我们如何检查用户是否正在登录或注册? 时间:2012-07-06 作者:Andrew Welch 我正在使用此筛选器更改登录页面上的文本:function filter_register_text() { return "<p class=\'message register\'>Registering for this site will give you access to the admin panel to add new products with images and useful files for others to download and choose open product licenses.</p>"; } add_filter(\'login_message\', \'filter_register_text\'); 如果用户signs up 在网站上,而不是只想log in.谢谢 1 个回复 最合适的回答,由SO网友:TheDeadMedic 整理而成 我想你最好的办法是检查action 参数已设置(&S);等于register:if ( isset( $_REQUEST[\'action\'] ) && $_REQUEST[\'action\'] == \'register\' ) add_filter( \'login_message\', \'filter_register_text\' ); 结束 文章导航