Changeset 15839
- Timestamp:
- 10/18/2010 09:54:39 PM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15838 r15839 278 278 return true; 279 279 return false; 280 }281 282 /**283 * Generates a unique key from an argument284 *285 * @since 3.1286 *287 * @param mixed $arg288 * @return string289 */290 function wp_cache_key( $arg ) {291 if ( is_scalar( $arg ) )292 return md5( $arg );293 294 $arg = (array) $arg;295 sort( $arg );296 297 return md5( serialize( $arg ) );298 280 } 299 281 -
trunk/wp-includes/post.php
r15838 r15839 3990 3990 $post_types = apply_filters( "get_lastpost{$field}_post_types", (array) $post_types ); 3991 3991 3992 $key = "lastpost{$field}:$blog_id:$timezone:" . wp_cache_key( $post_types);3992 $key = "lastpost{$field}:$blog_id:$timezone:" . md5( serialize( $post_types ) ); 3993 3993 3994 3994 $date = wp_cache_get( $key, 'timeinfo' );
Note: See TracChangeset
for help on using the changeset viewer.