get_post_ancestors() fixes. fixes #7029 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@8019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-05-30 20:31:45 +00:00
parent d1d186cd35
commit e7c4a9de85
1 changed files with 2 additions and 3 deletions

View File

@ -193,12 +193,11 @@ function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
* @subpackage Post
* @since 2.5
*
* @param string $field {@internal Missing Description}}
* @param int|object &$post post ID or post object
* @param int|object $post post ID or post object
* @return array of ancestor IDs
*/
function get_post_ancestors($post) {
$post = get_post();
$post = get_post($post);
if ( !empty($post->ancestors) )
return $post->ancestors;