Coding Standards: Rename $r variable used with wp_parse_args() to $parsed_args for clarity.
Props freewebmentor. Fixes #45059. Built from https://develop.svn.wordpress.org/trunk@45667 git-svn-id: http://core.svn.wordpress.org/trunk@45478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -73,14 +73,14 @@ class WP_Ajax_Response {
|
||||
'supplemental' => array(),
|
||||
);
|
||||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
$parsed_args = wp_parse_args( $args, $defaults );
|
||||
|
||||
$position = preg_replace( '/[^a-z0-9:_-]/i', '', $r['position'] );
|
||||
$id = $r['id'];
|
||||
$what = $r['what'];
|
||||
$action = $r['action'];
|
||||
$old_id = $r['old_id'];
|
||||
$data = $r['data'];
|
||||
$position = preg_replace( '/[^a-z0-9:_-]/i', '', $parsed_args['position'] );
|
||||
$id = $parsed_args['id'];
|
||||
$what = $parsed_args['what'];
|
||||
$action = $parsed_args['action'];
|
||||
$old_id = $parsed_args['old_id'];
|
||||
$data = $parsed_args['data'];
|
||||
|
||||
if ( is_wp_error( $id ) ) {
|
||||
$data = $id;
|
||||
@@ -118,8 +118,8 @@ class WP_Ajax_Response {
|
||||
}
|
||||
|
||||
$s = '';
|
||||
if ( is_array( $r['supplemental'] ) ) {
|
||||
foreach ( $r['supplemental'] as $k => $v ) {
|
||||
if ( is_array( $parsed_args['supplemental'] ) ) {
|
||||
foreach ( $parsed_args['supplemental'] as $k => $v ) {
|
||||
$s .= "<$k><![CDATA[$v]]></$k>";
|
||||
}
|
||||
$s = "<supplemental>$s</supplemental>";
|
||||
|
||||
Reference in New Issue
Block a user