FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Introduce `perflab_active_modules` filter to control which modules are active by eugene-manuilov · Pull Request #87 · WordPress/performance · GitHub

Introduce perflab_active_modules filter to control which modules are active - #87

Merged
felixarntz merged 8 commits into
trunkfrom
feature/modules-control-filter
Jan 18, 2022
Merged

Introduce perflab_active_modules filter to control which modules are active#87
felixarntz merged 8 commits into
trunkfrom
feature/modules-control-filter

Conversation

Copy link
Copy Markdown
Contributor

Addresses #33

felixarntz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@eugene-manuilov Looks great!

I left one comment below that doesn't block this from being merged, but we'll need to keep this in mind. Maybe it's better for now to put 1.0.0 like we have elsewhere. However, I think it'd be great to have an issue bringing up the n.e.x.t proposal.

Comment thread load.php Outdated
/**
* Filters active modules to allow programmatically control which modules are active.
*
* @since n.e.x.t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We don't have the n.e.x.t convention here so far, but it's worth evaluating. Do you mind opening an issue where we can propose/discuss it? It would be important to document this somewhere eventually. We haven't published a release yet, but once we get to that, we'll need to have documentation anyway.

Maybe we could even have a npm script that replaces all n.e.x.t occurrences with a specific version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Updated and added a new ticket: #90

felixarntz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Re-approving for the additional (mini-)change.

Copy link
Copy Markdown
Member

@eugene-manuilov could provide a snippet of how to test the filter, in a mu-plugin for instance? Thanks :)

Copy link
Copy Markdown
Member

@eugene-manuilov could provide a snippet of how to test the filter, in a mu-plugin for instance? Thanks :)

add_filter( 'perflab_active_modules', function ( $modules ) {
    return array_diff( $modules, [ "foo", "bar" ] ); // modules you want to remove
} );

add_filter( 'perflab_active_modules', function ( $modules ) {
    return array_merge( $modules, [ "foo", "bar" ] ); // modules you want to add
} );

Copy link
Copy Markdown
Member

Thanks, @tillkruss

felixarntz added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure labels Jan 18, 2022
felixarntz added this to the 1.0.0-beta.1 milestone Jan 18, 2022
felixarntz added Infrastructure Issues for the overall performance plugin infrastructure and removed Infrastructure Issues for the overall performance plugin infrastructure labels Jan 18, 2022
felixarntz merged commit a1ca4ff into trunk Jan 18, 2022
felixarntz changed the title Allow programmatic control of active modules via filter Introduce perflab_active_modules filter to control which modules are active Jan 18, 2022
tillkruss deleted the feature/modules-control-filter branch March 7, 2022 19:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL