Make WordPress Core


Ignore:
Timestamp:
10/18/2010 09:06:49 PM (14 years ago)
Author:
scribu
Message:

Fix custom post type feed when no regular posts present. Props aaroncampbell for initial patch. Fixes #14922

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r15834 r15838  
    278278        return true;
    279279    return false;
     280}
     281
     282/**
     283 * Generates a unique key from an argument
     284 *
     285 * @since 3.1
     286 *
     287 * @param mixed $arg
     288 * @return string
     289 */
     290function 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 ) );
    280298}
    281299
Note: See TracChangeset for help on using the changeset viewer.