WordPress.org

Make WordPress Core

Ticket #20981: 20981.patch

File 20981.patch, 12.5 KB (added by azaozz, 22 months ago)
  • wp-admin/gears-manifest.php

     
    1 <?php 
    2 /** 
    3  * Defines the Gears manifest file for Google Gears offline storage. 
    4  * 
    5  * @package WordPress 
    6  * @subpackage Administration 
    7  */ 
    8  
    9 /** 
    10  * Disable error reporting 
    11  * 
    12  * Set this to error_reporting( E_ALL ) or error_reporting( E_ALL | E_STRICT ) for debugging 
    13  */ 
    14 error_reporting(0); 
    15  
    16 /** Set ABSPATH for execution */ 
    17 define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' ); 
    18  
    19 require(ABSPATH . '/wp-admin/includes/manifest.php'); 
    20  
    21 $files = get_manifest(); 
    22  
    23 header( 'Expires: Wed, 11 Jan 1984 05:00:00 GMT' ); 
    24 header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); 
    25 header( 'Cache-Control: no-cache, must-revalidate, max-age=0' ); 
    26 header( 'Pragma: no-cache' ); 
    27 header( 'Content-Type: application/x-javascript; charset=UTF-8' ); 
    28 ?> 
    29 { 
    30 "betaManifestVersion" : 1, 
    31 "version" : "<?php echo $man_version; ?>", 
    32 "entries" : [ 
    33 <?php 
    34 $entries = ''; 
    35  
    36 foreach ( $files as $file ) { 
    37         // Set ignoreQuery, defaulting to true 
    38         $ignore_query = ( isset($file[2]) && !$file[2] ) ? '' : ', "ignoreQuery" : true '; 
    39  
    40         // If version is not set, just output the file 
    41         if ( !isset($file[1]) ) 
    42                 $entries .= '{ "url" : "' . $file[0] . '"' . $ignore_query . ' }' . "\n"; 
    43         // Output url and src 
    44         else 
    45                 $entries .= '{ "url" : "' . $file[0] . '", "src" : "' . $file[0] . '?' . $file[1] . '"' . $ignore_query . ' },' . "\n"; 
    46 } 
    47  
    48 echo trim( trim($entries), ',' ); 
    49 ?> 
    50  
    51 ]} 
  • wp-admin/includes/manifest.php

     
    1 <?php 
    2  
    3 if ( !defined('ABSPATH') ) 
    4         exit; 
    5  
    6 require(ABSPATH . 'wp-includes/version.php'); 
    7  
    8 $man_version = md5( $tinymce_version . $manifest_version ); 
    9 $mce_ver = "ver=$tinymce_version"; 
    10  
    11 /** 
    12  * Retrieve list of all cacheable WP files 
    13  * 
    14  * Array format: file, version (optional), bool (whether to use src and set ignoreQuery, defaults to true) 
    15  */ 
    16 function &get_manifest() { 
    17         global $mce_ver; 
    18  
    19         $files = array( 
    20                 array('images/align-center.png'), 
    21                 array('images/align-left.png'), 
    22                 array('images/align-none.png'), 
    23                 array('images/align-right.png'), 
    24                 array('images/archive-link.png'), 
    25                 array('images/blue-grad.png'), 
    26                 array('images/bubble_bg.gif'), 
    27                 array('images/bubble_bg-rtl.gif'), 
    28                 array('images/button-grad.png'), 
    29                 array('images/button-grad-active.png'), 
    30                 array('images/comment-grey-bubble.png'), 
    31                 array('images/date-button.gif'), 
    32                 array('images/ed-bg.gif'), 
    33                 array('images/fade-butt.png'), 
    34                 array('images/fav.png'), 
    35                 array('images/fav-arrow.gif'), 
    36                 array('images/fav-arrow-rtl.gif'), 
    37                 array('images/generic.png'), 
    38                 array('images/gray-grad.png'), 
    39                 array('images/icons32.png'), 
    40                 array('images/icons32-vs.png'), 
    41                 array('images/list.png'), 
    42                 array('images/wpspin_light.gif'), 
    43                 array('images/wpspin_dark.gif'), 
    44                 array('images/logo.gif'), 
    45                 array('images/logo-ghost.png'), 
    46                 array('images/media-button-image.gif'), 
    47                 array('images/media-button-music.gif'), 
    48                 array('images/media-button-other.gif'), 
    49                 array('images/media-button-video.gif'), 
    50                 array('images/menu.png'), 
    51                 array('images/menu-vs.png'), 
    52                 array('images/menu-arrows.gif'), 
    53                 array('images/menu-bits.gif'), 
    54                 array('images/menu-bits-rtl.gif'), 
    55                 array('images/menu-dark.gif'), 
    56                 array('images/menu-dark-rtl.gif'), 
    57                 array('images/no.png'), 
    58                 array('images/required.gif'), 
    59                 array('images/resize.gif'), 
    60                 array('images/screen-options-right.gif'), 
    61                 array('images/screen-options-right-up.gif'), 
    62                 array('images/se.png'), 
    63                 array('images/star.gif'), 
    64                 array('images/toggle-arrow.gif'), 
    65                 array('images/toggle-arrow-rtl.gif'), 
    66                 array('images/white-grad.png'), 
    67                 array('images/white-grad-active.png'), 
    68                 array('images/wordpress-logo.png'), 
    69                 array('images/wp-logo.png'), 
    70                 array('images/xit.gif'), 
    71                 array('images/yes.png'), 
    72                 array('../wp-includes/images/crystal/archive.png'), 
    73                 array('../wp-includes/images/crystal/audio.png'), 
    74                 array('../wp-includes/images/crystal/code.png'), 
    75                 array('../wp-includes/images/crystal/default.png'), 
    76                 array('../wp-includes/images/crystal/document.png'), 
    77                 array('../wp-includes/images/crystal/interactive.png'), 
    78                 array('../wp-includes/images/crystal/text.png'), 
    79                 array('../wp-includes/images/crystal/video.png'), 
    80                 array('../wp-includes/images/crystal/spreadsheet.png'), 
    81                 array('../wp-includes/images/rss.png'), 
    82                 array('../wp-includes/images/blank.gif'), 
    83                 array('../wp-includes/images/upload.png'), 
    84                 array('../wp-includes/js/thickbox/loadingAnimation.gif'), 
    85                 array('../wp-includes/js/thickbox/tb-close.png'), 
    86         ); 
    87  
    88         if ( @is_file('../wp-includes/js/tinymce/tiny_mce.js') ) : 
    89         $mce = array( 
    90                 array('../wp-includes/js/tinymce/wp-tinymce.php', $mce_ver), 
    91  
    92                 array('../wp-includes/js/tinymce/tiny_mce.js', $mce_ver), 
    93                 array('../wp-includes/js/tinymce/langs/wp-langs-en.js', $mce_ver), 
    94                 array('../wp-includes/js/tinymce/utils/mctabs.js', $mce_ver), 
    95                 array('../wp-includes/js/tinymce/utils/validate.js', $mce_ver), 
    96                 array('../wp-includes/js/tinymce/utils/form_utils.js', $mce_ver), 
    97                 array('../wp-includes/js/tinymce/utils/editable_selects.js', $mce_ver), 
    98                 array('../wp-includes/js/tinymce/tiny_mce_popup.js', $mce_ver), 
    99  
    100                 array('../wp-includes/js/tinymce/themes/advanced/editor_template.js', $mce_ver), 
    101                 array('../wp-includes/js/tinymce/themes/advanced/source_editor.htm', $mce_ver), 
    102                 array('../wp-includes/js/tinymce/themes/advanced/anchor.htm', $mce_ver), 
    103                 array('../wp-includes/js/tinymce/themes/advanced/image.htm', $mce_ver), 
    104                 array('../wp-includes/js/tinymce/themes/advanced/link.htm', $mce_ver), 
    105                 array('../wp-includes/js/tinymce/themes/advanced/color_picker.htm', $mce_ver), 
    106                 array('../wp-includes/js/tinymce/themes/advanced/charmap.htm', $mce_ver), 
    107                 array('../wp-includes/js/tinymce/themes/advanced/js/color_picker.js', $mce_ver), 
    108                 array('../wp-includes/js/tinymce/themes/advanced/js/charmap.js', $mce_ver), 
    109                 array('../wp-includes/js/tinymce/themes/advanced/js/image.js', $mce_ver), 
    110                 array('../wp-includes/js/tinymce/themes/advanced/js/link.js', $mce_ver), 
    111                 array('../wp-includes/js/tinymce/themes/advanced/js/source_editor.js', $mce_ver), 
    112                 array('../wp-includes/js/tinymce/themes/advanced/js/anchor.js', $mce_ver), 
    113                 array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css', $mce_ver), 
    114                 array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css', $mce_ver), 
    115                 array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css', $mce_ver), 
    116  
    117                 array('../wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js', $mce_ver), 
    118                 array('../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm', $mce_ver), 
    119  
    120                 array('../wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js', $mce_ver), 
    121                 array('../wp-includes/js/tinymce/plugins/inlinepopups/template.htm', $mce_ver), 
    122                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css', $mce_ver), 
    123  
    124                 array('../wp-includes/js/tinymce/plugins/media/editor_plugin.js', $mce_ver), 
    125                 array('../wp-includes/js/tinymce/plugins/media/js/media.js', $mce_ver), 
    126                 array('../wp-includes/js/tinymce/plugins/media/media.htm', $mce_ver), 
    127                 array('../wp-includes/js/tinymce/plugins/media/css/content.css', $mce_ver), 
    128                 array('../wp-includes/js/tinymce/plugins/media/css/media.css', $mce_ver), 
    129  
    130                 array('../wp-includes/js/tinymce/plugins/paste/editor_plugin.js', $mce_ver), 
    131                 array('../wp-includes/js/tinymce/plugins/paste/js/pasteword.js', $mce_ver), 
    132                 array('../wp-includes/js/tinymce/plugins/paste/js/pastetext.js', $mce_ver), 
    133                 array('../wp-includes/js/tinymce/plugins/paste/pasteword.htm', $mce_ver), 
    134                 array('../wp-includes/js/tinymce/plugins/paste/blank.htm', $mce_ver), 
    135                 array('../wp-includes/js/tinymce/plugins/paste/pastetext.htm', $mce_ver), 
    136  
    137                 array('../wp-includes/js/tinymce/plugins/safari/editor_plugin.js', $mce_ver), 
    138  
    139                 array('../wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js', $mce_ver), 
    140                 array('../wp-includes/js/tinymce/plugins/spellchecker/css/content.css', $mce_ver), 
    141  
    142                 array('../wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js', $mce_ver), 
    143  
    144                 array('../wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js', $mce_ver), 
    145                 array('../wp-includes/js/tinymce/plugins/wordpress/css/content.css', $mce_ver), 
    146  
    147                 array('../wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js', $mce_ver), 
    148                 array('../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html', $mce_ver), 
    149                 array('../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js', $mce_ver), 
    150                 array('../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css', $mce_ver), 
    151                 array('../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css', $mce_ver), 
    152  
    153                 array('../wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js', $mce_ver), 
    154  
    155                 array('../wp-includes/js/tinymce/themes/advanced/img/icons.gif'), 
    156                 array('../wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg'), 
    157                 array('../wp-includes/js/tinymce/themes/advanced/img/fm.gif'), 
    158                 array('../wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png'), 
    159                 array('../wp-includes/js/tinymce/themes/advanced/img/sflogo.png'), 
    160                 array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png'), 
    161                 array('../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif'), 
    162                 array('../wp-includes/images/down_arrow.gif'), 
    163                 array('../wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif'), 
    164                 array('../wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif'), 
    165                 array('../wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif'), 
    166                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif'), 
    167                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif'), 
    168                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif'), 
    169                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif'), 
    170                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif'), 
    171                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif'), 
    172                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif'), 
    173                 array('../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif'), 
    174                 array('../wp-includes/js/tinymce/plugins/media/img/flash.gif'), 
    175                 array('../wp-includes/js/tinymce/plugins/media/img/quicktime.gif'), 
    176                 array('../wp-includes/js/tinymce/plugins/media/img/realmedia.gif'), 
    177                 array('../wp-includes/js/tinymce/plugins/media/img/shockwave.gif'), 
    178                 array('../wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif'), 
    179                 array('../wp-includes/js/tinymce/plugins/media/img/trans.gif'), 
    180                 array('../wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif'), 
    181                 array('../wp-includes/js/tinymce/plugins/wordpress/img/more.gif'), 
    182                 array('../wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif'), 
    183                 array('../wp-includes/js/tinymce/plugins/wordpress/img/page.gif'), 
    184                 array('../wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif'), 
    185                 array('../wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif'), 
    186                 array('../wp-includes/js/tinymce/plugins/wordpress/img/help.gif'), 
    187                 array('../wp-includes/js/tinymce/plugins/wordpress/img/image.gif'), 
    188                 array('../wp-includes/js/tinymce/plugins/wordpress/img/media.gif'), 
    189                 array('../wp-includes/js/tinymce/plugins/wordpress/img/video.gif'), 
    190                 array('../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif'), 
    191                 array('../wp-includes/js/tinymce/plugins/wpeditimage/img/image.png'), 
    192                 array('../wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png'), 
    193                 array('../wp-includes/js/tinymce/plugins/wpgallery/img/delete.png'), 
    194                 array('../wp-includes/js/tinymce/plugins/wpgallery/img/edit.png'), 
    195                 array('../wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png') 
    196         ); 
    197         $files = array_merge($files, $mce); 
    198         endif; 
    199  
    200         return $files; 
    201 } 
  • wp-admin/includes/update-core.php

     
    395395'wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js', 
    396396// Don't delete, yet: 'wp-pass.php', 
    397397// Don't delete, yet: 'wp-register.php', 
     398// 3.5 
     399'wp-admin/gears-manifest.php', 
     400'wp-admin/includes/manifest.php', 
    398401); 
    399402 
    400403/**