Ticket #32101: 32101.2.diff
File 32101.2.diff, 3.7 KB (added by , 10 years ago) |
---|
-
src/wp-admin/includes/plugin.php
31 31 * Network: Optional. Specify "Network: true" to require that a plugin is activated 32 32 * across all sites in an installation. This will prevent a plugin from being 33 33 * activated on a single site when Multisite is enabled. 34 * Private: Optional. Specify "Private: true" to exclude the plugin from update checks. 34 35 * * / # Remove the space to close comment 35 36 * 36 37 * Some users have issues with opening large files and manipulating the contents … … 63 64 * @type string $TextDomain Plugin textdomain. 64 65 * @type string $DomainPath Plugins relative directory path to .mo files. 65 66 * @type bool $Network Whether the plugin can only be activated network-wide. 67 * @type bool $Private Whether the plugin should be excluded from update checks. 66 68 * } 67 69 */ 68 70 function get_plugin_data( $plugin_file, $markup = true, $translate = true ) { … … 77 79 'TextDomain' => 'Text Domain', 78 80 'DomainPath' => 'Domain Path', 79 81 'Network' => 'Network', 82 'Private' => 'Private', 80 83 // Site Wide Only is deprecated in favor of Network. 81 84 '_sitewide' => 'Site Wide Only', 82 85 ); … … 92 95 $plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) ); 93 96 unset( $plugin_data['_sitewide'] ); 94 97 98 $plugin_data['Private'] = ( 'true' == strtolower( $plugin_data['Private'] ) ); 99 95 100 if ( $markup || $translate ) { 96 101 $plugin_data = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup, $translate ); 97 102 } else { -
src/wp-includes/class-wp-theme.php
38 38 'Tags' => 'Tags', 39 39 'TextDomain' => 'Text Domain', 40 40 'DomainPath' => 'Domain Path', 41 'Private' => 'Private', 41 42 ); 42 43 43 44 /** … … 574 575 * whether it is actually valid. 575 576 * 576 577 * @since 3.4.0 578 * @since 4.4.0 Added the 'Private' header. 577 579 * @access public 578 580 * 579 * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags. 581 * @param string $header Theme header. Accepts 'Name', 'Description', 'Author', 'Version', 'ThemeURI', 582 * 'AuthorURI', 'Status', 'Tags', 'TextDomain', 'DomainPath', or 'Private'. 580 583 * @return string|false String on success, false on failure. 581 584 */ 582 585 public function get( $header ) { … … 687 690 case 'Version' : 688 691 $value = strip_tags( $value ); 689 692 break; 693 case 'Private' : 694 $value = 'true' === strtolower( $value ); 695 break; 690 696 } 691 697 692 698 return $value; -
src/wp-includes/update.php
200 200 require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 201 201 202 202 $plugins = get_plugins(); 203 204 // Omit 'private' plugins. 205 foreach ( $plugins as $file => $p ) { 206 if ( $p['Private'] ) { 207 unset( $plugins[ $file ] ); 208 } 209 } 210 203 211 $translations = wp_get_installed_translations( 'plugins' ); 204 212 205 213 $active = get_option( 'active_plugins', array() ); … … 366 374 foreach ( $installed_themes as $theme ) { 367 375 $checked[ $theme->get_stylesheet() ] = $theme->get('Version'); 368 376 377 // Omit 'private' themes. 378 if ( $theme->get( 'Private' ) ) { 379 continue; 380 } 381 369 382 $themes[ $theme->get_stylesheet() ] = array( 370 383 'Name' => $theme->get('Name'), 371 384 'Title' => $theme->get('Name'),