WordPress.org

Make WordPress Core

Changeset 30036


Ignore:
Timestamp:
10/27/2014 02:15:35 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Don't add 'sticky' class in get_post_class() if 'ignore_sticky_posts' query var is set.

props jakub.tyrcha, johneckman.
fixes #18035.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r30030 r30036  
    438438    // sticky for Sticky Posts
    439439    if ( is_sticky( $post->ID ) ) {
    440         if ( is_home() && ! is_paged() ) {
     440        if ( is_home() && ! is_paged() && ! get_query_var( 'ignore_sticky_posts' ) ) {
    441441            $classes[] = 'sticky';
    442442        } elseif ( is_admin() ) {
Note: See TracChangeset for help on using the changeset viewer.