Skip to content

Instantly share code, notes, and snippets.

@kopepasah
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kopepasah/9593413 to your computer and use it in GitHub Desktop.
Save kopepasah/9593413 to your computer and use it in GitHub Desktop.
One line conditional to check if a Jetpack module is active or not.
Jetpack::get_available_modules();
Array
0 => after-the-deadline
1 => carousel
2 => comments
3 => contact-form
4 => custom-css
5 => enhanced-distribution
6 => gplus-authorship
7 => gravatar-hovercards
8 => infinite-scroll
9 => json-api
10 => latex
11 => likes
12 => markdown
13 => minileven
14 => monitor
15 => notes
16 => omnisearch
17 => photon
18 => post-by-email
19 => publicize
20 => related-posts
21 => sharedaddy
22 => shortcodes
23 => shortlinks
24 => sso
25 => stats
26 => subscriptions
27 => tiled-gallery
28 => vaultpress
29 => videopress
30 => widget-visibility
31 => widgets
class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'carousel' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment