Completed
Push — branch-3.9 ( 37c385...c2429f )
by
unknown
09:53
created

Jetpack_JITM::is_jitm_dismissed()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 10
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
3
/**
4
 * Jetpack just in time messaging through out the admin
5
 *
6
 * @since 3.7.0
7
 */
8
class Jetpack_JITM {
9
10
	/**
11
	 * @var Jetpack_JITM
12
	 **/
13
	private static $instance = null;
14
15
	/**
16
	 * Get user dismissed messages.
17
	 *
18
	 * @var array
19
	 */
20
	private static $jetpack_hide_jitm = null;
21
22
	/**
23
	 * Whether plugin auto updates are allowed in this WordPress installation or not.
24
	 *
25
	 * @var bool
26
	 */
27
	private static $auto_updates_allowed = false;
28
29
	static function init() {
30
		if ( is_null( self::$instance ) ) {
31
			self::$instance = new Jetpack_JITM;
32
		}
33
34
		return self::$instance;
35
	}
36
37
	private function __construct() {
38
		if ( ! Jetpack::is_active() || self::is_jitm_dismissed() ) {
39
			return;
40
		}
41
		add_action( 'current_screen', array( $this, 'prepare_jitms' ) );
42
	}
43
44
	/**
45
	 * Prepare actions according to screen and post type.
46
	 *
47
	 * @since 3.8.2
48
	 *
49
	 * @uses Jetpack_Autoupdate::get_possible_failures()
50
	 *
51
	 * @param object $screen
52
	 */
53
	function prepare_jitms( $screen ) {
54
		if ( ! current_user_can( 'jetpack_manage_modules' ) ) {
55
			return;
56
		}
57
58
		if ( 'edit-comments' == $screen->base && ! Jetpack::is_plugin_active( 'akismet/akismet.php' ) ) {
59
			add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
60
			add_action( 'admin_notices', array( $this, 'akismet_msg' ) );
61
		}
62
		elseif ( 'post' == $screen->base && ( isset( $_GET['message'] ) && 6 == $_GET['message'] ) ) {
63
			add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
64
			add_action( 'edit_form_top', array( $this, 'backups_after_publish_msg' ) );
65
		}
66
		elseif ( 'update-core' == $screen->base && ! Jetpack::is_plugin_active( 'vaultpress/vaultpress.php' ) ) {
67
			add_action( 'admin_enqueue_scripts', array( $this, 'jitm_enqueue_files' ) );
68
			add_action( 'admin_notices', array( $this, 'backups_updates_msg' ) );
69
		}
70
	}
71
72
	/*
73
	 * Present Manage just in time activation msg on update-core.php
74
	 *
75
	 */
76
	function manage_msg() {
77
		$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
78
		?>
79
		<div class="jp-jitm">
80
			<a href="#" data-module="manage" class="dismiss"><span class="genericon genericon-close"></span></a>
81
82
			<div class="jp-emblem">
83
				<?php echo self::get_jp_emblem(); ?>
84
			</div>
85
			<p class="msg">
86
				<?php esc_html_e( 'Reduce security risks with automated plugin updates.', 'jetpack' ); ?>
87
			</p>
88
89
			<p>
90
				<img class="j-spinner hide" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="manage" class="activate button <?php if ( Jetpack::is_module_active( 'manage' ) ) {
91
					echo 'hide';
92
				} ?>"><?php esc_html_e( 'Activate Now', 'jetpack' ); ?></a><a href="<?php echo esc_url( 'https://wordpress.com/plugins/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com to try these features', 'jetpack' ); ?>" id="jetpack-wordpressdotcom" class="button button-jetpack <?php if ( ! Jetpack::is_module_active( 'manage' ) ) {
93
					echo 'hide';
94
				} ?>"><?php esc_html_e( 'Go to WordPress.com', 'jetpack' ); ?></a>
95
			</p>
96
		</div>
97
		<?php
98
		//jitm is being viewed, track it
99
		$jetpack = Jetpack::init();
100
		$jetpack->stat( 'jitm', 'manage-viewed-' . JETPACK__VERSION );
101
		$jetpack->do_stats( 'server_side' );
102
	}
103
104
	/*
105
	 * Present Photon just in time activation msg
106
	 *
107
	 */
108
	function photon_msg() {
109
		?>
110
		<div class="jp-jitm">
111
			<a href="#" data-module="photon" class="dismiss"><span class="genericon genericon-close"></span></a>
112
113
			<div class="jp-emblem">
114
				<?php echo self::get_jp_emblem(); ?>
115
			</div>
116
			<p class="msg">
117
				<?php esc_html_e( 'Speed up your photos and save bandwidth costs by using a free content delivery network.', 'jetpack' ); ?>
118
			</p>
119
120
			<p>
121
				<img class="j-spinner hide" style="margin-top: 13px;" width="17" height="17" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="photon" class="activate button button-jetpack"><?php esc_html_e( 'Activate Photon', 'jetpack' ); ?></a>
122
			</p>
123
		</div>
124
		<?php
125
		//jitm is being viewed, track it
126
		$jetpack = Jetpack::init();
127
		$jetpack->stat( 'jitm', 'photon-viewed-' . JETPACK__VERSION );
128
		$jetpack->do_stats( 'server_side' );
129
	}
130
131
	/**
132
	 * Display Photon JITM template in Media Library after user uploads an image.
133
	 *
134
	 * @since 3.9.0
135
	 */
136
	function photon_tmpl() {
137
		?>
138
		<script id="tmpl-jitm-photon" type="text/html">
139
			<div class="jp-jitm" data-track="photon-modal">
140
				<a href="#" data-module="photon" class="dismiss"><span class="genericon genericon-close"></span></a>
141
142
				<div class="jp-emblem">
143
					<?php echo self::get_jp_emblem(); ?>
144
				</div>
145
				<p class="msg">
146
					<?php esc_html_e( 'Let Jetpack deliver your images optimized and faster than ever.', 'jetpack' ); ?>
147
				</p>
148
149
				<p>
150
					<img class="j-spinner hide" style="margin-top: 13px;" width="17" height="17" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="photon" class="activate button button-jetpack"><?php esc_html_e( 'Activate Photon', 'jetpack' ); ?></a>
151
				</p>
152
			</div>
153
		</script>
154
		<?php
155
	}
156
157
	/**
158
	 * Display message prompting user to enable auto-updates in WordPress.com.
159
	 *
160
	 * @since 3.8.2
161
	 */
162
	function manage_pi_msg() {
163
		$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
164
		$manage_active       = Jetpack::is_module_active( 'manage' );
165
166
		// Check if plugin has auto update already enabled in WordPress.com and don't show JITM in such case.
167
		$active_before = get_option( 'jetpack_temp_active_plugins_before', array() );
168
		delete_option( 'jetpack_temp_active_plugins_before' );
169
		$active_now                  = get_option( 'active_plugins', array() );
170
		$activated                   = array_diff( $active_now, $active_before );
171
		$auto_update_plugin_list     = Jetpack_Options::get_option( 'autoupdate_plugins', array() );
172
		$plugin_auto_update_disabled = false;
173
		foreach ( $activated as $plugin ) {
174
			if ( ! in_array( $plugin, $auto_update_plugin_list ) ) {
175
176
				// Plugin doesn't have auto updates enabled in WordPress.com yet.
177
				$plugin_auto_update_disabled = true;
178
179
				// We don't need to continue checking, it's ok to show JITM for this plugin.
180
				break;
181
			}
182
		}
183
184
		// Check if the activated plugin is in the WordPress.org repository
185
		$plugin_can_auto_update = false;
186
		$plugin_updates 		= get_site_transient( 'update_plugins' );
187
		if ( false === $plugin_updates ) {
188
189
			// If update_plugins doesn't exist, display message anyway
190
			$plugin_can_auto_update = true;
191
		} else {
192
			$plugin_updates = array_merge( $plugin_updates->response, $plugin_updates->no_update );
193
			foreach ( $activated as $plugin ) {
194
				if ( isset( $plugin_updates[ $plugin ] ) ) {
195
196
					// There's at least one plugin set cleared for auto updates
197
					$plugin_can_auto_update = true;
198
199
					// We don't need to continue checking, it's ok to show JITM for this round.
200
					break;
201
				}
202
			}
203
		}
204
205
		if ( ! $manage_active && $plugin_auto_update_disabled && $plugin_can_auto_update && self::$auto_updates_allowed ) :
206
			?>
207
			<div class="jp-jitm">
208
				<a href="#" data-module="manage-pi" class="dismiss"><span class="genericon genericon-close"></span></a>
209
210
				<div class="jp-emblem">
211
					<?php echo self::get_jp_emblem(); ?>
212
				</div>
213
				<?php if ( ! $manage_active ) : ?>
214
					<p class="msg">
215
						<?php esc_html_e( 'Save time with automated plugin updates.', 'jetpack' ); ?>
216
					</p>
217
					<p>
218
						<img class="j-spinner hide" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="manage" data-module-success="<?php esc_attr_e( 'Success!', 'jetpack' ); ?>" class="activate button"><?php esc_html_e( 'Activate remote management', 'jetpack' ); ?></a>
219
					</p>
220
				<?php elseif ( $manage_active ) : ?>
221
					<p>
222
						<?php esc_html_e( 'Save time with auto updates on WordPress.com', 'jetpack' ); ?>
223
					</p>
224
				<?php endif; // manage inactive
225
				?>
226
				<p class="show-after-enable <?php echo $manage_active ? '' : 'hide'; ?>">
227
					<a href="<?php echo esc_url( 'https://wordpress.com/plugins/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com to enable auto-updates for plugins', 'jetpack' ); ?>" data-module="manage-pi" class="button button-jetpack launch show-after-enable"><?php if ( ! $manage_active ) : ?><?php esc_html_e( 'Enable auto-updates on WordPress.com', 'jetpack' ); ?><?php elseif ( $manage_active ) : ?><?php esc_html_e( 'Enable auto-updates', 'jetpack' ); ?><?php endif; // manage inactive ?></a>
228
				</p>
229
			</div>
230
			<?php
231
			//jitm is being viewed, track it
232
			$jetpack = Jetpack::init();
233
			$jetpack->stat( 'jitm', 'manage-pi-viewed-' . JETPACK__VERSION );
234
			$jetpack->do_stats( 'server_side' );
235
		endif; // manage inactive
236
	}
237
238
	/**
239
	 * Display message in editor prompting user to compose entry in WordPress.com.
240
	 *
241
	 * @since 3.8.2
242
	 */
243
	function editor_msg() {
244
		global $typenow;
245
		if ( current_user_can( 'manage_options' ) ) {
246
			$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
247
			$editor_dismissed = isset( self::$jetpack_hide_jitm['editor'] );
248
			if ( ! $editor_dismissed ) :
249
			?>
250
			<div class="jp-jitm">
251
				<a href="#"  data-module="editor" class="dismiss"><span class="genericon genericon-close"></span></a>
252
				<div class="jp-emblem">
253
					<?php echo self::get_jp_emblem(); ?>
254
				</div>
255
				<p class="msg">
256
					<?php esc_html_e( 'Try the brand new editor.', 'jetpack' ); ?>
257
				</p>
258
				<p>
259
					<a href="<?php echo esc_url( 'https://wordpress.com/' . $typenow . '/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Write on WordPress.com', 'jetpack' ); ?>" data-module="editor" class="button button-jetpack launch show-after-enable"><?php esc_html_e( 'Write on WordPress.com', 'jetpack' ); ?></a>
260
				</p>
261
			</div>
262
			<?php
263
			//jitm is being viewed, track it
264
			$jetpack = Jetpack::init();
265
			$jetpack->stat( 'jitm', 'editor-viewed-' . JETPACK__VERSION );
266
			$jetpack->do_stats( 'server_side' );
267
			endif; // manage or editor inactive
268
		}
269
	}
270
271
	/**
272
	 * Display message in editor prompting user to enable stats.
273
	 *
274
	 * @since 3.9.0
275
	 */
276
	function stats_msg() {
277
		$stats_active        = Jetpack::is_module_active( 'stats' );
278
		$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
279
		?>
280
		<div class="jp-jitm">
281
			<a href="#" data-module="stats" class="dismiss"><span class="genericon genericon-close"></span></a>
282
283
			<div class="jp-emblem">
284
				<?php echo self::get_jp_emblem(); ?>
285
			</div>
286
			<p class="msg">
287
				<?php esc_html_e( 'Track detailed stats on this post and the rest of your site.', 'jetpack' ); ?>
288
			</p>
289
			<?php if ( ! $stats_active ) : ?>
290
				<p>
291
					<img class="j-spinner hide" src="<?php echo esc_url( includes_url( 'images/spinner-2x.gif' ) ); ?>" alt="<?php echo esc_attr__( 'Loading...', 'jetpack' ); ?>" /><a href="#" data-module="stats" data-module-success="<?php esc_attr_e( 'Success! Jetpack Stats is now activated.', 'jetpack' ); ?>" class="activate button"><?php esc_html_e( 'Enable Jetpack Stats', 'jetpack' ); ?></a>
292
				</p>
293
			<?php endif; // stats inactive
294
			?>
295
			<p class="show-after-enable <?php echo $stats_active ? '' : 'hide'; ?>">
296
				<a href="<?php echo esc_url( 'https://wordpress.com/stats/insights/' . $normalized_site_url ); ?>" target="_blank" title="<?php esc_attr_e( 'Go to WordPress.com', 'jetpack' ); ?>" data-module="stats" class="button button-jetpack launch show-after-enable"><?php esc_html_e( 'Go to WordPress.com', 'jetpack' ); ?></a>
297
			</p>
298
		</div>
299
		<?php
300
		//jitm is being viewed, track it
301
		$jetpack = Jetpack::init();
302
		$jetpack->stat( 'jitm', 'post-stats-viewed-' . JETPACK__VERSION );
303
		$jetpack->do_stats( 'server_side' );
304
	}
305
306
	/**
307
	 * Display JITM in Updates screen prompting user to enable Backups.
308
	 *
309
	 * @since 3.9.5
310
	 */
311 View Code Duplication
	function backups_updates_msg() {
312
		$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
313
		$url = 'https://wordpress.com/plans/' . $normalized_site_url;
314
		$jitm_stats_url = Jetpack::build_stats_url( array( 'x_jetpack-jitm' => 'vaultpress' ) );
315
		?>
316
		<div class="jp-jitm" data-track="vaultpress-updates" data-stats_url="<?php echo esc_url( $jitm_stats_url ); ?>">
317
			<a href="#" data-module="vaultpress" class="dismiss"><span class="genericon genericon-close"></span></a>
318
319
			<div class="jp-emblem">
320
				<?php echo self::get_jp_emblem(); ?>
321
			</div>
322
			<p class="msg">
323
				<?php esc_html_e( 'Backups are recommended to protect your site before you make any changes.', 'jetpack' ); ?>
324
			</p>
325
			<p>
326
				<a href="<?php echo esc_url( $url ); ?>" target="_blank" title="<?php esc_attr_e( 'Enable VaultPress Backups', 'jetpack' ); ?>" data-module="vaultpress" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-vault" class="button button-jetpack launch jptracks"><?php esc_html_e( 'Enable VaultPress Backups', 'jetpack' ); ?></a>
327
			</p>
328
		</div>
329
		<?php
330
		//jitm is being viewed, track it
331
		$jetpack = Jetpack::init();
332
		$jetpack->stat( 'jitm', 'vaultpress-updates-viewed-' . JETPACK__VERSION );
333
		$jetpack->do_stats( 'server_side' );
334
	}
335
336
	/**
337
	 * Display JITM in Comments screen prompting user to enable Akismet.
338
	 *
339
	 * @since 3.9.5
340
	 */
341 View Code Duplication
	function akismet_msg() {
342
		$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
343
		$url = 'https://wordpress.com/plans/' . $normalized_site_url;
344
		$jitm_stats_url = Jetpack::build_stats_url( array( 'x_jetpack-jitm' => 'akismet' ) );
345
		?>
346
		<div class="jp-jitm" data-stats_url="<?php echo esc_url( $jitm_stats_url ); ?>">
347
			<a href="#" data-module="akismet" class="dismiss"><span class="genericon genericon-close"></span></a>
348
349
			<div class="jp-emblem">
350
				<?php echo self::get_jp_emblem(); ?>
351
			</div>
352
			<p class="msg">
353
				<?php esc_html_e( "Spam affects your site's legitimacy, protect your site with Akismet.", 'jetpack' ); ?>
354
			</p>
355
			<p>
356
				<a href="<?php echo esc_url( $url ); ?>" target="_blank" title="<?php esc_attr_e( 'Automate Spam Blocking', 'jetpack' ); ?>" data-module="akismet" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-akismet" class="button button-jetpack launch jptracks"><?php esc_html_e( 'Automate Spam Blocking', 'jetpack' ); ?></a>
357
			</p>
358
		</div>
359
		<?php
360
		//jitm is being viewed, track it
361
		$jetpack = Jetpack::init();
362
		$jetpack->stat( 'jitm', 'akismet-viewed-' . JETPACK__VERSION );
363
		$jetpack->do_stats( 'server_side' );
364
	}
365
366
	/**
367
	 * Display JITM after a post is published prompting user to enable Backups.
368
	 *
369
	 * @since 3.9.5
370
	 */
371 View Code Duplication
	function backups_after_publish_msg() {
372
		$normalized_site_url = Jetpack::build_raw_urls( get_home_url() );
373
		$url = 'https://wordpress.com/plans/' . $normalized_site_url;
374
		$jitm_stats_url = Jetpack::build_stats_url( array( 'x_jetpack-jitm' => 'vaultpress' ) );
375
		?>
376
		<div class="jp-jitm" data-track="vaultpress-publish" data-stats_url="<?php echo esc_url( $jitm_stats_url ); ?>">
377
			<a href="#" data-module="vaultpress" class="dismiss"><span class="genericon genericon-close"></span></a>
378
379
			<div class="jp-emblem">
380
				<?php echo self::get_jp_emblem(); ?>
381
			</div>
382
			<p class="msg">
383
				<?php esc_html_e( "Great job! Now let's make sure your hard work is never lost, backup everything with VaultPress.", 'jetpack' ); ?>
384
			</p>
385
			<p>
386
				<a href="<?php echo esc_url( $url ); ?>" target="_blank" title="<?php esc_attr_e( 'Enable Backups', 'jetpack' ); ?>" data-module="vaultpress" data-jptracks-name="nudge_click" data-jptracks-prop="jitm-vault-post" class="button button-jetpack launch jptracks"><?php esc_html_e( 'Enable Backups', 'jetpack' ); ?></a>
387
			</p>
388
		</div>
389
		<?php
390
		//jitm is being viewed, track it
391
		$jetpack = Jetpack::init();
392
		$jetpack->stat( 'jitm', 'vaultpress-publish-viewed-' . JETPACK__VERSION );
393
		$jetpack->do_stats( 'server_side' );
394
	}
395
396
	/*
397
	* Function to enqueue jitm css and js
398
	*/
399
	function jitm_enqueue_files( $hook ) {
0 ignored issues
show
Unused Code introduced by
The parameter $hook is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
400
401
		$wp_styles = new WP_Styles();
402
		$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
403
		wp_enqueue_style( 'jetpack-jitm-css', plugins_url( "css/jetpack-admin-jitm{$min}.css", JETPACK__PLUGIN_FILE ), false, JETPACK__VERSION . '-201243242' );
404
		$wp_styles->add_data( 'jetpack-jitm-css', 'rtl', true );
405
406
		//Build stats url for tracking manage button
407
		$jitm_stats_url = Jetpack::build_stats_url( array( 'x_jetpack-jitm' => 'wordpresstools' ) );
408
409
		// Enqueue javascript to handle jitm notice events
410
		wp_enqueue_script( 'jetpack-jitm-js', plugins_url( '_inc/jetpack-jitm.js', JETPACK__PLUGIN_FILE ),
411
			array( 'jquery' ), JETPACK__VERSION, true );
412
		wp_localize_script(
413
			'jetpack-jitm-js',
414
			'jitmL10n',
415
			array(
416
				'ajaxurl'     => admin_url( 'admin-ajax.php' ),
417
				'jitm_nonce'  => wp_create_nonce( 'jetpack-jitm-nonce' ),
418
				'photon_msgs' => array(
419
					'success' => esc_html__( 'Success! Photon is now actively optimizing and serving your images for free.', 'jetpack' ),
420
					'fail'    => esc_html__( 'We are sorry but unfortunately Photon did not activate.', 'jetpack' )
421
				),
422
				'manage_msgs' => array(
423
					'success' => esc_html__( 'Success! WordPress.com tools are now active.', 'jetpack' ),
424
					'fail'    => esc_html__( 'We are sorry but unfortunately Manage did not activate.', 'jetpack' )
425
				),
426
				'stats_msgs' => array(
427
					'success' => esc_html__( 'Success! Stats are now active.', 'jetpack' ),
428
					'fail'    => esc_html__( 'We are sorry but unfortunately Stats did not activate.', 'jetpack' )
429
				),
430
				'jitm_stats_url' => $jitm_stats_url
431
			)
432
		);
433
	}
434
435
	/**
436
	 * Check if a JITM was dismissed or not. Currently, dismissing one JITM will dismiss all of them.
437
	 *
438
	 * @since 3.8.2
439
	 *
440
	 * @return bool
441
	 */
442
	function is_jitm_dismissed() {
443
		if ( is_null( self::$jetpack_hide_jitm ) ) {
444
445
			// The option returns false when nothing was dismissed
446
			self::$jetpack_hide_jitm = Jetpack_Options::get_option( 'hide_jitm' );
0 ignored issues
show
Documentation Bug introduced by
It seems like \Jetpack_Options::get_option('hide_jitm') of type * is incompatible with the declared type array of property $jetpack_hide_jitm.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
447
		}
448
449
		// so if it's not an array, it means no JITM was dismissed
450
		return is_array( self::$jetpack_hide_jitm );
451
	}
452
453
	/**
454
	 * Return string containing the Jetpack logo.
455
	 *
456
	 * @since 3.9.0
457
	 *
458
	 * @return string
459
	 */
460
	function get_jp_emblem() {
461
		return '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0" y="0" viewBox="0 0 172.9 172.9" enable-background="new 0 0 172.9 172.9" xml:space="preserve">	<path d="M86.4 0C38.7 0 0 38.7 0 86.4c0 47.7 38.7 86.4 86.4 86.4s86.4-38.7 86.4-86.4C172.9 38.7 134.2 0 86.4 0zM83.1 106.6l-27.1-6.9C49 98 45.7 90.1 49.3 84l33.8-58.5V106.6zM124.9 88.9l-33.8 58.5V66.3l27.1 6.9C125.1 74.9 128.4 82.8 124.9 88.9z" /></svg>';
462
	}
463
}
464
/**
465
 * Filter to turn off all just in time messages
466
 *
467
 * @since 3.7.0
468
 *
469
 * @param bool true Whether to show just in time messages.
470
 */
471
if ( apply_filters( 'jetpack_just_in_time_msgs', false ) ) {
472
	Jetpack_JITM::init();
473
}