Make WordPress Core


Ignore:
Timestamp:
06/14/2016 03:05:21 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Introduce a redirect_term_location filter to change the redirect on term editing.

This complements the redirect_post_location filter added in [12260].

Props alexvandervegt.
Fixes #36367.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r37488 r37696  
    206206        $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
    207207    }
    208     wp_redirect( $location );
     208
     209    /**
     210     * Filters the taxonomy redirect destination URL.
     211     *
     212     * @since 4.6.0
     213     *
     214     * @param string $location The destination URL.
     215     * @param object $tax      The taxonomy object.
     216     */
     217    wp_redirect( apply_filters( 'redirect_term_location', $location, $tax ) );
    209218    exit;
    210219}
Note: See TracChangeset for help on using the changeset viewer.