get_post_ancestors() fixes. fixes #7029 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@8019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
43660f8de7
commit
e1faf662e8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user