Load comments-popup template through the index.

git-svn-id: https://develop.svn.wordpress.org/trunk@2332 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2005-02-14 09:17:23 +00:00
parent 62bdfa854b
commit 35b685cb65
7 changed files with 37 additions and 19 deletions

View File

@@ -26,6 +26,7 @@ class WP_Query {
var $is_trackback = false;
var $is_home = false;
var $is_404 = false;
var $is_comments_popup = false;
var $is_admin = false;
function init () {
@@ -187,11 +188,15 @@ class WP_Query {
$this->is_paged = true;
}
if ('' != $qv['comments_popup']) {
$this->is_comments_popup = true;
}
if (strstr($_SERVER['PHP_SELF'], 'wp-admin/')) {
$this->is_admin = true;
}
if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin)) {
if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup)) {
$this->is_home = true;
}
@@ -312,6 +317,9 @@ class WP_Query {
$where .= " AND WEEK(post_date, 1)='" . $q['w'] . "'";
}
if ( intval($q['comments_popup']) )
$q['p'] = intval($q['comments_popup']);
// If a post number is specified, load that post
if (($q['p'] != '') && intval($q['p']) != 0) {
$q['p'] = (int) $q['p'];