// 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;
}
'wordpress',
'wpautoresize',
'wpeditimage',
+ 'wpemoji',
'wpgallery',
'wplink',
'wpdialogs',
],
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,
// 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 ),
*/
$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).
*
* @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).
$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');
?>
<div id="wp-fullscreen-body" class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>" data-theme-width="<?php echo (int) $width; ?>" data-dfw-width="<?php echo (int) $dfw_width; ?>">
<div id="wp-fullscreen-save">
<input type="button" class="button button-primary right" value="<?php echo $save; ?>" onclick="wp.editor.fullscreen.save();" />
- <span class="wp-fullscreen-saved-message"><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
+ <span class="wp-fullscreen-saved-message"><?php if ( $post && $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span>
<span class="wp-fullscreen-error-message"><?php _e('Save failed.'); ?></span>
<span class="spinner"></span>
</div>
<div id="link-options">
<p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
<div>
- <label><span><?php _e( 'URL' ); ?></span><input id="url-field" type="text" name="href" /></label>
+ <label><span><?php _e( 'URL' ); ?></span><input id="wp-link-url" type="text" /></label>
</div>
- <div>
- <label><span><?php _e( 'Title' ); ?></span><input id="link-title-field" type="text" name="linktitle" /></label>
+ <div class="wp-link-text-field">
+ <label><span><?php _e( 'Link Text' ); ?></span><input id="wp-link-text" type="text" /></label>
</div>
<div class="link-target">
- <label><span> </span><input type="checkbox" id="link-target-checkbox" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
+ <label><span> </span><input type="checkbox" id="wp-link-target" /> <?php _e( 'Open link in a new window/tab' ); ?></label>
</div>
</div>
<p class="howto"><a href="#" id="wp-link-search-toggle"><?php _e( 'Or link to existing content' ); ?></a></p>
<div class="link-search-wrapper">
<label>
<span class="search-label"><?php _e( 'Search' ); ?></span>
- <input type="search" id="search-field" class="link-search-field" autocomplete="off" />
+ <input type="search" id="wp-link-search" class="link-search-field" autocomplete="off" />
<span class="spinner"></span>
</label>
</div>