admin管理员组文章数量:1323714
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?
本文标签: Replace form field error text
版权声明:本文标题:Replace form field error text? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742127649a2422014.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论