[wp-hackers] Overriding Cor Functions (Was: IIS Problem)
ryan at boren.nu
Sun Apr 3 21:45:23 GMT 2005
On Sun, 2005-04-03 at 16:38 -0500, Ryan Boren wrote:
> On Sun, 2005-04-03 at 16:30 -0500, Robert Deaton wrote:
> > How about splitting some of the bare necessities out of functions.php
> > and into another file, so that we would have access to some of the
> > functions that nobody should be changing anyways and that plugins
> > would need (get_option, add_action, add_filter, etc.). This way, we
> > don't lose some of the features that plugins can provide and still
> > have the option to override most core functions. This could become a
> > whole new major feature for whatever the next release is (dare I say
> > 1.6, 1.7, or 1.8, who knows?). It could be called more of a "module"
> > or "addon" instead of plugins, because it offers greater power over
> > what happens everywhere.
> get_alloptions() and some other functions call do_action() and
> apply_filters(). If we call these before the plugins are loaded, no one
> will be around to listen to those actions and filters.
> We could have a set of preload-functions.php, but none of those
> functions should invoke filters or actions. Doing so would be useless.
> Adding filters and actions would be okay.
Hmmm, we call get_settings() several times before loading plugins.
get_settings() calls get_alloptions() which retrieves all options and
does an apply_filters() on each. Since plugins aren't loaded yet,
applying filters doesn't seem very useful.
More information about the wp-hackers