I am customizing a multisite installation of Wordpress, and I want to replace this text.
Site names can only contain lowercase letters (a-z) and numbers.
Problem is that this is in the core of Wordpress and I cannot find any hook for it? Do you have any idea on how to edit this with PHP? Or do I have to use some kind of CSS text replacement?
Thank you in advance!
The error appears under the blogname-field
I am customizing a multisite installation of Wordpress, and I want to replace this text.
Site names can only contain lowercase letters (a-z) and numbers.
Problem is that this is in the core of Wordpress and I cannot find any hook for it? Do you have any idea on how to edit this with PHP? Or do I have to use some kind of CSS text replacement?
Thank you in advance!
The error appears under the blogname-field
- What are you trying to change it to and why? – Tom J Nowell ♦ Commented Sep 10, 2020 at 14:05
1 Answer
Reset to default 0I actually managed to chage it with this:
function replace_registration_site_name_error( $translated_text, $text, $domain ) {
$default = 'Site names can only contain lowercase letters (a-z) and numbers.';
if ( $translated_text == $default ) {
$translated_text = __( 'Test', 'my_text_domain' );
}
return $translated_text;
}
This works great. However I am not able to change these two strings with this method?
Site name must be at least %s character.
Site name must be at least %s characters.
Anyone know why?