Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #14162


Ignore:
Timestamp:
07/01/2010 12:21:19 AM (15 years ago)
Author:
scribu
Comment:

Sure, but this enhancement is not dependant on chaining. You could still do this:

$term = get_term_by( 'name', 'Term Name', 'taxname' );
echo $term->get_link();

which would still be better than:

$term = get_term_by( 'name', 'Term Name', 'taxname' );
echo get_term_link( $term, 'taxname' );

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14162 – Description

    initial v2  
    77Current:
    88
    9 `get_term_link( get_term_by( 'name', 'Term Name', 'taxname' ), 'taxname' )`
     9{{{get_term_link( get_term_by( 'name', 'Term Name', 'taxname' ), 'taxname' )}}}
    1010
    1111Proposed:
    1212
    13 `get_term_by( 'name', 'Term Name', 'taxname' )->get_link()`
     13{{{get_term_by( 'name', 'Term Name', 'taxname' )->get_link()}}}
    1414
    1515get_term_by() would return a WP_Term instance instead of a stdClass instance.