Changeset 48413
- Timestamp:
- 07/10/2020 12:29:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-list-util.php
r47808 r48413 103 103 104 104 foreach ( $this->output as $key => $obj ) { 105 $to_match = (array) $obj;106 107 105 $matched = 0; 106 108 107 foreach ( $args as $m_key => $m_value ) { 109 if ( array_key_exists( $m_key, $to_match ) && $m_value == $to_match[ $m_key ] ) { 110 $matched++; 108 109 if ( is_array( $obj ) ) { 110 111 // Treat object as an array 112 if ( array_key_exists( $m_key, $obj ) && ( $m_value == $obj[ $m_key ] ) ) { 113 $matched++; 114 } 115 116 } elseif ( is_object( $obj ) ) { 117 118 // Treat object as an object 119 if ( isset( $obj->{$m_key} ) && ( $m_value == $obj->{$m_key} ) ) { 120 $matched++; 121 } 111 122 } 112 123 }
Note: See TracChangeset
for help on using the changeset viewer.