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

Add plugin suppression info in plugins screen #6959

Merged

Conversation

dhaval-parekh
Copy link
Collaborator

@dhaval-parekh dhaval-parekh commented Mar 7, 2022

Summary

Fixes #5340

Add plugin suppression info in the plugin meta row on the plugin screen.

image

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

@dhaval-parekh dhaval-parekh marked this pull request as ready for review March 7, 2022 14:50
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2022

Plugin builds for 73ce94c are ready 🛎️!

Copy link
Collaborator

@delawski delawski left a comment

Choose a reason for hiding this comment

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

@dhaval-parekh Thanks for the PR.

I noticed an issue with this feature on a multisite install. The network Plugins screen (/wp-admin/network/plugins.php) incorrectly displays an information about plugin suppression (it uses suppression data for the main site in a network):

Screenshot 2022-03-08 at 17 32 46

I think we skip displaying this information in the network dashboard since plugin suppression is site-specific.

@dhaval-parekh dhaval-parekh force-pushed the feature/5340-plugin-suppression-into-plugins-screen branch from 621839b to 715fd43 Compare March 9, 2022 11:44
@dhaval-parekh dhaval-parekh self-assigned this Mar 9, 2022
@westonruter westonruter added this to the v2.2.2 milestone Mar 9, 2022

$screen = get_current_screen();

if ( ! ( $screen instanceof WP_Screen && 'plugins' === $screen->id ) ) {
Copy link
Member

Choose a reason for hiding this comment

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

What was this needed for? Wouldn't the plugin_row_meta filter only be shown on the plugins screen anyway?

Copy link
Member

@westonruter westonruter Mar 9, 2022

Choose a reason for hiding this comment

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

I guess for @delawski's comment in #6959 (review)?

…340-plugin-suppression-into-plugins-screen

* 'develop' of github.com:ampproject/amp-wp:
  Copy referrerpolicy attribute from img to amp-pixel
  Improve nav menu E2E tests by creating test menu before each test suite
  Bail out if there is no menu location or it is already selected
  Add E2E tests for Twenty Twenty-Two header nav menu block
  Test Twenty Twenty search modal on mobile breakpoint
  Remove redundant space
  Use `Extension` class constant for getting `amp-pixel` tag name
  Add missing replacement string to `str_replace` and reformat
  Use `::class` constant instead of hardcoded class name
  Examine parsed URL instead of using regex
  Remove `amp-pixel` from selector conversion mapping
  Replace `img` with `amp-pixel` when dealing with Facebook tracking pixel
Comment on lines 507 to 509
$screen = get_current_screen();

if ( ! ( $screen instanceof WP_Screen && 'plugins' === $screen->id ) ) {
Copy link
Member

Choose a reason for hiding this comment

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

If so, another option would be:

Suggested change
$screen = get_current_screen();
if ( ! ( $screen instanceof WP_Screen && 'plugins' === $screen->id ) ) {
if ( is_network_admin() ) {

@westonruter westonruter merged commit a55b588 into develop Mar 10, 2022
@westonruter westonruter deleted the feature/5340-plugin-suppression-into-plugins-screen branch March 10, 2022 17:34
@westonruter westonruter changed the title Add plugin suppression info in plugin page. Add plugin suppression info in plugins page Mar 10, 2022
@westonruter westonruter changed the title Add plugin suppression info in plugins page Add plugin suppression info in plugins screen Mar 10, 2022
westonruter added a commit that referenced this pull request Mar 10, 2022
Co-authored-by: Dhaval Parekh <dmparekh007@gmail.com>
@westonruter westonruter added the Changelogged Whether the issue/PR has been added to release notes. label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelogged Whether the issue/PR has been added to release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate plugin suppression into plugins screen
3 participants