WP Editor не работает на внешнем интерфейсе в WordPress

Я пытаюсь встроить wp-редактор в интерфейс, но он не работает после обновления WordPress 4.5, последняя версия,

$settings = array(
'wpautop' => true,
'postContent' => 'content',
'media_buttons' => false,
'tinymce' => array(
'theme_advanced_buttons1' => 'bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,justifyleft,justifycenter,justifyright,undo,redo,link,unlink,fullscreen',

'theme_advanced_buttons2' => 'pastetext,pasteword,removeformat,|,charmap,|,outdent,indent,|,undo,redo',

'theme_advanced_buttons3' => '',

'theme_advanced_buttons4' => ''
),

'quicktags' => array(
'buttons' => 'b,i,ul,ol,li,link,close'
)
);
wp_editor( $postContent, 'postContent', $settings );

Выходные данные

1

Решение

Я запустил тикет об ошибке на WordPress.org по адресу: https://core.trac.wordpress.org/ticket/36802

Пожалуйста, добавьте любую дополнительную информацию, которая может у вас быть к этому билету.

0

Другие решения

Я думаю, что вы должны определить поле ‘textarea_name’ в ваших esttings
ниже приведены все настройки, необходимые для функции wp_editor
wp_editor ($ content, $ editor_id, $ settings = array ());

// default settings
$settings = array(
'wpautop' => true, // use wpautop?
'media_buttons' => true, // show insert/upload button(s)
'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."'tabindex' => '',
'editor_css' => '', // intended for extra styles for both visual and HTML editors buttons, needs to include the <style> tags, can use "scoped".
'editor_class' => '', // add extra class(es) to the editor textarea
'teeny' => false, // output the minimal editor config used in Press This
'dfw' => false, // replace the default fullscreen with DFW (supported on the front-end in WordPress 3.4)
'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
);
0

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector