* @type int $textarea_rows Number rows in the editor textarea. Default 20.
* @type string|int $tabindex Tabindex value to use. Default empty.
* @type string $tabfocus_elements The previous and next element ID to move the focus to
- * when pressing the Tab key in TinyMCE. Defualt ':prev,:next'.
+ * when pressing the Tab key in TinyMCE. Default ':prev,:next'.
* @type string $editor_css Intended for extra styles for both Visual and Text editors.
* Should include `<style>` tags, and can use "scoped". Default empty.
- * @type string $editor_class Extra classes to add to the editor textarea elemen. Default empty.
+ * @type string $editor_class Extra classes to add to the editor textarea element. Default empty.
* @type bool $teeny Whether to output the minimal editor config. Examples include
* Press This and the Comment editor. Default false.
* @type bool $dfw Deprecated in 4.1. Since 4.3 used only to enqueue wp-fullscreen-stub.js for backwards compatibility.
$editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"';
$tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
$default_editor = 'html';
- $toolbar = $buttons = $autocomplete = '';
+ $buttons = $autocomplete = '';
$editor_id_attr = esc_attr( $editor_id );
if ( $set['drag_drop_upload'] ) {
public static function editor_settings($editor_id, $set) {
global $wp_version, $tinymce_version;
- $first_run = false;
-
if ( empty(self::$first_init) ) {
if ( is_admin() ) {
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'editor_js' ), 50 );
/** This filter is documented in wp-admin/includes/media.php */
$no_captions = (bool) apply_filters( 'disable_captions', '' );
- $first_run = true;
$ext_plugins = '';
if ( $set['teeny'] ) {
'wplink',
'wpdialogs',
'wptextpattern',
- 'wpview'
+ 'wpview',
+ 'wpembed',
);
if ( ! self::$has_medialib ) {
'wpeditimage_disable_captions' => $no_captions,
'wpeditimage_html5_captions' => current_theme_supports( 'html5', 'caption' ),
'plugins' => implode( ',', $plugins ),
+ 'wp_lang_attr' => get_bloginfo( 'language' )
);
if ( ! empty( $mce_external_plugins ) ) {
*
* @since 2.1.0
*
- * @param array $stylesheets Comma-delimited list of stylesheets.
+ * @param string $stylesheets Comma-delimited list of stylesheets.
*/
$mce_css = trim( apply_filters( 'mce_css', implode( ',', $mce_css ) ), ' ,' );
} else {
$mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' );
- if ( $set['_content_editor_dfw'] ) {
- $mce_buttons[] = 'dfw';
- } else {
- $mce_buttons[] = 'fullscreen';
+ if ( ! wp_is_mobile() ) {
+ if ( $set['_content_editor_dfw'] ) {
+ $mce_buttons[] = 'dfw';
+ } else {
+ $mce_buttons[] = 'fullscreen';
+ }
}
$mce_buttons[] = 'wp_adv';
'Color' => __( 'Color' ),
'Custom color' => __( 'Custom color' ),
- 'Custom...' => _x( 'Custom...', 'label for custom color' ),
+ 'Custom...' => _x( 'Custom...', 'label for custom color' ), // no ellipsis
'No color' => __( 'No color' ),
// Spelling, search/replace plugins
'Toolbar Toggle' => __( 'Toolbar Toggle' ),
'Insert Read More tag' => __( 'Insert Read More tag' ),
'Insert Page Break tag' => __( 'Insert Page Break tag' ),
- 'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor
+ 'Read more...' => __( 'Read more...' ), // Title on the placeholder inside the editor (no ellipsis)
'Distraction-free writing mode' => __( 'Distraction-free writing mode' ),
'No alignment' => __( 'No alignment' ), // Tooltip for the 'alignnone' button in the image toolbar
'Remove' => __( 'Remove' ), // Tooltip for the 'remove' button in the image toolbar
<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="wp-link-target" /> <?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 tab' ); ?></label>
</div>
</div>
<p class="howto"><a href="#" id="wp-link-search-toggle"><?php _e( 'Or link to existing content' ); ?></a></p>