mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Deprecate start_wp(). Move start_wp functionality to setup_postdata(). Add the_post() method to WP_Query.
git-svn-id: https://develop.svn.wordpress.org/trunk@2104 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -571,6 +571,12 @@ class WP_Query {
|
||||
return $this->post;
|
||||
}
|
||||
|
||||
function the_post() {
|
||||
global $post;
|
||||
$post = $this->next_post();
|
||||
setup_postdata($post);
|
||||
}
|
||||
|
||||
function have_posts() {
|
||||
if ($this->current_post + 1 < $this->post_count) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user