mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 06:36:47 +01:00
3.7 regression from [25119]: Have in_category() return false when the first argument is empty.
Merges [25923] to the 3.7 branch. props ericlewis. fixes #25706. Built from https://develop.svn.wordpress.org/branches/3.7@25924 git-svn-id: http://core.svn.wordpress.org/branches/3.7@25883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
63b0a09a2f
commit
45cb40226f
@ -232,6 +232,9 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false )
|
||||
* @return bool True if the current post is in any of the given categories.
|
||||
*/
|
||||
function in_category( $category, $post = null ) {
|
||||
if ( empty( $category ) )
|
||||
return false;
|
||||
|
||||
return has_category( $category, $post );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user