WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #23837, comment 6


Ignore:
Timestamp:
03/22/13 16:37:28 (16 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23837, comment 6

    initial v1  
    22> Oh, wait -- "Restore WP_Error return to get_term_link()" in r17437. :| 
    33 
    4 Yes, it's documented that `get_term_link()` can return a `WP_Error` object if the term doesn't exist: [[BR]] 
     4Yes, it's documented that `get_term_link()` returns a `WP_Error` object if the term doesn't exist: [[BR]] 
    55http://codex.wordpress.org/Function_Reference/get_term_link#Return_Values 
    66 
    7 Seems like themes should either use `get_category_link()`, which still returns an empty string on error (but only accepts category ID or object), or use `is_wp_error()` check. 
     7Seems like Twenty Ten should either use `get_category_link()`, which still returns an empty string on error (but only accepts category ID or object), or add `is_wp_error()` check.