From 1e785fa0c308a662d2375050c6df7b97d964bbea Mon Sep 17 00:00:00 2001 From: David Baumwald Date: Wed, 10 Nov 2021 21:09:30 +0000 Subject: [PATCH] Taxonomy: Document that the `get_terms` filter can have `null` for `$taxonomies`. The `get_terms` filter currently documents that the filter passes an array as both the first and second parameters, which is normally true, except that the second can be `null` when not specified. This change updates the filter's docblock to indicate that the second parameter can also be of a `null` type. Props dd32, audrasjb, mukesh27. Fixes #54222. git-svn-id: https://develop.svn.wordpress.org/trunk@52131 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 32e1f66052..e0d848a9f7 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -1330,7 +1330,7 @@ function get_terms( $args = array(), $deprecated = '' ) { * @since 4.6.0 Added the `$term_query` parameter. * * @param array $terms Array of found terms. - * @param array $taxonomies An array of taxonomies. + * @param array|null $taxonomies An array of taxonomies if known. * @param array $args An array of get_terms() arguments. * @param WP_Term_Query $term_query The WP_Term_Query object. */