Changeset 15574 for trunk/wp-includes/functions.php
- Timestamp:
- 09/05/2010 06:47:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15568 r15574 2981 2981 2982 2982 /** 2983 * Extract a slice of an array, given a list of keys 2984 * 2985 * @since 3.1.0 2986 * 2987 * @param array $array The original array 2988 * @param array $keys The list of keys 2989 * @return array The array slice 2990 */ 2991 function wp_array_slice_assoc( $array, $keys ) { 2992 $slice = array(); 2993 foreach ( $keys as $key ) 2994 if ( isset( $array[ $key ] ) ) 2995 $slice[ $key ] = $array[ $key ]; 2996 2997 return $slice; 2998 } 2999 3000 /** 2983 3001 * Filters a list of objects, based on a set of key => value arguments 2984 3002 *
Note: See TracChangeset
for help on using the changeset viewer.