Make WordPress Core

Ticket #55257: #55257.patch

File #55257.patch, 563 bytes (added by rehanali, 4 years ago)

Added patch

  • formatting.php

     
    50005000 * @return mixed The value with the callback applied to all non-arrays and non-objects inside it.
    50015001 */
    50025002function map_deep( $value, $callback ) {
     5003        if ( is_object( $value ) && $value instanceof __PHP_Incomplete_Class ) {
     5004                 return $value;
     5005                }
     5006
    50035007        if ( is_array( $value ) ) {
    50045008                foreach ( $value as $index => $item ) {
    50055009                        $value[ $index ] = map_deep( $item, $callback );