Fatal error: Call to undefined Funktion is_user_logged_in()

Ich entwickle ein WordPress-Plugin. Während der Verwendung (wp_insert_post) bekam ich diese Fehlermeldung:

Fatal error: Call to undefined function is_user_logged_in() in /home/designs/public_html/WP/wp-includes/post.php on line 2185

Hier ist die Datei auf pastebin: http://pastebin.com/YETGT4dK Diese Datei enthalten ist, in den Haupt-plugin-Datei.

Danke !


Den entsprechenden Abschnitt der pastebin ist

if(isset($_POST['save_coupons']) and $_POST['save_coupons']=='yes'){


    //lots of stuff

    /*
     * Inserting New Coupon as Post
    */
    $post = array();
    $post['post_status']   = 'publish';
    $post['post_type']     = 'coupons';
    $post['post_title']    = $title;
    $post['post_content']  = $description;

    $post_id = wp_insert_post( $post );

    //lots more stuff


}//endif
  • Siehe ab Zeile 93.
InformationsquelleAutor Rizwan | 2014-05-09
Schreibe einen Kommentar