subdirectory_reserved_names filter-hookWP 3.0.0

Filters reserved site names on a sub-directory Multisite installation.

Usage

add_filter( 'subdirectory_reserved_names', 'wp_kama_subdirectory_reserved_names_filter' );

/**
 * Function for `subdirectory_reserved_names` filter-hook.
 * 
 * @param string[] $subdirectory_reserved_names Array of reserved names.
 *
 * @return string[]
 */
function wp_kama_subdirectory_reserved_names_filter( $subdirectory_reserved_names ){

	// filter...
	return $subdirectory_reserved_names;
}
$subdirectory_reserved_names(string[])
Array of reserved names.

Changelog

Since 3.0.0 Introduced.
Since 4.4.0 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', and 'embed' were added to the reserved names list.

Where the hook is called

get_subdirectory_reserved_names()
subdirectory_reserved_names
wp-includes/ms-functions.php 2791
return apply_filters( 'subdirectory_reserved_names', $names );

Where the hook is used in WordPress

Usage not found.