WordPress.org

Make WordPress Core

Changeset 21569


Ignore:
Timestamp:
08/21/12 04:04:54 (20 months ago)
Author:
nacin
Message:

Ensure sticky posts are WP_Post objects. props mdawaffe. see #21309.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r21559 r21569  
    27512751                    if ( 'publish' != $sticky_post->post_status ) 
    27522752                        continue; 
    2753                     array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); 
     2753                    array_splice($this->posts, $sticky_offset, 0, array( get_post( $sticky_post ) ) ); 
    27542754                    $sticky_offset++; 
    27552755                } 
Note: See TracChangeset for help on using the changeset viewer.