Ticket #21976: 21976.patch
File 21976.patch, 5.9 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-editor.php
167 167 self::$baseurl = includes_url('js/tinymce'); 168 168 self::$mce_locale = $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1 169 169 $no_captions = (bool) apply_filters( 'disable_captions', '' ); 170 $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );171 170 $first_run = true; 172 171 $ext_plugins = ''; 172 $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' ); 173 173 174 if ( $set['dfw'] ) 175 $plugins[] = 'wpfullscreen'; 176 174 177 if ( $set['teeny'] ) { 175 178 self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs'), $editor_id ); 176 179 } else { … … 254 257 $plugins = array_unique( apply_filters('tiny_mce_plugins', $plugins) ); 255 258 } 256 259 257 if ( $set['dfw'] )258 $plugins[] = 'wpfullscreen';259 260 260 self::$plugins = $plugins; 261 261 self::$ext_plugins = $ext_plugins; 262 262 … … 362 362 $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'separator', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id ); 363 363 $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array(); 364 364 } else { 365 $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'fullscreen', 'wp_adv' ), $editor_id); 365 $mce_buttons = array('bold', 'italic', 'strikethrough', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', '|', 'link', 'unlink', 'wp_more', '|', 'spellchecker', 'wp_adv' ); 366 367 if ( $set['dfw'] ) 368 array_splice($mce_buttons, -1, 0, 'wp_fullscreen'); 369 370 $mce_buttons = apply_filters('mce_buttons', $mce_buttons, $editor_id); 366 371 $mce_buttons_2 = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' ), $editor_id); 367 372 $mce_buttons_3 = apply_filters('mce_buttons_3', array(), $editor_id); 368 373 $mce_buttons_4 = apply_filters('mce_buttons_4', array(), $editor_id); … … 378 383 unset($set['tinymce']['body_class']); 379 384 } 380 385 381 if ( $set['dfw'] ) {382 // replace the first 'fullscreen' with 'wp_fullscreen'383 if ( ($key = array_search('fullscreen', $mce_buttons)) !== false )384 $mce_buttons[$key] = 'wp_fullscreen';385 elseif ( ($key = array_search('fullscreen', $mce_buttons_2)) !== false )386 $mce_buttons_2[$key] = 'wp_fullscreen';387 elseif ( ($key = array_search('fullscreen', $mce_buttons_3)) !== false )388 $mce_buttons_3[$key] = 'wp_fullscreen';389 elseif ( ($key = array_search('fullscreen', $mce_buttons_4)) !== false )390 $mce_buttons_4[$key] = 'wp_fullscreen';391 }392 393 386 $mceInit = array ( 394 387 'elements' => $editor_id, 395 388 'wpautop' => (bool) $set['wpautop'], -
wp-includes/js/tinymce/langs/wp-langs-en.js
170 170 unload_msg:"The changes you made will be lost if you navigate away from this page." 171 171 }, 172 172 fullscreen:{ 173 desc:"Toggle fullscreen mode (Alt + Shift + G)"173 desc:"Toggle fullscreen mode" 174 174 }, 175 175 media:{ 176 176 desc:"Insert / edit embedded media", -
wp-includes/js/tinymce/langs/wp-langs.php
207 207 ), 208 208 209 209 'fullscreen' => array( 210 'desc' => __('Toggle fullscreen mode (Alt + Shift + G)')210 'desc' => __('Toggle fullscreen mode') 211 211 ), 212 212 213 213 'media' => array( -
wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
272 272 ed.addShortcut(mod_key + '+p', 'wordpress.wp_page_desc', 'WP_Page'); 273 273 ed.addShortcut('ctrl+s', 'save_desc', function(){if('function'==typeof autosave)autosave();}); 274 274 275 if ( /\bwpfullscreen\b/.test(ed.settings.plugins) )275 if ( /\bwpfullscreen\b/.test(ed.settings.plugins) && ed.id != 'mce_fullscreen' ) 276 276 ed.addShortcut(mod_key + '+w', 'wordpress.wp_fullscreen_desc', 'wpFullScreen'); 277 else if ( /\bfullscreen\b/.test(ed.settings.plugins) )278 ed.addShortcut(mod_key + '+g', 'fullscreen.desc', 'mceFullScreen');279 277 280 278 // popup buttons for images and the gallery 281 279 ed.onInit.add(function(ed) { -
wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
94 94 }); 95 95 96 96 ed.addCommand('wpFullScreen', function() { 97 if ( typeof(fullscreen) == 'undefined' )97 if ( typeof(fullscreen) == 'undefined' || tinymce.get('mce_fullscreen') ) // don't open DFW if the TInyMCE fullscreen is currently open 98 98 return; 99 99 100 100 if ( 'wp_mce_fullscreen' == ed.id )