subdirectory_reserved_names
Filters reserved site names on a sub-directory Multisite install.
Description
Parameters (1)
- 0. $names (string)
- Array of reserved names.
Usage
- To run the hook, copy the example below.
- $names = apply_filters( 'subdirectory_reserved_names', $names );
- if ( !empty( $names ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the subdirectory_reserved_names callback
- function filter_subdirectory_reserved_names( $names ) {
- // make filter magic happen here...
- return $names;
- };
- // add the filter
- add_filter( 'subdirectory_reserved_names', 'filter_subdirectory_reserved_names', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'subdirectory_reserved_names', 'filter_subdirectory_reserved_names', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/ms-functions.php
- return apply_filters( 'subdirectory_reserved_names', $names );