[wp-trac] [WordPress Trac] #16557: Ability to disable redirect_guess_404_permalink()

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 8 11:19:11 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 westi):

 Replying to [comment:5 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();
 > }}}
 >

 Can we not just hook {{{redirect_guess_404_permalink()}}} onto
 {{{redirect_canonical}}} and be done with it - no new filters needed?
 > 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:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list