Everywhere yoda conditions are

This commit is contained in:
David Stone
2025-02-09 00:20:10 -07:00
parent d74f6d1a53
commit be0ab98895
213 changed files with 691 additions and 412 deletions

View File

@ -78,28 +78,29 @@ class Broadcast_List_Table extends Base_List_Table {
$class = 'wu-bg-gray-200';
if ($type === 'broadcast_email') {
if ('broadcast_email' === $type) {
$label = __('Email', 'wp-ultimo');
}
if ($type === 'broadcast_notice') {
if ('broadcast_notice' === $type) {
$status = $item->get_notice_type();
$label = __('Notice', 'wp-ultimo');
if ($status === 'info') {
if ('info' === $status) {
$class = 'wu-bg-blue-200';
} elseif ($status === 'success') {
} elseif ('success' === $status) {
$class = 'wu-bg-green-200';
} elseif ($status === 'warning') {
} elseif ('warning' === $status) {
$class = 'wu-bg-orange-200';
} elseif ($status === 'error') {
} elseif ('error' === $status) {
$class = 'wu-bg-red-200';
}
}
return "<span class='wu-py-1 wu-px-2 $class wu-rounded-sm wu-text-gray-700 wu-text-xs wu-font-mono'>{$label}</span>";
}
/**
* Displays the name of the broadcast.
*
@ -428,6 +429,7 @@ class Broadcast_List_Table extends Base_List_Table {
return $columns;
}
/**
* Returns the filters for this page.
*