WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/25/2019 12:47:53 AM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename $r variable used with wp_parse_args() to $parsed_args for clarity.

Props freewebmentor.
Fixes #45059.

File:
1 edited

Legend:

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

    r45583 r45667  
    10901090
    10911091    // Parse arguments
    1092     $r = wp_parse_args(
     1092    $parsed_args = wp_parse_args(
    10931093        $args,
    10941094        array(
     
    11031103
    11041104    // Loop through tabs
    1105     foreach ( $r['links'] as $link_id => $link ) {
     1105    foreach ( $parsed_args['links'] as $link_id => $link ) {
    11061106
    11071107        // Skip link if user can't access
    1108         if ( ! current_user_can( $link['cap'], $r['blog_id'] ) ) {
     1108        if ( ! current_user_can( $link['cap'], $parsed_args['blog_id'] ) ) {
    11091109            continue;
    11101110        }
     
    11171117
    11181118        // Selected is set by the parent OR assumed by the $pagenow global
    1119         if ( $r['selected'] === $link_id || $link['url'] === $GLOBALS['pagenow'] ) {
     1119        if ( $parsed_args['selected'] === $link_id || $link['url'] === $GLOBALS['pagenow'] ) {
    11201120            $classes[]    = 'nav-tab-active';
    11211121            $aria_current = ' aria-current="page"';
     
    11261126
    11271127        // Get the URL for this link
    1128         $url = add_query_arg( array( 'id' => $r['blog_id'] ), network_admin_url( $link['url'] ) );
     1128        $url = add_query_arg( array( 'id' => $parsed_args['blog_id'] ), network_admin_url( $link['url'] ) );
    11291129
    11301130        // Add link to nav links
Note: See TracChangeset for help on using the changeset viewer.