How to Check If a Jetpack Module is Active

WordPressPosted on

1 min read

Jetpack is an amazing multi-tool WordPress plugin which extends WP’s capabilities. It comes which a bunch of individual plugins like photon or infinite-scroll.

There are cases where we need to know which module is turned on. A frequent use case is an infinite-scroll module. If we want to load our post on a scroll or a simple button click – in an infinite way – we can use Jetpack too. But if we turn on this extension, we have to hide our themes original pagination, and this is where the is_module_active() functions come into the picture.

If you want to check a module find the proper name to the function like the following:

if ( class_exists( 'Jetpack' ) && !Jetpack::is_module_active( 'infinite-scroll' ) ) {

Here you can find some popular module names:

  • carousel
  • comments
  • contact-form
  • custom-css
  • enhanced-distribution
  • gplus-authorship
  • gravatar-hovercards
  • infinite-scroll
  • json-api
  • likes
  • markdown
  • minileven
  • monitor
  • notes
  • photon
  • post-by-email
  • publicize
  • related-posts
  • sharedaddy
  • shortcodes
  • shortlinks
  • sso
  • stats
  • subscriptions
  • tiled-gallery
  • vaultpress
  • videopress
  • widget-visibility
  • widgets

Note that Jetpack is under continuous so these can change. To check all of the available modules check this URL:

Get The Data From Option

Nice to know that you can also get the enabled extensions from an option named jetpack_active_modules:

print_r( get_option( 'jetpack_active_modules' ) );

Need a web developer? Maybe we can help, get in touch!

To see and write comments, you must allow the related (Disqus) cookies. For more information, please visit our privacy policy page.

Similar Posts

More content in WordPress category