Changeset 47557 for trunk/src/wp-includes/class-wp-query.php
- Timestamp:
- 04/09/2020 03:41:04 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-query.php
r47550 r47557 3138 3138 // Loop over posts and relocate stickies to the front. 3139 3139 for ( $i = 0; $i < $num_posts; $i++ ) { 3140 if ( in_array( $this->posts[ $i ]->ID, $sticky_posts ) ) {3140 if ( in_array( $this->posts[ $i ]->ID, $sticky_posts, true ) ) { 3141 3141 $sticky_post = $this->posts[ $i ]; 3142 3142 // Remove sticky from current position. … … 3147 3147 $sticky_offset++; 3148 3148 // Remove post from sticky posts array. 3149 $offset = array_search( $sticky_post->ID, $sticky_posts );3149 $offset = array_search( $sticky_post->ID, $sticky_posts, true ); 3150 3150 unset( $sticky_posts[ $offset ] ); 3151 3151 }
Note: See TracChangeset
for help on using the changeset viewer.