[wp-trac] [WordPress Trac] #15042: plugin.php functions (filters) should be available to all pluggable components (wpdb, object cache)
WordPress Trac
wp-trac at lists.automattic.com
Tue Oct 5 17:09:16 UTC 2010
#15042: plugin.php functions (filters) should be available to all pluggable
components (wpdb, object cache)
--------------------------+-------------------------------------------------
Reporter: andy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version:
Severity: normal | Keywords: filter, plugin
--------------------------+-------------------------------------------------
Problem: DB plugins (e.g. HyperDB) can't use add_filter or apply_filters
in their configurations because these functions are unavailable at include
time.
Discussion: The filter and action functions in plugin.php should be
available to all pluggable components. This includes WPDB and
WP_Object_Cache which should rely on these core programming patterns
rather than reimplementing them. As these functions deal only with global
variables, it is safe to include them earlier. Functions related to
plugin_basename are not useful to WPDB or WP_Object_Cache but there is no
danger in moving them as well.
Solution: Require plugin.php before require_wp_db().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15042>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list