admin管理员组

文章数量:1277896

I've build myself a custom page template. Within this template I'm using the wp_editor() function. Sadly, when I logout now from my wp site and go now to the page I want to see, I'm getting an error in my console:

Uncaught ReferenceError: tinymce is not defined

When I log back in, everything works quite fine. I've also tried to enqueue the editor script if a user isn't logged in this way:

if ( ! is_user_logged_in() ) {
    wp_enqueue_script( 'wp-tinymce' );
}

But this don't solved my issue. I've cleaned the cache every time and restarted the server.

So does anyone has an idea how I can get the wp_editor() function runnning with non-logged-in users?

本文标签: phpUsing wpeditor() when not logged stopped working