Sanitize when querying against category name so that multiple-word subcategories match. props filosofo. fixes #8619
git-svn-id: https://develop.svn.wordpress.org/trunk@10956 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
84b875a903
commit
6ed53a4461
@ -1815,6 +1815,7 @@ class WP_Query {
|
||||
|
||||
// Category stuff for nice URLs
|
||||
if ( '' != $q['category_name'] && !$this->is_singular ) {
|
||||
$q['category_name'] = sanitize_title($q['category_name']);
|
||||
$reqcat = get_category_by_path($q['category_name']);
|
||||
$q['category_name'] = str_replace('%2F', '/', urlencode(urldecode($q['category_name'])));
|
||||
$cat_paths = '/' . trim($q['category_name'], '/');
|
||||
|
Loading…
Reference in New Issue
Block a user