[wp-trac] [WordPress Trac] #2712: Need filter for posts after get results and before post status check

WordPress Trac wp-trac at lists.automattic.com
Tue May 9 13:50:18 GMT 2006


#2712: Need filter for posts after get results and before post status check
-------------------------+--------------------------------------------------
       Id:  2712         |      Status:  new                     
Component:  General      |    Modified:  Tue May  9 13:50:17 2006
 Severity:  enhancement  |   Milestone:  2.1                     
 Priority:  normal       |     Version:  2.1                     
    Owner:  anonymous    |    Reporter:  ev3rywh3re              
-------------------------+--------------------------------------------------
 I'm working on making EventCalendar3 work with 2.1Alpha. It actually works
 well using standard filters while preserving the status = future with one
 exception.

 Once you actually send the sql request with WP_Query, it goes through
 another check for status = future. This is around line 886 in query.php. I
 thought this may be a good place to add a filter like "posts_result". A
 filter can then be run on the results before the posts get the status
 check then filter "the_posts". I'm just going to paste a sample for
 query.php:


 {{{
 $this->request = apply_filters('posts_request', $request);

 $this->posts = $wpdb->get_results($this->request);

 $this->posts = apply_filters('posts_results', $this->posts);

 // Check post status to determine if post should be displayed.
 }}}

 The only alternative is to publish those posts which is probably not
 really the correct since they should probably still be "future" posts
 until the proper date.

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


More information about the wp-trac mailing list