Skip to content

Commit 7b83127

Browse files
Refactor plugins screen message to use wp_kses
Co-authored-by: Weston Ruter <[email protected]>
1 parent 8f670f5 commit 7b83127

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

plugins/performance-lab/includes/admin/plugins.php

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -293,20 +293,23 @@ static function ( string $error_message ): string {
293293
</div>
294294
<p>
295295
<?php
296-
printf(
297-
/* translators: %1$s: opening anchor tag, %2$s: closing anchor tag */
298-
esc_html__( 'Performance features are installed as plugins. To update features or remove them, %1$s manage them on the plugins screen. %2$s', 'performance-lab' ),
299-
'<a href="' . esc_url(
300-
add_query_arg(
301-
array(
302-
's' => 'WordPress Performance Team',
303-
'plugin_status' => 'all',
304-
),
305-
admin_url( 'plugins.php' )
296+
$plugins_url = add_query_arg(
297+
array(
298+
's' => 'WordPress Performance Team',
299+
'plugin_status' => 'all',
300+
),
301+
admin_url( 'plugins.php' )
302+
);
303+
echo wp_kses(
304+
sprintf(
305+
/* translators: %s is the URL to the plugins screen */
306+
__( 'Performance features are installed as plugins. To update features or remove them, <a href="%s">manage them on the plugins screen</a>.', 'performance-lab' ),
307+
esc_url( $plugins_url )
308+
),
309+
array(
310+
'a' => array( 'href' => true ),
306311
)
307-
) . '">',
308-
'</a>'
309-
);
312+
);
310313
?>
311314
</p>
312315
<?php

0 commit comments

Comments
 (0)