Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:33:45 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve comments in some wp-admin files per the documentation standards.

Follow-up to [47084].

Props passoniate, apedog.
Fixes #49223, #49227.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ms.php

    r47093 r47119  
    2121        }
    2222
    23         if ( $file['error'] != '0' ) { // there's already an error
     23        if ( $file['error'] != '0' ) { // There's already an error.
    2424                return $file;
    2525        }
    … …  
    130130 * @since 3.0.0
    131131 *
    132  * @todo Merge with wp_delete_user() ?
     132 * @todo Merge with wp_delete_user()?
    133133 *
    134134 * @global wpdb $wpdb WordPress database abstraction object.
    … …  
    178178                        }
    179179
    180                         // Clean links
     180                        // Clean links.
    181181                        $link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id ) );
    182182
    … …  
    221221        $space_allowed = get_space_allowed();
    222222        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.
    224224        }
    225225        $space_used = get_space_used();
    … …  
    645645                $code_lang = basename( $val, '.mo' );
    646646
    647                 if ( $code_lang == 'en_US' ) { // American English
     647                if ( $code_lang == 'en_US' ) { // American English.
    648648                        $flag          = true;
    649649                        $ae            = __( 'American English' );
    650650                        $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.
    652652                        $flag          = true;
    653653                        $be            = __( 'British English' );
    … …  
    659659        }
    660660
    661         if ( $flag === false ) { // WordPress english
     661        if ( $flag === false ) { // WordPress English.
    662662                $output[] = '<option value=""' . selected( $current, '', false ) . '>' . __( 'English' ) . '</option>';
    663663        }
    664664
    665         // Order by name
     665        // Order by name.
    666666        uksort( $output, 'strnatcasecmp' );
    667667
    … …  
    10681068        );
    10691069
    1070         // Parse arguments
     1070        // Parse arguments.
    10711071        $parsed_args = wp_parse_args(
    10721072                $args,
    … …  
    10781078        );
    10791079
    1080         // Setup the links array
     1080        // Setup the links array.
    10811081        $screen_links = array();
    10821082
    1083         // Loop through tabs
     1083        // Loop through tabs.
    10841084        foreach ( $parsed_args['links'] as $link_id => $link ) {
    10851085
    1086                 // Skip link if user can't access
     1086                // Skip link if user can't access.
    10871087                if ( ! current_user_can( $link['cap'], $parsed_args['blog_id'] ) ) {
    10881088                        continue;
    10891089                }
    10901090
    1091                 // Link classes
     1091                // Link classes.
    10921092                $classes = array( 'nav-tab' );
    10931093
    … …  
    10951095                $aria_current = '';
    10961096
    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.
    10981098                if ( $parsed_args['selected'] === $link_id || $link['url'] === $GLOBALS['pagenow'] ) {
    10991099                        $classes[]    = 'nav-tab-active';
    … …  
    11011101                }
    11021102
    1103                 // Escape each class
     1103                // Escape each class.
    11041104                $esc_classes = implode( ' ', $classes );
    11051105
    1106                 // Get the URL for this link
     1106                // Get the URL for this link.
    11071107                $url = add_query_arg( array( 'id' => $parsed_args['blog_id'] ), network_admin_url( $link['url'] ) );
    11081108
    1109                 // Add link to nav links
     1109                // Add link to nav links.
    11101110                $screen_links[ $link_id ] = '<a href="' . esc_url( $url ) . '" id="' . esc_attr( $link_id ) . '" class="' . $esc_classes . '"' . $aria_current . '>' . esc_html( $link['label'] ) . '</a>';
    11111111        }
Note: See TracChangeset for help on using the changeset viewer.