WordPress.org

Ready to get started?Download WordPress

Forums

Theme My Login
Filtering Markup for Error Messaging (2 posts)

  1. djquinn
    Member
    Posted 8 months ago #

    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.

    http://wordpress.org/plugins/theme-my-login/

  2. djquinn
    Member
    Posted 8 months ago #

    Apologies, I've sent this feature request to you via your form.

Reply

You must log in to post.

About this Plugin

About this Topic