Changeset 47119 for trunk/src/wp-admin/includes/ms.php
- Timestamp:
- 01/29/2020 12:33:45 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ms.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ms.php
r47093 r47119 21 21 } 22 22 23 if ( $file['error'] != '0' ) { // there's already an error23 if ( $file['error'] != '0' ) { // There's already an error. 24 24 return $file; 25 25 } … … 130 130 * @since 3.0.0 131 131 * 132 * @todo Merge with wp_delete_user() ?132 * @todo Merge with wp_delete_user()? 133 133 * 134 134 * @global wpdb $wpdb WordPress database abstraction object. … … 178 178 } 179 179 180 // Clean links 180 // Clean links. 181 181 $link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id ) ); 182 182 … … 221 221 $space_allowed = get_space_allowed(); 222 222 if ( ! is_numeric( $space_allowed ) ) { 223 $space_allowed = 10; // Default space allowed is 10 MB 223 $space_allowed = 10; // Default space allowed is 10 MB. 224 224 } 225 225 $space_used = get_space_used(); … … 645 645 $code_lang = basename( $val, '.mo' ); 646 646 647 if ( $code_lang == 'en_US' ) { // American English 647 if ( $code_lang == 'en_US' ) { // American English. 648 648 $flag = true; 649 649 $ae = __( 'American English' ); 650 650 $output[ $ae ] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . $ae . '</option>'; 651 } elseif ( $code_lang == 'en_GB' ) { // British English 651 } elseif ( $code_lang == 'en_GB' ) { // British English. 652 652 $flag = true; 653 653 $be = __( 'British English' ); … … 659 659 } 660 660 661 if ( $flag === false ) { // WordPress english661 if ( $flag === false ) { // WordPress English. 662 662 $output[] = '<option value=""' . selected( $current, '', false ) . '>' . __( 'English' ) . '</option>'; 663 663 } 664 664 665 // Order by name 665 // Order by name. 666 666 uksort( $output, 'strnatcasecmp' ); 667 667 … … 1068 1068 ); 1069 1069 1070 // Parse arguments 1070 // Parse arguments. 1071 1071 $parsed_args = wp_parse_args( 1072 1072 $args, … … 1078 1078 ); 1079 1079 1080 // Setup the links array 1080 // Setup the links array. 1081 1081 $screen_links = array(); 1082 1082 1083 // Loop through tabs 1083 // Loop through tabs. 1084 1084 foreach ( $parsed_args['links'] as $link_id => $link ) { 1085 1085 1086 // Skip link if user can't access 1086 // Skip link if user can't access. 1087 1087 if ( ! current_user_can( $link['cap'], $parsed_args['blog_id'] ) ) { 1088 1088 continue; 1089 1089 } 1090 1090 1091 // Link classes 1091 // Link classes. 1092 1092 $classes = array( 'nav-tab' ); 1093 1093 … … 1095 1095 $aria_current = ''; 1096 1096 1097 // Selected is set by the parent OR assumed by the $pagenow global 1097 // Selected is set by the parent OR assumed by the $pagenow global. 1098 1098 if ( $parsed_args['selected'] === $link_id || $link['url'] === $GLOBALS['pagenow'] ) { 1099 1099 $classes[] = 'nav-tab-active'; … … 1101 1101 } 1102 1102 1103 // Escape each class 1103 // Escape each class. 1104 1104 $esc_classes = implode( ' ', $classes ); 1105 1105 1106 // Get the URL for this link 1106 // Get the URL for this link. 1107 1107 $url = add_query_arg( array( 'id' => $parsed_args['blog_id'] ), network_admin_url( $link['url'] ) ); 1108 1108 1109 // Add link to nav links 1109 // Add link to nav links. 1110 1110 $screen_links[ $link_id ] = '<a href="' . esc_url( $url ) . '" id="' . esc_attr( $link_id ) . '" class="' . $esc_classes . '"' . $aria_current . '>' . esc_html( $link['label'] ) . '</a>'; 1111 1111 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)