функция
since 4.4.0
get_subdirectory_reserved_names()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
get_subdirectory_reserved_names(): string[]
Описание
Получает список зарезервированных сайтов в установке Multisite с поддиректориями.
Возвращаемое значение
string[]
Исходный код
wp-includes/ms-functions.php:2745
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 );
}
История изменений
| Версия | Описание |
|---|---|
| 4.4.0 | Introduced. |

