[wp-trac] [WordPress Trac] #42717: get_category_link() accepting object but not id

WordPress Trac noreply at wordpress.org
Mon Dec 4 20:39:00 UTC 2017


#42717: get_category_link() accepting object but not id
--------------------------+---------------------------
 Reporter:  belbo         |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.9.2
Component:  Taxonomy      |     Version:  4.9
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"42364"]:
 {{{
 #!CommitTicketReference repository="" revision="42364"
 Don't do a strict taxonomy check in `get_category_link()`.

 Prior to version 4.9, a quirk in the implementation of `get_term()` caused
 `get_category_link( 123 )` to fetch the taxonomy archive link for term 123
 even if 123 is not in the 'category' taxonomy. The quirk was fixed in
 [40979];
 see #40671. This bugfix introduced a regression for theme authors who were
 expecting the old behavior.

 By lifting the 'category' restriction, we allow the template function to
 work
 in the old way.

 Fixes #42717. See #42771.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42717#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list