WordPress at a glance

wp_parse_slug_list() WP 1.0

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

Works based on: sanitize_title()
✈ 1 time = 0.000199s = fast | 50000 times = 3.64s = fast | PHP 7.0.8, WP 4.7

No Hooks.

Return

Array. Sanitized array of slugs.

Usage

wp_parse_slug_list( $list );
$list(array/string) (required)
List of slugs.

Code of wp parse slug list: wp-includes/functions.php VER 5.1.1

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

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

Related Functions

From tag: array list help functions (sorting arrays objects)

More from tag: sanitize_

More from category: Helper Functions

No comments
    Hello, !     Log In . Register