Skip to content

Instantly share code, notes, and snippets.

@sirchrispy
Last active August 29, 2015 14:05
Show Gist options
  • Save sirchrispy/81ec9deb0545baeea57f to your computer and use it in GitHub Desktop.
Save sirchrispy/81ec9deb0545baeea57f to your computer and use it in GitHub Desktop.
WP: Plugins - Jetpack
<?php
//* Only display the following jetpack modules
add_filter( 'jetpack_get_available_modules', 'fs_only_these_jetpack_modules' );
function fs_only_these_jetpack_modules ( $modules ) {
$return = array();
$return['after-the-deadline'] = $modules['after-the-deadline']; // Spelling and Grammar
$return['carousel'] = $modules['carousel']; // Carousel
$return['comments'] = $modules['comments']; // Jetpack Comments
$return['contact-form'] = $modules['contact-form']; // Contact Form
$return['custom-css'] = $modules['custom-css']; // Custom CSS
$return['enhanced-distribution'] = $modules['enhanced-distribution']; // Enhanced Distribution
$return['gplus-authorship'] = $modules['gplus-authorship']; // Google+ Profile
$return['gravatar-hovercards'] = $modules['gravatar-hovercards']; // Gravatar Hovercards
$return['holiday-snow'] = $modules['holiday-snow']; // Holiday Snow
$return['infinite-scroll'] = $modules['infinite-scroll']; // Infinite Scroll
$return['json-api'] = $modules['json-api']; // JSON API
$return['latex'] = $modules['latex']; // Beautiful Math
$return['likes'] = $modules['likes']; // Likes
$return['markdown'] = $modules['markdown']; // Markdown
$return['minileven'] = $modules['minileven']; // Mobile Theme
$return['monitor'] = $modules['monitor']; // Monitor
$return['notes'] = $modules['notes']; // Notifications
$return['omnisearch'] = $modules['omnisearch']; // Omnisearch
$return['photon'] = $modules['photon']; // Photon
$return['post-by-email'] = $modules['post-by-email']; // Post by Email
$return['publicize'] = $modules['publicize']; // Publicize
$return['related-posts'] = $modules['related-posts']; // Related Posts
$return['sharedaddy'] = $modules['sharedaddy']; // Sharing
$return['shortcodes'] = $modules['shortcodes']; // Shortcode Embeds
$return['sso'] = $modules['sso']; // Jetpack Single Sign On
$return['stats'] = $modules['stats']; // WordPress.com Stats
$return['shortlinks'] = $modules['shortlinks']; // WP.me Shortlinks
$return['subscriptions'] = $modules['subscriptions']; // Subscriptions
$return['tiled-gallery'] = $modules['tiled-gallery']; // Tiled Galleries
$return['vaultpress'] = $modules['vaultpress']; // Vaultpress
$return['verification-tools'] = $modules['verification-tools']; // Site Verification Tools
$return['videopress'] = $modules['videopress']; // VideoPress
$return['widget-visibility'] = $modules['widget-visibility']; // Widget Visibility
$return['widgets'] = $modules['widgets']; // Extra Sidebar Widgets
return $return;
}
//* Autoactivate the following Jetpack modules upon new site creation/jetpack activation
add_filter( 'jetpack_get_default_modules', 'fs_auto_activate_these_jetpack_modules' );
function fs_auto_activate_these_jetpack_modules() {
return array(
'after-the-deadline', // Spelling and Grammar
'carousel', // Carousel
'comments', // Jetpack Comments
'contact-form', // Contact Form
'custom-css', // Custom CSS
'enhanced-distribution',// Enhanced Distribution
'gplus-authorship', // Google+ Profile
'gravatar-hovercards', // Gravatar Hovercards
'holiday-snow', // Holiday Snow
'infinite-scroll', // Infinite Scroll
'json-api', // JSON API
'latex', // Beautiful Math
'likes', // Likes
'markdown', // Markdown
'minileven', // Mobile Theme
'monitor', // Monitor
'notes', // Notifications
'omnisearch', // Omnisearch
'photon', // Photon
'post-by-email', // Post by Email
'publicize', // Publicize
'related-posts', // Related Posts
'sharedaddy', // Sharing
'shortcodes', // Shortcode Embeds
'sso', // Jetpack Single Sign On
'stats', // WordPress.com Stats
'shortlinks', // WP.me Shortlinks
'subscriptions', // Subscriptions
'tiled-gallery', // Tiled Galleries
'vaultpress', // Vaultpress
'verification-tools', // Site Verification Tools
'videopress', // VideoPress
'widget-visibility', // Widget Visibility
'widgets', // Extra Sidebar Widgets
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment