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:
nacin 2010-11-17 17:10:50 +00:00
parent 0921736b76
commit 4beb3ab36e
1 changed files with 2 additions and 2 deletions

View File

@ -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');