wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_parse_id_list › WordPress Function

Od3.0.0
Przestarzałyn/a
› wp_parse_id_list ( $input_list )
Parametry:
  • (array|string|int) $input_list List of IDs.
    Wymagane: Tak
Powrót:
  • (int[]) Sanitized array of IDs. May include zero. Keys are preserved
    from the input and `array_unique()` may leave gaps, so the
    result is not necessarily a list.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 5.1.0
  • 7.2.0

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



Źródło

function wp_parse_id_list( $input_list ): array {
	$input_list = wp_parse_list( $input_list );

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