mirror of
git://develop.git.wordpress.org/
synced 2025-03-19 03:19:48 +01:00
TinyMCE: remove and rearrange some of the editor buttons to improve user experience.
Props hugobaeta, melchoyce, celloexpressions, mor10, iseulde, mrwweb. See #27159. git-svn-id: https://develop.svn.wordpress.org/trunk@38932 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5de6c7927d
commit
7f8003e6ea
@ -554,6 +554,16 @@ final class _WP_Editors {
|
||||
// Limit the preview styles in the menu/toolbar
|
||||
'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform',
|
||||
|
||||
// Disable H1 in the drop-down and the menu.
|
||||
'block_formats' =>
|
||||
'Paragraph=p;' .
|
||||
'Heading 2=h2;' .
|
||||
'Heading 3=h3;' .
|
||||
'Heading 4=h4;' .
|
||||
'Heading 5=h5;' .
|
||||
'Heading 6=h6;' .
|
||||
'Preformatted=pre',
|
||||
|
||||
'end_container_on_empty_block' => true,
|
||||
'wpeditimage_disable_captions' => $no_captions,
|
||||
'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ),
|
||||
@ -609,7 +619,7 @@ final class _WP_Editors {
|
||||
$mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id );
|
||||
$mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
|
||||
} else {
|
||||
$mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
|
||||
$mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
|
||||
|
||||
if ( ! wp_is_mobile() ) {
|
||||
if ( $set['_content_editor_dfw'] ) {
|
||||
@ -631,7 +641,7 @@ final class _WP_Editors {
|
||||
*/
|
||||
$mce_buttons = apply_filters( 'mce_buttons', $mce_buttons, $editor_id );
|
||||
|
||||
$mce_buttons_2 = array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
|
||||
$mce_buttons_2 = array( 'strikethrough', 'hr', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo' );
|
||||
|
||||
if ( ! wp_is_mobile() ) {
|
||||
$mce_buttons_2[] = 'wp_help';
|
||||
|
Loading…
x
Reference in New Issue
Block a user