PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
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 13.9.2 14.0.1 All 504 releases
← All changes | modules/wordads/php/class-wordads-admin.php +30 -7 12.7.316.3-a.1 View file →
@@ -4,8 +4,12 @@
4 4 *
5 5 * @package automattic/jetpack
6 6 */
7 7
8 +if ( ! defined( 'ABSPATH' ) ) {
9 + exit( 0 );
10 +}
11 +
8 12 /**
9 13 * The standard set of admin pages for the user if Jetpack is installed
10 14 */
11 15 class WordAds_Admin {
@@ -45,15 +49,34 @@
45 49 'color' => 'red',
46 50 'approved' => 'No',
47 51 );
48 52
49 - $type = $wordads->option( 'wordads_approved' ) ? 'updated' : 'error';
50 - ?>
51 - <div class="notice <?php echo esc_attr( $type ); ?> is-dismissible">
52 - <p>Status: <span style="color:<?php echo esc_attr( $status['color'] ); ?>;"><?php echo esc_html( $status ); ?></p>
53 - <pre><?php echo esc_html( $response ); ?></pre>
54 - </div>
55 - <?php
53 + $type = $wordads->option( 'wordads_approved' ) ? 'updated' : 'error';
54 + $message = sprintf(
55 + wp_kses(
56 + /* Translators: %1$s is the status color, %2$s is the status, %3$s is the response */
57 + __( '<p>Status: <span style="color:%1$s;">%2$s</span></p><pre>%3$s</pre>', 'jetpack' ),
58 + array(
59 + 'p' => array(),
60 + 'span' => array(
61 + 'style' => array(),
62 + ),
63 + 'pre' => array(),
64 + )
65 + ),
66 + esc_attr( $status['color'] ),
67 + esc_html( $status ),
68 + esc_html( $response )
69 + );
70 +
71 + wp_admin_notice(
72 + $message,
73 + array(
74 + 'type' => $type,
75 + 'dismissible' => true,
76 + 'paragraph_wrap' => false,
77 + )
78 + );
56 79 }
57 80 }
58 81
59 82 global $wordads_admin;