PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.5
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.5
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 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 All 506 releases
← All changes | modules/scan/class-admin-bar-notice.php +7 -5 13.2.4 → 16.3-a.5 View file →
@@ -8,8 +8,9 @@
8 8 namespace Automattic\Jetpack\Scan;
9 9
10 10 use Automattic\Jetpack\Assets;
11 11 use Automattic\Jetpack\Redirect;
12 +use WP_Admin_Bar;
12 13
13 14 /**
14 15 * Class Main
15 16 *
@@ -173,12 +174,13 @@
173 174 ),
174 175 );
175 176
176 177 if ( $has_threats ) {
177 - $node['href'] = esc_url( Redirect::get_url( 'calypso-scanner' ) );
178 - $node['meta']['onclick'] = 'window.open( this.href ); return false;';
179 - $node['meta']['class'] = 'error';
180 - $node['title'] = sprintf(
178 + $node['href'] = esc_url( Redirect::get_url( 'calypso-scanner' ) );
179 + $node['meta']['target'] = '_blank';
180 + $node['meta']['rel'] = 'noopener noreferrer';
181 + $node['meta']['class'] = 'error';
182 + $node['title'] = sprintf(
181 183 esc_html(
182 184 /* translators: %s is the alert icon */
183 185 _n( '%s Threat found', '%s Threats found', $this->get_threat_count(), 'jetpack' )
184 186 ),
@@ -208,9 +210,9 @@
208 210 if ( empty( $scan_state ) ) {
209 211 return null;
210 212 }
211 213 // Return true if there is at least one threat found.
212 - return (bool) isset( $scan_state->threats[0] );
214 + return isset( $scan_state->threats[0] );
213 215 }
214 216
215 217 /**
216 218 * Returns the number of threats found or 0.