2020-05-01 / 4285阅 / 悠然
Get an array of ancestor IDs for a given object.
(int)
(Optional)
The ID of the object. Default 0.
(string)
(Optional)
The type of object for which we'll be retrieving ancestors. Accepts a post type or a taxonomy name.
Default value: ''
(string)
(Optional)
Type of resource $object_type is. Accepts 'post_type' or 'taxonomy'.
Default value: ''
(int[]) An array of IDs of ancestors from lowest to highest in the hierarchy.