Making WordPress.org


Ignore:
Timestamp:
05/31/2016 08:10:44 PM (10 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Set handbook-related flags and data once via query variables rather than assuming (or always checking for) the presence of handbook plugin template tags.

Specifically sets 'is_handbook', 'current_handbook', 'current_handbook_home_url', 'current_handbook_name'.

Props keesiemeijer.
Fixes #1671.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/redirects.php

    r3242 r3281  
    3333         */
    3434        public static function redirect_single_search_match() {
    35                 if ( is_search() && ! wporg_is_handbook() && 1 == $GLOBALS['wp_query']->found_posts ) {
     35                if ( is_search() && ! get_query_var( 'is_handbook' ) && 1 == $GLOBALS['wp_query']->found_posts ) {
    3636                        wp_redirect( get_permalink( get_post() ) );
    3737                        exit();
Note: See TracChangeset for help on using the changeset viewer.