From e4229833fe1ca8de51589835b95986833c8e44d7 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Fri, 24 Jan 2025 23:28:23 +0000 Subject: [PATCH] Docs: Improve @return docblock section for `get_category()`. This changeset adds more details on the `WP_Term` returned by `get_category()` as it contains additional backwards compatible aliases for the era before WP 4.4 and 2.3. Props apermo, audrasjb. Fixes #62842. See #62281. Built from https://develop.svn.wordpress.org/trunk@59704 git-svn-id: http://core.svn.wordpress.org/trunk@59046 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category.php | 5 +++-- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-includes/category.php b/wp-includes/category.php index 5dc35cf6b5..d1c43274d7 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -85,8 +85,9 @@ function get_categories( $args = '' ) { * correspond to a WP_Term object, an associative array, or a numeric array, * respectively. Default OBJECT. * @param string $filter Optional. How to sanitize category fields. Default 'raw'. - * @return object|array|WP_Error|null Category data in type defined by $output parameter. - * WP_Error if $category is empty, null if it does not exist. + * @return WP_Term|array|WP_Error|null Category data in type defined by $output parameter. + * Returns a WP_Term object with backwards compatible property aliases filled in. + * WP_Error if $category is empty, null if it does not exist. */ function get_category( $category, $output = OBJECT, $filter = 'raw' ) { $category = get_term( $category, 'category', $output, $filter ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 2eafc2529b..eda98ef718 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59703'; +$wp_version = '6.8-alpha-59704'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.