newblogname
Filter HookDescription
Filters the new site name during registration. The name is the site's subdomain or the site's subdirectory path depending on the network settings.Hook Information
File Location |
wp-includes/ms-functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 708 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$blogname
|
Site name. |
Usage Examples
Basic Usage
<?php
// Hook into newblogname
add_filter('newblogname', 'my_custom_filter', 10, 1);
function my_custom_filter($blogname) {
// Your custom filtering logic here
return $blogname;
}
Source Code Context
wp-includes/ms-functions.php:708
- How this hook is used in WordPress core
<?php
703 *
704 * @since MU (3.0.0)
705 *
706 * @param string $blogname Site name.
707 */
708 $blogname = apply_filters( 'newblogname', $blogname );
709
710 $blog_title = wp_unslash( $blog_title );
711
712 if ( empty( $blog_title ) ) {
713 $errors->add( 'blog_title', __( 'Please enter a site title.' ) );
PHP Documentation
<?php
/**
* Filters the new site name during registration.
*
* The name is the site's subdomain or the site's subdirectory
* path depending on the network settings.
*
* @since MU (3.0.0)
*
* @param string $blogname Site name.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/ms-functions.php
Related Hooks
Related hooks will be displayed here in future updates.