PluginProbe ʕ •ᴥ•ʔ
Jetpack – WP Security, Backup, Speed, & Growth / 13.0.2
Jetpack – WP Security, Backup, Speed, & Growth v13.0.2
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 14.5.1 14.6.1 14.7.1 14.8.1 14.9.2 15.0.3 15.1.2 15.2.1 15.3.2 15.4.1 15.5.1 15.6.1 15.7.2 15.8.1 15.9.2 16.0.2 16.1.3 16.2-a.5 16.2-a.3 16.1.2 16.2-a.1 16.1.1 16.1 16.1-beta 16.1-beta.2 16.1-beta.3 16.1-a.5 16.1-a.3 16.0.1 16.1-a.1 16.0 16.0-beta 16.0-a.7 16.0-a.5 15.9.1 16.0-a.3 16.0-a.1 15.9 15.9-beta 15.9-a.7 15.9-a.5 15.9-a.3 15.9-a.1 15.8 15.8-beta 15.8-a.7 15.8-a.5 5.2.5 5.3.4 5.4.4 5.5.5 5.6.5 5.7.5 5.8.4 5.9.4 6.0.4 6.1 6.1.1 6.1.2 6.1.3 6.1.4 6.1.5 6.2 6.2.1 6.2.2 6.2.3 6.2.4 6.2.5 6.3 6.3.1 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.4 6.4.1 6.4.2 6.4.3 6.4.4 6.4.5 6.4.6 6.5 6.5.1 6.5.2 6.5.3 6.5.4 6.6 6.6.1 6.6.2 6.6.3 6.6.4 6.6.5 6.7 6.7.1 6.7.2 6.7.3 6.7.4 6.8 6.8.1 6.8.2 6.8.3 6.8.4 6.8.5 6.9 6.9.1 6.9.2 6.9.3 6.9.4 7.0 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1 7.1.1 7.1.2 7.1.3 7.1.4 7.1.5 7.2 7.2.1 7.2.1.1 7.2.2 7.2.3 7.2.4 7.2.5 7.3 7.3.0.1 7.3.1 7.3.1.1 7.3.2 7.3.3 7.3.4 7.3.5 7.4 7.4.1 7.4.2 7.4.3 7.4.4 7.4.5 7.5 7.5.0.1 7.5.1 7.5.2 7.5.3 7.5.4 7.5.5 7.5.6 7.5.7 7.6 7.6.1 7.6.2 7.6.3 7.6.4 7.7 7.7.1 7.7.2 7.7.3 7.7.4 7.7.5 7.7.6 7.8 7.8.1 7.8.2 7.8.3 7.8.4 7.9 7.9.1 7.9.2 7.9.3 7.9.4 8.0 8.0.1 8.0.2 8.0.3 8.1 8.1.1 8.1.2 8.1.3 8.1.4 8.2 8.2.0.1 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.3 8.3.1 8.3.2 8.3.3 8.4 8.4.1 8.4.2 8.4.3 8.4.4 8.4.5 8.5 8.5.1 8.5.2 8.5.3 8.6 8.6.1 8.6.2 8.6.3 8.6.4 8.7 8.7.0.1 8.7.1 8.7.2 8.7.3 8.7.4 8.8 8.8.1 8.8.2 8.8.3 8.8.4 8.8.5 8.9 8.9.1 8.9.2 8.9.3 8.9.4 9.0 9.0.1 9.0.2 9.0.3 9.0.4 9.0.5 9.1 9.1.1 9.1.2 9.1.3 9.2 9.2.1 9.2.2 9.2.3 9.2.4 9.3 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.4 9.4.1 9.4.2 9.4.3 9.4.4 9.5 9.5.1 9.5.2 9.5.3 9.5.4 9.5.5 9.6 9.6.1 9.6.2 9.6.3 9.6.4 9.7 9.7.1 9.7.2 15.7-beta.2 9.7.3 15.7.1 9.8 15.8-a.1 9.8.1 15.8-a.3 9.8.2 2.0.9 9.8.3 2.1.7 9.9 2.2.10 9.9.1 2.3.10 9.9.2 2.4.7 9.9.3 2.5.5 2.6.6 2.7.5 2.8.5 2.9.6 3.0.6 3.1.5 3.2.5 3.3.6 3.4.6 3.5.6 3.6.4 3.7.5 3.8.5 3.9.10 4.0.7 4.1.4 4.2.5 4.3.5 4.4.5 4.5.3 4.6.3 4.7.4 4.8.5 4.9.3 5.0.3 5.1.4 trunk 10.0 10.0.1 10.0.2 10.1 10.1.1 10.1.2 10.2 10.2.1 10.2.2 10.2.3 10.3 10.3.1 10.3.2 10.4 10.4.1 10.4.2 10.5 10.5.1 10.5.2 10.5.3 10.6 10.6.1 10.6.2 10.7 10.7.1 10.7.2 10.8 10.8.1 10.8.2 10.9 10.9.1 10.9.2 10.9.3 11.0 11.0.1 11.0.2 11.1 11.1.1 11.1.2 11.1.3 11.1.4 11.2 11.2.1 11.2.2 11.3 11.3.1 11.3.2 11.3.3 11.3.4 11.4 11.4.1 11.4.2 11.5 11.5.1 11.5.2 11.5.3 11.6 11.6.1 11.6.2 11.7 11.7.1 11.7.2 11.7.3 11.8 11.8.3 11.8.4 11.8.5 11.8.6 11.9 11.9.1 11.9.2 11.9.3 12.0 12.0.1 12.0.2 12.1 12.1.1 12.1.2 12.2 12.2.1 12.2.2 12.3 12.3.1 12.4 12.4.1 12.5 12.5.1 12.6 12.6.1 12.6.2 12.6.3 12.7 12.7.1 12.7.2 12.8 12.8.1 12.8.2 12.9 12.9.1 12.9.2 12.9.3 12.9.4 13.0 13.0.1 13.1 13.1.1 13.1.2 13.1.3 13.1.4 13.2 13.2.1 13.2.2 13.2.3 13.3 13.3.1 13.3.2 13.4 13.4.1 13.4.2 13.4.3 13.4.4 13.5 13.5.1 13.6 13.6.1 13.7 13.7.1 13.8 13.8.1 13.8.2 13.9 13.9.1 14.0 14.1 14.2 14.2.1 14.3 14.4 14.4.1 14.5 14.6 14.7 14.8 14.9 14.9.1 15.0 15.0.1 15.0.2 15.1 15.1.1 15.2 15.3 15.3.1 15.4 15.5 15.6 15.7 15.7-a.1 15.7-a.3 15.7-a.5 15.7-a.7 15.7-beta
jetpack / class.jetpack-connection-banner.php
jetpack Last commit date
3rd-party 2 years ago _inc 2 years ago css 2 years ago extensions 2 years ago images 2 years ago jetpack_vendor 14 hours ago json-endpoints 2 years ago modules 1 year ago sal 2 years ago src 3 years ago vendor 2 years ago views 3 years ago CHANGELOG.md 2 years ago LICENSE.txt 5 years ago SECURITY.md 2 years ago class-jetpack-connection-status.php 2 years ago class-jetpack-connection-widget.php 2 years ago class-jetpack-gallery-settings.php 3 years ago class-jetpack-pre-connection-jitms.php 4 years ago class-jetpack-recommendations-banner.php 2 years ago class-jetpack-stats-dashboard-widget.php 2 years ago class-jetpack-wizard-banner.php 5 years ago class-jetpack-xmlrpc-methods.php 2 years ago class.frame-nonce-preview.php 4 years ago class.jetpack-admin.php 2 years ago class.jetpack-affiliate.php 2 years ago class.jetpack-autoupdate.php 2 years ago class.jetpack-bbpress-json-api.compat.php 2 years ago class.jetpack-boost-modules.php 3 years ago class.jetpack-cli.php 2 years ago class.jetpack-client-server.php 4 years ago class.jetpack-connection-banner.php 2 years ago class.jetpack-data.php 2 years ago class.jetpack-gutenberg.php 2 years ago class.jetpack-heartbeat.php 2 years ago class.jetpack-idc.php 5 years ago class.jetpack-modules-list-table.php 2 years ago class.jetpack-network-sites-list-table.php 3 years ago class.jetpack-network.php 3 years ago class.jetpack-plan.php 3 years ago class.jetpack-post-images.php 2 years ago class.jetpack-twitter-cards.php 2 years ago class.jetpack-user-agent.php 2 years ago class.jetpack.php 2 years ago class.json-api-endpoints.php 2 years ago class.json-api.php 2 years ago class.photon.php 3 years ago composer.json 2 years ago enhanced-open-graph.php 3 years ago functions.compat.php 2 years ago functions.cookies.php 2 years ago functions.global.php 2 years ago functions.is-mobile.php 2 years ago functions.opengraph.php 2 years ago functions.photon.php 2 years ago jetpack.php 14 hours ago json-api-config.php 3 years ago json-endpoints.php 2 years ago load-jetpack.php 3 years ago locales.php 4 years ago readme.txt 14 hours ago uninstall.php 2 years ago wpml-config.xml 4 years ago
class.jetpack-connection-banner.php
394 lines
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 /**
3 * Jetpack connection banner.
4 * DEPRECATED
5 *
6 * @package automattic/jetpack
7 */
8
9 use Automattic\Jetpack\Assets;
10 use Automattic\Jetpack\Assets\Logo;
11 use Automattic\Jetpack\Licensing;
12
13 /**
14 * Jetpack connection banner.
15 * DEPRECATED - this banner has been removed as of version 13.0
16 */
17 class Jetpack_Connection_Banner {
18 /**
19 * Static instance.
20 *
21 * @var Jetpack_Connection_Banner
22 */
23 private static $instance = null;
24
25 /**
26 * Initialize and fetch the static instance.
27 *
28 * @return self
29 */
30 public static function init() {
31 if ( self::$instance === null ) {
32 self::$instance = new Jetpack_Connection_Banner();
33 }
34
35 return self::$instance;
36 }
37
38 /**
39 * Jetpack_Connection_Banner constructor.
40 *
41 * Since we call the Jetpack_Connection_Banner:init() method from the `Jetpack` class, and after
42 * the admin_init action fires, we know that the admin is initialized at this point.
43 */
44 private function __construct() {
45 add_action( 'current_screen', array( $this, 'maybe_initialize_hooks' ) );
46 }
47
48 /**
49 * The banner is forcibly displayed.
50 *
51 * @return bool
52 */
53 public static function force_display() {
54 /**
55 * This is an experiment for partners to test. Allow customization of the behavior of pre-connection banners.
56 *
57 * @since 8.6.0
58 *
59 * @param bool $always_show_prompt Should this prompt always appear? Default to false.
60 */
61 return apply_filters( 'jetpack_pre_connection_prompt_helpers', false );
62 }
63
64 /**
65 * Can the banner be displayed for the given screen?
66 *
67 * @param \WP_Screen $current_screen Current WordPress screen.
68 *
69 * @return bool
70 */
71 public static function can_be_displayed( $current_screen ) {
72 $has_connected_owner = Jetpack::connection()->has_connected_owner();
73 $is_connected = Jetpack::is_connection_ready();
74 $has_licenses = ! empty( Licensing::instance()->stored_licenses() );
75
76 // Don't show the connect notice if the site has a connected owner.
77 if ( $has_connected_owner ) {
78 return false;
79 }
80
81 // Don't show the connect notice if a site connection is established and there are no stored licenses.
82 // Stored licenses indicate that a purchased product may not be provisioned yet hence we need to keep
83 // showing the notice to nudge the user to connect in order to have their product(s) provisioned.
84 if ( $is_connected && ! $has_licenses ) {
85 return false;
86 }
87
88 // Kill if banner has been dismissed and the pre-connection helpers filter is not set.
89 if (
90 Jetpack_Options::get_option( 'dismissed_connection_banner' ) &&
91 ! self::force_display()
92 ) {
93 return false;
94 }
95
96 // Don't show the connect notice anywhere but the plugins.php after activating.
97 if ( 'plugins' !== $current_screen->base && 'dashboard' !== $current_screen->base ) {
98 return false;
99 }
100
101 if ( ! current_user_can( 'jetpack_connect' ) ) {
102 return false;
103 }
104
105 return true;
106 }
107
108 /**
109 * Given a string for the the banner was added, and an int that represents the slide to
110 * a URL for, this function returns a connection URL with a from parameter that will
111 * support split testing.
112 *
113 * @since 7.2 Event key format is now banner-connect-banner-72-dashboard or connect-banner-72-plugins.
114 * The param $slide_num was removed since we removed all slides but the first one.
115 * @since 4.4.0
116 *
117 * @param string $jp_version_banner_added A short version of when the banner was added. Ex. 44.
118 * @return string
119 */
120 public function build_connect_url_for_slide( $jp_version_banner_added ) {
121 global $current_screen;
122 $url = Jetpack::init()->build_connect_url(
123 true,
124 false,
125 sprintf( 'connect-banner-%s-%s', $jp_version_banner_added, $current_screen->base )
126 );
127 return add_query_arg( 'auth_approved', 'true', $url );
128 }
129
130 /**
131 * Will initialize hooks to display the new (as of 4.4) connection banner if the current user can
132 * connect Jetpack, if Jetpack has not been deactivated, and if the current page is the plugins or dashboard page.
133 *
134 * @since 4.4.0
135 * @since 4.5.0 Made the new (as of 4.4) connection banner display to everyone by default.
136 * @since 5.3.0 Running another split test between 4.4 banner and a new one in 5.3.
137 * @since 7.2 B test was removed.
138 * @since 9.7 Moved the connection condition checking to this method to fulfill Licensing requirements.
139 *
140 * @param \WP_Screen $current_screen Current WordPress screen.
141 */
142 public function maybe_initialize_hooks( $current_screen ) {
143 if ( ! self::can_be_displayed( $current_screen ) ) {
144 return;
145 }
146
147 if ( ! empty( Licensing::instance()->stored_licenses() ) ) {
148 add_action( 'admin_notices', array( $this, 'render_license_aware_banner' ) );
149 } else {
150 add_action( 'admin_notices', array( $this, 'render_banner' ) );
151 }
152
153 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_banner_scripts' ) );
154 add_action( 'admin_print_styles', array( $this, 'admin_banner_styles' ) );
155
156 if ( Jetpack::state( 'network_nag' ) ) {
157 add_action( 'network_admin_notices', array( $this, 'network_connect_notice' ) );
158 }
159
160 // Only fires immediately after plugin activation.
161 if ( get_transient( 'activated_jetpack' ) ) {
162 if (
163 ! \Jetpack_Options::get_option( 'has_seen_wc_connection_modal', false )
164 && in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', Jetpack::get_active_plugins() ), true )
165 ) {
166 wp_safe_redirect( Jetpack::admin_url( 'page=jetpack#/woo-setup' ) );
167 } else {
168 add_action( 'admin_enqueue_scripts', array( Jetpack::init(), 'activate_dialog' ) );
169 }
170 delete_transient( 'activated_jetpack' );
171 }
172 }
173
174 /**
175 * Include the needed styles
176 */
177 public function admin_banner_styles() {
178 wp_enqueue_style(
179 'jetpack-connection-banner',
180 Assets::get_file_url_for_environment(
181 'css/jetpack-connection-banner.min.css',
182 'css/jetpack-connection-banner.css'
183 ),
184 array(),
185 JETPACK__VERSION
186 );
187 }
188
189 /**
190 * Enqueues JavaScript for new connection banner.
191 *
192 * @since 4.4.0
193 */
194 public static function enqueue_banner_scripts() {
195 wp_enqueue_script(
196 'jetpack-connection-banner-js',
197 Assets::get_file_url_for_environment(
198 '_inc/build/jetpack-connection-banner.min.js',
199 '_inc/jetpack-connection-banner.js'
200 ),
201 array( 'jquery' ),
202 JETPACK__VERSION,
203 true
204 );
205
206 wp_localize_script(
207 'jetpack-connection-banner-js',
208 'jp_banner',
209 array(
210 'ajax_url' => admin_url( 'admin-ajax.php' ),
211 'connectionBannerNonce' => wp_create_nonce( 'jp-connection-banner-nonce' ),
212 )
213 );
214 }
215
216 /**
217 * Enqueues JavaScript and CSS for the connection button.
218 *
219 * @since 7.7
220 */
221 public static function enqueue_connect_button_scripts() {
222 wp_enqueue_script(
223 'jetpack-connect-button',
224 Assets::get_file_url_for_environment(
225 '_inc/build/connect-button.min.js',
226 '_inc/connect-button.js'
227 ),
228 array( 'jquery' ),
229 JETPACK__VERSION,
230 true
231 );
232
233 wp_enqueue_style(
234 'jetpack-connect-button',
235 Assets::get_file_url_for_environment(
236 'css/jetpack-connect.min.css',
237 'css/jetpack-connect.css'
238 ),
239 array(),
240 JETPACK__VERSION
241 );
242
243 $tracking = new Automattic\Jetpack\Tracking();
244 $identity = $tracking->tracks_get_identity( get_current_user_id() );
245
246 wp_localize_script(
247 'jetpack-connect-button',
248 'jpConnect',
249 array(
250 'buttonTextRegistering' => __( 'Loading...', 'jetpack' ),
251 'connectUrl' => Jetpack::admin_url( 'page=jetpack#/setup' ),
252 'identity' => $identity,
253 'preFetchScript' => plugins_url( '_inc/build/admin.js', JETPACK__PLUGIN_FILE ) . '?ver=' . JETPACK__VERSION,
254 )
255 );
256 }
257
258 /**
259 * Renders the new connection banner as of 4.4.0.
260 *
261 * @since 4.4.0
262 * @since 7.2 Copy and visual elements reduced to show the new focus of Jetpack on Security and Performance.
263 * @since 11.1 Adjusted the banner to Emerald style
264 */
265 public function render_banner() {
266 $jetpack_logo = new Logo();
267 ?>
268 <div class="jp-connection-banner">
269 <div class="jp-connection-banner__container-top-text">
270 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="0" fill="none" width="24" height="24"/><g><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"/></g></svg>
271 <span>
272 <?php esc_html_e( 'You’re almost done. Set up Jetpack to enable powerful security and performance tools for WordPress.', 'jetpack' ); ?>
273 </span>
274 </div>
275 <?php
276 if ( ! static::force_display() ) :
277 ?>
278 <span
279 class="notice-dismiss jp-connection-banner__dismiss"
280 title="<?php esc_attr_e( 'Dismiss this notice', 'jetpack' ); ?>">
281 </span>
282
283 <?php
284 endif;
285 ?>
286 <div class="jp-connection-banner__inner">
287 <div class="jp-connection-banner__content">
288 <div class="jp-connection-banner__logo">
289 <?php echo $jetpack_logo->get_jp_emblem_larger(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
290 </div>
291 <h2 class="jp-connection-banner__title"><?php esc_html_e( 'Simplify your site security and performance with Jetpack', 'jetpack' ); ?></h2>
292 <div class="jp-connection-banner__columns">
293 <div class="jp-connection-banner__text"><?php esc_html_e( 'Jetpack provides easy-to-use, comprehensive WordPress site security and backups, so you can focus on running your business.', 'jetpack' ); ?></div>
294 <div class="jp-connection-banner__text"><?php esc_html_e( 'Jetpack’s performance features make your site lightning-fast, while also improving your SEO and giving your visitors a better experience.', 'jetpack' ); ?></div>
295 </div>
296 <div class="jp-connection-banner__footer">
297 <div class="jp-connection-banner__text jp-connection-banner__text--caption"><?php jetpack_render_tos_blurb(); ?></div>
298 <a id="jp-connect-button--alt" href="<?php echo esc_url( $this->build_connect_url_for_slide( '111' ) ); ?>" class="jp-banner-cta-button">
299 <?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
300 </a>
301 </div>
302 </div>
303 <div class="jp-connection-banner__image-container">
304 <img class="jp-connection-banner__image-background" src="<?php echo esc_url( plugins_url( 'images/jetpack-connection-banner-background.svg', JETPACK__PLUGIN_FILE ) ); ?>" />
305 <picture>
306 <source
307 type="image/webp"
308 srcset="<?php echo esc_url( plugins_url( 'images/jetpack-connection-image.webp', JETPACK__PLUGIN_FILE ) ); ?> 1x, <?php echo esc_url( plugins_url( 'images/jetpack-connection-image-2x.webp', JETPACK__PLUGIN_FILE ) ); ?> 2x">
309 <img
310 class="jp-connection-banner__image"
311 srcset="<?php echo esc_url( plugins_url( 'images/jetpack-connection-image.png', JETPACK__PLUGIN_FILE ) ); ?> 1x, <?php echo esc_url( plugins_url( 'images/jetpack-connection-image-2x.png', JETPACK__PLUGIN_FILE ) ); ?> 2x"
312 src="<?php echo esc_url( plugins_url( 'images/jetpack-connection-image.png', JETPACK__PLUGIN_FILE ) ); ?>"
313 alt="">
314 </picture>
315 </div>
316 </div>
317 </div>
318 <?php
319 }
320
321 /**
322 * Renders the license-away version of the connection banner.
323 *
324 * @since 9.0.0
325 * @since 11.1 Adjusted the banner to Emerald style
326 */
327 public function render_license_aware_banner() {
328 $jetpack_logo = new Logo();
329 ?>
330 <div class="jp-connection-banner">
331 <div class="jp-connection-banner__inner">
332 <div class="jp-connection-banner__content">
333 <div class="jp-connection-banner__logo">
334 <?php echo $jetpack_logo->get_jp_emblem_larger(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
335 </div>
336 <h2 class="jp-connection-banner__title jp-connection-banner__title--warning">
337 <svg height="38" width="38" viewBox="0 0 24 24" class="jp-connection-banner__warning-icon">
338 <g>
339 <rect x="8" y="6" width="8" height="12" style="fill:#000000" />
340 <path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z" style="fill:#eec74f"></path>
341 </g>
342 </svg>
343 <?php esc_html_e( 'Finish setting up Jetpack', 'jetpack' ); ?>
344 </h2>
345 <div class="jp-connection-banner__text"><?php esc_html_e( "Thanks for purchasing a Jetpack subscription.\nThere’s just one more step to complete the installation.", 'jetpack' ); ?></div>
346 <div class="jp-connection-banner__footer">
347 <div class="jp-connection-banner__text jp-connection-banner__text--caption"><?php jetpack_render_tos_blurb(); ?></div>
348 <a id="jp-connect-button--alt" href="<?php echo esc_url( $this->build_connect_url_for_slide( '111' ) ); ?>" class="jp-banner-cta-button">
349 <?php esc_html_e( 'Set up Jetpack', 'jetpack' ); ?>
350 </a>
351 </div>
352 </div>
353 <div class="jp-connection-banner__image-container">
354 <img class="jp-connection-banner__image-background" src="<?php echo esc_url( plugins_url( 'images/jetpack-connection-banner-background.svg', JETPACK__PLUGIN_FILE ) ); ?>" />
355 <picture>
356 <source
357 type="image/webp"
358 srcset="<?php echo esc_url( plugins_url( 'images/jetpack-connection-image.webp', JETPACK__PLUGIN_FILE ) ); ?> 1x, <?php echo esc_url( plugins_url( 'images/jetpack-connection-image-2x.webp', JETPACK__PLUGIN_FILE ) ); ?> 2x">
359 <img
360 class="jp-connection-banner__image"
361 srcset="<?php echo esc_url( plugins_url( 'images/jetpack-connection-image.png', JETPACK__PLUGIN_FILE ) ); ?> 1x, <?php echo esc_url( plugins_url( 'images/jetpack-connection-image-2x.png', JETPACK__PLUGIN_FILE ) ); ?> 2x"
362 src="<?php echo esc_url( plugins_url( 'images/jetpack-connection-image.png', JETPACK__PLUGIN_FILE ) ); ?>"
363 alt="">
364 </picture>
365 </div>
366 </div>
367 </div>
368 <?php
369 }
370
371 /**
372 * Renders the legacy network connection banner.
373 */
374 public function network_connect_notice() {
375 ?>
376 <div id="message" class="updated jetpack-message">
377 <div class="squeezer">
378 <h2>
379 <?php
380 echo wp_kses(
381 __(
382 '<strong>Jetpack is activated!</strong> Each site on your network must be connected individually by an admin on that site.',
383 'jetpack'
384 ),
385 array( 'strong' => array() )
386 );
387 ?>
388 </h2>
389 </div>
390 </div>
391 <?php
392 }
393 }
394