Метка: wp
Добавить дополнительный Едитор, редактор текста в WP

Коротко и по делу, времени много нету писать три километра текста.
Вообщем бывает надо добавить доп едитор для записей и тп.
add_meta_box( 'compositionEditor', __( 'Product short description'), 'composition_editor', 'product', 'normal' ); function composition_editor() { $settings = array( 'textarea_name' => 'excerpt', 'quicktags' => array( 'buttons' => 'em,strong,link' ), 'tinymce' => array( 'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,bullist,numlist,separator,blockquote,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator', 'theme_advanced_buttons2' => '', ), 'editor_css' => '<style>#wp-excerpt-editor-container .wp-editor-area{height:175px; width:100%;}</style>', ); wp_editor( htmlspecialchars_decode( $post->post_excerpt, ENT_QUOTES ), 'excerpt', apply_filters( 'woocommerce_product_short_description_editor_settings', $settings ) ); }
Кто понял тот понял, кто не понял тому не дано понять, а это значить что прогерство не ваше дело, идите гуляйте и не портите прогерский рынок.