[wp-trac] [WordPress Trac] #22448: Changeset 22011 corrupts the effect of the the_posts filters

WordPress Trac noreply at wordpress.org
Wed Nov 14 19:16:22 UTC 2012


#22448: Changeset 22011 corrupts the effect of the the_posts filters
-----------------------------+--------------------------
 Reporter:  ntm              |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Query
  Version:  trunk            |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 I started testing with WP 3.5 beta 3 and the plugin I maintain (podPress).
 The plugin extends the array $this->posts via the filter the_posts (wp-
 includes/query.php - function get_posts()). It adds keys and values. But
 the {{{array_map()}}} command which has been added with the
 [http://core.trac.wordpress.org/changeset/22011 Changeset 22011]
 {{{
 $this->posts = array_map( 'get_post', $this->posts );
 }}}
 sets the {{{$this->posts}}} array back to the content it had contained
 before the filter. It retrogrades the_posts filter in my case and the
 content of {{{$this->posts}}} after {{{array_map()}}} seems to be the same
 as before the filter.

 Is it possible to move the array_map() command some lines up or the filter
 down?

 (Changeset 22011 was added during the discussion of #21309)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22448>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list