将此添加到functions.php
:
/*******************************************
* TinyMCE EDITOR "Biographical Info" USER PROFILE
*******************************************/
function biographical_info_tinymce() {
if ( basename($_SERVER[\'PHP_SELF\']) == \'profile.php\' || basename($_SERVER[\'PHP_SELF\']) == \'user-edit.php\' && function_exists(\'wp_tiny_mce\') ) {
wp_admin_css();
wp_enqueue_script(\'utils\');
wp_enqueue_script(\'editor\');
do_action(\'admin_print_scripts\');
do_action(\'admin_print_styles-post-php\');
do_action(\'admin_print_styles\');
remove_all_filters(\'mce_external_plugins\');
add_filter( \'teeny_mce_before_init\',
create_function( \'$a\', \'
$a["theme"] = "advanced";
$a["skin"] = "wp_theme";
$a["height"] = "300";
$a["width"] = "440";
$a["onpageload"] = "";
$a["mode"] = "exact";
$a["elements"] = "description";
$a["theme_advanced_buttons1"] = "formatselect, forecolor, bold, italic, pastetext, pasteword, bullist, numlist, link, unlink, outdent, indent, charmap, removeformat, spellchecker, fullscreen, wp_adv";
$a["theme_advanced_buttons2"] = "underline, justifyleft, justifycenter, justifyright, justifyfull, forecolor, pastetext, undo, redo, charmap, wp_help";
$a["theme_advanced_blockformats"] = "p,h2,h3,h4,h5,h6";
$a["theme_advanced_disable"] = "strikethrough";
return $a;\' )
);
wp_tiny_mce( true );
}
}
add_action(\'admin_head\', \'biographical_info_tinymce\');
.有人应该为此赊账,但我不记得我在哪里找到的。。
无论如何,这对我来说很好