0
做我加了一些领域的wordpress commments并添加以下代码保存:我怎么能确定mysql的语句susseccfully在WordPress
add_action ('comment_post', 'add_comment_bid_values', 1);
function add_comment_bid_values($comment_id) {
if(isset($_POST['bidprice'])) {
$bidprice = wp_filter_nohtml_kses($_POST['bidprice']);
add_comment_meta($comment_id, 'bidprice', $bidprice, false);
}
if(isset($_POST['bidday'])) {
$bidday = wp_filter_nohtml_kses($_POST['bidday']);
add_comment_meta($comment_id, 'bidday', $bidday, false);
}
if(isset($_POST['bidprepay'])) {
$bidprepay = wp_filter_nohtml_kses($_POST['bidprepay']);
add_comment_meta($comment_id, 'bidprepay', $bidprepay, false);
}
if(isset($_POST['bidsponsor'])) {
$bidsponsor = wp_filter_nohtml_kses($_POST['bidsponsor']);
add_comment_meta($comment_id, 'bidsponsor', $bidsponsor, false);
}
if(isset($_POST['bidfetured'])) {
$bidfetured = wp_filter_nohtml_kses($_POST['bidfetured']);
add_comment_meta($comment_id, 'bidfetured', $bidfetured, false);
}
}
现在
我怎么能肯定评论,它的元插入wordpress数据库,因为通过comment_form函数保存了一些信息,这个meta保存在上面的代码中,而且wordpress没有事务。
感谢