PHPackages                             automattic/jetpack-jitm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. automattic/jetpack-jitm

ActiveJetpack-library[Utility &amp; Helpers](/categories/utility)

automattic/jetpack-jitm
=======================

Just in time messages for Jetpack

v4.3.27(1mo ago)648.3k↓35.7%16GPL-2.0-or-laterPHPPHP &gt;=7.2CI passing

Since Sep 3Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Automattic/jetpack-jitm)[ Packagist](https://packagist.org/packages/automattic/jetpack-jitm)[ RSS](/packages/automattic-jetpack-jitm/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelog (1)Dependencies (22)Versions (283)Used By (6)

Jetpack Just In Time Messages
=============================

[](#jetpack-just-in-time-messages)

A package encapsulating Just In Time Messages.

Just In Time Messages (JITMs) are real-time contextual in-admin notices. Such notices are displayed on specific admin pages, based on multiple parameters (page visited, Jetpack connection status, plan status, features active, ...).

There are 2 main ways to use JITMs:

- You can create static notices within the Jetpack plugin. Those will be displayed before the site is connected to WordPress.com. See `Pre_Connection_JITM` to find out more.
- You can create dynamic notices once the Jetpack plugin is connected to WordPress.com. Those notices will be pulled from WordPress.com depending on the parameters mentioned above. See `Post_Connection_JITM` to find out more.

### Usage

[](#usage)

#### Using the Config Package

[](#using-the-config-package)

The JITMs can be enabled using the Config package:

```
use Automattic/Jetpack/Config;

// Configuring as early as plugins_loaded priority 1
// to make sure every action handler gets properly set.
add_action( 'plugins_loaded', 'configure_jitm', 1 );

function configure_jitm() {
    $config = new Config();
    $config->ensure( 'jitm' );
}

```

#### Directly Using the JITM Package

[](#directly-using-the-jitm-package)

The JITMs can also be enabled by using the JITM package directly:

```
Automattic\Jetpack\JITMS\JITM::configure();

```

#### Where the JITM will be displayed

[](#where-the-jitm-will-be-displayed)

JITMs can be shown on any admin page that has the `` element within the dom, as it's where the messages are injected. You may need to add or adjust this element to fit in your plugin.

### Adding Pre-Connection JITMs

[](#adding-pre-connection-jitms)

Plugins can add pre-connection JITMs uisng the `jetpack_pre_connection_jitms` filter. Each JITM message must be an array and must contain the following keys:

- id
- message\_path
- message
- description
- button\_link
- button\_caption

If a JITM is missing one of the above keys, the JITM will not be displayed.

The JITM message array may also contain the following optional keys:

- icon - When the 'icon' key does not exist, the Jetpack icon is used by default. The available settings for this option are:
    - 'jetpack' for the Jetpack icon.
    - 'woocommerce' for the WooCommerce icon.
    - An empty string for no icon.

The Jetpack plugin's pre-connection JITMs can be found in the `Jetpack_Pre_Connection_JITMs` class.

#### Example

[](#example)

```
function add_preconnection_jitms( $messages ) {
    $example_jitm = array(
		'id'             => 'example-jitm',
		'message_path'   => '/wp:plugins:admin_notices/',
		'message'        => __( 'An example message.', 'jetpack' ),
		'description'    => __( 'An example description.', 'jetpack' ),
		'button_link'    => 'https://example.com/path',
		'button_caption' => __( 'Example button text', 'jetpack' ),
    );

    if ( ! is_array( $messages ) ) {
		return array( $example_jitm );
    }

    return array_merge( $messages, array( $example_jitm ) );
 }

 add_filter( 'jetpack_pre_connection_jitms', 'add_preconnection_jitms' );

```

Using this package in your WordPress plugin
-------------------------------------------

[](#using-this-package-in-your-wordpress-plugin)

If you plan on using this package in your WordPress plugin, we would recommend that you use [Jetpack Autoloader](https://packagist.org/packages/automattic/jetpack-autoloader) as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well.

Security
--------

[](#security)

Need to report a security vulnerability? Go to  or directly to our security bug bounty site .

License
-------

[](#license)

jetpack-jitm is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

###  Health Score

60

—

FairBetter than 99% of packages

Maintenance90

Actively maintained with recent releases

Popularity34

Limited adoption so far

Community33

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~10 days

Total

240

Last Release

56d ago

Major Versions

v1.16.2 → v2.0.02021-08-31

v2.5.3 → v3.0.02023-11-20

v3.1.29 → v4.0.02024-11-14

PHP version history (2 changes)v3.0.0PHP &gt;=7.0

v4.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c5869ecbb8e0eac7e8b8e0f3cf7bdd8d5fcdc4abc10a72281872c53f8639d44?d=identicon)[automattic](/maintainers/automattic)

![](https://www.gravatar.com/avatar/11609890f6e7a840715f4cfc9622d77ea64b7dfc024df5643fbf8471a18c00f3?d=identicon)[kraft](/maintainers/kraft)

![](https://www.gravatar.com/avatar/5326730499ec14e274f51b9bcc39db6aac0fb38b33849715aae0e2587a2b93df?d=identicon)[jeherve](/maintainers/jeherve)

![](https://www.gravatar.com/avatar/6e220e167e341c28b1aa10bf0bb0374999068329f8683d3187ee3cf6749b8837?d=identicon)[dereksmart](/maintainers/dereksmart)

---

Top Contributors

[![anomiex](https://avatars.githubusercontent.com/u/1030580?v=4)](https://github.com/anomiex "anomiex (262 commits)")[![tbradsha](https://avatars.githubusercontent.com/u/32492176?v=4)](https://github.com/tbradsha "tbradsha (108 commits)")[![jeherve](https://avatars.githubusercontent.com/u/426388?v=4)](https://github.com/jeherve "jeherve (103 commits)")[![kraftbj](https://avatars.githubusercontent.com/u/88897?v=4)](https://github.com/kraftbj "kraftbj (56 commits)")[![zinigor](https://avatars.githubusercontent.com/u/374293?v=4)](https://github.com/zinigor "zinigor (43 commits)")[![sergeymitr](https://avatars.githubusercontent.com/u/1341249?v=4)](https://github.com/sergeymitr "sergeymitr (42 commits)")[![bindlegirl](https://avatars.githubusercontent.com/u/1242807?v=4)](https://github.com/bindlegirl "bindlegirl (35 commits)")[![samiff](https://avatars.githubusercontent.com/u/15803018?v=4)](https://github.com/samiff "samiff (33 commits)")[![manzoorwanijk](https://avatars.githubusercontent.com/u/18226415?v=4)](https://github.com/manzoorwanijk "manzoorwanijk (27 commits)")[![gmjuhasz](https://avatars.githubusercontent.com/u/36671565?v=4)](https://github.com/gmjuhasz "gmjuhasz (25 commits)")[![coder-karen](https://avatars.githubusercontent.com/u/16754605?v=4)](https://github.com/coder-karen "coder-karen (22 commits)")[![sdixon194](https://avatars.githubusercontent.com/u/33553323?v=4)](https://github.com/sdixon194 "sdixon194 (19 commits)")[![kbrown9](https://avatars.githubusercontent.com/u/50059399?v=4)](https://github.com/kbrown9 "kbrown9 (14 commits)")[![dilirity](https://avatars.githubusercontent.com/u/11799079?v=4)](https://github.com/dilirity "dilirity (11 commits)")[![ice9js](https://avatars.githubusercontent.com/u/8056203?v=4)](https://github.com/ice9js "ice9js (11 commits)")[![dereksmart](https://avatars.githubusercontent.com/u/7129409?v=4)](https://github.com/dereksmart "dereksmart (10 commits)")[![nateweller](https://avatars.githubusercontent.com/u/10933065?v=4)](https://github.com/nateweller "nateweller (8 commits)")[![gravityrail](https://avatars.githubusercontent.com/u/51896?v=4)](https://github.com/gravityrail "gravityrail (8 commits)")[![chihsuan](https://avatars.githubusercontent.com/u/4344253?v=4)](https://github.com/chihsuan "chihsuan (7 commits)")[![haqadn](https://avatars.githubusercontent.com/u/3737780?v=4)](https://github.com/haqadn "haqadn (7 commits)")

---

Tags

jetpack

### Embed Badge

![Health badge](/badges/automattic-jetpack-jitm/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-jetpack-jitm/health.svg)](https://phpackages.com/packages/automattic-jetpack-jitm)
```

###  Alternatives

[automattic/jetpack

Jetpack supercharges your self‑hosted WordPress site with the awesome cloud power of WordPress.com

3621.9k](/packages/automattic-jetpack)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
