Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Sterup

    (@foomagoo)

    This plugin disables plugins. Not plugin modules. That is an entirely different animal.

    Thread Starter sambodinho

    (@sambodinho)

    Cool, no worries, thanks for the swift response Jeff

    @sambodinho

    You can do you by using this great piece of code…

    add_filter( 'jetpack_get_available_modules', 'prefix_hide_jetpack_modules' );
    /**
    * Disable all non-whitelisted jetpack modules.
    *
    * As it's written, this will allow all of the currently available Jetpack
    * modules to work display and be activated normally.
    *
    * If there's a module you'd like to disable, simply comment it out or remove it
    * from the whitelist and it will no longer be available for activation.
    *
    * @author WP Site Care
    * @link   https://www.wpsitecare.com/disable-jetpack-modules/
    * @param  array $modules the existing list of Jetpack modules
    * @return array $modules the amended list of Jetpack modules
    */
    function prefix_hide_jetpack_modules( $modules ) {
    	// A list of Jetpack modules which are allowed to activate.
    	$whitelist = array(
    		'enhanced-distribution',
    		'publicize',
    		'related-posts',
    		'stats',
    		'vaultpress',
    		'verification-tools',
    	);
    
    	return array_intersect_key( $modules, array_flip( $whitelist ) );
    }

    Just list the Jetpack modules that you want to keep.

    Courtesy of — https://www.wpsitecare.com/disable-jetpack-modules/

    take care,

    Netivity

    • This reply was modified 8 years, 2 months ago by netivity.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Usage for specific plugin modules? (jetpack)’ is closed to new replies.