WordPress.org

Make WordPress Core

Changeset 21553


Ignore:
Timestamp:
08/20/2012 05:25:06 PM (7 years ago)
Author:
ryan
Message:

Reduce calls to sanitize_title_with_dashes in register_(post_type|taxonomy). Props ocean90. fixes #21600

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r21550 r21553  
    10431043        if ( true === $args->query_var )
    10441044            $args->query_var = $post_type;
    1045         $args->query_var = sanitize_title_with_dashes($args->query_var);
     1045        else
     1046            $args->query_var = sanitize_title_with_dashes($args->query_var);
    10461047        $wp->add_query_var($args->query_var);
    10471048    }
  • trunk/wp-includes/taxonomy.php

    r21552 r21553  
    332332        if ( true === $args['query_var'] )
    333333            $args['query_var'] = $taxonomy;
    334         $args['query_var'] = sanitize_title_with_dashes($args['query_var']);
     334        else
     335            $args['query_var'] = sanitize_title_with_dashes($args['query_var']);
    335336        $wp->add_query_var($args['query_var']);
    336337    }
Note: See TracChangeset for help on using the changeset viewer.