[wp-trac] [WordPress Trac] #7029: Bad get_post_ancestors()

WordPress Trac wp-trac at lists.automattic.com
Fri May 23 15:17:11 GMT 2008


#7029: Bad get_post_ancestors()
---------------------+------------------------------------------------------
 Reporter:  temoto   |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.5.2    
Component:  General  |     Version:  2.5.1    
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 wp-includes/post.php:195 [[BR]]
 Bugs:[[BR]]
 - Params description do not match code.[[BR]]
 - Function doesn't work because get_post() requires argument.

 {{{
 /**
  * get_post_ancestors() - Retrieve ancestors for a post
  *
  * @package WordPress
  * @subpackage Post
  * @since 2.5
  *
  * @param string $field {@internal Missing Description}}
  * @param int|object &$post post ID or post object
  * @return array of ancestor IDs
  */
 function get_post_ancestors($post) {
         $post = get_post();

         if ( !empty($post->ancestors) )
                 return $post->ancestors;

         return array();
 }
 }}}

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


More information about the wp-trac mailing list