mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Fix regression in get_tag_link()
since 4.9.
See [42364] for description of the problem. Because `get_category_link()` is now totally taxonomy-agnostic, `get_tag_link()` can become a simple wrapper. Props juiiee8487, markjaquith. See #42771. Built from https://develop.svn.wordpress.org/trunk@42366 git-svn-id: http://core.svn.wordpress.org/trunk@42195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
438f7a0701
commit
1abbaa0f74
@ -1111,17 +1111,7 @@ function walk_category_dropdown_tree() {
|
|||||||
* @return string Link on success, empty string if tag does not exist.
|
* @return string Link on success, empty string if tag does not exist.
|
||||||
*/
|
*/
|
||||||
function get_tag_link( $tag ) {
|
function get_tag_link( $tag ) {
|
||||||
if ( ! is_object( $tag ) ) {
|
return get_category_link( $tag );
|
||||||
$tag = (int) $tag;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tag = get_term_link( $tag, 'post_tag' );
|
|
||||||
|
|
||||||
if ( is_wp_error( $tag ) ) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return $tag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-42365';
|
$wp_version = '5.0-alpha-42366';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user