[wp-trac] [WordPress Trac] #55432: The $plugin parameter of the "plugin_loaded" action can be polluted by individual plugins

WordPress Trac noreply at wordpress.org
Tue Mar 22 14:28:42 UTC 2022


#55432: The $plugin parameter of the "plugin_loaded" action can be polluted by
individual plugins
---------------------------+---------------------
 Reporter:  stevegrunwell  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  6.0
Component:  Plugins        |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+---------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch => has-patch
 * milestone:  Future Release => 6.0


Comment:

 * [attachment:"55432.diff"] follows the precedent of [28644] and renames
 `$plugin` to `$_wp_plugin_file` to reduce the chance of a conflict.
 * [attachment:"55432.2.diff"] takes another approach more in line with
 [50787] and introduces a new function, `wp_load_plugin_file()`, to be used
 whenever we need to load a plugin file in core.

 I think [attachment:"55432.2.diff"] would be preferred here.

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


More information about the wp-trac mailing list