Docs: Improve `wp_get_object_terms()` return type.

Props dd32, audrasjb, desrosj, mukesh27.
Fixes #56327.
See #55646.

Built from https://develop.svn.wordpress.org/trunk@54441


git-svn-id: http://core.svn.wordpress.org/trunk@54000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2022-10-10 12:30:16 +00:00
parent 1795435a9f
commit f4521ee2a1
2 changed files with 14 additions and 13 deletions

View File

@ -2180,8 +2180,9 @@ function wp_delete_category( $cat_ID ) {
* @param int|int[] $object_ids The ID(s) of the object(s) to retrieve.
* @param string|string[] $taxonomies The taxonomy names to retrieve terms from.
* @param array|string $args See WP_Term_Query::__construct() for supported arguments.
* @return WP_Term[]|WP_Error Array of terms or empty array if no terms found.
* WP_Error if any of the taxonomies don't exist.
* @return WP_Term[]|int[]|string[]|string|WP_Error Array of terms, a count thereof as a numeric string,
* or WP_Error if any of the taxonomies do not exist.
* See WP_Term_Query::get_terms() for more information.
*/
function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
if ( empty( $object_ids ) || empty( $taxonomies ) ) {
@ -2257,11 +2258,11 @@ function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
*
* @since 4.2.0
*
* @param WP_Term[] $terms Array of terms for the given object or objects.
* @param int[] $object_ids Array of object IDs for which terms were retrieved.
* @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
* @param array $args Array of arguments for retrieving terms for the given
* object(s). See wp_get_object_terms() for details.
* @param WP_Term[]|int[]|string[]|string $terms Array of terms or a count thereof as a numeric string.
* @param int[] $object_ids Array of object IDs for which terms were retrieved.
* @param string[] $taxonomies Array of taxonomy names from which terms were retrieved.
* @param array $args Array of arguments for retrieving terms for the given
* object(s). See wp_get_object_terms() for details.
*/
$terms = apply_filters( 'get_object_terms', $terms, $object_ids, $taxonomies, $args );
@ -2276,11 +2277,11 @@ function wp_get_object_terms( $object_ids, $taxonomies, $args = array() ) {
*
* @since 2.8.0
*
* @param WP_Term[] $terms Array of terms for the given object or objects.
* @param string $object_ids Comma separated list of object IDs for which terms were retrieved.
* @param string $taxonomies SQL fragment of taxonomy names from which terms were retrieved.
* @param array $args Array of arguments for retrieving terms for the given
* object(s). See wp_get_object_terms() for details.
* @param WP_Term[]|int[]|string[]|string $terms Array of terms or a count thereof as a numeric string.
* @param string $object_ids Comma separated list of object IDs for which terms were retrieved.
* @param string $taxonomies SQL fragment of taxonomy names from which terms were retrieved.
* @param array $args Array of arguments for retrieving terms for the given
* object(s). See wp_get_object_terms() for details.
*/
return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-beta3-54429';
$wp_version = '6.1-beta3-54441';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.