Changeset 6247

Show
Ignore:
Timestamp:
10/14/07 01:08:07 (11 months ago)
Author:
ryan
Message:

Allow single post ID and comma delimited list of post IDs to be passed to update_postmeta_cache(). Fix default cache to allow storage of empty array. see #5194

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/cache.php

    r5870 r6247  
    268268            $group = 'default'; 
    269269 
    270         if (NULL == $data) 
     270        if (NULL === $data) 
    271271            $data = ''; 
    272272 
  • trunk/wp-includes/post.php

    r6242 r6247  
    16661666        return false; 
    16671667 
     1668    if ( !is_array($post_ids) ) { 
     1669        $post_ids = preg_replace('|[^0-9,]|', '', $post_ids); 
     1670        $post_ids = explode(',', $post_ids); 
     1671    } 
     1672 
     1673    $post_ids = array_map('intval', $post_ids); 
     1674 
    16681675    $ids = array(); 
    16691676    foreach ( (array) $post_ids as $id ) {