Filtering Markup for Error Messaging
-
Hi there, it seems like it’s not possible to filter the markup that comes out of get_errors() in the plugin.
For example, in any of the form templates, we have this at the top:
<?php $template->the_action_template_message( 'login'); ?> <?php $template->the_errors(); ?>
I can change the markup that comes out of the_action_template_message by using the $before and $after parameters, but the markup that comes out of the_errors has hardcoded markup coming from the get_errors() function:
It’s on line 223 of class-theme-my-login-template.php:
if ( ! empty( $errors ) ) $output .= '<div class="error">' . apply_filters( 'login_errors', $errors ) . "</p>\n"; if ( ! empty( $messages ) ) $output .= '<p class="message">' . apply_filters( 'login_messages', $messages ) . "</p>\n";
If you removed the p tags in there, we’d be able to add our own markup by using your filters for login_messages and error_messages.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Filtering Markup for Error Messaging’ is closed to new replies.