Make WordPress Core

Opened 9 years ago

Last modified 8 years ago

#36641 new enhancement

WP_Term method __toString

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

I think that this is good idea. For example:

<?php
        echo '<pre>';
                var_dump(implode(', ', get_the_terms( get_the_ID(), 'category' )));
        echo '</pre>';
?>

I have string(**) "Cat 1, Cat 2"

Attachments (1)

36641.patch (579 bytes) - added by sebastian.pisula 9 years ago.

Download all attachments as: .zip

Change History (4)

#1 @swissspidy
9 years ago

  • Component changed from General to Taxonomy
  • Keywords has-patch added

#2 @boonebgorges
9 years ago

I guess I don't see any harm in adding this, though it's not something we offer elsewhere in WP (other than in WP_Theme).

#3 @swissspidy
8 years ago

  • Keywords needs-unit-tests added
Note: See TracTickets for help on using tickets.