diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 835a2a5fef..b20126f53e 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -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';