Skip to content

Conversation

@eliorivero
Copy link
Contributor

Before this PR, filtering modules out could result in

captura de pantalla 2016-08-31 a las 17 36 46

#### Changes proposed in this Pull Request: - checks that hardcoded modules are among those that are not filtered out by using the filter `jetpack_get_available_modules` - removes card from At a Glance that belongs to a module removed through the filter #### Testing instructions: - paste this where it can be executed
add_filter( 'jetpack_get_available_modules', function ( $modules ) {
    unset( $modules['protect'] );
    unset( $modules['carousel'] );
    unset( $modules['post-by-email'] );
    unset( $modules['sharedaddy'] );
    unset( $modules['json-api'] );
    unset( $modules['photon'] );
    return $modules;
} );
  • go to Jetpack > Settings and make sure those cards don't look empty like before, but like

captura de pantalla 2016-08-31 a las 17 38 19

- in Jetpack > Dashboard > At a Glance, make sure that cards that belong to a filtered out module are not displayed.

@eliorivero eliorivero added [Type] Bug When a feature is broken and / or not performing as intended [Status] In Progress Admin Page React-powered dashboard under the Jetpack menu labels Aug 31, 2016
@eliorivero eliorivero added this to the 4.3-During Beta milestone Aug 31, 2016
@dereksmart dereksmart added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Aug 31, 2016
@zinigor zinigor 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 Aug 31, 2016
@zinigor
Copy link
Contributor

zinigor commented Aug 31, 2016

Tested, works well for now! Added one commit that refactors one conditional for better readability. LGTM!

@dereksmart dereksmart merged commit b10eadd into master Aug 31, 2016
@dereksmart dereksmart deleted the fix/remove-modules-filtered branch August 31, 2016 22:09
@dereksmart dereksmart removed the [Status] Ready to Merge Go ahead, you can push that green button! label Aug 31, 2016
@RCowles
Copy link
Contributor

RCowles commented Sep 22, 2016

A user in the forums reported that he's unable to remove VaultPress from the new UI using the jetpack_get_available_modules filter:

That functionality is no longer working for for a couple items under the Security Tab (security scanning and site backups specifically) in the new React interface. Previously I could block “vaultpress” in the modules list using that code, but it’s not working anymore. Is there a different module name in the latest version?

Original report:
https://wordpress.org/support/topic/hide-modules-in-react-interface/

@RCowles RCowles modified the milestones: 4.3.2, 4.3-During Beta Sep 22, 2016
@jeherve
Copy link
Member

jeherve commented Sep 26, 2016

@RCowles Might be worth creating a brand new issue for that, since this PR is already merged.

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 [Type] Bug When a feature is broken and / or not performing as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants