get_subdirectory_reserved_names

Retrieves a list of reserved site on a sub-directory Multisite install.

Description

(array) get_subdirectory_reserved_names(); 

Returns (array)

$names Array of reserved subdirectory names.


Usage

  1. if ( !function_exists( 'get_subdirectory_reserved_names' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_subdirectory_reserved_names(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-functions.php  
  1. function get_subdirectory_reserved_names() { 
  2. $names = array( 
  3. 'page', 'comments', 'blog', 'files', 'feed', 'wp-admin',  
  4. 'wp-content', 'wp-includes', 'wp-json', 'embed' 
  5. ); 
  6.  
  7. /** 
  8. * Filters reserved site names on a sub-directory Multisite install. 
  9. * @since 3.0.0 
  10. * @since 4.4.0 'wp-admin', 'wp-content', 'wp-includes', 'wp-json', and 'embed' were added 
  11. * to the reserved names list. 
  12. * @param array $subdirectory_reserved_names Array of reserved names. 
  13. */