The Order of Things

Since WP 3.6.1, you may get odd errors like “Call to undefined function wp_validate_redirect()” errors in WP Admin where AJAX is used. The error is due to plugins that call wp_get_referer() on init.

While this will be patched more in 3.6.2, today’s quick lesson in ‘Making your plugins better’ is this simple note:

Doing anything before plugins_loaded or init is a bad idea.

If you find an affected plugin, please feel free to report it here: