Make WordPress Core

Changeset 6247


Ignore:
Timestamp:
10/14/2007 01:08:07 AM (18 years 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

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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 ) {
Note: See TracChangeset for help on using the changeset viewer.