[wp-trac] [WordPress Trac] #37656: Improve plugin bootstrapping processes with `WP_Plugin`

WordPress Trac noreply at wordpress.org
Tue Aug 16 13:08:30 UTC 2016


#37656: Improve plugin bootstrapping processes with `WP_Plugin`
-------------------------+------------------------------
 Reporter:  flixos90     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Plugins      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by swissspidy):

 A `WP_Plugin` class has been previously mentioned in #22256 and brought up
 with a patch in #21883, but only in regards of hooks and filters (i.e.
 `$GLOBALS['wp_global_hooks'] = new WP_Plugin();`. With #17817 in
 contention, that approach would need some more tweaking. Also, the class
 name isn't ideal too because of `WP_Theme`. Using `WP_Plugin` for hooks
 but themes can use hooks too? Confusing.

 Starting small has probably the highest chance of getting this into core,
 i.e. a `WP_Plugin` class analogous to `WP_Theme`. Forgetting #21883 and
 `register_plugin()` in the beginning.

 While `register_plugin()` and an additional interface sounds interesting,
 I do not think anyone would use it because of backward compatibility with
 older WordPress versions. Who wants to basically maintain two versions of
 their plugin?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37656#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list