Ensure that taxonomy name passed to `get_term()` filters is non-empty.
Since [34997], the `$taxonomy` parameter of `get_term()` has been optional. This created cases where the `$taxonomy` parameter, used to concatenate names for some filters and passed as a parameter to others, would be empty. This changeset ensures that it's never empty by falling back on the `taxonomy` of the located term. Props dlh. Fixes #45698. Built from https://develop.svn.wordpress.org/trunk@44325 git-svn-id: http://core.svn.wordpress.org/trunk@44155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eef048a3e8
commit
88ccca5d76
|
@ -840,6 +840,9 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
|
|||
return null;
|
||||
}
|
||||
|
||||
// Ensure for filters that this is not empty.
|
||||
$taxonomy = $_term->taxonomy;
|
||||
|
||||
/**
|
||||
* Filters a taxonomy term object.
|
||||
*
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.1-alpha-44324';
|
||||
$wp_version = '5.1-alpha-44325';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue