Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_parse_id_list [ WordPress Function ]

wp_parse_id_list ( $list )
Parameters:
  • (array|string) $list
Returns:
  • (array) Sanitized array of IDs
Defined at:



Clean up an array, comma- or space-separated list of IDs.

Source


<?php
function wp_parse_id_list$list ) {
    if ( !
is_array($list) )
        
$list preg_split('/[\s,]+/'$list);

    return 
array_unique(array_map('absint'$list));
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics