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:
scribu
2010-10-18 21:06:49 +00:00
parent d5bd0ffd71
commit e62f41c374
2 changed files with 61 additions and 49 deletions
+18
View File
@@ -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.
*