Regression on login_message: content erased
-
hello,
i don’t know exactly when it happened but you introduced a regression with the filter
login_message
. This filter takes an argument (HTML content) and you should return a proper value, either after a change, or the original content if you don’t apply any change. If you don’t do so, you are cancelling what other plugins/themes are doing by erasing the previously modified content. This used to work in previous versions.Also, you are not using the filter correctly since you should return the value and not print it!
The workaround is to register a filter with a lower priority (11+) to cancel your bug but this is a problem you should fix.
From login-form-screen.php:
// Message Above Login Form add_filter('login_message','message_above_login_form'); function message_above_login_form(){ // <---- missing argument ! $login_page = unserialize(get_option('Admin_custome_login_login')); if(isset($login_page['log_form_above_msg'])){ $log_form_above_msg = $login_page['log_form_above_msg']; if($log_form_above_msg !=""){ ?> <p class='login-msg-above'><?php echo html_entity_decode(stripslashes($log_form_above_msg)); ?></p> <?php // you should RETURN HTML content, not print it! } } }
- The topic ‘Regression on login_message: content erased’ is closed to new replies.