WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 636 | $errors = new WP_Error(); |
| 637 | $illegal_names = get_site_option( 'illegal_names' ); |
| 638 | if ( $illegal_names == false ) { |
| 639 | $illegal_names = array( 'www', 'web', 'root', 'admin', 'main', 'invite', 'administrator' ); |
| 640 | add_site_option( 'illegal_names', $illegal_names ); |
| 641 | } |
| 642 | |
| 643 | // On sub dir installs, Some names are so illegal, only a filter can spring them from jail |
| 644 | if (! is_subdomain_install() ) |
| 645 | $illegal_names = array_merge($illegal_names, apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ) ); |
| 646 | |
| 647 | |
| 648 | if ( empty( $blogname ) ) |
| 649 | $errors->add('blogname', __('Please enter a site name')); |
| 650 | |
| 651 | $maybe = array(); |
| 652 | preg_match( '/[a-z0-9]+/', $blogname, $maybe ); |
| 653 | if ( $blogname != $maybe[0] ) |
| 654 | $errors->add('blogname', __('Only lowercase letters and numbers allowed')); |