[wp-hackers] updating plugins for compatibility with 2.4.x+

wordpress at santosj.name wordpress at santosj.name
Mon Feb 4 06:34:43 GMT 2008


You are looking the wrong place for the errors. Most of the time when
errors are encountered, they are redirected. In the process of wp-login,
you'll want to look in either wp_signon() (pluggable.php??), or
wp_safe_redirect() for a filter of some kind, or login_header() for a
filter. If none exist, then I guess the WordPress source doesn't want to
you see the errors.

There are no other actions or hooks that reference the errors, so I
suppose you are SOL in WordPress 2.5. You can lobby for them to add an
action that references the errors before the redirect.

Jacob Santos


> Hopefully, someone can tell me where I am going wrong with this?
>
> I am in the process of updating my plugins for 2.4.x and beyond, and one
> of
> them hooks into register_post (wp-login.php).
>
> The old plugin only required one global, $errors, and in keeping with how
> 2.3.x and lower handled them, displaying the error message was only as
> tough
> as using: *$errors['plugin'] = get_option('plugin_message');
>
> *2.4-bleeding has changed the error stuff to a format like so:
> *$errors->add('invalid_email',
> __('<strong>ERROR</strong>: There is no user registered with that email
> address.'));
>
> *I have tried everything under the sun, globalized everything I could
> think
> of, $errors, $error, you name it, and made sure that my error message
> follows the pattern above, and yet for some reason I cannot get WP to
> "see"
> my error.
> I've went so far as to place a *var_dump( $errors ); *after
> do_action('register_post'); inside wp-login.php, and of course, it sees
> all
> the standard errors, but doesnt see the one I'm adding. Yes, the actual
> checking is working.
>
> Am I missing globals? Something else that I need to add? If I take the
> plugin code and paste it right above the hook, it works -- so I'm
> obviously
> missing something.
>
> Ideas?
>
> Thanks in advance
>
>
> *
> *
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>




More information about the wp-hackers mailing list