X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..8ab4a4532479e8db471032b51042ec8c4716d091:/wp-includes/class-wp-editor.php diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 521c0ee6..ae026215 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -117,12 +117,6 @@ final class _WP_Editors { // A cookie (set when a user resizes the editor) overrides the height. $cookie = (int) get_user_setting( 'ed_size' ); - // Upgrade an old TinyMCE cookie if it is still around, and the new one isn't. - if ( ! $cookie && isset( $_COOKIE['TinyMCE_content_size'] ) ) { - parse_str( $_COOKIE['TinyMCE_content_size'], $cookie ); - $cookie = $cookie['ch']; - } - if ( $cookie ) $set['editor_height'] = $cookie; } @@ -360,6 +354,7 @@ final class _WP_Editors { 'wordpress', 'wpautoresize', 'wpeditimage', + 'wpemoji', 'wpgallery', 'wplink', 'wpdialogs', @@ -490,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, @@ -512,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 ), @@ -584,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). * @@ -592,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). @@ -1251,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'); ?>
@@ -1316,7 +1309,7 @@ final class _WP_Editors {
- post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?> + post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?>
@@ -1448,13 +1441,13 @@ final class _WP_Editors {