wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
_rest_array_intersect_key_recursive › WordPress Function
Desde5.3.0
Obsoleton/a
› _rest_array_intersect_key_recursive ( $array1, $array2 )
Parâmetros: (2) |
|
Retorna: |
|
Definido em: |
|
Codex: |
Recursively computes the intersection of arrays using keys for comparison.
Funções relacionadas: get_intermediate_image_sizes, rest_parse_hex_color
Fonte
function _rest_array_intersect_key_recursive( $array1, $array2 ) { $array1 = array_intersect_key( $array1, $array2 ); foreach ( $array1 as $key => $value ) { if ( is_array( $value ) && is_array( $array2[ $key ] ) ) { $array1[ $key ] = _rest_array_intersect_key_recursive( $value, $array2[ $key ] ); } } return $array1; }