Use PHP 7.4 featers and PHP 8 polyfills
This commit is contained in:
@ -54,7 +54,6 @@
|
||||
We also added a bunch of improvements and fixes that go from more translated strings for Spanish, Brazilian Portuguese, and French, to better PHP 8.2 compatibility, to webhook triggering.
|
||||
</p>
|
||||
<div class="wu-inline-block wu-float-right wu-ml-8 wu-mb-4">
|
||||
<img class="wu-block wu-rounded" src="<?php echo wu_get_asset('erasmo-carlos.jpg'); ?>" width="200">
|
||||
<small class="wu-block wu-mt-1">Gilberto Gil</small>
|
||||
</div>
|
||||
<p class="wu-text-lg wu-leading-relaxed">
|
||||
@ -90,9 +89,9 @@
|
||||
64,
|
||||
'',
|
||||
'Arindo Duque',
|
||||
array(
|
||||
[
|
||||
'class' => 'wu-rounded-full',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
@ -108,50 +107,50 @@
|
||||
|
||||
<?php
|
||||
|
||||
$key_people = array(
|
||||
'arindo' => array(
|
||||
$key_people = [
|
||||
'arindo' => [
|
||||
'email' => 'arindo@wpultimo.com',
|
||||
'signature' => 'arindo.png',
|
||||
'name' => 'Arindo Duque',
|
||||
'position' => 'Founder and CEO',
|
||||
),
|
||||
'allyson' => array(
|
||||
],
|
||||
'allyson' => [
|
||||
'email' => 'allyson@wpultimo.com',
|
||||
'signature' => '',
|
||||
'name' => 'Allyson Souza',
|
||||
'position' => 'Developer',
|
||||
),
|
||||
'anyssa' => array(
|
||||
],
|
||||
'anyssa' => [
|
||||
'email' => 'anyssa@wpultimo.com',
|
||||
'signature' => '',
|
||||
'name' => 'Anyssa Ferreira',
|
||||
'position' => 'Designer',
|
||||
),
|
||||
'gustavo' => array(
|
||||
],
|
||||
'gustavo' => [
|
||||
'email' => 'gustavo@wpultimo.com',
|
||||
'signature' => '',
|
||||
'name' => 'Gustavo Modesto',
|
||||
'position' => 'Developer',
|
||||
),
|
||||
'juliana' => array(
|
||||
],
|
||||
'juliana' => [
|
||||
'email' => 'juliana@wpultimo.com',
|
||||
'signature' => '',
|
||||
'name' => 'Juliana Dias Gomes',
|
||||
'position' => 'Do-it-all',
|
||||
),
|
||||
'lucas-carvalho' => array(
|
||||
],
|
||||
'lucas-carvalho' => [
|
||||
'email' => 'lucas@wpultimo.com',
|
||||
'signature' => '',
|
||||
'name' => 'Lucas Carvalho',
|
||||
'position' => 'Developer',
|
||||
),
|
||||
'yan' => array(
|
||||
],
|
||||
'yan' => [
|
||||
'email' => 'yan@wpultimo.com',
|
||||
'signature' => '',
|
||||
'name' => 'Yan Kairalla',
|
||||
'position' => 'Developer',
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
|
||||
?>
|
||||
|
||||
@ -167,9 +166,9 @@
|
||||
64,
|
||||
'',
|
||||
'Arindo Duque',
|
||||
array(
|
||||
[
|
||||
'class' => 'wu-rounded-full',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
<strong class="wu-text-base wu-block"><?php echo $person['name']; ?></strong>
|
||||
|
@ -11,7 +11,7 @@ foreach ($notices as $key => $notice) : ?>
|
||||
|
||||
<div class="notice wu-hidden wu-admin-notice wu-styling hover:wu-styling notice-<?php echo esc_attr($notice['type']); ?> <?php echo $notice['dismissible_key'] ? esc_attr('is-dismissible') : ''; ?>">
|
||||
|
||||
<?php if (strpos($notice['message'], '<p>') !== false) : ?>
|
||||
<?php if (str_contains($notice['message'], '<p>')) : ?>
|
||||
|
||||
<?php echo $notice['message']; ?>
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -36,9 +36,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -40,9 +40,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -19,9 +19,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -60,9 +60,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -35,11 +35,11 @@
|
||||
$form = new \WP_Ultimo\UI\Form(
|
||||
$field->id,
|
||||
$field->fields,
|
||||
array(
|
||||
[
|
||||
'views' => 'admin-pages/fields',
|
||||
'classes' => trim('wu-flex ' . esc_attr($field->classes)),
|
||||
'field_wrapper_classes' => 'wu-bg-transparent',
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
$form->render();
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
@ -30,9 +30,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -35,9 +35,9 @@ $content_wrapper_classes = $field->content_wrapper_classes
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -53,9 +53,9 @@ $content_wrapper_classes = $field->content_wrapper_classes
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -40,9 +40,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -21,9 +21,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
@ -33,9 +33,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array('field' => $field)
|
||||
['field' => $field]
|
||||
);
|
||||
?>
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -51,7 +51,7 @@
|
||||
<?php
|
||||
|
||||
if (! $field->values && $field->value) {
|
||||
$_values = array();
|
||||
$_values = [];
|
||||
$columns = array_keys($field->value);
|
||||
$values = $field->value;
|
||||
|
||||
@ -65,7 +65,7 @@ if (! $field->values && $field->value) {
|
||||
$field->values = $_values;
|
||||
}
|
||||
|
||||
$fields = array();
|
||||
$fields = [];
|
||||
|
||||
foreach ($field->fields as $key => $value) {
|
||||
$fields[ $key . '[]' ] = $field->fields[ $key ];
|
||||
@ -91,11 +91,11 @@ if (is_array($field->values)) {
|
||||
(new \WP_Ultimo\UI\Form(
|
||||
$field->id,
|
||||
$fields,
|
||||
array(
|
||||
[
|
||||
'views' => 'admin-pages/fields',
|
||||
'classes' => 'wu-flex',
|
||||
'field_wrapper_classes' => 'wu-bg-transparent',
|
||||
)
|
||||
]
|
||||
))->render();
|
||||
?>
|
||||
</div>
|
||||
@ -118,11 +118,11 @@ if (is_array($field->values)) {
|
||||
(new \WP_Ultimo\UI\Form(
|
||||
$field->id,
|
||||
$fields,
|
||||
array(
|
||||
[
|
||||
'views' => 'admin-pages/fields',
|
||||
'classes' => 'wu-flex',
|
||||
'field_wrapper_classes' => 'wu-bg-transparent',
|
||||
)
|
||||
]
|
||||
))->render();
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
@ -30,9 +30,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -48,9 +48,9 @@
|
||||
*/
|
||||
$option = wp_parse_args(
|
||||
$option,
|
||||
array(
|
||||
[
|
||||
'tooltip' => '',
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -54,9 +54,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @since 2.0.0
|
||||
*/
|
||||
?>
|
||||
<li class="<?php echo esc_attr(trim($field->wrapper_classes) . (strpos($field->wrapper_classes, '-bg-') === false ? ' wu-bg-gray-200' : '')); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
|
||||
<li class="<?php echo esc_attr(trim($field->wrapper_classes) . (! str_contains($field->wrapper_classes, '-bg-') ? ' wu-bg-gray-200' : '')); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
|
||||
|
||||
<button id="<?php echo esc_attr($field->id); ?>" type="submit" name="submit_button" value="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); ?> class="<?php echo esc_attr(trim($field->classes)); ?>">
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -74,9 +74,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -80,9 +80,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -98,9 +98,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -72,9 +72,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -36,9 +36,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -20,9 +20,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -51,9 +51,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'admin-pages/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -91,7 +91,7 @@ if ( ! defined('ABSPATH')) {
|
||||
<td style=" text-align: center;">
|
||||
<p style="font-family: <?php echo $template_settings['footer_font']; ?>; font-size: 12px; line-height: 1.6m; color: <?php echo $template_settings['footer_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['footer_align']; ?>">
|
||||
<strong><?php echo wu_get_setting('company_name'); ?></strong><br>
|
||||
<?php echo nl2br(wu_get_setting('company_address', array())); ?>
|
||||
<?php echo nl2br(wu_get_setting('company_address', [])); ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -44,9 +44,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -28,9 +28,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -18,9 +18,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -34,15 +34,15 @@
|
||||
$form = new \WP_Ultimo\UI\Form(
|
||||
$field->id,
|
||||
$field->fields,
|
||||
array(
|
||||
[
|
||||
'views' => 'checkout/fields',
|
||||
'classes' => 'wu-flex wu-my-1',
|
||||
'field_wrapper_classes' => 'wu-bg-transparent',
|
||||
'wrap_tag' => 'span',
|
||||
'step' => (object) array(
|
||||
'step' => (object) [
|
||||
'classes' => '',
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$form->render();
|
||||
@ -54,9 +54,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -29,9 +29,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -19,9 +19,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-description',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -53,9 +53,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -48,9 +48,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -19,9 +19,9 @@ $active_gateways = wu_get_active_gateway_as_options();
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -71,9 +71,9 @@ $active_gateways = wu_get_active_gateway_as_options();
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -44,9 +44,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -44,9 +44,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -65,9 +65,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-title',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
<div class="sm:wu-flex wu-items-stretch wu-content-center">
|
||||
|
||||
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? array()); ?>>
|
||||
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? []); ?>>
|
||||
<?php echo $field->prefix; ?>
|
||||
</div>
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<?php if ($field->suffix) : ?>
|
||||
|
||||
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? array()); ?>>
|
||||
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? []); ?>>
|
||||
<?php echo $field->suffix; ?>
|
||||
</div>
|
||||
|
||||
@ -58,9 +58,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -28,9 +28,9 @@
|
||||
*/
|
||||
wu_get_template(
|
||||
'checkout/fields/partials/field-errors',
|
||||
array(
|
||||
[
|
||||
'field' => $field,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -28,18 +28,18 @@
|
||||
$form = new \WP_Ultimo\UI\Form(
|
||||
"checkout-{$step_name}",
|
||||
$final_fields,
|
||||
array(
|
||||
[
|
||||
'title' => $display_title ? $step['name'] : '',
|
||||
'views' => 'checkout/fields',
|
||||
'classes' => wu_get_isset($step, 'classes', '') . ' wu-grid wu-grid-cols-2 wu-gap-4',
|
||||
'field_wrapper_classes' => 'wu-col-span-2',
|
||||
'html_attr' => array(
|
||||
'id' => wu_get_isset($step, 'element_id') ? wu_get_isset($step, 'element_id') : "wu-step-{$step_name}",
|
||||
),
|
||||
'variables' => array(
|
||||
'html_attr' => [
|
||||
'id' => wu_get_isset($step, 'element_id') ?: "wu-step-{$step_name}",
|
||||
],
|
||||
'variables' => [
|
||||
'step' => (object) $step,
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
$is_trial_setup = $membership->is_trialing() && empty($payment->get_total());
|
||||
|
||||
$notes = array();
|
||||
$notes = [];
|
||||
|
||||
if ($is_trial_setup) {
|
||||
$desc = $membership->get_recurring_description();
|
||||
@ -24,7 +24,7 @@ $should_auto_renew = ! empty($original_cart) ? $original_cart->should_auto_renew
|
||||
$recurring_total = $membership->get_amount();
|
||||
|
||||
if ($membership->is_recurring() && $should_auto_renew) {
|
||||
$payment_total = $payment->get_total() ? $payment->get_total() : $membership->get_initial_amount();
|
||||
$payment_total = $payment->get_total() ?: $membership->get_initial_amount();
|
||||
|
||||
$desc = $membership->get_recurring_description();
|
||||
|
||||
|
@ -10,10 +10,10 @@
|
||||
$order_form = new \WP_Ultimo\UI\Form(
|
||||
'product-fields',
|
||||
$product_fields,
|
||||
array(
|
||||
[
|
||||
'title' => __('Products', 'wp-ultimo'),
|
||||
'views' => 'checkout/fields',
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
/**
|
||||
@ -29,7 +29,7 @@
|
||||
*
|
||||
* @since 2.0.0
|
||||
*/
|
||||
$submit = new \WP_Ultimo\UI\Form('submit-fields', $submit_fields, array('views' => 'checkout/fields'));
|
||||
$submit = new \WP_Ultimo\UI\Form('submit-fields', $submit_fields, ['views' => 'checkout/fields']);
|
||||
|
||||
/**
|
||||
* Render form fields.
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @param string $label The field label.
|
||||
*/
|
||||
|
||||
$products_to_reduce = array_merge(array(false), $products);
|
||||
$products_to_reduce = array_merge([false], $products);
|
||||
|
||||
$first_recurring_product = array_reduce(
|
||||
$products_to_reduce,
|
||||
@ -195,7 +195,7 @@ if ($first_recurring_product !== null) {
|
||||
* Price display.
|
||||
*/
|
||||
|
||||
$symbol_left = in_array(wu_get_setting('currency_position', '%s%v'), array('%s%v', '%s %v'));
|
||||
$symbol_left = in_array(wu_get_setting('currency_position', '%s%v'), ['%s%v', '%s %v']);
|
||||
|
||||
?>
|
||||
|
||||
@ -222,7 +222,7 @@ if ($first_recurring_product !== null) {
|
||||
</span>
|
||||
|
||||
<?php
|
||||
foreach (array(3, 12) as $freq) :
|
||||
foreach ([3, 12] as $freq) :
|
||||
$price_variation = $product->get_price_variation($freq, 'month');
|
||||
|
||||
if ( ! $price_variation) {
|
||||
@ -303,10 +303,10 @@ if ($first_recurring_product !== null) {
|
||||
*
|
||||
* Display quarterly and Annually plans, to be hidden.
|
||||
*/
|
||||
$prices_total = array(
|
||||
$prices_total = [
|
||||
3 => __('every 3 months', 'wp-ultimo'),
|
||||
12 => __('yearly', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($prices_total as $freq => $string) {
|
||||
$price_variation = $product->get_price_variation($freq, 'month');
|
||||
|
@ -25,13 +25,13 @@ if (isset($should_display) && ! $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) : [];
|
||||
|
||||
?>
|
||||
|
||||
@ -82,7 +82,7 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
|
||||
|
||||
</ul>
|
||||
|
||||
<div id="wu-site-template-container-grid" class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo isset($cols) ? $cols : '3'; ?> wu-gap-4">
|
||||
<div id="wu-site-template-container-grid" class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo $cols ?? '3'; ?> wu-gap-4">
|
||||
|
||||
<?php foreach ($sites as $site_template) : ?>
|
||||
|
||||
@ -93,7 +93,7 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
|
||||
|
||||
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
|
||||
|
||||
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? array($customer_sites_category) : array()); ?>
|
||||
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
|
||||
|
||||
<div
|
||||
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
|
||||
|
@ -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"
|
||||
|
@ -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) : [];
|
||||
|
||||
?>
|
||||
<div id="wu-site-template-container">
|
||||
@ -89,7 +89,7 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
|
||||
|
||||
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
|
||||
|
||||
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? array($customer_sites_category) : array()); ?>
|
||||
<?php $categories = array_merge($site_template->get_categories(), ! $is_template ? [$customer_sites_category] : []); ?>
|
||||
|
||||
<div
|
||||
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
|
||||
|
@ -13,11 +13,11 @@
|
||||
<?php
|
||||
echo get_avatar_url(
|
||||
$user->ID,
|
||||
array(
|
||||
[
|
||||
'force_display' => true,
|
||||
'size' => 300,
|
||||
'default' => 'identicon',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
');">
|
||||
@ -32,10 +32,10 @@
|
||||
86,
|
||||
'identicon',
|
||||
'',
|
||||
array(
|
||||
[
|
||||
'force_display' => true,
|
||||
'class' => 'wu-rounded-full wu-border wu-border-solid wu-border-gray-300 wu-relative',
|
||||
)
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
|
@ -41,11 +41,11 @@
|
||||
<?php
|
||||
|
||||
$link = add_query_arg(
|
||||
array(
|
||||
[
|
||||
'start_date' => $preset['start_date'],
|
||||
'end_date' => $preset['end_date'],
|
||||
'preset' => $slug,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
$request_slug = wu_request('preset', 'none');
|
||||
|
@ -11,28 +11,28 @@
|
||||
|
||||
<?php
|
||||
|
||||
$data = array();
|
||||
$data = [];
|
||||
$slug = 'signup_countries';
|
||||
$headers = array(
|
||||
$headers = [
|
||||
__('Country', 'wp-ultimo'),
|
||||
__('Customer Count', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($countries as $country_code => $count) {
|
||||
$line = array(
|
||||
$line = [
|
||||
wu_get_country_name($country_code),
|
||||
$count,
|
||||
);
|
||||
];
|
||||
|
||||
$data[] = $line;
|
||||
} // end foreach;
|
||||
|
||||
$page->render_csv_button(
|
||||
array(
|
||||
[
|
||||
'headers' => $headers,
|
||||
'data' => $data,
|
||||
'slug' => $slug,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -12,28 +12,28 @@
|
||||
|
||||
<?php
|
||||
|
||||
$data = array();
|
||||
$data = [];
|
||||
$slug = 'signup_forms';
|
||||
$headers = array(
|
||||
$headers = [
|
||||
__('Checkout Form', 'wp-ultimo'),
|
||||
__('Signups', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($forms as $form) {
|
||||
$line = array(
|
||||
$line = [
|
||||
$form->signup_form,
|
||||
$form->count,
|
||||
);
|
||||
];
|
||||
|
||||
$data[] = $line;
|
||||
} // end foreach;
|
||||
|
||||
$page->render_csv_button(
|
||||
array(
|
||||
[
|
||||
'headers' => $headers,
|
||||
'data' => $data,
|
||||
'slug' => $slug,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -12,30 +12,30 @@
|
||||
|
||||
<?php
|
||||
|
||||
$data = array();
|
||||
$data = [];
|
||||
$slug = 'most_visited_sites';
|
||||
$headers = array(
|
||||
$headers = [
|
||||
__('Site', 'wp-ultimo'),
|
||||
__('Visits', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($sites as $site_visits) {
|
||||
$site_line = $site_visits->site->get_title() . ' ' . get_admin_url($site_visits->site->get_id());
|
||||
|
||||
$line = array(
|
||||
$line = [
|
||||
$site_line,
|
||||
$site_visits->count,
|
||||
);
|
||||
];
|
||||
|
||||
$data[] = $line;
|
||||
} // end foreach;
|
||||
|
||||
$page->render_csv_button(
|
||||
array(
|
||||
[
|
||||
'headers' => $headers,
|
||||
'data' => $data,
|
||||
'slug' => $slug,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -11,32 +11,32 @@
|
||||
|
||||
<?php
|
||||
|
||||
$data = array();
|
||||
$data = [];
|
||||
$slug = 'taxes_by_code';
|
||||
$headers = array(
|
||||
$headers = [
|
||||
__('Tax', 'wp-ultimo'),
|
||||
__('Rate', 'wp-ultimo'),
|
||||
__('Orders', 'wp-ultimo'),
|
||||
__('Tax Total', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($taxes_by_rate as $tax_line) {
|
||||
$line = array(
|
||||
$line = [
|
||||
wu_get_isset($tax_line, 'title', 'No Name'),
|
||||
$tax_line['tax_rate'],
|
||||
$tax_line['order_count'],
|
||||
wu_format_currency($tax_line['tax_total']),
|
||||
);
|
||||
];
|
||||
|
||||
$data[] = $line;
|
||||
} // end foreach;
|
||||
|
||||
$page->render_csv_button(
|
||||
array(
|
||||
[
|
||||
'headers' => $headers,
|
||||
'data' => $data,
|
||||
'slug' => $slug,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -11,34 +11,34 @@
|
||||
|
||||
<?php
|
||||
|
||||
$data = array();
|
||||
$data = [];
|
||||
$slug = 'taxes_by_day';
|
||||
$headers = array(
|
||||
$headers = [
|
||||
__('Day', 'wp-ultimo'),
|
||||
__('Orders', 'wp-ultimo'),
|
||||
__('Total Sales', 'wp-ultimo'),
|
||||
__('Tax Total', 'wp-ultimo'),
|
||||
__('Net Profit', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($taxes_by_day as $day => $tax_line) {
|
||||
$line = array(
|
||||
$line = [
|
||||
date_i18n(get_option('date_format'), strtotime($day)),
|
||||
$tax_line['order_count'],
|
||||
wu_format_currency($tax_line['total']),
|
||||
wu_format_currency($tax_line['tax_total']),
|
||||
wu_format_currency($tax_line['net_profit']),
|
||||
);
|
||||
];
|
||||
|
||||
$data[] = $line;
|
||||
} // end foreach;
|
||||
|
||||
$page->render_csv_button(
|
||||
array(
|
||||
[
|
||||
'headers' => $headers,
|
||||
'data' => $data,
|
||||
'slug' => $slug,
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
|
@ -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">
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<?php if ($object->get_initiator() == 'manual') : ?>
|
||||
|
||||
<a href='<?php echo wu_network_admin_url('wp-ultimo-edit-customer', array('id' => $object->get_author_id())); ?>' class='wu-table-card wu-text-gray-700 wu-p-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-no-underline'>
|
||||
<a href='<?php echo wu_network_admin_url('wp-ultimo-edit-customer', ['id' => $object->get_author_id()]); ?>' class='wu-table-card wu-text-gray-700 wu-p-2 wu-flex wu-flex-grow wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-no-underline'>
|
||||
|
||||
<div class="wu-flex wu-relative wu-h-7 wu-w-7 wu-rounded-full wu-ring-2 wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center wu-mr-3">
|
||||
|
||||
@ -26,10 +26,10 @@
|
||||
32,
|
||||
'identicon',
|
||||
'',
|
||||
array(
|
||||
[
|
||||
'force_display' => true,
|
||||
'class' => 'wu-rounded-full',
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
echo $avatar;
|
||||
|
@ -27,11 +27,11 @@ if ( ! defined('ABSPATH')) {
|
||||
|
||||
<?php
|
||||
|
||||
$prices = array(
|
||||
$prices = [
|
||||
1 => __('Monthly', 'wp-ultimo'),
|
||||
3 => __('Quarterly', 'wp-ultimo'),
|
||||
12 => __('Yearly', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
$first = true;
|
||||
|
||||
|
@ -30,7 +30,7 @@ if ( ! defined('ABSPATH')) {
|
||||
*/
|
||||
$plan_attrs = '';
|
||||
|
||||
foreach (array(1, 3, 12) as $type) {
|
||||
foreach ([1, 3, 12] as $type) {
|
||||
$price = $plan->free ? __('Free!', 'wp-ultimo') : str_replace(wu_get_currency_symbol(), '', wu_format_currency((((float) $plan->{'price_' . $type}) / $type)));
|
||||
$plan_attrs .= " data-price-$type='$price'";
|
||||
} // end foreach;
|
||||
@ -65,7 +65,7 @@ $plan_attrs = apply_filters('wu_pricing_table_plan', $plan_attrs, $plan);
|
||||
<?php else : ?>
|
||||
|
||||
<h5>
|
||||
<?php $symbol_left = in_array(wu_get_setting('currency_position', '%s%v'), array('%s%v', '%s %v')); ?>
|
||||
<?php $symbol_left = in_array(wu_get_setting('currency_position', '%s%v'), ['%s%v', '%s %v']); ?>
|
||||
<?php
|
||||
if ($symbol_left) :
|
||||
?>
|
||||
@ -88,10 +88,10 @@ $plan_attrs = apply_filters('wu_pricing_table_plan', $plan_attrs, $plan);
|
||||
*
|
||||
* Display quarterly and Annually plans, to be hidden
|
||||
*/
|
||||
$prices_total = array(
|
||||
$prices_total = [
|
||||
3 => __('every 3 months', 'wp-ultimo'),
|
||||
12 => __('yearly', 'wp-ultimo'),
|
||||
);
|
||||
];
|
||||
|
||||
foreach ($prices_total as $freq => $string) {
|
||||
$text = sprintf(__('%1$s, billed %2$s', 'wp-ultimo'), wu_format_currency($plan->{"price_$freq"}), $string);
|
||||
|
@ -96,12 +96,12 @@ if (empty($plans)) {
|
||||
foreach ($plans as $plan) {
|
||||
wu_get_template(
|
||||
'legacy/signup/pricing-table/plan',
|
||||
array(
|
||||
[
|
||||
'plan' => $plan,
|
||||
'count' => $count,
|
||||
'columns' => $columns,
|
||||
'current_plan' => $current_plan,
|
||||
)
|
||||
]
|
||||
);
|
||||
} // end foreach;
|
||||
|
||||
|
@ -23,23 +23,23 @@ require_once ABSPATH . 'wp-admin/includes/class-wp-screen.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/screen.php';
|
||||
|
||||
// Load the admin actions removed in WordPress 6.0
|
||||
$admin_actions = array(
|
||||
'admin_print_scripts' => array(
|
||||
$admin_actions = [
|
||||
'admin_print_scripts' => [
|
||||
'print_head_scripts' => 20,
|
||||
),
|
||||
'admin_print_styles' => array(
|
||||
],
|
||||
'admin_print_styles' => [
|
||||
'print_admin_styles' => 20,
|
||||
),
|
||||
'admin_head' => array(
|
||||
],
|
||||
'admin_head' => [
|
||||
'wp_color_scheme_settings' => 10,
|
||||
'wp_admin_canonical_url' => 10,
|
||||
'wp_site_icon' => 10,
|
||||
'wp_admin_viewport_meta' => 10,
|
||||
),
|
||||
'admin_print_footer_scripts' => array(
|
||||
],
|
||||
'admin_print_footer_scripts' => [
|
||||
'_wp_footer_scripts' => 10,
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($admin_actions as $action => $handlers) {
|
||||
foreach ($handlers as $handler => $priority) {
|
||||
@ -109,7 +109,7 @@ do_action('wu_checkout_scripts');
|
||||
|
||||
?>
|
||||
|
||||
<div class="wu-setup-content wu-content-<?php echo wu_request('step', isset($signup->step) ? $signup->step : 'default'); ?>">
|
||||
<div class="wu-setup-content wu-content-<?php echo wu_request('step', $signup->step ?? 'default'); ?>">
|
||||
|
||||
<div name="loginform" id="loginform">
|
||||
|
||||
@ -131,7 +131,7 @@ do_action('wu_checkout_scripts');
|
||||
/**
|
||||
* Nav Links
|
||||
*/
|
||||
wu_get_template('legacy/signup/signup-nav-links', array('signup' => $signup));
|
||||
wu_get_template('legacy/signup/signup-nav-links', ['signup' => $signup]);
|
||||
?>
|
||||
|
||||
</div> <!-- /login -->
|
||||
@ -140,7 +140,7 @@ do_action('wu_checkout_scripts');
|
||||
/**
|
||||
* Navigation Steps
|
||||
*/
|
||||
wu_get_template('legacy/signup/signup-steps-navigation', array('signup' => $signup));
|
||||
wu_get_template('legacy/signup/signup-steps-navigation', ['signup' => $signup]);
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
@ -30,10 +30,10 @@ if ( ! defined('ABSPATH')) {
|
||||
*/
|
||||
$nav_links = apply_filters(
|
||||
'wu_signup_form_nav_links',
|
||||
array(
|
||||
[
|
||||
home_url() => __('Return to Home', 'wp-ultimo'),
|
||||
wp_login_url() => sprintf('<strong>%s</strong>', __('Log In', 'wp-ultimo')),
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
if ( ! isset($signup->step)) {
|
||||
|
@ -31,7 +31,7 @@ if ( ! defined('ABSPATH')) {
|
||||
*/
|
||||
$dynamic_part = '<strong id="wu-your-site" v-html="site_url ? site_url : \'yoursite\'">';
|
||||
// This is used on the yoursite.network.com during sign-up
|
||||
$dynamic_part .= isset($signup->results['blogname']) ? $signup->results['blogname'] : __('yoursite', 'wp-ultimo');
|
||||
$dynamic_part .= $signup->results['blogname'] ?? __('yoursite', 'wp-ultimo');
|
||||
$dynamic_part .= '</strong>';
|
||||
|
||||
$site_url = preg_replace('#^https?://#', '', WU_Signup()->get_site_url_for_previewer());
|
||||
|
@ -21,24 +21,24 @@ if ( ! defined('ABSPATH')) {
|
||||
|
||||
// Get all available plans
|
||||
$plans = wu_get_products(
|
||||
array(
|
||||
[
|
||||
'type' => 'plan',
|
||||
)
|
||||
]
|
||||
);
|
||||
|
||||
// Render the selector
|
||||
wu_get_template(
|
||||
'legacy/signup/pricing-table/pricing-table',
|
||||
array(
|
||||
[
|
||||
'plans' => $plans,
|
||||
'signup' => $signup,
|
||||
'current_plan' => false,
|
||||
'is_shortcode' => false,
|
||||
'atts' => array(
|
||||
'atts' => [
|
||||
'primary_color' => '#00a1ff', // wu_get_setting('primary-color', '#00a1ff'),
|
||||
'accent_color' => '#78b336', // wu_get_setting('accent-color', '#78b336'),
|
||||
'default_pricing_option' => 1, // wu_get_setting('default_pricing_option', 1),
|
||||
'show_selector' => true,
|
||||
),
|
||||
)
|
||||
],
|
||||
]
|
||||
);
|
||||
|
@ -14,7 +14,7 @@
|
||||
<a
|
||||
class="button wu-ml-2 wubox"
|
||||
title="<?php esc_attr_e('Add new Product', 'wp-ultimo'); ?>"
|
||||
href="<?php echo esc_attr(wu_get_form_url('edit_membership_product', array('id' => $membership->get_id()))); ?>"
|
||||
href="<?php echo esc_attr(wu_get_form_url('edit_membership_product', ['id' => $membership->get_id()])); ?>"
|
||||
>
|
||||
<span class="dashicons-wu-circle-with-plus wu-align-text-bottom"></span>
|
||||
<?php _e('Add new Product', 'wp-ultimo'); ?>
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
<div class="wu-w-2/3">
|
||||
|
||||
<input class="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="text" id="<?php echo esc_attr($field->id); ?>" class="regular-text" value="<?php echo wu_get_setting($field->id); ?>" placeholder="<?php echo $field->placeholder ? $field->placeholder : ''; ?>">
|
||||
<input class="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="text" id="<?php echo esc_attr($field->id); ?>" class="regular-text" value="<?php echo wu_get_setting($field->id); ?>" placeholder="<?php echo $field->placeholder ?: ''; ?>">
|
||||
|
||||
<?php if ($field->desc) : ?>
|
||||
|
||||
|
@ -55,7 +55,7 @@ wp_enqueue_script('wu-field-button-upload', WP_Ultimo()->get_asset("wu-field-ima
|
||||
<?php echo $field['desc']; ?>
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="<?php echo $field_slug; ?>" id="<?php echo $field_slug; ?>" value="<?php echo wu_get_setting($field_slug) ? wu_get_setting($field_slug) : $field['default']; ?>">
|
||||
<input type="hidden" name="<?php echo $field_slug; ?>" id="<?php echo $field_slug; ?>" value="<?php echo wu_get_setting($field_slug) ?: $field['default']; ?>">
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
$settings = wu_get_setting($field_slug);
|
||||
|
||||
if ($settings === false) {
|
||||
$settings = isset($field['default']) ? $field['default'] : false;
|
||||
$settings = $field['default'] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -54,7 +54,7 @@
|
||||
foreach ($field['options'] as $field_value => $field_name) :
|
||||
|
||||
// Check this setting
|
||||
$this_settings = isset($settings[ $field_value ]) ? $settings[ $field_value ] : false;
|
||||
$this_settings = $settings[ $field_value ] ?? false;
|
||||
|
||||
?>
|
||||
|
||||
|
@ -9,9 +9,9 @@
|
||||
|
||||
$setting = wu_get_setting($field_slug);
|
||||
|
||||
$setting = is_array($setting) ? $setting : array();
|
||||
$setting = is_array($setting) ? $setting : [];
|
||||
|
||||
$placeholder = isset($field['placeholder']) ? $field['placeholder'] : '';
|
||||
$placeholder = $field['placeholder'] ?? '';
|
||||
|
||||
// WU_Scripts()->enqueue_select2();
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
<div class="wu-w-2/3">
|
||||
|
||||
<input <?php echo $field->html_attr ? $field->get_html_attributes() : ''; ?> <?php echo $field->disabled ? 'disabled="disabled"' : ''; ?> name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" id="<?php echo esc_attr($field->id); ?>" class="regular-text" value="<?php echo wu_get_setting($field->id); ?>" placeholder="<?php echo $field->placeholder ? $field->placeholder : ''; ?>">
|
||||
<input <?php echo $field->html_attr ? $field->get_html_attributes() : ''; ?> <?php echo $field->disabled ? 'disabled="disabled"' : ''; ?> name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" id="<?php echo esc_attr($field->id); ?>" class="regular-text" value="<?php echo wu_get_setting($field->id); ?>" placeholder="<?php echo $field->placeholder ?: ''; ?>">
|
||||
|
||||
<?php if (isset($field->append) && ! empty($field->append)) : ?>
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
<li class="wu-inline-block wu-m-0 wu-p-0 wu-px-2">
|
||||
|
||||
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-site', array('id' => $current_site->get_id()))); ?>"
|
||||
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-site', ['id' => $current_site->get_id()])); ?>"
|
||||
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
|
||||
<span title="<?php esc_attr_e('Current Site', 'wp-ultimo'); ?>"
|
||||
class="dashicons-wu-browser wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
<li class="wu-inline-block wu-m-0 wu-p-0 wu-px-2">
|
||||
|
||||
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-customer', array('id' => $customer->get_id()))); ?>"
|
||||
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-customer', ['id' => $customer->get_id()])); ?>"
|
||||
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
|
||||
<span title="<?php esc_attr_e('Current Site', 'wp-ultimo'); ?>"
|
||||
class="dashicons-wu-user wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
<li class="wu-inline-block wu-m-0 wu-p-0 wu-px-2">
|
||||
|
||||
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-membership', array('id' => $membership->get_id()))); ?>"
|
||||
<a href="<?php echo esc_attr(wu_network_admin_url('wp-ultimo-edit-membership', ['id' => $membership->get_id()])); ?>"
|
||||
class="wu-inline-block wu-uppercase wu-text-gray-600 wu-no-underline">
|
||||
<span title="<?php esc_attr_e('Current Site', 'wp-ultimo'); ?>"
|
||||
class="dashicons-wu-circular-graph wu-text-sm wu-w-auto wu-h-auto wu-align-text-bottom wu-relative"></span>
|
||||
|
@ -30,7 +30,7 @@
|
||||
<div class="wu-flex wu-justify-between wu-bg-gray-100 wu--m-in wu-mt-4 wu-p-4 wu-overflow-hidden wu-border-t wu-border-solid wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-300">
|
||||
|
||||
<a
|
||||
href="<?php echo esc_url(wu_network_admin_url('wp-ultimo-settings', array('tab' => 'integrations'))); ?>"
|
||||
href="<?php echo esc_url(wu_network_admin_url('wp-ultimo-settings', ['tab' => 'integrations'])); ?>"
|
||||
class="wu-self-center button button-large wu-float-left"
|
||||
>
|
||||
<?php _e('← Cancel', 'wp-ultimo'); ?>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</p>
|
||||
|
||||
<div class="">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('gridpane-1.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('gridpane-1.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
|
||||
<p class="wu-text-sm">
|
||||
@ -24,7 +24,7 @@
|
||||
</p>
|
||||
|
||||
<div class="">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('gridpane-2.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('gridpane-2.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
|
||||
<p class="wu-text-sm">
|
||||
|
@ -23,7 +23,7 @@
|
||||
</p>
|
||||
|
||||
<div class="">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-1.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-1.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
|
||||
<p class="wu-text-center"><i><?php _e('Settings Page Link', 'wp-ultimo'); ?></i></p>
|
||||
@ -31,12 +31,12 @@
|
||||
<p class="wu-text-sm"><?php _e('On the new page, click in the', 'wp-ultimo'); ?><b> <?php _e('API Key', 'wp-ultimo'); ?> </b> <?php _e('menu item on the left', 'wp-ultimo'); ?>.</p>
|
||||
|
||||
<div class="">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-2.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-2.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
<p class="wu-text-center"><i><?php _e('API Key page link', 'wp-ultimo'); ?></i></p>
|
||||
<p class="wu-text-sm"> <?php _e('Copy the', 'wp-ultimo'); ?> <b> <?php _e('API Key and Secret values', 'wp-ultimo'); ?> </b>, <?php _e('we will need them in the next steps', 'wp-ultimo'); ?>. <b> <?php _e('Make sure the RunCloud API toggle is turned ON', 'wp-ultimo'); ?>, </b> <?php _e('otherwise RunCloud won’t accept WP Multisite WaaS API calls', 'wp-ultimo'); ?>.</p>
|
||||
<div class="">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-3.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-3.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
<p class="wu-text-center"><i><?php _e('Copy the API Key and API Secret values', 'wp-ultimo'); ?></i></p>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
</h3>
|
||||
<p class="wu-text-sm"><?php _e('To find what are the server and app ids for your application, navigate to your web application manage page inside the RunCloud panel. Once you are there, you’ll be able to extract the values from the URL', 'wp-ultimo'); ?>.</p>
|
||||
<div class="">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-4.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('runcloud-4.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
<p class="wu-text-center"><i><?php _e('Server ID is the first one, the second one is App ID.', 'wp-ultimo'); ?></i></p>
|
||||
<p class="wu-text-sm"><?php _e('Save the Server and APP id values as they will be necessary in the next step', 'wp-ultimo'); ?>.</p>
|
||||
|
@ -9,18 +9,18 @@
|
||||
<h1 id="step-1-getting-a-serverpilot-api-key" class="intercom-align-left" data-post-processed="true">Step 1: Getting the API Key and the Client ID</h1>
|
||||
<p class="intercom-align-left">In Your ServerPilot admin panel, first go to the Account Settings page and navigate to the API link, there you can get the API Key and Client ID (if the API Key field is empty, click the New API Key button). <b>Paste those values somewhere as we'll need them in a later step.</b> </p>
|
||||
<div class="intercom-container intercom-align-left">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('serverpilot-1.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('serverpilot-1.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
|
||||
<h1 id="step-2-get-the-server-id" class="intercom-align-left" data-post-processed="true">Step 2: Getting the App ID</h1>
|
||||
<p class="intercom-align-left">Next, we’ll need to get the App ID for your WordPress site. To find that ID, navigate to your app’s manage page:</p>
|
||||
<div class="intercom-container intercom-align-left">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('serverpilot-2.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('serverpilot-2.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
<p class="intercom-align-left">Then, take a look at the URL at the top of your browser. The APP ID is the portion between the app/ and the /settings segments of the URL.</p>
|
||||
|
||||
<div class="intercom-container intercom-align-left">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('serverpilot-3.png', 'img/hosts'); ?>">
|
||||
<img class="wu-w-full" src="<?php echo wu_get_asset('serverpilot-3.webp', 'img/hosts'); ?>">
|
||||
</div>
|
||||
|
||||
<p class="intercom-align-left">After this you can proceed to the next integration step where you can paste these values in the related fields.</p>
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
<tr
|
||||
<?php echo ! $default['done'] ? 'data-content="' . esc_attr($slug) . '"' : ''; ?>
|
||||
<?php echo wu_array_to_html_attrs(wu_get_isset($default, 'html_attr', array())); ?>
|
||||
<?php echo wu_array_to_html_attrs(wu_get_isset($default, 'html_attr', [])); ?>
|
||||
>
|
||||
|
||||
<?php if ($checks) : ?>
|
||||
@ -44,7 +44,7 @@
|
||||
<?php if ($default['done']) : ?>
|
||||
<td class="status">
|
||||
<span class="wu-text-green-600">
|
||||
<?php echo isset($default['completed']) ? $default['completed'] : __('Completed!', 'wp-ultimo'); ?>
|
||||
<?php echo $default['completed'] ?? __('Completed!', 'wp-ultimo'); ?>
|
||||
</span>
|
||||
</td>
|
||||
<?php else : ?>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<span class="dashicons dashicons-yes-alt wu-text-green-400 wu-w-auto wu-h-auto wu-text-5xl wu-mb-2"></span>
|
||||
|
||||
<h1 class="wu-text-gray-800">
|
||||
<?php printf(__('We are ready, %s!', 'wp-ultimo'), apply_filters('wu_setup_step_done_name', isset($page->customer->first) ? $page->customer->first : __('my friend', 'wp-ultimo'))); ?>
|
||||
<?php printf(__('We are ready, %s!', 'wp-ultimo'), apply_filters('wu_setup_step_done_name', $page->customer->first ?? __('my friend', 'wp-ultimo'))); ?>
|
||||
</h1>
|
||||
|
||||
<p class="wu-text-lg wu-text-gray-600 wu-my-4">
|
||||
|
Reference in New Issue
Block a user