Use PHP 7.4 featers and PHP 8 polyfills
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
:class="index > 0 ? 'wu-border-solid wu-border-0 wu-border-t wu-border-gray-300' : ''"
|
||||
v-for="(event, index) in queried.events"
|
||||
>
|
||||
<a :href="'<?php echo wu_network_admin_url('wp-ultimo-view-event', array('id' => '')); ?>=' + event.id" class="wu-block hover:wu-bg-gray-50">
|
||||
<a :href="'<?php echo wu_network_admin_url('wp-ultimo-view-event', ['id' => '']); ?>=' + event.id" class="wu-block hover:wu-bg-gray-50">
|
||||
<div class="wu-px-4 wu-py-4 wu-flex wu-items-center">
|
||||
<div class="wu-min-w-0 wu-flex-1 sm:wu-flex sm:wu-items-center">
|
||||
<div class="wu-mt-4 wu-flex-shrink-0 sm:wu-mt-0 sm:wu-mr-4">
|
||||
|
@ -274,10 +274,10 @@
|
||||
echo esc_attr(
|
||||
wu_get_form_url(
|
||||
'see_product_details',
|
||||
array(
|
||||
[
|
||||
'product' => $addon['product']->get_slug(),
|
||||
'width' => 500,
|
||||
)
|
||||
]
|
||||
)
|
||||
);
|
||||
?>
|
||||
@ -298,11 +298,11 @@
|
||||
echo esc_attr(
|
||||
wu_get_form_url(
|
||||
'edit_membership_product_modal',
|
||||
array(
|
||||
[
|
||||
'membership' => $membership->get_hash(),
|
||||
'product' => $addon['product']->get_slug(),
|
||||
'width' => 500,
|
||||
)
|
||||
]
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
@ -64,47 +64,47 @@
|
||||
|
||||
$status = "<span class='wu-py-1 wu-px-2 wu-rounded-sm wu-text-xs wu-leading-none wu-font-mono $class'>{$label}</span>";
|
||||
|
||||
$second_row_actions = array();
|
||||
$second_row_actions = [];
|
||||
|
||||
if ( ! $item->is_primary_domain()) {
|
||||
$second_row_actions['make_primary'] = array(
|
||||
$second_row_actions['make_primary'] = [
|
||||
'wrapper_classes' => 'wubox',
|
||||
'icon' => 'dashicons-wu-edit1 wu-align-middle wu-mr-1',
|
||||
'label' => '',
|
||||
'url' => $domain['primary_link'],
|
||||
'value' => __('Make Primary', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
} // end if;
|
||||
|
||||
$second_row_actions['remove'] = array(
|
||||
$second_row_actions['remove'] = [
|
||||
'wrapper_classes' => 'wu-text-red-500 wubox',
|
||||
'icon' => 'dashicons-wu-trash-2 wu-align-middle wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => __('Delete', 'wp-ultimo'),
|
||||
'url' => $domain['delete_link'],
|
||||
);
|
||||
];
|
||||
|
||||
echo wu_responsive_table_row(
|
||||
array(
|
||||
[
|
||||
'id' => false,
|
||||
'title' => strtolower($item->get_domain()),
|
||||
'url' => false,
|
||||
'status' => $status,
|
||||
),
|
||||
array(
|
||||
'primary' => array(
|
||||
],
|
||||
[
|
||||
'primary' => [
|
||||
'wrapper_classes' => $item->is_primary_domain() ? 'wu-text-blue-600' : '',
|
||||
'icon' => $item->is_primary_domain() ? 'dashicons-wu-filter_1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-plus-square wu-align-text-bottom wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $item->is_primary_domain() ? __('Primary', 'wp-ultimo') . wu_tooltip(__('All other mapped domains will redirect to the primary domain.', 'wp-ultimo'), 'dashicons-editor-help wu-align-middle wu-ml-1') : __('Alias', 'wp-ultimo'),
|
||||
),
|
||||
'secure' => array(
|
||||
],
|
||||
'secure' => [
|
||||
'wrapper_classes' => $item->is_secure() ? 'wu-text-green-500' : '',
|
||||
'icon' => $item->is_secure() ? 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1' : 'dashicons-wu-lock1 wu-align-text-bottom wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $item->is_secure() ? __('Secure (HTTPS)', 'wp-ultimo') : __('Not Secure (HTTP)', 'wp-ultimo'),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
$second_row_actions
|
||||
);
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
<tbody class="wu-align-baseline">
|
||||
|
||||
<?php foreach ($membership->get_payments(array('number' => ! empty($limit) ? $limit : null)) as $payment) : ?>
|
||||
<?php foreach ($membership->get_payments(['number' => ! empty($limit) ? $limit : null]) as $payment) : ?>
|
||||
|
||||
<!-- Invoice Item -->
|
||||
<tr>
|
||||
@ -50,39 +50,39 @@
|
||||
esc_attr__('Download Invoice', 'wp-ultimo')
|
||||
);
|
||||
|
||||
$payment_column = $payment->get_status() === 'pending' ? array(
|
||||
'pay_now' => array(
|
||||
'url' => add_query_arg(array('payment' => $payment->get_hash()), wu_get_registration_url()),
|
||||
$payment_column = $payment->get_status() === 'pending' ? [
|
||||
'pay_now' => [
|
||||
'url' => add_query_arg(['payment' => $payment->get_hash()], wu_get_registration_url()),
|
||||
'icon' => 'dashicons-wu-credit-card wu-align-middle wu-mr-1',
|
||||
'label' => __('Go to payment', 'wp-ultimo'),
|
||||
'value' => __('Pay Now', 'wp-ultimo'),
|
||||
),
|
||||
) : array();
|
||||
],
|
||||
] : [];
|
||||
|
||||
echo wu_responsive_table_row(
|
||||
array(
|
||||
[
|
||||
'url' => false,
|
||||
'title' => $payment->get_invoice_number() . $download_link,
|
||||
'status' => wu_format_currency($payment->get_total(), $payment->get_currency()),
|
||||
),
|
||||
],
|
||||
array_merge(
|
||||
array(
|
||||
'status' => array(
|
||||
[
|
||||
'status' => [
|
||||
'url' => false,
|
||||
'icon' => wu_get_payment_icon_classes($payment->get_status()) . ' wu-mr-1',
|
||||
'value' => $payment->get_status_label(),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
$payment_column
|
||||
),
|
||||
array(
|
||||
'date_created' => array(
|
||||
[
|
||||
'date_created' => [
|
||||
'url' => false,
|
||||
'icon' => 'dashicons-wu-calendar1 wu-align-middle wu-mr-1',
|
||||
'label' => '',
|
||||
'value' => $payment->get_formatted_date('date_created'),
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -11,9 +11,9 @@ $add_new_url = wu_get_setting('enable_multiple_sites') ? $element->get_new_site_
|
||||
|
||||
// Redirect back to this page after create the site
|
||||
$add_new_url = add_query_arg(
|
||||
array(
|
||||
[
|
||||
'redirect_url' => urlencode(wu_get_current_url()),
|
||||
),
|
||||
],
|
||||
$add_new_url
|
||||
);
|
||||
|
||||
@ -113,7 +113,7 @@ $show_add_new = apply_filters('wp_ultimo_my_sites_show_add_new', $show_add_new);
|
||||
</span>
|
||||
|
||||
<span class="wu-text-xs wu-text-gray-600 wu-block wu-mt-2">
|
||||
<?php echo str_replace(array('http://', 'https://'), '', $site->get_active_site_url()); ?>
|
||||
<?php echo str_replace(['http://', 'https://'], '', $site->get_active_site_url()); ?>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<div class="<?php echo wu_env_picker('', 'wu-widget-inset'); ?>">
|
||||
|
||||
<?php if (in_array($payment->get_status(), array('completed'))) : ?>
|
||||
<?php if (in_array($payment->get_status(), ['completed'])) : ?>
|
||||
|
||||
<!-- Thank You -->
|
||||
<div id="wu-thank-you-message-block">
|
||||
|
Reference in New Issue
Block a user