Skip to content
Commit 6dd5546f authored by Scott Taylor's avatar Scott Taylor
Browse files

Fix a regression for `get_queried_object()` by checking for `category_name`...

Fix a regression for `get_queried_object()` by checking for `category_name` when `cat` isn't set - mainly `is_category()` being true for Uncategorized or when queried object is accessed in `pre_get_posts`. Also check for `$query['terms']` when trying to assign a term as the queried object when `is_tax()` is true. Adds a unit test. See [26007] for how I originally broke this while fixing a bigger issue.

Props Chouby, jeremyfelt.
Fixes #26634, #26627.


Built from https://develop.svn.wordpress.org/trunk@26864


git-svn-id: https://core.svn.wordpress.org/trunk@26750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent e6989727
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment