Make WordPress Core

Changeset 4023


Ignore:
Timestamp:
07/20/2006 02:05:25 AM (18 years ago)
Author:
ryan
Message:

Fix current page handling when using page_for_posts. Props skeltoac. fixes #2959

File:
1 edited

Legend:

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

    r3957 r4023  
    280280    var $is_attachment = false;
    281281    var $is_robots = false;
     282    var $is_posts_page = false;
    282283
    283284    function init_query_flags() {
     
    301302        $this->is_attachment = false;
    302303        $this->is_robots = false;
     304        $this->is_posts_page = false;
    303305    }
    304306
     
    628630                $this->is_page = false;
    629631                $this->is_home = true;
     632                $this->is_posts_page = true;
    630633            } else {
    631634                $q['pagename'] = str_replace('%2F', '/', urlencode(urldecode($q['pagename'])));
     
    666669                $this->is_page = false;
    667670                $this->is_home = true;
     671                $this->is_posts_page = true;
    668672            } else {
    669673                $q['p'] = $q['page_id'];
     
    10191023            $this->queried_object = &$category;
    10201024            $this->queried_object_id = $cat;
     1025        } else if ($this->is_posts_page) {
     1026            $this->queried_object = & get_page(get_option('page_for_posts'));
     1027            $this->queried_object_id = $this->queried_object->ID;
    10211028        } else if ($this->is_single) {
    10221029            $this->queried_object = $this->post;
Note: See TracChangeset for help on using the changeset viewer.