Use PHP 7.4 featers and PHP 8 polyfills

This commit is contained in:
David Stone
2025-02-08 13:57:32 -07:00
parent 8bea6067cd
commit b41dc2b2eb
550 changed files with 15270 additions and 14627 deletions

View File

@ -22,13 +22,13 @@ if ( ! $should_display) {
return;
} // end if;
$sites = array_map('wu_get_site', isset($sites) ? $sites : array());
$sites = array_map('wu_get_site', $sites ?? []);
$categories = isset($categories) ? $categories : array();
$categories ??= [];
$customer_sites_category = __('Your Sites', 'wp_ultimo');
$customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites) : array();
$customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites) : [];
?>
@ -181,7 +181,7 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
<?php $is_template = $site->get_type() === 'site_template'; ?>
<?php $categories = array_merge($site->get_categories(), ! $is_template ? array($customer_sites_category) : array()); ?>
<?php $categories = array_merge($site->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
<div
class="theme"