diff --git a/wp-includes/post.php b/wp-includes/post.php index 90077076b4..af34198903 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -716,6 +716,8 @@ function wp_update_post($postarr = array()) { } function wp_publish_post($post_id) { + global $wpdb; + $post = get_post($post_id); if ( empty($post) )