From 08add33b654c5257b9eee7460b4543baa94271be Mon Sep 17 00:00:00 2001 From: Jason Adams Date: Mon, 18 Nov 2024 16:17:26 -0700 Subject: [PATCH] refactor: cleans up logic a bit --- src/Actions/RenderAdminNotice.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Actions/RenderAdminNotice.php b/src/Actions/RenderAdminNotice.php index ee7ce4c..d2d4d8e 100644 --- a/src/Actions/RenderAdminNotice.php +++ b/src/Actions/RenderAdminNotice.php @@ -38,10 +38,6 @@ public function __invoke(AdminNotice $notice): string $content = $renderTextOrCallback; } - if (!$notice->isCustom() && $notice->shouldAutoParagraph()) { - $content = wpautop($content); - } - if ($notice->isCustom()) { return $this->applyCustomAttributesToContent($content, $notice); } @@ -49,7 +45,7 @@ public function __invoke(AdminNotice $notice): string return sprintf( "
idAttribute>%s
", esc_attr($this->getStandardWrapperClasses($notice)), - $content + $notice->shouldAutoParagraph() ? wpautop($content) : $content ); }