Skip to content

Settings UI: add filter 'jetpack_show_promotions' to disable banners when false#6765

Merged
eliorivero merged 1 commit intomasterfrom
add/filter-deactivate-promotions
Mar 27, 2017
Merged

Settings UI: add filter 'jetpack_show_promotions' to disable banners when false#6765
eliorivero merged 1 commit intomasterfrom
add/filter-deactivate-promotions

Conversation

@eliorivero
Copy link
Copy Markdown
Contributor

Fixes #4537

Changes proposed in this Pull Request:

  • introduces a new filter jetpack_show_promotions that when set to false, hides all banners from settings UI
  • introduces a new component JetpackBanner that acts as a hub for the banners and displays them based on the result of the jetpack_show_promotions filter

Testing instructions:

  • add add_filter( 'jetpack_show_promotions', '__return_false' ); in the functions.php of a theme or in a plugin. All banners should now be hidden.

@eliorivero eliorivero added Admin Page React-powered dashboard under the Jetpack menu [Status] Needs Review This PR is ready for review. Enhancement Changes to an existing feature — removing, adding, or changing parts of it labels Mar 27, 2017
@eliorivero eliorivero added this to the Settings UI milestone Mar 27, 2017
@eliorivero eliorivero self-assigned this Mar 27, 2017
Copy link
Copy Markdown
Contributor

@dereksmart dereksmart left a comment

Choose a reason for hiding this comment

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

Nice, 🐑

@dereksmart dereksmart added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Mar 27, 2017
@eliorivero eliorivero merged commit 89a0f3c into master Mar 27, 2017
@eliorivero eliorivero deleted the add/filter-deactivate-promotions branch March 27, 2017 18:55
@eliorivero eliorivero removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu Enhancement Changes to an existing feature — removing, adding, or changing parts of it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants