Changeset 11388
- Timestamp:
- 05/18/2009 08:29:26 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/cache-manifest.php
r11076 r11388 16 16 /** Set ABSPATH for execution */ 17 17 define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' ); 18 define( 'WPINC', 'wp-includes' );19 18 20 19 require(ABSPATH . '/wp-admin/includes/manifest.php'); 21 20 22 $man_version = ''; 23 24 $files = get_manifest($man_version); 25 26 $man_version = md5($man_version); 21 $files = get_manifest(); 27 22 28 23 header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); … … 32 27 header( 'Content-Type: text/cache-manifest; charset=UTF-8' ); 33 28 ?> 34 CACHE MANIFEST 35 # 36 # Version: <?php echo $man_version; ?> _2008071037 # 29 CACHE MANIFEST 30 # 31 # Version: <?php echo $man_version; ?> 32 # 38 33 <?php 39 34 foreach ( $files as $file ) { … … 43 38 // If ver is set but ignoreQuery is not, output file with ver tacked on 44 39 else 45 echo $file[0] . '? ver=' . $file[1] . "\n";40 echo $file[0] . '?' . $file[1] . "\n"; 46 41 } 47 42 -
trunk/wp-admin/gears-manifest.php
r11076 r11388 16 16 /** Set ABSPATH for execution */ 17 17 define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' ); 18 define( 'WPINC', 'wp-includes' );19 18 20 19 require(ABSPATH . '/wp-admin/includes/manifest.php'); 21 20 22 $man_version = ''; 23 24 $files = get_manifest($man_version); 25 26 $man_version = md5($man_version); 21 $files = get_manifest(); 27 22 28 23 header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); … … 34 29 { 35 30 "betaManifestVersion" : 1, 36 "version" : "<?php echo $man_version; ?> _20081201",31 "version" : "<?php echo $man_version; ?>", 37 32 "entries" : [ 38 33 <?php … … 45 40 // If ver is set but ignoreQuery is not, output file with ver tacked on 46 41 elseif ( !isset($file[2]) ) 47 $entries .= '{ "url" : "' . $file[0] . '? ver=' . $file[1] . '" },' . "\n";42 $entries .= '{ "url" : "' . $file[0] . '?' . $file[1] . '" },' . "\n"; 48 43 // Output url, src, and ignoreQuery 49 44 else 50 $entries .= '{ "url" : "' . $file[0] . '", "src" : "' . $file[0] . '? ver=' . $file[1] . '", "ignoreQuery" : true },' . "\n";45 $entries .= '{ "url" : "' . $file[0] . '", "src" : "' . $file[0] . '?' . $file[1] . '", "ignoreQuery" : true },' . "\n"; 51 46 } 52 47 -
trunk/wp-admin/includes/manifest.php
r11204 r11388 3 3 if ( !defined('ABSPATH') ) 4 4 exit; 5 /** 6 * @ignore 7 */ 8 function __() {} 9 10 /** 11 * @ignore 12 */ 13 function _c() {} 14 15 /** 16 * @ignore 17 */ 18 function _x() {} 19 20 21 /** 22 * @ignore 23 */ 24 function add_filter() {} 25 26 /** 27 * @ignore 28 */ 29 function esc_attr() {} 30 31 /** 32 * @ignore 33 */ 34 function attribute_escape() {} 35 36 /** 37 * @ignore 38 */ 39 function apply_filters() {} 40 41 /** 42 * @ignore 43 */ 44 function get_option() {} 45 46 /** 47 * @ignore 48 */ 49 function is_lighttpd_before_150() {} 50 51 /** 52 * @ignore 53 */ 54 function add_action() {} 55 56 /** 57 * @ignore 58 */ 59 function do_action_ref_array() {} 60 61 /** 62 * @ignore 63 */ 64 function get_bloginfo() {} 65 66 /** 67 * @ignore 68 */ 69 function is_admin() {return true;} 70 71 /** 72 * @ignore 73 */ 74 function site_url() {} 75 76 /** 77 * @ignore 78 */ 79 function admin_url() {} 80 81 /** 82 * @ignore 83 */ 84 function wp_guess_url() {} 85 86 require(ABSPATH . '/wp-includes/script-loader.php'); 87 require(ABSPATH . '/wp-includes/version.php'); 5 6 require(ABSPATH . 'wp-includes/version.php'); 7 8 $man_version = md5( $tinymce_version . $manifest_version ); 9 $mce_ver = "ver=$tinymce_version"; 88 10 89 11 /** … … 92 14 * Array format: file, version (optional), bool (whether to use src and set ignoreQuery) 93 15 */ 94 95 $wp_scripts = new WP_Scripts(); 96 wp_default_scripts($wp_scripts); 97 98 $wp_styles = new WP_Styles(); 99 wp_default_styles($wp_styles); 100 101 function &get_manifest(&$man_ver) { 102 global $wp_scripts, $wp_styles, $wp_version; 103 104 $files = array(); 105 foreach ( $wp_scripts->registered as $script ) { 106 if ( empty($script->src) ) continue; 107 $ver = empty($script->ver) ? $wp_version : $script->ver; 108 if ( 'editor' == $script->handle ) $mce_ver = $script->ver; 109 $src = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $script->src ); 110 $files[] = array($src, $ver); 111 $man_ver .= $ver; 112 } 113 114 foreach ( $wp_styles->registered as $style ) { 115 if ( empty($style->src) ) continue; 116 117 $ver = empty($style->ver) ? $wp_version : $style->ver; 118 $src = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $style->src ); 119 if ( 'colors' == $style->handle ) $src = 'css/colors-classic.css'; 120 $files[] = array($src, $ver); 121 $man_ver .= $ver; 122 123 if ( isset($style->extra['rtl']) && $style->extra['rtl'] ) { 124 if ( is_bool( $style->extra['rtl'] ) ) 125 $rtl_href = str_replace( '.css', '-rtl.css', $src ); 126 else 127 $rtl_href = str_replace( array( '/wp-admin/', '/wp-includes/' ), array( '', '../wp-includes/' ), $style->extra['rtl'] ); 128 129 $files[] = array($rtl_href, $ver); 130 $man_ver .= $ver; 131 } 132 } 133 134 $images = array( 16 function &get_manifest() { 17 global $mce_ver; 18 19 $files = array( 135 20 array('images/align-center.png'), 136 21 array('images/align-left.png'), … … 204 89 ); 205 90 206 $files = array_merge($files, $images);207 208 91 if ( @is_file('../wp-includes/js/tinymce/tiny_mce.js') ) : 209 92 $mce = array( 210 array('../wp-includes/js/tinymce/wp-tinymce.php', $mce_ver, true), 93 array('../wp-includes/js/tinymce/wp-tinymce.php', 'c=1&' . $mce_ver, true), 94 array('../wp-includes/js/tinymce/wp-tinymce.php', 'c=0&' . $mce_ver, true), 95 211 96 array('../wp-includes/js/tinymce/tiny_mce.js', $mce_ver, true), 212 97 array('../wp-includes/js/tinymce/langs/wp-langs-en.js', $mce_ver, true), -
trunk/wp-admin/includes/post.php
r11383 r11388 1152 1152 * Adds the TinyMCE editor used on the Write and Edit screens. 1153 1153 * 1154 * Has option to output a trimmed down version used in Press This.1155 *1156 1154 * @package WordPress 1157 1155 * @since 2.7 1156 * 1157 * TinyMCE is loaded separately from other Javascript by using wp-tinymce.php. It outputs concatenated 1158 * and optionaly pre-compressed version of the core and all default plugins. Additional plugins are loaded 1159 * directly by TinyMCE using non-blocking method. Custom plugins can be refreshed by adding a query string 1160 * to the URL when queueing them with the mce_external_plugins filter. 1161 * 1162 * @param bool $teeny optional Output a trimmed down version used in Press This. 1158 1163 */ 1159 1164 function wp_tiny_mce( $teeny = false ) { 1160 global $concatenate_scripts, $compress_scripts ;1165 global $concatenate_scripts, $compress_scripts, $tinymce_version; 1161 1166 1162 1167 if ( ! user_can_richedit() ) … … 1335 1340 $language = $initArray['language']; 1336 1341 $zip = $compress_scripts ? 1 : 0; 1337 $ver = apply_filters('tiny_mce_version', '323'); 1342 1343 /** 1344 * Deprecated 1345 * 1346 * The tiny_mce_version filter is not needed since external plugins are loaded directly by TinyMCE. 1347 * These plugins can be refreshed by appending query string to the URL passed to mce_external_plugins filter. 1348 * If the plugin has a popup dialog, a query string can be added to the button action that opens it (in the plugin's code). 1349 */ 1350 $version = apply_filters('tiny_mce_version', ''); 1351 $version = 'ver=' . $tinymce_version . $version; 1338 1352 1339 1353 if ( 'en' != $language ) … … 1351 1365 base : "<?php echo $baseurl; ?>", 1352 1366 suffix : "", 1353 query : " ver=<?php echo $ver; ?>",1367 query : "<?php echo $version; ?>", 1354 1368 mceInit : {<?php echo $mce_options; ?>}, 1355 1369 load_ext : function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');} … … 1360 1374 <?php 1361 1375 if ( $concatenate_scripts ) 1362 echo "<script type='text/javascript' src='$baseurl/wp-tinymce.php?c=$zip& ver=$ver'></script>\n";1376 echo "<script type='text/javascript' src='$baseurl/wp-tinymce.php?c=$zip&$version'></script>\n"; 1363 1377 else 1364 echo "<script type='text/javascript' src='$baseurl/tiny_mce.js? ver=$ver'></script>\n";1378 echo "<script type='text/javascript' src='$baseurl/tiny_mce.js?$version'></script>\n"; 1365 1379 1366 1380 if ( 'en' != $language && isset($lang) ) 1367 1381 echo "<script type='text/javascript'>\n$lang\n</script>\n"; 1368 1382 else 1369 echo "<script type='text/javascript' src='$baseurl/langs/wp-langs-en.js? ver=$ver'></script>\n";1383 echo "<script type='text/javascript' src='$baseurl/langs/wp-langs-en.js?$version'></script>\n"; 1370 1384 ?> 1371 1385 -
trunk/wp-includes/script-loader.php
r11378 r11388 9 9 * 10 10 * Several constants are used to manage the loading, concatenating and compression of scripts and CSS: 11 * define('SCRIPT_DEBUG', true); loads the devel ppment (non-minified) versions of all scripts12 * define('CONCATENATE_SCRIPTS', false); disables both compression and cancatenating,11 * define('SCRIPT_DEBUG', true); loads the development (non-minified) versions of all scripts and disables compression and concatenation 12 * define('CONCATENATE_SCRIPTS', false); disables compression and concatenation, 13 13 * define('COMPRESS_SCRIPTS', false); disables compression of scripts, 14 14 * define('COMPRESS_CSS', false); disables compression of CSS, … … 87 87 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); 88 88 89 // Modify this version when tinyMCE plugins are changed. 90 function mce_version() { 91 return '20090503'; 92 } 93 add_filter( 'tiny_mce_version', 'mce_version' ); 94 95 $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", false, mce_version() ); 89 $scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", false, '20090503' ); 96 90 97 91 $scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); -
trunk/wp-includes/version.php
r11383 r11388 18 18 $wp_db_version = 10851; 19 19 20 ?> 20 /** 21 * Holds the TinyMCE version 22 * 23 * @global string $tinymce_version 24 */ 25 $tinymce_version = '323'; 26 27 /** 28 * Holds the cache manifest version 29 * 30 * @global string $manifest_version 31 */ 32 $manifest_version = '20090517';
Note: See TracChangeset
for help on using the changeset viewer.