get_subdirectory_reserved_names(): string[]
Retrieves a list of reserved site on a sub-directory Multisite installation.
Return
string[] Array of reserved names.
Source
File: wp-includes/ms-functions.php
.
View all references
function get_subdirectory_reserved_names() {
$names = array(
'page',
'comments',
'blog',
'files',
'feed',
'wp-admin',
'wp-content',
'wp-includes',
'wp-json',
'embed',
);
/**
* Filters reserved site names on a sub-directory Multisite installation.
*
* @since 3.0.0
* @since 4.4.0 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', and 'embed' were added
* to the reserved names list.
*
* @param string[] $subdirectory_reserved_names Array of reserved names.
*/
return apply_filters( 'subdirectory_reserved_names', $names );
}
Hooks
-
apply_filters( 'subdirectory_reserved_names',
string[] $subdirectory_reserved_names ) -
Filters reserved site names on a sub-directory Multisite installation.
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
Allow “/blog” in multsite network :
Here is better solution to modify this list of reserved names. Solution by daniyalahmedk not working for 2 reasons:
return
state in the function and WordPress getnull
as result of this function (not array with words).