function onaction_comment_close($post_id) { global $wpdb; $status = $wpdb->get_var("SELECT comment_status FROM {$wpdb->posts} WHERE ID = {$post_id}"); if ($status == 'open') { $lock = 0; } else { $lock = 1; } d3forum_topic_rock($post_id, $lock); }
function onaction_comment_close($post_id) { global $wpdb; $status = $wpdb->get_var("SELECT comment_status FROM $wpdb->posts WHERE ID = $post_id"); if ($status =='open') $lock = 0; else $lock = 1; d3forum_topic_rock($post_id,$lock); }