[wp-hackers] plugins-loaded timing?
Stephen Rider
wp-hackers at striderweb.com
Wed May 27 21:12:45 GMT 2009
Hi all --
Is there a particular reasoning why the "plugins-loaded" action
doesn't fire just after the plugins are loaded? After plugins load, a
few things happen before the actual action happens. Specifically....
*** excerpt from wp-settings.php ***
require (ABSPATH . WPINC . '/pluggable.php');
/*
* In most cases the default internal encoding is latin1, which is of
no use,
* since we want to use the mb_ functions for utf-8 strings
*/
if (function_exists('mb_internal_encoding')) {
if (!@mb_internal_encoding(get_option('blog_charset')))
mb_internal_encoding('UTF-8');
}
if ( defined('WP_CACHE') && function_exists('wp_cache_postload') )
wp_cache_postload();
do_action('plugins_loaded');
*** end excerpt ***
I ask because I have (more than once) had functions I would like to
run immediately after plugins load, and this throws a potential
spanner in the works (especially the fact that the hook fires after
pluggable.php has been loaded).
--
Stephen Rider
http://striderweb.com/
More information about the wp-hackers
mailing list