X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/88550bc3400cc7c035ff590ecb007c7938041ded..8ab4a4532479e8db471032b51042ec8c4716d091:/wp-includes/class-wp-editor.php?ds=sidebyside diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 6148583d..ae026215 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -354,6 +354,7 @@ final class _WP_Editors { 'wordpress', 'wpautoresize', 'wpeditimage', + 'wpemoji', 'wpgallery', 'wplink', 'wpdialogs', @@ -484,15 +485,6 @@ final class _WP_Editors { ], strikethrough: {inline: 'del'} }", - 'block_formats' => - 'Paragraph=p;' . - 'Pre=pre;' . - 'Heading 1=h1;' . - 'Heading 2=h2;' . - 'Heading 3=h3;' . - 'Heading 4=h4;' . - 'Heading 5=h5;' . - 'Heading 6=h6', 'relative_urls' => false, 'remove_script_host' => false, 'convert_urls' => false, @@ -506,6 +498,7 @@ 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', + 'end_container_on_empty_block' => true, 'wpeditimage_disable_captions' => $no_captions, 'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ), 'plugins' => implode( ',', $plugins ), @@ -578,6 +571,12 @@ 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' ); + + if ( ! wp_is_mobile() ) { + $mce_buttons_2[] = 'wp_help'; + } + /** * Filter the second-row list of TinyMCE buttons (Visual tab). * @@ -586,7 +585,7 @@ final class _WP_Editors { * @param array $buttons Second-row list of buttons. * @param string $editor_id Unique editor identifier, e.g. 'content'. */ - $mce_buttons_2 = apply_filters( 'mce_buttons_2', array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id ); + $mce_buttons_2 = apply_filters( 'mce_buttons_2', $mce_buttons_2, $editor_id ); /** * Filter the third-row list of TinyMCE buttons (Visual tab). @@ -1245,7 +1244,7 @@ final class _WP_Editors { $width = isset( $content_width ) && 800 > $content_width ? $content_width : 800; $width = $width + 22; // compensate for the padding and border $dfw_width = get_user_setting( 'dfw_width', $width ); - $save = isset( $post->post_status ) && $post->post_status == 'publish' ? __('Update') : __('Save'); + $save = $post && $post->post_status == 'publish' ? __('Update') : __('Save'); ?>
@@ -1310,7 +1309,7 @@ final class _WP_Editors {
- post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?> + post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?>
@@ -1442,13 +1441,13 @@ final class _WP_Editors {