WordPress.org

Plugin Directory

Changeset 567866


Ignore:
Timestamp:
07/05/12 15:50:17 (22 months ago)
Author:
jbrinley
Message:

If %category% is in the permastruct, WordPress will try to redirect all router pages to the URL for the dummy page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-router/trunk/WP_Router_Page.class.php

    r391925 r567866  
    177177        return $template; 
    178178    } 
     179 
     180    /** 
     181     * If %category% is in the permastruct, WordPress will try to redirect 
     182     * all router pages to the URL for the dummy page. This should 
     183     * stop that from happening 
     184     * 
     185     * @see redirect_canonical() 
     186     * @param string $redirect_url 
     187     * @param string $requested_url 
     188     * @return bool 
     189     */ 
     190    public function override_redirect( $redirect_url, $requested_url ) { 
     191        if ( get_query_var('WP_Route') ) { 
     192            return FALSE; 
     193        } 
     194        return $redirect_url; 
     195    } 
    179196} 
Note: See TracChangeset for help on using the changeset viewer.