mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Fix custom post type feed when no regular posts present. Props aaroncampbell for initial patch. Fixes #14922
git-svn-id: https://develop.svn.wordpress.org/trunk@15838 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -279,6 +279,24 @@ function is_serialized_string( $data ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a unique key from an argument
|
||||
*
|
||||
* @since 3.1
|
||||
*
|
||||
* @param mixed $arg
|
||||
* @return string
|
||||
*/
|
||||
function wp_cache_key( $arg ) {
|
||||
if ( is_scalar( $arg ) )
|
||||
return md5( $arg );
|
||||
|
||||
$arg = (array) $arg;
|
||||
sort( $arg );
|
||||
|
||||
return md5( serialize( $arg ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve option value based on name of option.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user