A bunch of filters and minor fixes
|Reported by:||5ubliminal||Owned by:|
First of all I removed the
unset($wp_filter); // in wp-settings.php
and setup a static counter in add_filter(). On the first run, it will reset the $wp_filter to an empty array(). It will also make sure on each run the $wp_filter is an array().
This allows plugins to hook even inside the wp-config.php if it includes the wp-includes/plugin.php file.
I added 1-2 filters to all functions that list plugin files. This way plugins can alter these lists. Still got a lot to test but the filters in place do absolutely no damage, but provide me the testing ground for some deeper modifications.
I also added 2 tweaks I carry on from version to version. A filter like this:
apply_filters( "query_template", $templates, $type );
located in the get_query_template() function allowing unitary management of template file array regardless of future WordPress changes.
Also added an extra parameter to login_init action in wp-login.php. Special actions exist for each $action but needed the general one to tell me where it's calling from.
do_action( 'login_init', $action ); // This was missing
Changes are commented and my name attached to each change so you know who to blame or ask questions.