Completed
Push — add/network-activation-banner ( a00363 )
by
unknown
11:56
created

Jetpack_Connection_Banner::render_banner_b()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
class Jetpack_Connection_Banner {
4
	/**
5
	 * @var Jetpack_Connection_Banner
6
	 **/
7
	private static $instance = null;
8
9
	static function init() {
10
		if ( is_null( self::$instance ) ) {
11
			self::$instance = new Jetpack_Connection_Banner();
12
		}
13
14
		return self::$instance;
15
	}
16
17
	/**
18
	 * Jetpack_Connection_Banner constructor.
19
	 *
20
	 * Since we call the Jetpack_Connection_Banner:init() method from the `Jetpack` class, and after
21
	 * the admin_init action fires, we know that the admin is initialized at this point.
22
	 */
23
	private function __construct() {
24
		add_action( 'current_screen', array( $this, 'maybe_initialize_hooks' ) );
25
		add_action( 'updating_jetpack_version', array( $this, 'cleanup_on_upgrade' ), 10, 2 );
26
	}
27
28
	function cleanup_on_upgrade( $new_version = null, $old_version = null ) {
29
		if ( version_compare( $old_version, '4.4', '>=' ) && version_compare( $old_version, '5.3', '<' ) ) {
30
			delete_option( 'jetpack_connection_banner_ab' );
31
		}
32
	}
33
34
	/**
35
	 * Checks whether the connection banner A/B test should be ran.
36
	 *
37
	 * @since 5.3.0
38
	 *
39
	 * @param null $now
40
	 *
41
	 * @return bool
42
	 */
43
	static function check_ab_test_not_expired( $now = null ) {
44
		// Get the current timestamp in GMT
45
		$now = empty( $now ) ? current_time( 'timestamp', 1 ) : $now;
46
47
		// Arguments are hour, minute, second, month, day, year. So, we are getting the timestamp for GMT timestamp
48
		// for the October 5th, 2017.
49
		$expiration = gmmktime( 0, 0, 0, 10, 5, 2017 );
50
51
		return $expiration >= $now;
52
	}
53
54
	/**
55
	 * Gets the value for which connection banner to show, and initializes if not set.
56
	 *
57
	 * @since 5.3.0
58
	 *
59
	 * @return int
60
	 */
61
	static function get_random_connection_banner_value() {
62
		$random_connection_banner = get_option( 'jetpack_connection_banner_ab' );
63
		if ( ! $random_connection_banner ) {
64
			$random_connection_banner = mt_rand( 1, 2 );
65
			update_option( 'jetpack_connection_banner_ab', $random_connection_banner );
66
		}
67
68
		return $random_connection_banner;
69
	}
70
71
	/**
72
	 * Given a string for the the banner was added, and an int that represents the slide to
73
	 * a URL for, this function returns a connection URL with a from parameter that will
74
	 * support split testing.
75
	 *
76
	 * @param string     $jp_version_banner_added A short version of when the banner was added. Ex. 44
77
	 * @param string|int $slide_num               The index of the slide, 1-indexed.
78
	 * @return string
79
	 */
80
	function build_connect_url_for_slide( $jp_version_banner_added, $slide_num ) {
81
		global $current_screen;
82
		$url = Jetpack::init()->build_connect_url(
83
			true,
84
			false,
85
			sprintf( 'banner-%s-slide-%s-%s', $jp_version_banner_added, $slide_num, $current_screen->base )
86
		);
87
		return add_query_arg( 'auth_approved', 'true', $url );
88
	}
89
90
	/**
91
	 * Will initialize hooks to display the new (as of 4.4) connection banner if the current user can
92
	 * connect Jetpack, if Jetpack has not been deactivated, and if the current page is the plugins page.
93
	 *
94
	 * This method should not be called if the site is connected to WordPress.com or if the site is in development mode.
95
	 *
96
	 * @since 4.4.0
97
	 * @since 4.5.0 Made the new (as of 4.4) connection banner display to everyone by default.
98
	 * @since 5.3.0 Running another split test between 4.4 banner and a new one in 5.3.
99
	 *
100
	 * @param $current_screen
101
	 */
102
	function maybe_initialize_hooks( $current_screen ) {
103
		// Kill if banner has been dismissed
104
		if ( Jetpack_Options::get_option( 'dismissed_connection_banner' ) ) {
105
			return;
106
		}
107
108
		// Don't show the connect notice anywhere but the plugins.php after activating
109
		if (
110
			'plugins' !== $current_screen->base
111
			&& 'plugins-network' !== $current_screen->base
112
			&& 'dashboard' !== $current_screen->base
113
		) {
114
			return;
115
		}
116
117
		if ( ! current_user_can( 'jetpack_connect' ) ) {
118
			return;
119
		}
120
121
		// A/B testing banner code entry point was removed from here
122
		add_action( 'admin_notices', array( $this, 'render_banner' ) );
123
124
		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_banner_scripts' ) );
125
		add_action( 'admin_print_styles', array( Jetpack::init(), 'admin_banner_styles' ) );
126
127
		if ( Jetpack::state( 'network_nag' ) ) {
128
			add_action( 'network_admin_notices', array( $this, 'network_connect_notice' ) );
129
		}
130
131
		// Only fires immediately after plugin activation
132
		if ( get_transient( 'activated_jetpack' ) ) {
133
			add_action( 'admin_notices', array( $this, 'render_connect_prompt_full_screen' ) );
134
			delete_transient( 'activated_jetpack' );
135
		}
136
	}
137
138
	/**
139
	 * Enqueues JavaScript for new connection banner.
140
	 *
141
	 * @since 4.4.0
142
	 */
143 View Code Duplication
	function enqueue_banner_scripts() {
144
		wp_enqueue_script(
145
			'jetpack-connection-banner-js',
146
			Jetpack::get_file_url_for_environment(
147
				'_inc/build/jetpack-connection-banner.min.js',
148
				'_inc/jetpack-connection-banner.js'
149
			),
150
			array( 'jquery' ),
151
			JETPACK__VERSION,
152
			true
153
		);
154
155
		wp_localize_script(
156
			'jetpack-connection-banner-js',
157
			'jp_banner',
158
			array(
159
				'ajax_url' => admin_url( 'admin-ajax.php' ),
160
				'connectionBannerNonce' => wp_create_nonce( 'jp-connection-banner-nonce' ),
161
			)
162
		);
163
	}
164
165
	/**
166
	 * Renders the new connection banner as of 4.4.0.
167
	 *
168
	 * @since 4.4.0
169
	 */
170 View Code Duplication
	function render_banner() { ?>
171
		<div id="message" class="updated jp-wpcom-connect__container">
172
			<div class="jp-wpcom-connect__inner-container">
173
				<span
174
					class="notice-dismiss connection-banner-dismiss"
175
					title="<?php esc_attr_e( 'Dismiss this notice', 'jetpack' ); ?>">
176
				</span>
177
178
				<div class="jp-wpcom-connect__vertical-nav">
179
					<div class="jp-wpcom-connect__vertical-nav-container">
180
						<div class="vertical-menu__feature-item jp-feature-intro vertical-menu__feature-item-is-selected">
181
							<div class="vertical-menu__feature-item-icon">
182
								<svg class="jp-wpcom-connect__svg-jetpack" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" version="1.1"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2z M11,14H6l5-10V14z M13,20V10h5L13,20z"/></svg>
183
							</div>
184
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Welcome to Jetpack', 'jetpack' ); ?></span>
185
						</div>
186
						<div class="vertical-menu__feature-item">
187
							<div class="vertical-menu__feature-item-icon">
188
								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 20 20" version="1.1"><path d="M7.8 17.6L12.2 17.6 12.2 2 7.8 2 7.8 17.6ZM14.4 17.6L18.9 17.6 18.9 5.3 14.4 5.3 14.4 17.6ZM1.1 17.6L5.6 17.6 5.6 9.8 1.1 9.8 1.1 17.6ZM0 22L20 22 20 19.8 0 19.8 0 22Z" /></svg>
189
							</div>
190
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Stats &amp; Traffic Tools', 'jetpack' ); ?></span>
191
						</div>
192
						<div class="vertical-menu__feature-item">
193
							<div class="vertical-menu__feature-item-icon">
194
								<svg xmlns="http://www.w3.org/2000/svg" width="16" height="20" viewBox="0 1 16 20" version="1.1"><defs><polygon points="16 10 16 0 0 0 0 10 0 20 16 20"/></defs><g stroke="none" stroke-width="1" transform="translate(0.000000, 1.000000)"><mask fill="white"/><path d="M9 13.7L9 16 7 16 7 13.7C6.4 13.4 6 12.7 6 12 6 10.9 6.9 10 8 10 9.1 10 10 10.9 10 12 10 12.7 9.6 13.4 9 13.7L9 13.7ZM5 5C5 3.3 6.3 2 8 2 9.7 2 11 3.3 11 5L11 6 5 6 5 5ZM14 6L13 6 13 5C13 2.2 10.8 0 8 0 5.2 0 3 2.2 3 5L3 6 2 6C0.9 6 0 6.9 0 8L0 18C0 19.1 0.9 20 2 20L14 20C15.1 20 16 19.1 16 18L16 8C16 6.9 15.1 6 14 6L14 6Z" mask="url(#mask-2)"/></g></svg>
195
							</div>
196
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Site Security', 'jetpack' ); ?></span>
197
						</div>
198
						<div class="vertical-menu__feature-item">
199
							<div class="vertical-menu__feature-item-icon">
200
								<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="0" fill="none" width="20" height="20"/><g><path d="M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"/></g></svg>
201
							</div>
202
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Professional Themes', 'jetpack' ); ?></span>
203
						</div>
204
						<div class="vertical-menu__feature-item">
205
							<div class="vertical-menu__feature-item-icon">
206
								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 20 20" version="1.1"><path d="M6 4L6 10.3 9 7 13.9 12.4 14.5 11.7C15.3 10.8 16.7 10.8 17.5 11.7L18 12.2 18 4 6 4ZM20 4L20 16C20 17.1 19.1 18 18 18L6 18C4.9 18 4 17.1 4 16L4 4C4 2.9 4.9 2 6 2L18 2C19.1 2 20 2.9 20 4L20 4ZM2 20L16 20 16 20C16 21.1 15.1 22 14 22L2 22C0.9 22 0 21.1 0 20L0 8C0 6.9 0.9 6 2 6L2 6 2 20ZM13 7.5C13 6.7 13.7 6 14.5 6 15.3 6 16 6.7 16 7.5 16 8.3 15.3 9 14.5 9 13.7 9 13 8.3 13 7.5L13 7.5Z" /></svg>
207
							</div>
208
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Performance', 'jetpack' ); ?></span>
209
						</div>
210
						<div class="vertical-menu__feature-item wp-app-logo">
211
							<div class="vertical-menu__feature-item-icon">
212
								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 20 20" version="1.1"><defs><polygon points="0 20 20 20 20 0 0 0 0 20"/></defs><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(0.000000, 2.000000)"><mask fill="white"/><path d="M14.3 17.3L16.9 9.8C17.4 8.6 17.5 7.7 17.5 6.8 17.5 6.5 17.5 6.2 17.5 5.9 18.1 7.1 18.5 8.5 18.5 10 18.5 13.1 16.8 15.9 14.3 17.3L14.3 17.3ZM11.2 6C11.7 6 12.1 5.9 12.1 5.9 12.6 5.9 12.5 5.2 12.1 5.2 12.1 5.2 10.7 5.3 9.8 5.3 9 5.3 7.6 5.2 7.6 5.2 7.1 5.2 7.1 5.9 7.5 5.9 7.5 5.9 8 6 8.4 6L9.7 9.6 7.9 15.2 4.8 6C5.3 6 5.8 5.9 5.8 5.9 6.2 5.9 6.2 5.2 5.7 5.2 5.7 5.2 4.3 5.3 3.4 5.3 3.3 5.3 3.1 5.3 2.9 5.3 4.4 3 7 1.5 10 1.5 12.2 1.5 14.2 2.3 15.7 3.7 15.7 3.7 15.7 3.7 15.6 3.7 14.8 3.7 14.2 4.5 14.2 5.2 14.2 5.9 14.6 6.5 15 7.2 15.4 7.8 15.7 8.5 15.7 9.6 15.7 10.3 15.5 11.1 15.1 12.3L14.2 15.2 11.2 6ZM10 18.5C9.2 18.5 8.4 18.4 7.6 18.2L10.1 10.7 12.8 17.9C12.8 17.9 12.8 18 12.8 18 11.9 18.3 11 18.5 10 18.5L10 18.5ZM1.5 10C1.5 8.8 1.8 7.6 2.2 6.5L6.3 17.7C3.5 16.3 1.5 13.4 1.5 10L1.5 10ZM10 0C4.5 0 0 4.5 0 10 0 15.5 4.5 20 10 20 15.5 20 20 15.5 20 10 20 4.5 15.5 0 10 0L10 0Z" fill="#86A6BD" mask="url(#mask-2)"/></g></svg>
213
							</div>
214
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'WordPress Apps', 'jetpack' ); ?></span>
215
						</div>
216
						<div class="vertical-menu__feature-item">
217
							<div class="vertical-menu__feature-item-icon">
218
								<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 4 15 15" version="1.1"><polygon points="6.6 4 6.6 10.6 0 10.6 0 12.4 6.6 12.4 6.6 19 8.4 19 8.4 12.4 15 12.4 15 10.6 8.4 10.6 8.4 4"/></svg>
219
							</div>
220
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'More Features', 'jetpack' ); ?></span>
221
						</div>
222
					</div>
223
				</div>
224
				<div class="jp-wpcom-connect__content-container">
225
226
					<!-- slide 1: intro -->
227
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-one jp__slide-is-active">
228
						<h2><?php esc_html_e( 'Jetpack simplifies site security, customization, and management.', 'jetpack' ) ?></h2>
229
230
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
231
							<img src="<?php echo plugins_url( 'images/jetpack-welcome.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
232
									esc_attr_e(
233
										'Jetpack is a free plugin that utilizes powerful WordPress.com servers to enhance your site and simplify managing it',
234
									'jetpack'
235
								); ?>" height="auto" width="250" />
236
						</div>
237
238
						<p>
239
							<?php
240
							esc_html_e(
241
								'Jetpack is a free plugin that utilizes powerful WordPress.com servers to enhance your site and simplify managing it.',
242
								'jetpack'
243
							);
244
							?>
245
						</p>
246
247
						<p>
248
							<?php
249
							esc_html_e(
250
								'You get detailed visitor stats, state-of-the-art security services, image performance upgrades, traffic generation tools, and more.',
251
								'jetpack'
252
							);
253
							?>
254
						</p>
255
256
						<p>
257
							<?php
258
							esc_html_e(
259
								'Connect to WordPress.com (free) to get started!',
260
								'jetpack'
261
							);
262
							?>
263
						</p>
264
265
						<p class="jp-banner__button-container">
266
							<span class="jp-banner__tos-blurb">
267
								<?php jetpack_render_tos_blurb(); ?>
268
							</span>
269
							<a
270
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 1 ) ); ?>"
271
								class="dops-button is-primary">
272
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
273
							</a>
274
							<a
275
								href="#"
276
								class="dops-button next-feature"
277
								title="<?php
278
								esc_attr_e(
279
									'Start tour to Learn about the benefits you receive when you connect Jetpack to WordPress.com',
280
									'jetpack'
281
								);
282
								?>">
283
								<?php esc_html_e( 'Start quick tour', 'jetpack' ); ?>
284
							</a>
285
						</p>
286
					</div> <!-- end slide 1 -->
287
288
					<!-- slide 2: stats -->
289
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-two">
290
						<h2><?php esc_html_e( 'Detailed stats and traffic tools to help your site grow', 'jetpack' ) ?></h2>
291
292
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
293
							<img src="<?php echo plugins_url( 'images/stats-people.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
294
								esc_attr_e(
295
									'Get clear and concise stats and analytics about your visitors',
296
								 'jetpack'
297
								); ?>" height="auto" width="225" />
298
						</div>
299
300
						<p>
301
							<?php
302
							esc_html_e(
303
								'Jetpack provides detailed stats and insights about your viewers.',
304
								'jetpack'
305
							);
306
							?>
307
						</p>
308
309
						<p>
310
							<?php
311
							esc_html_e(
312
								'This helps you make informed decisions about your content and drive more traffic to your site with our related posts, social, and enhanced distribution features.',
313
								'jetpack'
314
							);
315
							?>
316
						</p>
317
318
						<p>
319
							<?php
320
							esc_html_e(
321
								'Professional Plan customers get access to advanced SEO tools.',
322
								'jetpack'
323
							);
324
							?>
325
						</p>
326
327
						<p class="jp-banner__button-container">
328
							<span class="jp-banner__tos-blurb">
329
								<?php jetpack_render_tos_blurb(); ?>
330
							</span>
331
							<a href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 2 ) ); ?>" class="dops-button is-primary">
332
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
333
							</a>
334
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
335
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
336
							</a>
337
						</p>
338
					</div> <!-- end slide 2 -->
339
340
					<!-- slide 3: security -->
341
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-three">
342
						<h2><?php esc_html_e( 'Multiple security tools to give you peace of mind', 'jetpack' ) ?></h2>
343
344
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
345
							<img src="<?php echo plugins_url( 'images/security.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
346
									esc_attr_e(
347
										'Your site is automatically protected from brute force attacks, plus you can use single sign-on for extra security',
348
									'jetpack'
349
								); ?>" height="auto" width="250" />
350
						</div>
351
352
						<p>
353
							<?php
354
							esc_html_e(
355
								'Jetpack protects your site against brute force attacks and unauthorized logins. We also monitor your site for downtime and keep your plugins updated.',
356
								'jetpack'
357
							);
358
							?>
359
						</p>
360
361
						<p>
362
							<?php
363
							esc_html_e(
364
								'Customers on paid plans also benefit from unlimited backups of your entire site, spam protection, malware scanning, and automated fixes.',
365
								'jetpack'
366
							);
367
							?>
368
						</p>
369
370
						<p>
371
							<?php
372
							esc_html_e(
373
								'We also offer free support to all users, and priority assistance to paid customers.',
374
								'jetpack'
375
							);
376
							?>
377
						</p>
378
379
						<p class="jp-banner__button-container">
380
							<span class="jp-banner__tos-blurb">
381
								<?php jetpack_render_tos_blurb(); ?>
382
							</span>
383
							<a
384
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 3 ) ); ?>"
385
								class="dops-button is-primary">
386
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
387
							</a>
388
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
389
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
390
							</a>
391
						</p>
392
					</div> <!-- end slide 3 -->
393
394
					<!-- slide 3A: themes -->
395
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-three-a">
396
						<h2><?php esc_html_e( 'Hundreds of beautiful themes to choose from', 'jetpack' ) ?></h2>
397
398
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
399
							<img src="<?php echo plugins_url( 'images/customize-theme.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
400
									esc_attr_e(
401
										'Choosing a design for your site is essential. It defines your brand, your layout, and your visitors’ reading experience',
402
									'jetpack'
403
								); ?>" height="auto" width="250" />
404
						</div>
405
406
						<p>
407
							<?php
408
							esc_html_e(
409
								'Choosing a design for your site is essential. It defines your brand, your layout, and your visitors’ reading experience.',
410
								'jetpack'
411
							);
412
							?>
413
						</p>
414
415
						<p>
416
							<?php
417
							esc_html_e(
418
								'Jetpack reduces complexity and makes this previously difficult process a breeze. Browse hundreds of themes in our showcase, or search by theme, name, style, color, or type.',
419
								'jetpack'
420
							);
421
							?>
422
						</p>
423
424
						<p>
425
							<?php
426
							esc_html_e(
427
								'Preview, install, and activate with one-click, then use our suite of design tools to make it look just as you need it to.',
428
								'jetpack'
429
							);
430
							?>
431
						</p>
432
433
						<p class="jp-banner__button-container">
434
							<span class="jp-banner__tos-blurb">
435
								<?php jetpack_render_tos_blurb(); ?>
436
							</span>
437
							<a
438
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', '3a' ) ); ?>"
439
								class="dops-button is-primary">
440
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
441
							</a>
442
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
443
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
444
							</a>
445
						</p>
446
					</div> <!-- end slide 3A -->
447
448
449
					<!-- slide 4: Performance -->
450
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-four">
451
						<h2><?php esc_html_e( 'Faster site speeds through the WordPress.com CDN', 'jetpack' ) ?></h2>
452
453
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
454
							<img src="<?php echo plugins_url( 'images/cloud-based.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
455
									esc_attr_e(
456
										'Jetpack automatically optimizes and speeds up images using the global WordPress.com Content Delivery Network (CDN)',
457
									'jetpack'
458
								); ?>" height="auto" width="225" />
459
						</div>
460
461
						<p>
462
							<?php
463
							esc_html_e(
464
								'Jetpack automatically optimizes and speeds up images using the global WordPress.com Content Delivery Network (CDN). Let us do the heavy lifting for you by reducing bandwidth usage which could potentially lower your hosting costs.',
465
								'jetpack'
466
							);
467
							?>
468
						</p>
469
470
						<p>
471
							<?php
472
							esc_html_e(
473
								'Use of our CDN is unlimited and scales with your site for free. You can also use it for your theme images to further speed up your site.',
474
								'jetpack'
475
							);
476
							?>
477
						</p>
478
479
						<p class="jp-banner__button-container">
480
							<span class="jp-banner__tos-blurb">
481
								<?php jetpack_render_tos_blurb(); ?>
482
							</span>
483
							<a href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 4 ) ); ?>" class="dops-button is-primary">
484
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
485
							</a>
486
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
487
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
488
							</a>
489
						</p>
490
					</div> <!-- end slide 4 -->
491
492
					<!-- slide 5: Apps -->
493
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-five">
494
						<h2><?php esc_html_e( 'Free WordPress apps to manage your site(s) from any device', 'jetpack' ) ?></h2>
495
496
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
497
							<img src="<?php echo plugins_url( 'images/apps.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
498
									esc_attr_e(
499
										'Our mobile and desktop apps are free and available to you on Apple or Android devices once Jetpack is connected to WordPress.com',
500
									'jetpack'
501
								); ?>" height="auto" width="225" />
502
						</div>
503
504
						<p>
505
							<?php
506
							esc_html_e(
507
								'Publish content, track stats, moderate comments and so much more from anywhere in the world. Our mobile and desktop apps are free and available to you on Apple or Android devices once Jetpack is connected to WordPress.com.',
508
								'jetpack'
509
							);
510
							?>
511
						</p>
512
513
						<p>
514
							<?php
515
							esc_html_e(
516
								'When Jetpack is connected to WordPress.com, head over to the Apps tab within Jetpack for direct links to the mobile and desktop apps.',
517
								'jetpack'
518
							);
519
							?>
520
						</p>
521
522
						<p class="jp-banner__button-container">
523
							<span class="jp-banner__tos-blurb">
524
								<?php jetpack_render_tos_blurb(); ?>
525
							</span>
526
							<a href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 5 ) ); ?>" class="dops-button is-primary">
527
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
528
							</a>
529
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
530
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
531
							</a>
532
						</p>
533
					</div> <!-- end slide 5 -->
534
535
					<!-- slide 6: more features -->
536
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-six">
537
						<h2><?php esc_html_e( 'More Jetpack features our users love', 'jetpack' ) ?></h2>
538
539
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
540
							<img src="<?php echo plugins_url( 'images/customize-theme-2.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
541
									esc_attr_e(
542
										'Jetpack includes other features that help you customize your site',
543
									'jetpack'
544
								); ?>" height="auto" width="225" />
545
						</div>
546
547
						<p>
548
							<?php
549
							esc_html_e(  'Jetpack includes other features that help you customize your site including Custom CSS, Contact Forms, Galleries and Carousels, Notifications and Subscriptions, Configurable Widgets, and many more.',
550
								'jetpack'
551
							);
552
							?>
553
						</p>
554
555
						<p>
556
							<?php
557
							esc_html_e(  'Connect to WordPress.com to get started',
558
								'jetpack'
559
							);
560
							?>
561
							<a href="https://jetpack.com/features" target="_blank">
562
								<?php esc_html_e( 'or visit our site for the full feature list.', 'jetpack' ); ?>
563
							</a>
564
						</p>
565
566
						<p class="jp-banner__button-container">
567
							<span class="jp-banner__tos-blurb">
568
								<?php jetpack_render_tos_blurb(); ?>
569
							</span>
570
							<a
571
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 6 ) ); ?>"
572
								class="dops-button is-primary">
573
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
574
							</a>
575
						</p>
576
					</div> <!-- end slide 6 -->
577
				</div>
578
			</div>
579
		</div>
580
		<?php
581
	}
582
583
	/**
584
	 * Renders a split-test banner as of 5.3.0.
585
	 *
586
	 * @since 5.3.0
587
	 * @deprecated 6.0
588
	 */
589
	function render_banner_b() {
590
		_deprecated_function( __METHOD__, 'jetpack-6.0' );
591
	}
592
593
	/**
594
	 * Renders the full-screen connection prompt.  Only shown once and on plugin activation.
595
	 */
596
	function render_connect_prompt_full_screen() {
597
		?>
598
		<div class="jp-connect-full__container">
599
600
			<?php // planet + star svgs ?>
601
602
			<svg class="jp-connect-full__svg-stars" xmlns="http://www.w3.org/2000/svg" width="56" height="54" viewBox="0 0 56 54" version="1.1"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.95"><g transform="translate(-268.000000, -101.000000)" fill="#C8D7E1"><g transform="translate(160.000000, 32.000000)"><g transform="translate(104.000000, 69.000000)"><polyline points="53.6 10.3 59.3 8 53.6 5.7 51.3 0 49 5.7 43.3 8 49 10.3 51.3 16 53.6 10.3"/><polyline transform="translate(8.757724, 49.487494) rotate(315.000000) translate(-8.757724, -49.487494) " points="10.5 51.2 14.8 49.5 10.5 47.8 8.8 43.5 7 47.8 2.8 49.5 7 51.2 8.8 55.5 10.5 51.2"/></g></g></g></g></svg>
603
604
			<svg class="jp-connect-full__svg-jupiter" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50" height="100" viewBox="0 0 50 100" version="1.1"><defs><path d="M0.95 40.37C-4.37 67.46 13.27 93.73 40.37 99.05 67.46 104.37 93.73 86.73 99.05 59.63 104.37 32.54 86.73 6.27 59.63 0.95 32.54-4.37 6.27 13.27 0.95 40.37" id="path-1"/></defs><g id="Welcome" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.5"><g id="v1.2" transform="translate(-1215.000000, -93.000000)"><g id="lrg-planet-+-jupiter-Mask" transform="translate(160.000000, 32.000000)"><g id="jupiter" transform="translate(1055.000000, 61.000000)"><path d="M0.94 40.19C-4.36 67.16 13.22 93.32 40.19 98.62 67.16 103.92 93.32 86.35 98.62 59.37 103.92 32.4 86.35 6.24 59.37 0.94 32.4-4.36 6.24 13.22 0.94 40.19" id="jupFill-1" fill="#C8D7E1"/><g id="jupGroup-17"><mask id="mask-jup" fill="white"><use xlink:href="#path-1"/></mask><g id="jupClip-3"/><path d="M49.59 38.06C51.29 29.39 59.7 23.73 68.38 25.44 77.05 27.14 82.7 35.55 81 44.23 79.3 52.9 70.88 58.55 62.21 56.85 53.53 55.15 47.88 46.73 49.59 38.06" id="jupFill-2" fill="#E9EFF3" mask="url(#mask-jup)"/><path d="M53.93 52.41C48.66 47.1 42.15 43.21 34.98 41.08L37.21 29.74C44.64 30.48 52.15 29.34 59.03 26.41L53.93 52.41" id="jupFill-4" fill="#E9EFF3" mask="url(#mask-jup)"/><path d="M30.93 34.4C31.55 31.25 34.6 29.2 37.75 29.82 40.89 30.43 42.94 33.49 42.32 36.63 41.71 39.78 38.65 41.83 35.51 41.21 32.36 40.59 30.31 37.54 30.93 34.4" id="jupFill-5" fill="#E9EFF3" mask="url(#mask-jup)"/><polyline id="jupFill-9" fill="#E9EFF3" mask="url(#mask-jup)" points="35.54 41.22 -14.22 31.44 -11.99 20.08 37.77 29.85 35.54 41.22"/><path d="M30.34 67.29C31.4 61.93 36.59 58.44 41.95 59.49 47.31 60.54 50.8 65.74 49.75 71.1 48.69 76.46 43.5 79.95 38.14 78.89 32.78 77.84 29.29 72.65 30.34 67.29" id="jupFill-10" fill="#E9EFF3" mask="url(#mask-jup)"/><path d="M33.02 76.15C29.77 72.87 25.75 70.47 21.32 69.15L22.7 62.15C27.29 62.61 31.93 61.9 36.18 60.09L33.02 76.15" id="jupFill-11" fill="#E9EFF3" mask="url(#mask-jup)"/><path d="M18.82 65.02C19.2 63.08 21.09 61.82 23.03 62.2 24.97 62.58 26.24 64.46 25.86 66.41 25.48 68.35 23.59 69.62 21.65 69.23 19.7 68.85 18.44 66.97 18.82 65.02" id="jupFill-12" fill="#E9EFF3" mask="url(#mask-jup)"/><path d="M43.91 78.29C48.16 76.49 52.8 75.78 57.39 76.24L58.77 69.23C54.34 67.92 50.32 65.51 47.07 62.23L43.91 78.29" id="jupFill-13" fill="#E9EFF3" mask="url(#mask-jup)"/><polyline id="jupFill-16" fill="#E9EFF3" mask="url(#mask-jup)" points="21.67 69.24 -67.61 51.7 -66.23 44.68 23.05 62.22 21.67 69.24"/></g><path d="M35.02 68.89C35.07 65.99 37.47 63.68 40.37 63.74 43.28 63.79 45.58 66.19 45.53 69.09 45.47 72 43.07 74.3 40.17 74.25 37.27 74.19 34.96 71.79 35.02 68.89" id="jupFill-18" fill="#E9EFF3"/></g></g></g></g></svg>
605
606
607
			<div class="jp-connect-full__dismiss">
608
				<svg class="jp-connect-full__svg-dismiss" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>Dismiss Jetpack Connection Window</title><rect x="0" fill="none" /><g><path d="M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"/></g></svg>
609
			</div>
610
611
			<div class="jp-connect-full__step-header">
612
				<div class="jp-connect-full__step-header-logos">
613
614
					<svg class="jp-connect-full__svg-jetpack" xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60" version="1.1"><path d="M30,0C13.5,0,0,13.5,0,30s13.5,30,30,30s30-13.5,30-30S46.5,0,30,0z M29,35H13L29,6V35z M31,54V25h16L31,54z"/></svg>
615
616
					<svg class="jp-connect-full__svg-sync" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><title>Connect Jetpack to WordPress.com</title><rect x="0" fill="none" /><g><path d="M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"/></g></svg>
617
618
					<svg class="jp-connect-full__svg-wpcom" xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 2 20 20" version="1.1"><defs><polygon points="0 20 20 20 20 0 0 0 0 20"/></defs><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(0.000000, 2.000000)"><mask fill="white"/><path d="M14.3 17.3L16.9 9.8C17.4 8.6 17.5 7.7 17.5 6.8 17.5 6.5 17.5 6.2 17.5 5.9 18.1 7.1 18.5 8.5 18.5 10 18.5 13.1 16.8 15.9 14.3 17.3L14.3 17.3ZM11.2 6C11.7 6 12.1 5.9 12.1 5.9 12.6 5.9 12.5 5.2 12.1 5.2 12.1 5.2 10.7 5.3 9.8 5.3 9 5.3 7.6 5.2 7.6 5.2 7.1 5.2 7.1 5.9 7.5 5.9 7.5 5.9 8 6 8.4 6L9.7 9.6 7.9 15.2 4.8 6C5.3 6 5.8 5.9 5.8 5.9 6.2 5.9 6.2 5.2 5.7 5.2 5.7 5.2 4.3 5.3 3.4 5.3 3.3 5.3 3.1 5.3 2.9 5.3 4.4 3 7 1.5 10 1.5 12.2 1.5 14.2 2.3 15.7 3.7 15.7 3.7 15.7 3.7 15.6 3.7 14.8 3.7 14.2 4.5 14.2 5.2 14.2 5.9 14.6 6.5 15 7.2 15.4 7.8 15.7 8.5 15.7 9.6 15.7 10.3 15.5 11.1 15.1 12.3L14.2 15.2 11.2 6ZM10 18.5C9.2 18.5 8.4 18.4 7.6 18.2L10.1 10.7 12.8 17.9C12.8 17.9 12.8 18 12.8 18 11.9 18.3 11 18.5 10 18.5L10 18.5ZM1.5 10C1.5 8.8 1.8 7.6 2.2 6.5L6.3 17.7C3.5 16.3 1.5 13.4 1.5 10L1.5 10ZM10 0C4.5 0 0 4.5 0 10 0 15.5 4.5 20 10 20 15.5 20 20 15.5 20 10 20 4.5 15.5 0 10 0L10 0Z" fill="#86A6BD" mask="url(#mask-2)"/></g></svg>
619
620
				</div>
621
				<h2 class="jp-connect-full__step-header-title"><?php esc_html_e( 'Connect Jetpack to WordPress.com', 'jetpack' ) ?></h2>
622
			</div>
623
624
			<div class="jp-connect-full__card">
625
				<div class="jp-connect-full__card-inner">
626
					<p class="jp-connect-full__card-description">
627
						<?php
628
						esc_html_e(
629
							'Please connect to or create a WordPress.com account to start using Jetpack. This will enable powerful security, traffic, and customization services.',
630
							'jetpack'
631
						);
632
						?>
633
					</p>
634
				</div>
635
				<div class="jp-connect-full__card-footer">
636
					<p class="jp-connect-full__tos-blurb">
637
						<?php jetpack_render_tos_blurb(); ?>
638
					</p>
639
					<p class="jp-connect-full__button-container">
640
						<a href="<?php echo esc_url( Jetpack::init()->build_connect_url( true, false, 'full-screen-prompt' ) ); ?>" class="dops-button is-primary">
641
							<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
642
						</a>
643
					</p>
644
				</div>
645
			</div>
646
			<a class="jp-connect-full__help-button" href="https://jetpack.com/contact-support" target="_blank">
647
				<svg class="gridicon gridicons-help-outline" height="18" width="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"></path></g></svg>
648
				<?php esc_html_e( 'Get help connecting your site', 'jetpack' ); ?>
649
			</a>
650
		</div>
651
		<?php
652
	}
653
654
	/**
655
	 * Renders the legacy network connection banner.
656
	 */
657 View Code Duplication
	function network_connect_notice() {
658
		?>
659
		<div id="message" class="updated jp-wpcom-connect__container">
660
			<div class="jp-wpcom-connect__inner-container">
661
				<span
662
					class="notice-dismiss connection-banner-dismiss"
663
					title="<?php esc_attr_e( 'Dismiss this notice', 'jetpack' ); ?>">
664
				</span>
665
666
				<div class="jp-wpcom-connect__vertical-nav">
667
					<div class="jp-wpcom-connect__vertical-nav-container">
668
						<div class="vertical-menu__feature-item jp-feature-intro vertical-menu__feature-item-is-selected">
669
							<div class="vertical-menu__feature-item-icon">
670
								<svg class="jp-wpcom-connect__svg-jetpack" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" version="1.1"><path d="M12,2C6.5,2,2,6.5,2,12s4.5,10,10,10s10-4.5,10-10S17.5,2,12,2z M11,14H6l5-10V14z M13,20V10h5L13,20z"/></svg>
671
							</div>
672
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Welcome to Jetpack', 'jetpack' ); ?></span>
673
						</div>
674
						<div class="vertical-menu__feature-item">
675
							<div class="vertical-menu__feature-item-icon">
676
								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 20 20" version="1.1"><path d="M7.8 17.6L12.2 17.6 12.2 2 7.8 2 7.8 17.6ZM14.4 17.6L18.9 17.6 18.9 5.3 14.4 5.3 14.4 17.6ZM1.1 17.6L5.6 17.6 5.6 9.8 1.1 9.8 1.1 17.6ZM0 22L20 22 20 19.8 0 19.8 0 22Z" /></svg>
677
							</div>
678
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Stats &amp; Traffic Tools', 'jetpack' ); ?></span>
679
						</div>
680
						<div class="vertical-menu__feature-item">
681
							<div class="vertical-menu__feature-item-icon">
682
								<svg xmlns="http://www.w3.org/2000/svg" width="16" height="20" viewBox="0 1 16 20" version="1.1"><defs><polygon points="16 10 16 0 0 0 0 10 0 20 16 20"/></defs><g stroke="none" stroke-width="1" transform="translate(0.000000, 1.000000)"><mask fill="white"/><path d="M9 13.7L9 16 7 16 7 13.7C6.4 13.4 6 12.7 6 12 6 10.9 6.9 10 8 10 9.1 10 10 10.9 10 12 10 12.7 9.6 13.4 9 13.7L9 13.7ZM5 5C5 3.3 6.3 2 8 2 9.7 2 11 3.3 11 5L11 6 5 6 5 5ZM14 6L13 6 13 5C13 2.2 10.8 0 8 0 5.2 0 3 2.2 3 5L3 6 2 6C0.9 6 0 6.9 0 8L0 18C0 19.1 0.9 20 2 20L14 20C15.1 20 16 19.1 16 18L16 8C16 6.9 15.1 6 14 6L14 6Z" mask="url(#mask-2)"/></g></svg>
683
							</div>
684
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Site Security', 'jetpack' ); ?></span>
685
						</div>
686
						<div class="vertical-menu__feature-item">
687
							<div class="vertical-menu__feature-item-icon">
688
								<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="0" fill="none" width="20" height="20"/><g><path d="M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"/></g></svg>
689
							</div>
690
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Professional Themes', 'jetpack' ); ?></span>
691
						</div>
692
						<div class="vertical-menu__feature-item">
693
							<div class="vertical-menu__feature-item-icon">
694
								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 20 20" version="1.1"><path d="M6 4L6 10.3 9 7 13.9 12.4 14.5 11.7C15.3 10.8 16.7 10.8 17.5 11.7L18 12.2 18 4 6 4ZM20 4L20 16C20 17.1 19.1 18 18 18L6 18C4.9 18 4 17.1 4 16L4 4C4 2.9 4.9 2 6 2L18 2C19.1 2 20 2.9 20 4L20 4ZM2 20L16 20 16 20C16 21.1 15.1 22 14 22L2 22C0.9 22 0 21.1 0 20L0 8C0 6.9 0.9 6 2 6L2 6 2 20ZM13 7.5C13 6.7 13.7 6 14.5 6 15.3 6 16 6.7 16 7.5 16 8.3 15.3 9 14.5 9 13.7 9 13 8.3 13 7.5L13 7.5Z" /></svg>
695
							</div>
696
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'Performance', 'jetpack' ); ?></span>
697
						</div>
698
						<div class="vertical-menu__feature-item wp-app-logo">
699
							<div class="vertical-menu__feature-item-icon">
700
								<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 2 20 20" version="1.1"><defs><polygon points="0 20 20 20 20 0 0 0 0 20"/></defs><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(0.000000, 2.000000)"><mask fill="white"/><path d="M14.3 17.3L16.9 9.8C17.4 8.6 17.5 7.7 17.5 6.8 17.5 6.5 17.5 6.2 17.5 5.9 18.1 7.1 18.5 8.5 18.5 10 18.5 13.1 16.8 15.9 14.3 17.3L14.3 17.3ZM11.2 6C11.7 6 12.1 5.9 12.1 5.9 12.6 5.9 12.5 5.2 12.1 5.2 12.1 5.2 10.7 5.3 9.8 5.3 9 5.3 7.6 5.2 7.6 5.2 7.1 5.2 7.1 5.9 7.5 5.9 7.5 5.9 8 6 8.4 6L9.7 9.6 7.9 15.2 4.8 6C5.3 6 5.8 5.9 5.8 5.9 6.2 5.9 6.2 5.2 5.7 5.2 5.7 5.2 4.3 5.3 3.4 5.3 3.3 5.3 3.1 5.3 2.9 5.3 4.4 3 7 1.5 10 1.5 12.2 1.5 14.2 2.3 15.7 3.7 15.7 3.7 15.7 3.7 15.6 3.7 14.8 3.7 14.2 4.5 14.2 5.2 14.2 5.9 14.6 6.5 15 7.2 15.4 7.8 15.7 8.5 15.7 9.6 15.7 10.3 15.5 11.1 15.1 12.3L14.2 15.2 11.2 6ZM10 18.5C9.2 18.5 8.4 18.4 7.6 18.2L10.1 10.7 12.8 17.9C12.8 17.9 12.8 18 12.8 18 11.9 18.3 11 18.5 10 18.5L10 18.5ZM1.5 10C1.5 8.8 1.8 7.6 2.2 6.5L6.3 17.7C3.5 16.3 1.5 13.4 1.5 10L1.5 10ZM10 0C4.5 0 0 4.5 0 10 0 15.5 4.5 20 10 20 15.5 20 20 15.5 20 10 20 4.5 15.5 0 10 0L10 0Z" fill="#86A6BD" mask="url(#mask-2)"/></g></svg>
701
							</div>
702
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'WordPress Apps', 'jetpack' ); ?></span>
703
						</div>
704
						<div class="vertical-menu__feature-item">
705
							<div class="vertical-menu__feature-item-icon">
706
								<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 4 15 15" version="1.1"><polygon points="6.6 4 6.6 10.6 0 10.6 0 12.4 6.6 12.4 6.6 19 8.4 19 8.4 12.4 15 12.4 15 10.6 8.4 10.6 8.4 4"/></svg>
707
							</div>
708
							<span class="vertical-menu__feature-item-label"><?php esc_html_e( 'More Features', 'jetpack' ); ?></span>
709
						</div>
710
					</div>
711
				</div>
712
				<div class="jp-wpcom-connect__content-container">
713
714
					<!-- slide 1: intro -->
715
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-one jp__slide-is-active">
716
						<h2><?php esc_html_e( 'Jetpack simplifies site security, customization, and management.', 'jetpack' ) ?></h2>
717
718
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
719
							<img src="<?php echo plugins_url( 'images/jetpack-welcome.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
720
									esc_attr_e(
721
										'Jetpack is a free plugin that utilizes powerful WordPress.com servers to enhance your site and simplify managing it',
722
									'jetpack'
723
								); ?>" height="auto" width="250" />
724
						</div>
725
726
						<p>
727
							<?php
728
							esc_html_e(
729
								'Jetpack is a free plugin that utilizes powerful WordPress.com servers to enhance your site and simplify managing it.',
730
								'jetpack'
731
							);
732
							?>
733
						</p>
734
735
						<p>
736
							<?php
737
							esc_html_e(
738
								'You get detailed visitor stats, state-of-the-art security services, image performance upgrades, traffic generation tools, and more.',
739
								'jetpack'
740
							);
741
							?>
742
						</p>
743
744
						<p>
745
							<?php
746
							esc_html_e(
747
								'Connect to WordPress.com (free) to get started!',
748
								'jetpack'
749
							);
750
							?>
751
						</p>
752
753
						<p class="jp-banner__button-container">
754
							<span class="jp-banner__tos-blurb">
755
								<?php jetpack_render_tos_blurb(); ?>
756
							</span>
757
							<a
758
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 1 ) ); ?>"
759
								class="dops-button is-primary">
760
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
761
							</a>
762
							<a
763
								href="#"
764
								class="dops-button next-feature"
765
								title="<?php
766
								esc_attr_e(
767
									'Start tour to Learn about the benefits you receive when you connect Jetpack to WordPress.com',
768
									'jetpack'
769
								);
770
								?>">
771
								<?php esc_html_e( 'Start quick tour', 'jetpack' ); ?>
772
							</a>
773
						</p>
774
					</div> <!-- end slide 1 -->
775
776
					<!-- slide 2: stats -->
777
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-two">
778
						<h2><?php esc_html_e( 'Detailed stats and traffic tools to help your site grow', 'jetpack' ) ?></h2>
779
780
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
781
							<img src="<?php echo plugins_url( 'images/stats-people.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
782
								esc_attr_e(
783
									'Get clear and concise stats and analytics about your visitors',
784
								 'jetpack'
785
								); ?>" height="auto" width="225" />
786
						</div>
787
788
						<p>
789
							<?php
790
							esc_html_e(
791
								'Jetpack provides detailed stats and insights about your viewers.',
792
								'jetpack'
793
							);
794
							?>
795
						</p>
796
797
						<p>
798
							<?php
799
							esc_html_e(
800
								'This helps you make informed decisions about your content and drive more traffic to your site with our related posts, social, and enhanced distribution features.',
801
								'jetpack'
802
							);
803
							?>
804
						</p>
805
806
						<p>
807
							<?php
808
							esc_html_e(
809
								'Professional Plan customers get access to advanced SEO tools.',
810
								'jetpack'
811
							);
812
							?>
813
						</p>
814
815
						<p class="jp-banner__button-container">
816
							<span class="jp-banner__tos-blurb">
817
								<?php jetpack_render_tos_blurb(); ?>
818
							</span>
819
							<a href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 2 ) ); ?>" class="dops-button is-primary">
820
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
821
							</a>
822
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
823
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
824
							</a>
825
						</p>
826
					</div> <!-- end slide 2 -->
827
828
					<!-- slide 3: security -->
829
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-three">
830
						<h2><?php esc_html_e( 'Multiple security tools to give you peace of mind', 'jetpack' ) ?></h2>
831
832
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
833
							<img src="<?php echo plugins_url( 'images/security.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
834
									esc_attr_e(
835
										'Your site is automatically protected from brute force attacks, plus you can use single sign-on for extra security',
836
									'jetpack'
837
								); ?>" height="auto" width="250" />
838
						</div>
839
840
						<p>
841
							<?php
842
							esc_html_e(
843
								'Jetpack protects your site against brute force attacks and unauthorized logins. We also monitor your site for downtime and keep your plugins updated.',
844
								'jetpack'
845
							);
846
							?>
847
						</p>
848
849
						<p>
850
							<?php
851
							esc_html_e(
852
								'Customers on paid plans also benefit from unlimited backups of your entire site, spam protection, malware scanning, and automated fixes.',
853
								'jetpack'
854
							);
855
							?>
856
						</p>
857
858
						<p>
859
							<?php
860
							esc_html_e(
861
								'We also offer free support to all users, and priority assistance to paid customers.',
862
								'jetpack'
863
							);
864
							?>
865
						</p>
866
867
						<p class="jp-banner__button-container">
868
							<span class="jp-banner__tos-blurb">
869
								<?php jetpack_render_tos_blurb(); ?>
870
							</span>
871
							<a
872
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 3 ) ); ?>"
873
								class="dops-button is-primary">
874
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
875
							</a>
876
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
877
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
878
							</a>
879
						</p>
880
					</div> <!-- end slide 3 -->
881
882
					<!-- slide 3A: themes -->
883
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-three-a">
884
						<h2><?php esc_html_e( 'Hundreds of beautiful themes to choose from', 'jetpack' ) ?></h2>
885
886
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
887
							<img src="<?php echo plugins_url( 'images/customize-theme.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
888
									esc_attr_e(
889
										'Choosing a design for your site is essential. It defines your brand, your layout, and your visitors’ reading experience',
890
									'jetpack'
891
								); ?>" height="auto" width="250" />
892
						</div>
893
894
						<p>
895
							<?php
896
							esc_html_e(
897
								'Choosing a design for your site is essential. It defines your brand, your layout, and your visitors’ reading experience.',
898
								'jetpack'
899
							);
900
							?>
901
						</p>
902
903
						<p>
904
							<?php
905
							esc_html_e(
906
								'Jetpack reduces complexity and makes this previously difficult process a breeze. Browse hundreds of themes in our showcase, or search by theme, name, style, color, or type.',
907
								'jetpack'
908
							);
909
							?>
910
						</p>
911
912
						<p>
913
							<?php
914
							esc_html_e(
915
								'Preview, install, and activate with one-click, then use our suite of design tools to make it look just as you need it to.',
916
								'jetpack'
917
							);
918
							?>
919
						</p>
920
921
						<p class="jp-banner__button-container">
922
							<span class="jp-banner__tos-blurb">
923
								<?php jetpack_render_tos_blurb(); ?>
924
							</span>
925
							<a
926
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', '3a' ) ); ?>"
927
								class="dops-button is-primary">
928
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
929
							</a>
930
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
931
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
932
							</a>
933
						</p>
934
					</div> <!-- end slide 3A -->
935
936
937
					<!-- slide 4: Performance -->
938
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-four">
939
						<h2><?php esc_html_e( 'Faster site speeds through the WordPress.com CDN', 'jetpack' ) ?></h2>
940
941
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
942
							<img src="<?php echo plugins_url( 'images/cloud-based.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
943
									esc_attr_e(
944
										'Jetpack automatically optimizes and speeds up images using the global WordPress.com Content Delivery Network (CDN)',
945
									'jetpack'
946
								); ?>" height="auto" width="225" />
947
						</div>
948
949
						<p>
950
							<?php
951
							esc_html_e(
952
								'Jetpack automatically optimizes and speeds up images using the global WordPress.com Content Delivery Network (CDN). Let us do the heavy lifting for you by reducing bandwidth usage which could potentially lower your hosting costs.',
953
								'jetpack'
954
							);
955
							?>
956
						</p>
957
958
						<p>
959
							<?php
960
							esc_html_e(
961
								'Use of our CDN is unlimited and scales with your site for free. You can also use it for your theme images to further speed up your site.',
962
								'jetpack'
963
							);
964
							?>
965
						</p>
966
967
						<p class="jp-banner__button-container">
968
							<span class="jp-banner__tos-blurb">
969
								<?php jetpack_render_tos_blurb(); ?>
970
							</span>
971
							<a href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 4 ) ); ?>" class="dops-button is-primary">
972
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
973
							</a>
974
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
975
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
976
							</a>
977
						</p>
978
					</div> <!-- end slide 4 -->
979
980
					<!-- slide 5: Apps -->
981
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-five">
982
						<h2><?php esc_html_e( 'Free WordPress apps to manage your site(s) from any device', 'jetpack' ) ?></h2>
983
984
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
985
							<img src="<?php echo plugins_url( 'images/apps.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
986
									esc_attr_e(
987
										'Our mobile and desktop apps are free and available to you on Apple or Android devices once Jetpack is connected to WordPress.com',
988
									'jetpack'
989
								); ?>" height="auto" width="225" />
990
						</div>
991
992
						<p>
993
							<?php
994
							esc_html_e(
995
								'Publish content, track stats, moderate comments and so much more from anywhere in the world. Our mobile and desktop apps are free and available to you on Apple or Android devices once Jetpack is connected to WordPress.com.',
996
								'jetpack'
997
							);
998
							?>
999
						</p>
1000
1001
						<p>
1002
							<?php
1003
							esc_html_e(
1004
								'When Jetpack is connected to WordPress.com, head over to the Apps tab within Jetpack for direct links to the mobile and desktop apps.',
1005
								'jetpack'
1006
							);
1007
							?>
1008
						</p>
1009
1010
						<p class="jp-banner__button-container">
1011
							<span class="jp-banner__tos-blurb">
1012
								<?php jetpack_render_tos_blurb(); ?>
1013
							</span>
1014
							<a href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 5 ) ); ?>" class="dops-button is-primary">
1015
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
1016
							</a>
1017
							<a href="#" class="dops-button next-feature" title="<?php esc_attr_e( 'Jetpack Tour: Next Feature', 'jetpack' ); ?>">
1018
								<?php esc_html_e( 'Next feature', 'jetpack' ); ?>
1019
							</a>
1020
						</p>
1021
					</div> <!-- end slide 5 -->
1022
1023
					<!-- slide 6: more features -->
1024
					<div class="jp-wpcom-connect__slide jp-wpcom-connect__slide-six">
1025
						<h2><?php esc_html_e( 'More Jetpack features our users love', 'jetpack' ) ?></h2>
1026
1027
						<div class="jp-wpcom-connect__content-icon jp-connect-illo">
1028
							<img src="<?php echo plugins_url( 'images/customize-theme-2.svg', JETPACK__PLUGIN_FILE ); ?>" alt="<?php
1029
									esc_attr_e(
1030
										'Jetpack includes other features that help you customize your site',
1031
									'jetpack'
1032
								); ?>" height="auto" width="225" />
1033
						</div>
1034
1035
						<p>
1036
							<?php
1037
							esc_html_e(  'Jetpack includes other features that help you customize your site including Custom CSS, Contact Forms, Galleries and Carousels, Notifications and Subscriptions, Configurable Widgets, and many more.',
1038
								'jetpack'
1039
							);
1040
							?>
1041
						</p>
1042
1043
						<p>
1044
							<?php
1045
							esc_html_e(  'Connect to WordPress.com to get started',
1046
								'jetpack'
1047
							);
1048
							?>
1049
							<a href="https://jetpack.com/features" target="_blank">
1050
								<?php esc_html_e( 'or visit our site for the full feature list.', 'jetpack' ); ?>
1051
							</a>
1052
						</p>
1053
1054
						<p class="jp-banner__button-container">
1055
							<span class="jp-banner__tos-blurb">
1056
								<?php jetpack_render_tos_blurb(); ?>
1057
							</span>
1058
							<a
1059
								href="<?php echo esc_url( $this->build_connect_url_for_slide( '44', 6 ) ); ?>"
1060
								class="dops-button is-primary">
1061
								<?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
1062
							</a>
1063
						</p>
1064
					</div> <!-- end slide 6 -->
1065
				</div>
1066
			</div>
1067
		</div>
1068
		<?php
1069
	}
1070
}
1071