`get_the_category_by_ID()` should be taxonomy-agnostic.
Prior to 4.9, this function was accidentally taxonomy-agnostic in most cases. The fix in [40979] caused a regression in this function. For backward compatibility, we make it explicit that the query is by ID only. See #42771. Built from https://develop.svn.wordpress.org/trunk@42367 git-svn-id: http://core.svn.wordpress.org/trunk@42196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1abbaa0f74
commit
bc769416d8
|
@ -107,7 +107,7 @@ function get_the_category( $id = false ) {
|
|||
*/
|
||||
function get_the_category_by_ID( $cat_ID ) {
|
||||
$cat_ID = (int) $cat_ID;
|
||||
$category = get_term( $cat_ID, 'category' );
|
||||
$category = get_term( $cat_ID );
|
||||
|
||||
if ( is_wp_error( $category ) ) {
|
||||
return $category;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-42366';
|
||||
$wp_version = '5.0-alpha-42367';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue