检索子目录多站点安装上的保留站点列表。

原型

get_subdirectory_reserved_names()

返回值

(array)  $ names保留子目录名称的数组。

源文件

路径:wp-includes/ms-functions.php

<?php
...
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 array $subdirectory_reserved_names Array of reserved names.
	 */
	return apply_filters( 'subdirectory_reserved_names', $names );
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/get_subdirectory_reserved_names/