[wp-trac] [WordPress Trac] #49738: get_term_link will always generate a deprecated notice when used on post_tag or category

WordPress Trac noreply at wordpress.org
Tue Mar 31 13:45:17 UTC 2020


#49738: get_term_link will always generate a deprecated notice when used on
post_tag or category
-------------------------------+------------------------------
 Reporter:  scorbaciufermecat  |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Taxonomy           |     Version:  5.4
 Severity:  normal             |  Resolution:
 Keywords:  close              |     Focuses:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-screenshots dev-feedback needs-patch => close
 * severity:  major => normal


Comment:

 Hi there, welcome to WordPress Trac! Thanks for the report.

 This is intentional behavior of `apply_filters_deprecated()`, it only
 outputs the deprecated hook message if you have any functions in your
 plugins or theme specifically hooked to the deprecated `tag_link` or
 `category_link` filter. Those instances should be updated to use
 `term_link` instead.

 If you don't have any functions hooked to those deprecated filters, it
 [source:tags/5.3/src/wp-includes/plugin.php?marks=627-629#L600 returns
 early and doesn't do anything].

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


More information about the wp-trac mailing list