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 |
---|---|
38 |
|
39 | $blog = $_POST['blog']; |
40 | $domain = ''; |
41 | if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) |
42 | $domain = strtolower( $blog['domain'] ); |
43 |
|
44 | // If not a subdomain install, make sure the domain isn't a reserved word |
45 | if ( ! is_subdomain_install() ) { |
46 | /** This filter is documented in wp-includes/ms-functions.php */ |
47 | $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); |
48 | if ( in_array( $domain, $subdirectory_reserved_names ) ) |
49 | wp_die( sprintf( __('The following words are reserved for use by WordPress functions and cannot be used as blog names: <code>%s</code>' ), implode( '</code>, <code>', $subdirectory_reserved_names ) ) ); |
50 | } |
51 |
|
52 | $email = sanitize_email( $blog['email'] ); |
53 | $title = $blog['title']; |
54 |
|
55 | if ( empty( $domain ) ) |
56 | wp_die( __( 'Missing or invalid site address.' ) ); |