On this page
wp_get_post_cats( int $blogid = '1', int $post_ID ): array
This function has been deprecated. Use wp_get_post_categories() instead.
Retrieves a list of post categories.
Description
See also
Parameters
$blogidint Optional-
Not Used
Default:
'1' $post_IDint Required
Return
array
Source
File: wp-includes/deprecated.php. View all references
function wp_get_post_cats($blogid = '1', $post_ID = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_post_categories()' );
return wp_get_post_categories($post_ID);
}
Related
Uses
| Uses | Description |
|---|---|
| wp_get_post_categories() wp-includes/post.php | Retrieves the list of categories for a post. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Use wp_get_post_categories() |
| 1.0.1 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_post_cats