Ticket #14179: 23318-upgrade-header.diff
File 23318-upgrade-header.diff, 3.4 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/plugin.php
32 32 * Network: Optional. Specify "Network: true" to require that a plugin is activated 33 33 * across all sites in an installation. This will prevent a plugin from being 34 34 * activated on a single site when Multisite is enabled. 35 * Upgrade: Optional. Specify "Upgrade: false" to exclude plugin from checking for updates. 35 36 * * / # Remove the space to close comment 36 37 * </code> 37 38 * … … 47 48 * 'TextDomain' - Plugin's text domain for localization. 48 49 * 'DomainPath' - Plugin's relative directory path to .mo files. 49 50 * 'Network' - Boolean. Whether the plugin can only be activated network wide. 51 * 'Upgrade' - Boolean. Whether the plugin should be checked for updates on api.wordpress.org/plugins/update-check/ 50 52 * 51 53 * Some users have issues with opening large files and manipulating the contents 52 54 * for want is usually the first 1kiB or 2kiB. This function stops pulling in … … 81 83 'TextDomain' => 'Text Domain', 82 84 'DomainPath' => 'Domain Path', 83 85 'Network' => 'Network', 86 'Upgrade' => 'Upgrade', 84 87 // Site Wide Only is deprecated in favor of Network. 85 88 '_sitewide' => 'Site Wide Only', 86 89 ); … … 95 98 $plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) ); 96 99 unset( $plugin_data['_sitewide'] ); 97 100 101 // verify and set boolean value Upgrade header 102 $plugin_data['Upgrade'] = ( empty( $plugin_data['Upgrade'] ) || 'true' == strtolower( $plugin_data['Upgrade'] ) ); 103 98 104 if ( $markup || $translate ) { 99 105 $plugin_data = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup, $translate ); 100 106 } else { -
wp-includes/class-wp-theme.php
27 27 'Tags' => 'Tags', 28 28 'TextDomain' => 'Text Domain', 29 29 'DomainPath' => 'Domain Path', 30 'Upgrade' => 'Upgrade', 30 31 ); 31 32 32 33 /** … … 239 240 if ( basename( $this->stylesheet ) != $default_theme_slug ) 240 241 $this->headers['Name'] .= '/' . $this->stylesheet; 241 242 } 243 // verify and set boolean value Upgrade header 244 $this->headers['Upgrade'] = ( empty( $this->headers['Upgrade'] ) || 'true' == strtolower( $this->headers['Upgrade'] ) ); 242 245 } 243 246 244 247 // (If template is set from cache [and there are no errors], we know it's good.) -
wp-includes/update.php
223 223 } 224 224 } 225 225 226 // filter out plugins that not allow updating 227 foreach ( $plugins as $file => $p ) { 228 if ( ! $p['Upgrade'] ) { 229 unset( $plugins[ $file ] ); 230 } 231 } 232 226 233 $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked ); 227 234 228 235 if ( $time_not_changed && ! $extra_stats ) { … … 355 362 $request['active'] = get_option( 'stylesheet' ); 356 363 357 364 foreach ( $installed_themes as $theme ) { 365 // omit themes that not allow updating 366 if ( ! $theme->get('Upgrade') ) { 367 continue; 368 } 369 358 370 $checked[ $theme->get_stylesheet() ] = $theme->get('Version'); 359 371 360 372 $themes[ $theme->get_stylesheet() ] = array(