Make WordPress Core


Ignore:
Timestamp:
07/25/2019 12:47:53 AM (5 years 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-includes/class-wp-ajax-response.php

    r45590 r45667  
    7474        );
    7575
    76         $r = wp_parse_args( $args, $defaults );
     76        $parsed_args = wp_parse_args( $args, $defaults );
    7777
    78         $position = preg_replace( '/[^a-z0-9:_-]/i', '', $r['position'] );
    79         $id       = $r['id'];
    80         $what     = $r['what'];
    81         $action   = $r['action'];
    82         $old_id   = $r['old_id'];
    83         $data     = $r['data'];
     78        $position = preg_replace( '/[^a-z0-9:_-]/i', '', $parsed_args['position'] );
     79        $id       = $parsed_args['id'];
     80        $what     = $parsed_args['what'];
     81        $action   = $parsed_args['action'];
     82        $old_id   = $parsed_args['old_id'];
     83        $data     = $parsed_args['data'];
    8484
    8585        if ( is_wp_error( $id ) ) {
     
    119119
    120120        $s = '';
    121         if ( is_array( $r['supplemental'] ) ) {
    122             foreach ( $r['supplemental'] as $k => $v ) {
     121        if ( is_array( $parsed_args['supplemental'] ) ) {
     122            foreach ( $parsed_args['supplemental'] as $k => $v ) {
    123123                $s .= "<$k><![CDATA[$v]]></$k>";
    124124            }
Note: See TracChangeset for help on using the changeset viewer.