[wp-trac] [WordPress Trac] #16557: Ability to disable redirect_guess_404_permalink()
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 8 10:58:59 UTC 2011
#16557: Ability to disable redirect_guess_404_permalink()
------------------------------------+-----------------------------
Reporter: msafi | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Canonical | Version: 3.1
Severity: minor | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+-----------------------------
Comment (by nacin):
What I'd like to do is simply make redirect_guess_404_permalink() actually
hook into redirect_canonical(), I guess as a filter since it returns data.
Then the filter can be removed.
So instead of:
{{{
if ( ! $redirect_url )
$redirect_url = redirect_guess_404_permalink();
}}}
Instead do:
{{{
$redirect_url = apply_filters( 'redirect_guess_404_permalink',
$redirect_url );
}}}
And hook the function into there. Then it may be removed. Also, the filter
name is lame -- perhaps can be more generic considering the positioning.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16557#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list