Skip to content

Commit

Permalink
refactor: cleans up logic a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonTheAdams committed Nov 18, 2024
1 parent 3ccd34e commit 08add33
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Actions/RenderAdminNotice.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,14 @@ public function __invoke(AdminNotice $notice): string
$content = $renderTextOrCallback;
}

if (!$notice->isCustom() && $notice->shouldAutoParagraph()) {
$content = wpautop($content);
}

if ($notice->isCustom()) {
return $this->applyCustomAttributesToContent($content, $notice);
}

return sprintf(
"<div class='%s' $elementProperties->idAttribute>%s</div>",
esc_attr($this->getStandardWrapperClasses($notice)),
$content
$notice->shouldAutoParagraph() ? wpautop($content) : $content
);
}

Expand Down

0 comments on commit 08add33

Please sign in to comment.