Changeset 52066
- Timestamp:
- 11/09/2021 01:09:11 AM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-list-util.php
r51044 r52066 103 103 104 104 if ( ! in_array( $operator, array( 'AND', 'OR', 'NOT' ), true ) ) { 105 return array(); 105 $this->output = array(); 106 return $this->output; 106 107 } 107 108 -
trunk/src/wp-includes/functions.php
r52034 r52066 5048 5048 * @since 3.1.0 5049 5049 * @since 4.7.0 Uses `WP_List_Util` class. 5050 * @since 5.9.0 Converted into a wrapper for `wp_filter_object_list()`. 5050 5051 * 5051 5052 * @param array $list An array of objects to filter. … … 5059 5060 */ 5060 5061 function wp_list_filter( $list, $args = array(), $operator = 'AND' ) { 5061 if ( ! is_array( $list ) ) { 5062 return array(); 5063 } 5064 5065 $util = new WP_List_Util( $list ); 5066 5067 return $util->filter( $args, $operator ); 5062 return wp_filter_object_list( $list, $args, $operator ); 5068 5063 } 5069 5064
Note: See TracChangeset
for help on using the changeset viewer.