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

Jacob Santos wordpress at santosj.name
Mon Feb 4 07:27:30 GMT 2008

Come to think of it, if it worked in WordPress < 2.5, than it should also
work with WordPress 2.5 and a regression occurred. A trac ticket should be
filed to add the same behavior back in.

> 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
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


Jacob Santos

http://www.santosj.name - Personal Blog
http://funcdoc.wordpress.com - WordPress Function Documentation Blog

More information about the wp-hackers mailing list