} if (!$ajax) { wp_redirect(get_bloginfo('wpurl') . '/wp-admin/edit.php'); } break; case 'sync_bridge_thread': require_once 'inc/include_wp.php'; $post = wordbb_get_arg('post'); if (!isset($post)) { die; } $nonce = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce, 'wordbb_sync_bridge_thread_' . $post)) { die; } wordbb_bridge_wp_post($post); if (!$ajax) { wp_redirect(get_bloginfo('wpurl') . '/wp-admin/edit.php'); } exit("true"); break; case 'delete_bridge_thread': require_once 'inc/include_wp.php'; $post = wordbb_get_arg('post'); if (!isset($post)) { die; } $nonce = $_REQUEST['_wpnonce']; if (!wp_verify_nonce($nonce, 'wordbb_delete_bridge_thread_' . $post)) { die; }
function wordbb_publish_post($id) { global $wordbb; if (get_option('wordbb_create_thread') != "on") { return; } wordbb_bridge_wp_post($id); }