[wp-trac] [WordPress Trac] #20243: Ability to disable multiple term URL queries

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 15 15:07:26 UTC 2012


#20243: Ability to disable multiple term URL queries
-------------------------+------------------------------
 Reporter:  egorpromo    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Taxonomy     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  close        |
-------------------------+------------------------------
Changes (by scribu):

 * keywords:   => close


Comment:

 That said, I don't think we need to burden Core with yet another flag.

 You have multiple ways of achieving the desired outcome through a plugin.
 One example:

 `
 function disable_complex_term_queries( $args ) {
         foreach ( array( 'cat', 'tag' ) as $key ) {
                 if ( isset( $args[$key] ) && false !== strpos(
 $args[$key], ',' ) )
                         return array( 'error' => '404' );
         }

         return $args;
 }

 add_filter( 'request', 'disable_complex_term_queries' );
 `

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20243#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list