Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: subdirectory_reserved_names

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
611           $illegal_names = array_merge(
612                $illegal_names,
613                /**
614                 * Filter reserved site names on a sub-directory Multisite install.
615                 *
616                 * @since 3.0.0
617                 *
618                 * @param array $subdirectory_reserved_names Array of reserved names.
619                 */
620                apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) )
621           );
622      }
623
624      if ( empty( $blogname ) )
625           $errors->add('blogname', __( 'Please enter a site name.' ) );
626
627      if ( preg_match( '/[^a-z0-9]+/', $blogname ) )
628           $errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) );
629