Use PHP 7.4 featers and PHP 8 polyfills
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
* @since 1.8.2
|
||||
*/
|
||||
foreach ($page->get_title_links() as $action_link) :
|
||||
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
|
||||
$action_classes = $action_link['classes'] ?? '';
|
||||
|
||||
?>
|
||||
|
||||
|
@ -86,10 +86,10 @@
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_field',
|
||||
array(
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
'step' => '',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
=' + step_name + '&field=' + field.id"
|
||||
|
@ -47,9 +47,9 @@
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_step',
|
||||
array(
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
"
|
||||
@ -173,10 +173,10 @@
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_step',
|
||||
array(
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
'step' => '',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
=' + step.id"
|
||||
@ -195,11 +195,11 @@
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_field',
|
||||
array(
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
'width' => 600,
|
||||
'step' => '',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
=' + step.id"
|
||||
@ -313,9 +313,9 @@
|
||||
<?php
|
||||
echo wu_get_form_url(
|
||||
'add_new_form_step',
|
||||
array(
|
||||
[
|
||||
'checkout_form' => $checkout_form,
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
"
|
||||
|
@ -15,10 +15,10 @@
|
||||
<?php
|
||||
echo get_avatar_url(
|
||||
$item->get_user_id(),
|
||||
array(
|
||||
[
|
||||
'default' => 'identicon',
|
||||
'size' => 320,
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
)"
|
||||
@ -33,10 +33,10 @@
|
||||
92,
|
||||
'identicon',
|
||||
'',
|
||||
array(
|
||||
[
|
||||
'force_display' => true,
|
||||
'class' => 'wu-rounded-full wu-border wu-border-solid wu-border-gray-300 wu-bg-white',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
@ -101,7 +101,7 @@
|
||||
<?php
|
||||
if ( ! empty($item->get_memberships())) {
|
||||
?>
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-memberships', array('customer_id' => $item->get_id())); ?>">
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-memberships', ['customer_id' => $item->get_id()]); ?>">
|
||||
<?php _e('View', 'wp-ultimo'); ?>
|
||||
</a>
|
||||
<?php
|
||||
@ -124,9 +124,9 @@
|
||||
|
||||
$url_switch_to = sprintf('<a title="%s" class="%s" href="%s">%s</a>', __('Switch To', 'wp-ultimo'), $is_modal_switch_to, \WP_Ultimo\User_Switching::get_instance()->render($item->get_user_id()), __('Switch To', 'wp-ultimo'));
|
||||
|
||||
$actions = array(
|
||||
$actions = [
|
||||
'switch-to' => $item->get_user_id() !== get_current_user_id() ? $url_switch_to : __('None', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
echo implode('<br />', $actions);
|
||||
|
||||
@ -144,7 +144,7 @@
|
||||
<?php _e('Select Customer', 'wp-ultimo'); ?>
|
||||
</label>
|
||||
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-customer', array('id' => $item->get_id())); ?>" class="button button-primary">
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-customer', ['id' => $item->get_id()]); ?>" class="button button-primary">
|
||||
<?php _e('Manage', 'wp-ultimo'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -18,7 +18,7 @@
|
||||
* @since 1.8.2
|
||||
*/
|
||||
foreach ($page->get_title_links() as $action_link) :
|
||||
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
|
||||
$action_classes = $action_link['classes'] ?? '';
|
||||
|
||||
?>
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
* @since 1.8.2
|
||||
*/
|
||||
foreach ($page->get_title_links() as $action_link) :
|
||||
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
|
||||
$action_classes = $action_link['classes'] ?? '';
|
||||
|
||||
$attrs = isset($action_link['attrs']) ? $action_link['attrs'] : '';
|
||||
$attrs = $action_link['attrs'] ?? '';
|
||||
|
||||
?>
|
||||
|
||||
@ -133,9 +133,9 @@
|
||||
wp_editor(
|
||||
html_entity_decode($content),
|
||||
'content',
|
||||
array(
|
||||
[
|
||||
'height' => 500,
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
|
||||
<?php
|
||||
echo wu_render_empty_state(
|
||||
array(
|
||||
[
|
||||
'message' => __('No notes yet.', 'wp-ultimo'),
|
||||
'sub_message' => __('Use the "Add new Note" to create the first one.', 'wp-ultimo'),
|
||||
'link_url' => false,
|
||||
'display_background_image' => false,
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
@ -44,10 +44,10 @@
|
||||
20,
|
||||
'identicon',
|
||||
'',
|
||||
array(
|
||||
[
|
||||
'force_display' => true,
|
||||
'class' => 'wu-rounded-full wu-mr-2',
|
||||
)
|
||||
]
|
||||
)
|
||||
);
|
||||
?>
|
||||
@ -66,12 +66,12 @@
|
||||
<?php if (current_user_can('delete_notes')) : ?>
|
||||
|
||||
<?php
|
||||
$modal_atts = array(
|
||||
$modal_atts = [
|
||||
'object_id' => wu_request('id'),
|
||||
'model' => $model,
|
||||
'note_id' => $note->note_id,
|
||||
'height' => 306,
|
||||
);
|
||||
];
|
||||
?>
|
||||
|
||||
<span class="wu-ml-2">
|
||||
|
@ -7,7 +7,7 @@
|
||||
?>
|
||||
<div
|
||||
class="wu-flex wu-justify-center wu-items-center wu-text-center wu-bg-contain wu-bg-no-repeat wu--mb-12 wu-pb-12"
|
||||
style="background-image: url(<?php echo $display_background_image ? wu_get_asset('empty-state-bg.png', 'img') : ''; ?>); <?php echo $display_background_image ? 'height: calc(100vh - 300px); background-position: center -30px;' : ''; ?>"
|
||||
style="background-image: url(<?php echo $display_background_image ? wu_get_asset('empty-state-bg.webp', 'img') : ''; ?>); <?php echo $display_background_image ? 'height: calc(100vh - 300px); background-position: center -30px;' : ''; ?>"
|
||||
>
|
||||
|
||||
<div class="wu-block wu-p-4 md:wu-pt-12 wu-self-center">
|
||||
|
@ -75,7 +75,7 @@
|
||||
|
||||
<input
|
||||
name='s' id="s"
|
||||
value="<?php echo esc_attr(isset($_REQUEST['s']) ? $_REQUEST['s'] : ''); ?>"
|
||||
value="<?php echo esc_attr($_REQUEST['s'] ?? ''); ?>"
|
||||
placeholder="<?php echo esc_attr($search_label); ?>"
|
||||
type="search"
|
||||
aria-describedby="live-search-desc"
|
||||
|
@ -18,7 +18,7 @@
|
||||
* @since 1.8.2
|
||||
*/
|
||||
foreach ($page->get_title_links() as $action_link) :
|
||||
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
|
||||
$action_classes = $action_link['classes'] ?? '';
|
||||
|
||||
?>
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
<?php _e('Select Site', 'wp-ultimo'); ?>
|
||||
</label> -->
|
||||
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-product', array('id' => $item->get_id())); ?>" class="button button-primary">
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-product', ['id' => $item->get_id()]); ?>" class="button button-primary">
|
||||
<?php _e('Read More', 'wp-ultimo'); ?>
|
||||
</a>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
* @since 1.8.2
|
||||
*/
|
||||
foreach ($page->get_title_links() as $action_link) :
|
||||
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
|
||||
$action_classes = $action_link['classes'] ?? '';
|
||||
|
||||
?>
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
/**
|
||||
* Holds add-on menus
|
||||
*/
|
||||
$addons = array();
|
||||
$addons = [];
|
||||
|
||||
?>
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
<?php _e('Select Site', 'wp-ultimo'); ?>
|
||||
</label>
|
||||
|
||||
<a title="<?php echo esc_attr(__('Publish pending site', 'wp-ultimo')); ?>" href="<?php echo wu_get_form_url('publish_pending_site', array('membership_id' => $item->get_membership_id())); ?>" class="wubox button button-primary">
|
||||
<a title="<?php echo esc_attr(__('Publish pending site', 'wp-ultimo')); ?>" href="<?php echo wu_get_form_url('publish_pending_site', ['membership_id' => $item->get_membership_id()]); ?>" class="wubox button button-primary">
|
||||
<?php _e('Publish Site', 'wp-ultimo'); ?>
|
||||
</a>
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
<?php _e('Select Site', 'wp-ultimo'); ?>
|
||||
</label>
|
||||
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', array('id' => $item->get_id())); ?>" class="button button-primary">
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', ['id' => $item->get_id()]); ?>" class="button button-primary">
|
||||
<?php _e('Manage', 'wp-ultimo'); ?>
|
||||
</a>
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
|
||||
<span> </span>
|
||||
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', array('id' => $item->get_id())); ?>" class="button button-primary">
|
||||
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', ['id' => $item->get_id()]); ?>" class="button button-primary">
|
||||
<?php _e('See Main Site', 'wp-ultimo'); ?>
|
||||
</a>
|
||||
|
||||
|
Reference in New Issue
Block a user