Skip to content

Commit

Permalink
esc_html doesn't have the second argument, keep the wp_kses we'll…
Browse files Browse the repository at this point in the history
… check later
  • Loading branch information
widoz committed Oct 16, 2018
1 parent a59d01c commit 29cb4ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions multisite-global-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
*/
function adminNotice(string $message, string $noticeType, array $allowedMarkup = [])
{
$escaper = $allowedMarkup ? 'wp_kses' : 'esc_html';
add_action(
'admin_notices',
function () use ($message, $noticeType, $allowedMarkup, $escaper) {
function () use ($message, $noticeType, $allowedMarkup) {
?>
<div class="notice notice-<?= esc_attr($noticeType) ?>">
<p><?= $escaper($message, $allowedMarkup) ?></p>
<p><?= wp_kses($message, $allowedMarkup) ?></p>
</div>
<?php
}
Expand Down

0 comments on commit 29cb4ef

Please sign in to comment.