WordPress.org

Make WordPress Core

Ticket #49759: 49759.diff

File 49759.diff, 1.1 KB (added by audrasjb, 8 months ago)

Taxonomy: Undeprecate tag_link and category_link filters

  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index d240740ff2..aedc841fe1 100644
    a b function get_term_link( $term, $taxonomy = '' ) { 
    42664266                 * Filters the tag link.
    42674267                 *
    42684268                 * @since 2.3.0
    4269                  * @deprecated 2.5.0 Use {@see 'term_link'} instead.
    42704269                 *
    42714270                 * @param string $termlink Tag link URL.
    42724271                 * @param int    $term_id  Term ID.
    42734272                 */
    4274                 $termlink = apply_filters_deprecated( 'tag_link', array( $termlink, $term->term_id ), '2.5.0', 'term_link' );
     4273                $termlink = apply_filters( 'tag_link', $termlink, $term->term_id );
    42754274        } elseif ( 'category' === $taxonomy ) {
    42764275
    42774276                /**
    42784277                 * Filters the category link.
    42794278                 *
    42804279                 * @since 1.5.0
    4281                  * @deprecated 2.5.0 Use {@see 'term_link'} instead.
    42824280                 *
    42834281                 * @param string $termlink Category link URL.
    42844282                 * @param int    $term_id  Term ID.
    42854283                 */
    4286                 $termlink = apply_filters_deprecated( 'category_link', array( $termlink, $term->term_id ), '2.5.0', 'term_link' );
     4284                $termlink = apply_filters( 'category_link', $termlink, $term->term_id );
    42874285        }
    42884286
    42894287        /**