From d8215873a24795518dc83e4b4ec8fd8b5172838e Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 4 Dec 2017 20:39:45 +0000 Subject: [PATCH] Don't do a strict taxonomy check in `get_category_link()`. Prior to version 4.9, a quirk in the implementation of `get_term()` caused `get_category_link( 123 )` to fetch the taxonomy archive link for term 123 even if 123 is not in the 'category' taxonomy. The quirk was fixed in [40979]; see #40671. This bugfix introduced a regression for theme authors who were expecting the old behavior. By lifting the 'category' restriction, we allow the template function to work in the old way. Fixes #42717. See #42771. Built from https://develop.svn.wordpress.org/trunk@42364 git-svn-id: http://core.svn.wordpress.org/trunk@42193 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index c3782441e6..77c0d4532a 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -21,7 +21,7 @@ function get_category_link( $category ) { $category = (int) $category; } - $category = get_term_link( $category, 'category' ); + $category = get_term_link( $category ); if ( is_wp_error( $category ) ) { return ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index ae3c1e91ff..8198db1fa7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42362'; +$wp_version = '5.0-alpha-42364'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.