Make WordPress Core


Ignore:
Timestamp:
01/08/2010 08:44:45 AM (15 years ago)
Author:
westi
Message:

Add support to get_terms() to allow 'include' & 'exclude' args to be arrays(). Fixes #11076 props scribu.

File:
1 edited

Legend:

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

    r12656 r12658  
    27512751
    27522752/**
     2753 * Clean up an array, comma- or space-separated list of IDs
     2754 *
     2755 * @since 3.0.0
     2756 *
     2757 * @param array|string $list
     2758 * @return array Sanitized array of IDs
     2759 */
     2760function wp_parse_id_list($list) {
     2761    if ( !is_array($list) )
     2762        $list = preg_split('/[\s,]+/', $list);
     2763
     2764    return array_unique(array_map('absint', $list));
     2765}
     2766
     2767/**
    27532768 * Determines if default embed handlers should be loaded.
    27542769 *
Note: See TracChangeset for help on using the changeset viewer.