WordPress at a glance

wp_parse_id_list() WP 1.0

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

Works based on: wp_parse_list()
✈ 1 time = 0.000044s = very fast | 50000 times = 0.53s = very fast

No Hooks.

Return

Array. Sanitized array of IDs.

Usage

wp_parse_id_list( $list );
$list(array/string) (required)
List of ids.

Changelog

Since 3.0.0 Introduced.

Code of wp parse id list: wp-includes/functions.php WP 5.2.4

<?php
function wp_parse_id_list( $list ) {
	$list = wp_parse_list( $list );

	return array_unique( array_map( 'absint', $list ) );
}

Related Functions

From category: Helper Functions

No comments
    Hello, !     Log In . Register