[wp-trac] [WordPress Trac] #21309: Introduce WP_Post class
WordPress Trac
noreply at wordpress.org
Wed Nov 14 17:25:55 UTC 2012
#21309: Introduce WP_Post class
----------------------------+---------------------
Reporter: scribu | Owner: nacin
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 3.5
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch |
----------------------------+---------------------
Comment (by ntm):
Replying to [comment:77 ryan]:
> In [22011]:
> {{{
> #!CommitTicketReference repository="" revision="22011"
> Convert the object in the posts array to WP_Post only if the posts array
is not empty. Some post caching plugins can cause it to be empty. see
#21309
> }}}
I started testing with the plugin I maintain and WP 3.5 beta 3. The plugin
extends the array $this->posts via the filter the_posts (wp-
includes/query.php - function get_posts()). But the array_map() command
which has been added with the Changeset 22011
{{{
$this->posts = array_map( 'get_post', $this->posts );
}}}
set the $this->posts array back to the content it has contained before the
filter.
It retrogrades the_posts filter in my case.
Is it possible to move the array_map() command some lines up or the filter
down?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21309#comment:89>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list