We just committed a new function to Jetpack Trunk, and it should be enabled in the next release, Jetpack::is_module_active()
—
http://plugins.trac.wordpress.org/changeset/716884
Then you can just call:
if( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'contact-form' ) ) {}
Or at least, you will once the next version releases, and the user has their Jetpack updated. 🙂 If you’d like to preserve the backward compatability, you can just do:
if( class_exists( 'Jetpack' ) && in_array( 'contact-form', Jetpack::get_active_modules() ) {}
It’s a slightly tidier way than querying the option directly.
Related Posts:
- How to run Jetpack from localhost? [closed]
- When would it make sense to use Jetpack?
- Jetpack plugin (ShareDaddy): Prevent share buttons showing on custom post types?
- How to stop xmlrpc attacks without disabling component to allow JetPack to work in WordPress?
- Filtering get_permalink in Jetpack / ShareDaddy
- Redirect to another page using contact form 7? [closed]
- Is it possible to remove subscription box from Jetpack stats page? [closed]
- Cropping images from top center using Jetpack Photon
- Edit / Change Jetpack Mobile Theme [closed]
- Moving Jetpack buttons to appear below the first H2 title on all project/post pages [closed]
- Facebook and Twitter share buttons not working [closed]
- WordPress Stats Plugin: Display Post Views [closed]
- Why may one avoid Jetpack plugin? [closed]
- Jetpack: Subscribe via e-mail [closed]
- After installing JetPack, can I delete the WordPress stats plugin?
- Show views count for pop up post
- How can I disable Jetpack plugin on mobile?
- Fetching WP.me shortlinks for posts using WP Rest API
- How do plugin updates work?
- Jetpack Comments Change Placeholder Text
- I’ve installed Jetpack but can’t edit the CSS to my blog?
- Questions about using Disqus or Jetpack for comments [closed]
- How to enable suggested edits?
- How to remove WPML Generator Meta Tag by theme’s functions.php (override plugin function)? [closed]
- Load plugin selectively for pages or posts, etc
- Can i create two tables at single time while installation of custom plugin?
- How do I sanitize a javascript text?
- How can a Firebase user registration and login be integrated into a WordPress site?
- check for the current screen
- How to show custom static content at top of each category page?
- How to show category images (from plugin) on a regular page (page-example.php)?
- use function inside another function in WP Plugin
- Override the filter from plugin in child theme
- Sage WordPress – Plugin Namespace: Not Found
- Average Account Age
- Dont’ charge customer until product ships – woocommerce [closed]
- Absolute Image URL in srcset is appended to the upload dir
- how to open page, defined in plugin, from dashboad widget
- Change upload folder for a CPT
- Is there an npm library that uses best practices to scaffold a wordpress plugin that is build with React?
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Using plugin functions/methods within templates
- How to retain table data in wordpress phpunit tests
- Ajax : Call undefined function plugin_function() … can’t call any plugin function
- Setup wp_schedule_event within a custom plugin
- How to over-ride a file in a plugin? [closed]
- execute function after one completed
- How can I run a custom shortcode function on a live site and only run if the viewer is a specific machine?
- WHy custom plugin slows down the loading of the pages?
- Display Plugin Panels Outside of Admin Areas
- What are the correct permissions so WP doesn’t ask for FTP credentials if installing plugin?
- Looking for Gallery Plugin [closed]
- Notice: Undefined index: mtral_field_subscriber
- Delete free version plugin will also delete premium plugin
- URL rewrite with external JSON query
- How to delete a theme using AJAX
- Adding a responsive grid onto a page (without using a Bootstrap theme) [closed]
- Licensing a Plugin [closed]
- Add a function call after content automatically?
- Var_dump ACF “API”
- Equivalent of admin.php for public pages
- Detect plugin/theme installation (via upload)
- Engadget Like Featured Breaking Plugin
- sliding/fading header plugin or approach suggestion
- Google Analytics event tracking code being stripped out of links in Author box – WordPress site
- Security of a WordPress Plugin
- @wordpress/scripts advanced usage
- wp_post not working, keeps redirecting to posts page
- How to display ACF coustom field from category on author.php
- How to add Mobile field in Registration form using Theme my login Plugin
- Replace only the first CSS class
- make p tag collapsed after 3 rows
- WPBakery Page Builder Shortcode Showing On Front Page For Post
- Student access credentials
- Comment restrictions Wodpress
- Gutenberg editor in WordPress 5.0.3 /wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)
- How to capture customer’s credit card details via PayPal on my checkout page?
- Add code to page template on page built with Visual Composer
- .htaccess file doesn’t work, with hundred tries
- plugin translation is not working
- ACF Repeater Field Question [closed]
- A more elegant way to handle notices/warnings
- To set a post is new/old in vertical scrolling
- How to remove ‘View Details’ page & updates from third-party plugin?
- appointment plugin doesn’t display all appointments
- First argument is expected to be a valid callback for cp_admin_init and _canonical_charset
- Get the url of attachments from the post?
- WordPress User Frontend Editing Custom Fields
- W3 Total Cache and IIS7 not doing much [closed]
- Mystery URL http://#/ Listed in XML Sitemap Created by WordPress SEO by Yoast Plugin
- What are the downsides of using bootstrap in plugin development?
- How ACF Advanced Custom Field works with Woocommerce Single Product [closed]
- Function mb_strlen Fail [closed]
- Images get uploaded itself from the computer
- getPost() method and Pagination
- How to provide page_template path in custom plugin using WordPress
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)
- Issues with creating user profile for a subscriber, but with different profile page and functionalities
- Block Root REST API Route using custom &/or iThemes