[wp-trac] [WordPress Trac] #36367: Give users control on the term redirect
WordPress Trac
noreply at wordpress.org
Tue Apr 5 06:42:44 UTC 2016
#36367: Give users control on the term redirect
----------------------------+------------------------------
Reporter: alexvandervegt | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.4.2
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: administration
----------------------------+------------------------------
Comment (by alexvandervegt):
Here you go:
{{{#!php
<?php
diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php
index b953da6..14290e3 100644
--- a/wp-admin/edit-tags.php
+++ b/wp-admin/edit-tags.php
@@ -205,7 +205,15 @@
if ( ! empty( $_REQUEST['paged'] ) ) {
$location = add_query_arg( 'paged', (int)
$_REQUEST['paged'], $location );
}
- wp_redirect( $location );
+ /**
+ * Filter the taxonomy redirect destination URL.
+ *
+ * @since 4.5.0
+ *
+ * @param string $location The destination URL.
+ * @param object $tax The taxonomy object.
+ */
+ wp_redirect( apply_filters( 'redirect_term_location', $location,
$tax ) );
exit;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36367#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list