wp_insert_post error in plugin after updating to WP 3.9
-
After I upgraded to WP 3.9, one of my plugins generated the following error:
Fatal error: Call to undefined function is_user_logged_in() in /home/realizar/public_html/wp-includes/post.php on line 2185
After some reserch, I found out that the error is caused by the wp_insert_post:
I read the manual, but I cannot find out what I’m doing wrong. Here is the code I use:
$newPost = array( 'post_title' => $articleTitle, 'post_content' => $articleText, 'post_status' => $post_status ); wp_insert_post($newPost, true);
Thanks for any advice!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_insert_post error in plugin after updating to WP 3.9’ is closed to new replies.