[wp-trac] [WordPress Trac] #41346: Introduce a hook for individual plugin loaded

WordPress Trac noreply at wordpress.org
Wed Dec 12 12:27:15 UTC 2018


#41346: Introduce a hook for individual plugin loaded
------------------------------------+-----------------------------
 Reporter:  Rarst                   |       Owner:  SergeyBiryukov
     Type:  feature request         |      Status:  reviewing
 Priority:  normal                  |   Milestone:  5.1
Component:  Plugins                 |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  needs-patch needs-docs  |     Focuses:  performance
------------------------------------+-----------------------------

Comment (by ChriCo):

 Replying to [comment:1 schlessera]:
 >
 > {{{#!php
 > // snip ...
 > do_action( "plugin_loaded_{$plugin_slug}", $plugin );
 > }}}
 >

 Isn't it better to have

 {{{#!php
 do_action( "plugin_loaded", $plugin, $plugin_slug );
 }}}

 ? Otherwhise you would need to hook into {n}-Plugins. Instead you can hook
 into one action and have all possibilities.

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


More information about the wp-trac mailing list