Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add a filter for loaded plugins #118

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

jdamner
Copy link

@jdamner jdamner commented Aug 3, 2023

Change Details

Adds support for the MU plugins that are about to be loaded to be filtered.

Typically filtering of this list should be applied before the mu-loader is initialised.

add_filter(
    'lkwdwrd_mupluginloader_get_muplugins',
    function ( array $plugins ):  array {
        unset( $plugins['example/plugin.php'] );
        return $plugins;
    }
);

require_once 'vendor/boxuk/wp-muplugin-loader/src/mu-loader.php';

src/Util/loader.php Outdated Show resolved Hide resolved
@jdamner jdamner force-pushed the filter-muplugins-loading branch from 27e28a4 to 6e7c8da Compare August 3, 2023 14:48
Change Details
----------------
Adds support for the MU plugins that are about to be loaded to be filtered.

Typically filtering of this list should be applied before the mu-loader is initialised.
@jdamner jdamner force-pushed the filter-muplugins-loading branch from 6e7c8da to 5d3cc55 Compare August 3, 2023 15:00
@jdamner jdamner merged commit 1d3029d into master Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants