get_tag_link and get_category_link can also return WP_Error. fixes #15449.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0921736b76
commit
4beb3ab36e
|
@ -13,7 +13,7 @@
|
|||
* @see get_term_link()
|
||||
*
|
||||
* @param int $category_id Category ID.
|
||||
* @return string
|
||||
* @return string|WP_Error Link on success, WP_Error if category does not exist.
|
||||
*/
|
||||
function get_category_link( $category_id ) {
|
||||
return get_term_link((int)$category_id, 'category');
|
||||
|
@ -959,7 +959,7 @@ class Walker_CategoryDropdown extends Walker {
|
|||
* @see get_term_link()
|
||||
*
|
||||
* @param int $tag_id Tag (term) ID.
|
||||
* @return string
|
||||
* @return string|WP_Error Link on success, WP_Error if tag does not exist.
|
||||
*/
|
||||
function get_tag_link( $tag_id ) {
|
||||
return get_term_link( (int)$tag_id, 'post_tag');
|
||||
|
|
Loading…
Reference in New Issue