mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Add support to get_terms() to allow 'include' & 'exclude' args to be arrays(). Fixes #11076 props scribu.
git-svn-id: https://develop.svn.wordpress.org/trunk@12658 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2749,6 +2749,21 @@ function wp_parse_args( $args, $defaults = '' ) {
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up an array, comma- or space-separated list of IDs
|
||||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param array|string $list
|
||||
* @return array Sanitized array of IDs
|
||||
*/
|
||||
function wp_parse_id_list($list) {
|
||||
if ( !is_array($list) )
|
||||
$list = preg_split('/[\s,]+/', $list);
|
||||
|
||||
return array_unique(array_map('absint', $list));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if default embed handlers should be loaded.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user