Making WordPress.org

Ticket #3607: 3607.patch

File 3607.patch, 1.6 KB (added by keesiemeijer, 6 years ago)

Add query vars the proper way

  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/handbooks.php

     
    6262         * @return array Array with public query vars.
    6363         */
    6464        public static function add_query_vars( $public_query_vars ) {
    65                 $public_query_vars['is_handbook'] = false;
    66                 $public_query_vars['current_handbook'] = false;
    67                 $public_query_vars['current_handbook_home_url'] = false;
    68                 $public_query_vars['current_handbook_name'] = '';
     65                $public_query_vars[] = 'wporg_is_handbook';
     66                $public_query_vars[] = 'current_handbook';
     67                $public_query_vars[] = 'current_handbook_home_url';
     68                $public_query_vars[] = 'current_handbook_name';
    6969
    7070                return $public_query_vars;
    7171        }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php

     
    3838         * @return array
    3939         */
    4040        public static function default_qv_empty_post_type_search( $public_query_vars ) {
    41                 $public_query_vars['empty_post_type_search'] = false;
     41                $public_query_vars[] = 'empty_post_type_search';
    4242                return $public_query_vars;
    4343        }
    4444