Static pages. Take 1.

git-svn-id: https://develop.svn.wordpress.org/trunk@1527 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-08-10 05:35:59 +00:00
parent 244ed3485f
commit ec57c1a114
10 changed files with 108 additions and 18 deletions

View File

@@ -454,11 +454,16 @@ class WP_Query {
$distinct = 'DISTINCT';
}
$where .= ' AND (post_status = "publish"';
if ('' != $q['static']) {
$where .= ' AND (post_status = "static"';
} else {
$where .= ' AND (post_status = "publish"';
}
// Get private posts
if (isset($user_ID) && ('' != intval($user_ID)))
$where .= " OR post_author = $user_ID AND post_status != 'draft')";
$where .= " OR post_author = $user_ID AND post_status != 'draft' AND post_status != 'static')";
else
$where .= ')';