Use PHP 7.4 featers and PHP 8 polyfills
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user