Ticket #48191: 48191.patch
File 48191.patch, 3.6 KB (added by , 5 years ago) |
---|
-
src/wp-admin/includes/plugin.php
85 85 86 86 $plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' ); 87 87 88 // Site Wide Only is the old header for Network 88 // Site Wide Only is the old header for Network. 89 89 if ( ! $plugin_data['Network'] && $plugin_data['_sitewide'] ) { 90 90 /* translators: 1: Site Wide Only: true, 2: Network: true */ 91 91 _deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The %1$s plugin header is deprecated. Use %2$s instead.' ), '<code>Site Wide Only: true</code>', '<code>Network: true</code>' ) ); … … 142 142 */ 143 143 function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true ) { 144 144 145 // Sanitize the plugin filename to a WP_PLUGIN_DIR relative path 145 // Sanitize the plugin filename to a WP_PLUGIN_DIR relative path. 146 146 $plugin_file = plugin_basename( $plugin_file ); 147 147 148 // Translate fields 148 // Translate fields. 149 149 if ( $translate ) { 150 150 $textdomain = $plugin_data['TextDomain']; 151 151 if ( $textdomain ) { … … 167 167 } 168 168 } 169 169 170 // Sanitize fields 170 // Sanitize fields. 171 171 $allowed_tags_in_links = array( 172 172 'abbr' => array( 'title' => true ), 173 173 'acronym' => array( 'title' => true ), … … 196 196 $plugin_data['Title'] = $plugin_data['Name']; 197 197 $plugin_data['AuthorName'] = $plugin_data['Author']; 198 198 199 // Apply markup 199 // Apply markup. 200 200 if ( $markup ) { 201 201 if ( $plugin_data['PluginURI'] && $plugin_data['Name'] ) { 202 202 $plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '">' . $plugin_data['Name'] . '</a>'; … … 292 292 $plugin_root .= $plugin_folder; 293 293 } 294 294 295 // Files in wp-content/plugins directory 295 // Files in wp-content/plugins directory. 296 296 $plugins_dir = @ opendir( $plugin_root ); 297 297 $plugin_files = array(); 298 298 if ( $plugins_dir ) { … … 358 358 */ 359 359 function get_mu_plugins() { 360 360 $wp_plugins = array(); 361 // Files in wp-content/mu-plugins directory 361 // Files in wp-content/mu-plugins directory. 362 362 $plugin_files = array(); 363 363 364 364 if ( ! is_dir( WPMU_PLUGIN_DIR ) ) { … … 431 431 432 432 $_dropins = _get_dropins(); 433 433 434 // These exist in the wp-content directory 434 // These exist in the wp-content directory. 435 435 $plugins_dir = @opendir( WP_CONTENT_DIR ); 436 436 if ( $plugins_dir ) { 437 437 while ( ( $file = readdir( $plugins_dir ) ) !== false ) { … … 477 477 */ 478 478 function _get_dropins() { 479 479 $dropins = array( 480 'advanced-cache.php' => array( __( 'Advanced caching plugin.' ), 'WP_CACHE' ), // WP_CACHE 480 'advanced-cache.php' => array( __( 'Advanced caching plugin.' ), 'WP_CACHE' ), // WP_CACHE d 481 481 'db.php' => array( __( 'Custom database class.' ), true ), // auto on load 482 482 'db-error.php' => array( __( 'Custom database error message.' ), true ), // auto on error 483 483 'install.php' => array( __( 'Custom installation script.' ), true ), // auto on installation … … 1537 1537 * @param int $position The position in the menu order this item should appear. 1538 1538 * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability required. 1539 1539 */ 1540 1541 1540 function add_users_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $position = null ) { 1542 1541 if ( current_user_can( 'edit_users' ) ) { 1543 1542 $parent = 'users.php'; … … 1546 1545 } 1547 1546 return add_submenu_page( $parent, $page_title, $menu_title, $capability, $menu_slug, $function, $position ); 1548 1547 } 1548 1549 1549 /** 1550 1550 * Add submenu page to the Dashboard main menu. 1551 1551 *