plugin.php functions (filters) should be available to all pluggable components (wpdb, object cache)
|Reported by:||andy||Owned by:|
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().