File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -240,20 +240,11 @@ protected function get_all_items() {
240240 $ items = $ this ->get_item_list ();
241241
242242 // Get all mu-plugins including those in subfolders.
243- // get_mu_plugins() only returns PHP files directly in the mu-plugins directory.
244- // To also get plugins in subfolders, we use get_plugins() with a relative path.
245- $ mu_plugins = get_mu_plugins ();
246- if ( defined ( 'WPMU_PLUGIN_DIR ' ) ) {
247- // Get plugins from mu-plugins subfolders using the relative path approach.
248- // This is the standard WordPress method to access plugins in the mu-plugins directory.
249- $ mu_plugins_subfolder = get_plugins ( '/../ ' . basename ( WPMU_PLUGIN_DIR ) );
250- // Merge subfolder plugins with root-level mu-plugins.
251- // No duplicates possible: get_mu_plugins() returns 'plugin.php' (root only)
252- // while get_plugins() returns 'subfolder/plugin.php' (different keys).
253- foreach ( $ mu_plugins_subfolder as $ file => $ plugin_data ) {
254- if ( ! isset ( $ mu_plugins [ $ file ] ) ) {
255- $ mu_plugins [ $ file ] = $ plugin_data ;
256- }
243+ $ mu_plugins = get_mu_plugins ();
244+ $ mu_plugins_subfolder = get_plugins ( '/../ ' . basename ( WPMU_PLUGIN_DIR ) );
245+ foreach ( $ mu_plugins_subfolder as $ file => $ plugin_data ) {
246+ if ( ! isset ( $ mu_plugins [ $ file ] ) ) {
247+ $ mu_plugins [ $ file ] = $ plugin_data ;
257248 }
258249 }
259250
You can’t perform that action at this time.
0 commit comments