Apparently, a lot of us have been using wp_editor incorrectly and didn’t even know it. As of the WordPress version 3.9, you will receive an error if you are still using it this way:
The actual method is to place your field id in the textarea_name
argument in the settings paramenter, like this:
It’s an easy fix, one that I’ve already seen a few plugins make since WordPress 3.9 was released. See the codex for more information on using wp_editor()
.
Update February 26, 2015: The code above originally showed the error using the Widget API get_field_id()
, I’ve updated this to show how it might be used in/correctly elsewhere in WordPress.
Bao says
Hi you.
I have a custom wp_editor
in wp 3.8 it run very good
but after i update wp 3.9
it was error.
Pls help me
wp_editor( '', 'comment', array(
'media_buttons' => false,
'textarea_rows' => '3',
'tinymce' => array(
'plugins' => 'inlinepopups, wordpress, wplink, wpdialogs',
'theme_advanced_buttons1' => 'bold, italic, underline, strikethrough, forecolor, separator, bullist, numlist, separator, link, unlink, image','theme_advanced_buttons2' => ''),
'quicktags' => array('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close')
)
);
Joshua Nelson says
Bao,
I would suggest you reach out to the WordPress Support forums. I don’t think you’re getting the same error that I am talking about in this post. I’d have to see the warning itself to know.
Also, please post your code in a gist, linked into your comment.
Best of luck,
Joshua