Use new code style

This commit is contained in:
David Stone
2025-02-07 19:02:33 -07:00
parent 0181024ae1
commit 8433379d90
672 changed files with 37107 additions and 45249 deletions

View File

@ -21,185 +21,199 @@
</style>
<a class="wu-fixed wu-inline-block wu-bottom-0 wu-left-1/2 wu-transform wu--translate-x-1/2 wu-bg-white wu-p-4 wu-rounded-full wu-shadow wu-m-4 wu-no-underline wu-z-10 wu-border-gray-300 wu-border-solid wu-border" href="<?php echo esc_attr(network_admin_url()); ?>">
<?php _e('&larr; Back to the Dashboard', 'wp-ultimo'); ?>
<?php _e('&larr; Back to the Dashboard', 'wp-ultimo'); ?>
</a>
<div id="wp-ultimo-wrap" class="wrap wu-about-content">
<div style="max-width: 730px;" class="wu-max-w-screen-md wu-mx-auto wu-my-10 wu-p-12 wu-bg-white wu-shadow wu-text-justify">
<div style="max-width: 730px;" class="wu-max-w-screen-md wu-mx-auto wu-my-10 wu-p-12 wu-bg-white wu-shadow wu-text-justify">
<p class="wu-text-lg wu-leading-relaxed">
A new release strategy
</p>
<p class="wu-text-lg wu-leading-relaxed">
A new release strategy
</p>
<h1 class="wu-text-3xl">
Here's <span class="wu-font-bold">Erasmo</span>:<br>
WP Ultimo version 2.3.0
</h1>
<h1 class="wu-text-3xl">
Here's <span class="wu-font-bold">Erasmo</span>:<br>
WP Ultimo version 2.3.0
</h1>
<p class="wu-text-lg wu-leading-relaxed">
Hi guys!
</p>
<p class="wu-text-lg wu-leading-relaxed">
Hi guys!
</p>
<p class="wu-text-lg wu-leading-relaxed">
With WP Ultimo 2.3.0 we start a new streamlined approach of releases, focusing on a central feature in minors and rolling out fixes as soon as they are ready in patches. Less time waiting and leaner versions.
</p>
<p class="wu-text-lg wu-leading-relaxed">
This way we intend to avoid a significant gap in time between updates and an extensive scope of changes and fixes, all bundled into one massive release.
</p>
<p class="wu-text-lg wu-leading-relaxed">
This version focuses on allowing custom meta fields for customers in the admin area. This tool lets you collect additional information from your users. The potential for automation and WP Ultimo customizations is now expanded, as these fields may help tailor and streamline your operations.
</p>
<p class="wu-text-lg wu-leading-relaxed">
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">
This version is called Erasmo in honor of the Brazilian singer and songwriter
<a href="https://en.wikipedia.org/wiki/Erasmo_Carlos" target="_blank">
Erasmo Carlos
</a>
, who left us in 2022, at the age of 81.
</p>
<p class="wu-text-lg wu-leading-relaxed">
Erasmo was one of the faces of Jovem Guarda, a Brazilian musical TV show aired during the 1960s. The show was highly influenced by American rockn roll and the British Invasion of rock bands of that decade.
</p>
<p class="wu-text-lg wu-leading-relaxed">
Erasmo's songs are about love, friendship, ecology, and many other subjects distributed along more than two dozen albums. Here, you can listen to one of his classic songs
<a href="https://www.youtube.com/watch?v=ICnivS25bDc" target="_blank">Minha fama de mau</a>.
If youre feeling more romantic, go for this version of
<a href="https://www.youtube.com/watch?v=I5KJyKsLNGk" target="_blank">Do fundo do meu coração</a>,
with Adriana Calcanhoto. And dont forget to check out this
<a href="https://open.spotify.com/playlist/37i9dQZF1DZ06evO3F0tyd?si=6bb306446698495f" target="_blank">awesome playlist</a>.
</p>
<p class="wu-text-lg wu-leading-relaxed">
As always, let me know if you have any questions.
</p>
<p class="wu-text-lg wu-leading-relaxed wu-mb-8">
Yours truly,
</p>
<p class="wu-text-lg wu-leading-relaxed">
With WP Ultimo 2.3.0 we start a new streamlined approach of releases, focusing on a central feature in minors and rolling out fixes as soon as they are ready in patches. Less time waiting and leaner versions.
</p>
<p class="wu-text-lg wu-leading-relaxed">
This way we intend to avoid a significant gap in time between updates and an extensive scope of changes and fixes, all bundled into one massive release.
</p>
<p class="wu-text-lg wu-leading-relaxed">
This version focuses on allowing custom meta fields for customers in the admin area. This tool lets you collect additional information from your users. The potential for automation and WP Ultimo customizations is now expanded, as these fields may help tailor and streamline your operations.
</p>
<p class="wu-text-lg wu-leading-relaxed">
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">
This version is called Erasmo in honor of the Brazilian singer and songwriter
<a href="https://en.wikipedia.org/wiki/Erasmo_Carlos" target="_blank">
Erasmo Carlos
</a>
, who left us in 2022, at the age of 81.
</p>
<p class="wu-text-lg wu-leading-relaxed">
Erasmo was one of the faces of Jovem Guarda, a Brazilian musical TV show aired during the 1960s. The show was highly influenced by American rockn roll and the British Invasion of rock bands of that decade.
</p>
<p class="wu-text-lg wu-leading-relaxed">
Erasmo's songs are about love, friendship, ecology, and many other subjects distributed along more than two dozen albums. Here, you can listen to one of his classic songs
<a href="https://www.youtube.com/watch?v=ICnivS25bDc" target="_blank">Minha fama de mau</a>.
If youre feeling more romantic, go for this version of
<a href="https://www.youtube.com/watch?v=I5KJyKsLNGk" target="_blank">Do fundo do meu coração</a>,
with Adriana Calcanhoto. And dont forget to check out this
<a href="https://open.spotify.com/playlist/37i9dQZF1DZ06evO3F0tyd?si=6bb306446698495f" target="_blank">awesome playlist</a>.
</p>
<p class="wu-text-lg wu-leading-relaxed">
As always, let me know if you have any questions.
</p>
<p class="wu-text-lg wu-leading-relaxed wu-mb-8">
Yours truly,
</p>
<p class="wu-text-lg wu-leading-relaxed wu-mb-0">
<p class="wu-text-lg wu-leading-relaxed wu-mb-0">
<?php echo get_avatar('arindo@wpultimo.com', 64, '', 'Arindo Duque', [
'class' => 'wu-rounded-full',
]); ?>
<?php
echo get_avatar(
'arindo@wpultimo.com',
64,
'',
'Arindo Duque',
array(
'class' => 'wu-rounded-full',
)
);
?>
<strong class="wu-block">Arindo Duque</strong>
<small class="wu-block">Founder and CEO of NextPress, the makers of WP Ultimo</small>
</p>
<strong class="wu-block">Arindo Duque</strong>
<small class="wu-block">Founder and CEO of NextPress, the makers of WP Ultimo</small>
</p>
</div>
</div>
<div style="max-width: 700px;" class="wu-max-w-screen-md wu-mx-auto wu-mb-10">
<div style="max-width: 700px;" class="wu-max-w-screen-md wu-mx-auto wu-mb-10">
<hr class="hr-text wu-my-4 wu-text-gray-800" data-content="THIS VERSION WAS CRAFTED WITH LOVE BY">
<hr class="hr-text wu-my-4 wu-text-gray-800" data-content="THIS VERSION WAS CRAFTED WITH LOVE BY">
<?php
<?php
$key_people = [
'arindo' => [
'email' => 'arindo@wpultimo.com',
'signature' => 'arindo.png',
'name' => 'Arindo Duque',
'position' => 'Founder and CEO',
],
'allyson' => [
'email' => 'allyson@wpultimo.com',
'signature' => '',
'name' => 'Allyson Souza',
'position' => 'Developer',
],
'anyssa' => [
'email' => 'anyssa@wpultimo.com',
'signature' => '',
'name' => 'Anyssa Ferreira',
'position' => 'Designer',
],
'gustavo' => [
'email' => 'gustavo@wpultimo.com',
'signature' => '',
'name' => 'Gustavo Modesto',
'position' => 'Developer',
],
'juliana' => [
'email' => 'juliana@wpultimo.com',
'signature' => '',
'name' => 'Juliana Dias Gomes',
'position' => 'Do-it-all',
],
'lucas-carvalho' => [
'email' => 'lucas@wpultimo.com',
'signature' => '',
'name' => 'Lucas Carvalho',
'position' => 'Developer',
],
'yan' => [
'email' => 'yan@wpultimo.com',
'signature' => '',
'name' => 'Yan Kairalla',
'position' => 'Developer',
],
];
$key_people = array(
'arindo' => array(
'email' => 'arindo@wpultimo.com',
'signature' => 'arindo.png',
'name' => 'Arindo Duque',
'position' => 'Founder and CEO',
),
'allyson' => array(
'email' => 'allyson@wpultimo.com',
'signature' => '',
'name' => 'Allyson Souza',
'position' => 'Developer',
),
'anyssa' => array(
'email' => 'anyssa@wpultimo.com',
'signature' => '',
'name' => 'Anyssa Ferreira',
'position' => 'Designer',
),
'gustavo' => array(
'email' => 'gustavo@wpultimo.com',
'signature' => '',
'name' => 'Gustavo Modesto',
'position' => 'Developer',
),
'juliana' => array(
'email' => 'juliana@wpultimo.com',
'signature' => '',
'name' => 'Juliana Dias Gomes',
'position' => 'Do-it-all',
),
'lucas-carvalho' => array(
'email' => 'lucas@wpultimo.com',
'signature' => '',
'name' => 'Lucas Carvalho',
'position' => 'Developer',
),
'yan' => array(
'email' => 'yan@wpultimo.com',
'signature' => '',
'name' => 'Yan Kairalla',
'position' => 'Developer',
),
);
?>
?>
<div class="wu-flex wu-flex-wrap wu-mt-8">
<div class="wu-flex wu-flex-wrap wu-mt-8">
<?php foreach ($key_people as $person) { ?>
<?php foreach ($key_people as $person) { ?>
<div class="wu-text-center wu-w-1/4 wu-mb-5">
<div class="wu-text-center wu-w-1/4 wu-mb-5">
<?php
echo get_avatar($person['email'], 64, '', 'Arindo Duque', [
'class' => 'wu-rounded-full',
]);
?>
<strong class="wu-text-base wu-block"><?php echo $person['name']; ?></strong>
<small class="wu-text-xs wu-block"><?php echo $person['position']; ?></small>
<?php
echo get_avatar(
$person['email'],
64,
'',
'Arindo Duque',
array(
'class' => 'wu-rounded-full',
)
);
?>
<strong class="wu-text-base wu-block"><?php echo $person['name']; ?></strong>
<small class="wu-text-xs wu-block"><?php echo $person['position']; ?></small>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
<style>
.hr-text {
line-height: 1em;
position: relative;
outline: 0;
border: 0;
/* color: black; */
text-align: center;
height: 1.5em;
opacity: .5;
line-height: 1em;
position: relative;
outline: 0;
border: 0;
/* color: black; */
text-align: center;
height: 1.5em;
opacity: .5;
}
.hr-text:before {
content: '';
background: -webkit-gradient(linear, left top, right top, from(transparent), color-stop(#818078), to(transparent));
background: linear-gradient(to right, transparent, #818078, transparent);
position: absolute;
left: 0;
top: 50%;
width: 100%;
height: 1px;
content: '';
background: -webkit-gradient(linear, left top, right top, from(transparent), color-stop(#818078), to(transparent));
background: linear-gradient(to right, transparent, #818078, transparent);
position: absolute;
left: 0;
top: 50%;
width: 100%;
height: 1px;
}
.hr-text:after {
content: attr(data-content);
position: relative;
display: inline-block;
/* color: black; */
padding: 0 .5em;
line-height: 1.5em;
color: #818078;
background-color: #eef2f5;
content: attr(data-content);
position: relative;
display: inline-block;
/* color: black; */
padding: 0 .5em;
line-height: 1.5em;
color: #818078;
background-color: #eef2f5;
}
</style>

View File

@ -11,41 +11,41 @@ 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 echo $notice['message']; ?>
<?php else : ?>
<?php if (strpos($notice['message'], '<p>') !== false) : ?>
<?php echo $notice['message']; ?>
<?php else : ?>
<p class="wu-py-2"><?php echo $notice['message']; // phpcs:ignore ?></p>
<?php endif; ?>
<?php if (isset($notice['actions']) && !empty($notice['actions'])) : ?>
<?php if (isset($notice['actions']) && ! empty($notice['actions'])) : ?>
<div class="wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-l-0 wu-border-b-0 wu-bg-gray-100 wu--ml-2 wu--mb-1 wu--mr-2 sm:wu--mr-7.5 sm:wu--ml-3 sm:wu--mb-px">
<div class="wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-l-0 wu-border-b-0 wu-bg-gray-100 wu--ml-2 wu--mb-1 wu--mr-2 sm:wu--mr-7.5 sm:wu--ml-3 sm:wu--mb-px">
<ul class="wu-text-right wu-p-0 wu-m-0 wu-flex wu-justify-end">
<ul class="wu-text-right wu-p-0 wu-m-0 wu-flex wu-justify-end">
<?php foreach ($notice['actions'] as $action) : ?>
<?php foreach ($notice['actions'] as $action) : ?>
<li class="wu-inline-block wu-p-0 wu-m-0 wu-flex-shrink">
<a class="wu-bg-white wu-uppercase wu-no-underline wu-font-bold wu-text-gray-600 hover:wu-text-gray-700 wu-text-xs wu-inline-block wu-px-4 wu-py-2 wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-t-0 wu-border-b-0 wu-transition-all wu-mr-px" title="<?php echo esc_attr($action['title']); ?>" href="<?php echo esc_attr($action['url']); ?>"><?php echo $action['title']; ?></a>
</li>
<li class="wu-inline-block wu-p-0 wu-m-0 wu-flex-shrink">
<a class="wu-bg-white wu-uppercase wu-no-underline wu-font-bold wu-text-gray-600 hover:wu-text-gray-700 wu-text-xs wu-inline-block wu-px-4 wu-py-2 wu-border wu-border-solid wu-border-gray-300 wu-border-r-0 wu-border-t-0 wu-border-b-0 wu-transition-all wu-mr-px" title="<?php echo esc_attr($action['title']); ?>" href="<?php echo esc_attr($action['url']); ?>"><?php echo $action['title']; ?></a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($notice['dismissible_key']) && $notice['dismissible_key']) : ?>
<input type='hidden' name='notice_id' value='<?php echo esc_attr($notice['dismissible_key']); ?>'>
<input type='hidden' name='notice_id' value='<?php echo esc_attr($notice['dismissible_key']); ?>'>
<input type='hidden' name='nonce' value='<?php echo esc_attr($nonce); ?>'>
<input type='hidden' name='nonce' value='<?php echo esc_attr($nonce); ?>'>
<?php endif; ?>

View File

@ -7,34 +7,42 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<textarea id="field-<?php echo esc_attr($field->id); ?>" data-init="0" data-code-editor="<?php echo esc_attr($field->lang); ?>" class="form-control wu-w-full wu-my-1 <?php echo esc_attr($field->classes); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); ?>><?php echo esc_attr($field->value); ?></textarea>
<textarea id="field-<?php echo esc_attr($field->id); ?>" data-init="0" data-code-editor="<?php echo esc_attr($field->lang); ?>" class="form-control wu-w-full wu-my-1 <?php echo esc_attr($field->classes); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); ?>><?php echo esc_attr($field->value); ?></textarea>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -7,38 +7,46 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block">
<div class="wu-block">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<div class="wu-mt-2">
<div class="wu-mt-2">
<color-picker class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>></color-picker>
<color-picker class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>></color-picker>
</div>
</div>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -8,57 +8,65 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<select class="wu_select_icon" name="<?php echo esc_attr($field->id); ?>">
<select class="wu_select_icon" name="<?php echo esc_attr($field->id); ?>">
<option value=""><?php echo __('No Icon','wp-ultimo'); ?></option>
<option value=""><?php echo __('No Icon', 'wp-ultimo'); ?></option>
<?php foreach (wu_get_icons_list() as $category_label => $category_array) : ?>
<?php foreach (wu_get_icons_list() as $category_label => $category_array) : ?>
<optgroup label="<?php echo $category_label; ?>">
<optgroup label="<?php echo $category_label; ?>">
<?php foreach ($category_array as $option_key => $option_value) : ?>
<?php foreach ($category_array as $option_key => $option_value) : ?>
<option
value="<?php echo esc_attr($option_value); ?>"
<?php selected($field->value, $option_value); ?>
>
<?php echo $option_value; ?>
</option>
<option
value="<?php echo esc_attr($option_value); ?>"
<?php selected($field->value, $option_value); ?>
>
<?php echo $option_value; ?>
</option>
<?php endforeach; ?>
<?php endforeach; ?>
</optgroup>
</optgroup>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
</select>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -7,47 +7,55 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
<div class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$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',
));
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$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();
$form->render();
?>
?>
<?php if ($field->desc) : ?>
<?php if ($field->desc) : ?>
<div class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<div class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</div>
</div>
<?php endif; ?>
</div>
</div>
</li>

View File

@ -7,30 +7,30 @@
?>
<li class="wu-bg-gray-100 wu-py-4 <?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<h3 class="wu-my-1 wu-text-base wu-text-gray-800">
<h3 class="wu-my-1 wu-text-base wu-text-gray-800">
<?php echo $field->title; ?>
<?php echo $field->title; ?>
<?php if ($field->tooltip) : ?>
<?php if ($field->tooltip) : ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php endif; ?>
<?php endif; ?>
</h3>
</h3>
<?php if ($field->desc) : ?>
<?php if ($field->desc) : ?>
<p class="wu-mt-1 wu-mb-0 wu-text-gray-700">
<p class="wu-mt-1 wu-mb-0 wu-text-gray-700">
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</p>
</p>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</li>

View File

@ -7,6 +7,6 @@
?>
<li class="wu-hidden wu-m-0">
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
</li>

View File

@ -7,35 +7,43 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
<div class="wu-block wu-w-full wu-mt-4 <?php echo esc_attr($field->classes); ?>">
<div class="wu-block wu-w-full wu-mt-4 <?php echo esc_attr($field->classes); ?>">
<?php echo $field->content; ?>
<?php echo $field->content; ?>
</div>
</div>
</div>
</div>
</li>

View File

@ -7,7 +7,7 @@
/**
* Set the media query.
*
*
* When the stacked option is present
* and set to true, ignore the flex arrangement
* and make elements stacked.
@ -15,96 +15,104 @@
$mq = $field->stacked ? 'ignore-' : '';
$content_wrapper_classes = $field->content_wrapper_classes
? esc_attr(trim($field->content_wrapper_classes))
: "wu-ml-0 {$mq}md:wu-ml-4 {$mq}md:wu-w-4/12 wu-mt-4 {$mq}md:wu-mt-0 lg:wu-mt-2";
? esc_attr(trim($field->content_wrapper_classes))
: "wu-ml-0 {$mq}md:wu-ml-4 {$mq}md:wu-w-4/12 wu-mt-4 {$mq}md:wu-mt-0 lg:wu-mt-2";
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="<?php echo $mq; ?>md:wu-flex wu-items-center wu-w-full">
<div class="<?php echo $mq; ?>md:wu-flex wu-items-center wu-w-full">
<div class="<?php echo $mq; ?>md:wu-w-10/12">
<?php
<div class="<?php echo $mq; ?>md:wu-w-10/12">
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<div class="<?php echo $mq; ?>md:wu-w-9/12">
<?php
<div class="<?php echo $mq; ?>md:wu-w-9/12">
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</div>
</div>
<div class="<?php echo $content_wrapper_classes; ?>">
<div class="wu-wrapper-image-field wu-w-full wu-overflow-hidden">
<div class="<?php echo $content_wrapper_classes; ?>">
<div class="wu-wrapper-image-field wu-w-full wu-overflow-hidden">
<div class="wu-relative wu-w-full wu-overflow-hidden">
<div class="wu-relative wu-w-full wu-overflow-hidden">
<div class="wu-self-center wu-rounded wu-flex <?php echo $mq; ?>md:wu-max-w-full wu-min-w-full <?php echo $mq; ?>md:wu-max-h-20 wu-overflow-hidden">
<img
class="<?php echo $field->img ? '' : 'wu-absolute'; ?> wu-self-center wu-rounded sm:wu-max-w-full wu-min-w-full"
src="<?php echo $field->img; ?>"
>
<div class="wu-self-center wu-rounded wu-flex <?php echo $mq; ?>md:wu-max-w-full wu-min-w-full <?php echo $mq; ?>md:wu-max-h-20 wu-overflow-hidden">
<img
class="<?php echo $field->img ? '' : 'wu-absolute'; ?> wu-self-center wu-rounded sm:wu-max-w-full wu-min-w-full"
src="<?php echo $field->img; ?>"
>
</div>
</div>
<div class="wu-wrapper-image-field-upload-actions wu-absolute wu-top-4 wu-right-4 <?php echo $mq; ?>md:wu-top-2 <?php echo $mq; ?>md:wu-right-2 wu-scale-150 <?php echo $mq; ?>md:wu-scale-100">
<div class="wu-wrapper-image-field-upload-actions wu-absolute wu-top-4 wu-right-4 <?php echo $mq; ?>md:wu-top-2 <?php echo $mq; ?>md:wu-right-2 wu-scale-150 <?php echo $mq; ?>md:wu-scale-100">
<a title="<?php _e('Preview Image', 'wp-ultimo'); ?>" href="<?php echo $field->img; ?>" class="wubox wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<a title="<?php _e('Preview Image', 'wp-ultimo'); ?>" href="<?php echo $field->img; ?>" class="wubox wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<span class="dashicons-wu-eye1 wu-align-middle" style="top: -2px;"></span>
<span class="dashicons-wu-eye1 wu-align-middle" style="top: -2px;"></span>
</a>
</a>
<a title="<?php _e('Remove Image', 'wp-ultimo'); ?>" href="#" class="wu-remove-image wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<a title="<?php _e('Remove Image', 'wp-ultimo'); ?>" href="#" class="wu-remove-image wu-no-underline wu-text-center wu-inline-block wu-bg-black wu-opacity-60 wu-rounded-full wu-text-white wu-w-5 wu-h-5 wu-shadow-sm">
<span class="dashicons-wu-cross wu-align-middle"></span>
<span class="dashicons-wu-cross wu-align-middle"></span>
</a>
</a>
</div>
</div>
</div>
</div>
<input name="<?php echo esc_attr($field_slug); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> />
<input name="<?php echo esc_attr($field_slug); ?>" type="hidden" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> />
<div class="wu-add-image-wrapper <?php echo $mq; ?>md:wu-mt-0 wu-w-full" style="display: none;">
<div class="wu-add-image-wrapper <?php echo $mq; ?>md:wu-mt-0 wu-w-full" style="display: none;">
<a class="button wu-w-full wu-text-center wu-add-image">
<a class="button wu-w-full wu-text-center wu-add-image">
<span class="dashicons-wu-upload"></span> <?php _e('Upload Image', 'wp-ultimo'); ?>
<span class="dashicons-wu-upload"></span> <?php _e('Upload Image', 'wp-ultimo'); ?>
</a>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>

View File

@ -7,38 +7,46 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<a class="form-control <?php echo esc_attr($field->classes); ?>" type="<?php echo esc_attr($field->type); ?>" <?php echo $field->get_html_attributes(); ?>>
<a class="form-control <?php echo esc_attr($field->classes); ?>" type="<?php echo esc_attr($field->type); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php echo $field->display_value; ?>
<?php echo $field->display_value; ?>
</a>
</a>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -6,80 +6,88 @@
*/
?>
<li
class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>"
<?php echo $field->get_wrapper_html_attributes(); ?>
class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>"
<?php echo $field->get_wrapper_html_attributes(); ?>
>
<div class="wu-w-full">
<div class="wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
<ul data-columns="<?php echo esc_attr($field->columns); ?>" class='items wu--mx-1 wu-overflow-hidden wu-multiselect-content wu-static wu-my-2'>
<ul data-columns="<?php echo esc_attr($field->columns); ?>" class='items wu--mx-1 wu-overflow-hidden wu-multiselect-content wu-static wu-my-2'>
<?php foreach ($field->options as $value => $option) : ?>
<?php foreach ($field->options as $value => $option) : ?>
<li class="item wu-box-border wu-m-0 wu-my-2">
<li class="item wu-box-border wu-m-0 wu-my-2">
<div class="wu-bg-gray-100 wu-p-3 wu-m-0 wu-border-gray-300 wu-border-solid wu-border wu-rounded wu-items-center wu-flex wu-justify-between">
<div class="wu-bg-gray-100 wu-p-3 wu-m-0 wu-border-gray-300 wu-border-solid wu-border wu-rounded wu-items-center wu-flex wu-justify-between">
<span class="wu-block">
<span class="wu-block">
<span class="wu-my-1 wu-text-xs wu-font-bold wu-block">
<span class="wu-my-1 wu-text-xs wu-font-bold wu-block">
<?php echo $option['title']; ?>
<?php echo $option['title']; ?>
</span>
</span>
<?php if (isset($option['desc']) && !empty($option['desc'])) : ?>
<?php if (isset($option['desc']) && ! empty($option['desc'])) : ?>
<span class="wu-my-1 wu-inline-block wu-text-xs">
<span class="wu-my-1 wu-inline-block wu-text-xs">
<?php echo $option['desc']; ?>
<?php echo $option['desc']; ?>
</span>
</span>
<?php endif; ?>
<?php endif; ?>
</span>
</span>
<span class="wu-block wu-ml-2">
<span class="wu-block wu-ml-2">
<div class="wu-toggle">
<div class="wu-toggle">
<input <?php checked(in_array($value, (array) $field->value, true)); ?> value="<?php echo esc_attr($value); ?>" id="<?php echo esc_attr("{$field->id}_{$value}"); ?>" type="checkbox" name="<?php echo esc_attr("{$field->id}[]"); ?>" class="wu-tgl wu-tgl-ios" <?php echo $field->get_html_attributes(); ?>>
<input <?php checked(in_array($value, (array) $field->value, true)); ?> value="<?php echo esc_attr($value); ?>" id="<?php echo esc_attr("{$field->id}_{$value}"); ?>" type="checkbox" name="<?php echo esc_attr("{$field->id}[]"); ?>" class="wu-tgl wu-tgl-ios" <?php echo $field->get_html_attributes(); ?>>
<label for="<?php echo esc_attr("{$field->id}_{$value}"); ?>" class="wu-tgl-btn wp-ui-highlight"></label>
<label for="<?php echo esc_attr("{$field->id}_{$value}"); ?>" class="wu-tgl-btn wp-ui-highlight"></label>
</div>
</div>
</span>
</span>
</div>
</div>
</li>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
</div>
</div>
</li>

View File

@ -7,22 +7,26 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<div class="<?php echo esc_attr('wu-my-0 '.$field->classes); ?>">
<div class="<?php echo esc_attr('wu-my-0 ' . $field->classes); ?>">
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</div>
</div>
</li>

View File

@ -4,138 +4,142 @@
*
* @since 2.0.0
*/
?>
<?php if ($field->title) : ?>
<?php if ( $field->title ) : ?>
<li id="" class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<li id=""
class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-w-full wu-block">
<div class="wu-w-full wu-block">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array('field' => $field)
);
?>
?>
<?php
<?php
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
?>
?>
</div>
</div>
</li>
</li>
<?php endif; ?>
<?php
if (!$field->values && $field->value) {
if (! $field->values && $field->value) {
$_values = array();
$columns = array_keys($field->value);
$values = $field->value;
$_values = array();
foreach ($columns as $column) {
$count = count(array_pop($field->value));
for ($i = 0; $i < $count; $i++ ) {
$_values[ $i ][ $column ] = $field->value[ $column ][ $i ];
}
}
$columns = array_keys($field->value);
$field->values = $_values;
}
$values = $field->value;
$fields = array();
foreach ($columns as $column) {
foreach ($field->fields as $key => $value) {
$fields[ $key . '[]' ] = $field->fields[ $key ];
}
$count = count(array_pop($field->value));
if (is_array($field->values)) {
$position = 0;
$field_len = count($field->values);
foreach ($field->values as $key => $value) {
$field_id = esc_attr($field->id);
for ($i = 0; $i < $count; $i++) {
$field_id .= $position !== $field_len - 1 ? $key : '';
++$position;
?>
<li id="<?php echo esc_attr($field_id); ?>-line"
class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
foreach ($value as $field_name => $field_value) {
$fields[ $field_name . '[]' ]['value'] = $field_value;
}
$_values[$i][$column] = $field->value[$column][$i];
(new \WP_Ultimo\UI\Form(
$field->id,
$fields,
array(
'views' => 'admin-pages/fields',
'classes' => 'wu-flex',
'field_wrapper_classes' => 'wu-bg-transparent',
)
))->render();
?>
</div>
</li>
<?php
}
} else {
?>
<li id="<?php echo esc_attr($field->id); ?>-line"
class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
} // end if;
<div class="wu-w-full <?php echo esc_attr($field->classes); ?>">
} // end if;
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
(new \WP_Ultimo\UI\Form(
$field->id,
$fields,
array(
'views' => 'admin-pages/fields',
'classes' => 'wu-flex',
'field_wrapper_classes' => 'wu-bg-transparent',
)
))->render();
$field->values = $_values;
?>
} // end if;
</div>
$fields = array();
foreach ($field->fields as $key => $value) {
$fields[$key.'[]'] = $field->fields[$key];
}
if (is_array($field->values)) {
$position = 0;
$field_len = count($field->values);
foreach ($field->values as $key => $value) {
$field_id = esc_attr($field->id);
$field_id .= $position !== $field_len - 1 ? $key : '';
$position++;
?>
<li id="<?php echo esc_attr($field_id); ?>-line" class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
foreach ($value as $field_name => $field_value) {
$fields[$field_name.'[]']['value'] = $field_value;
}
$form = new \WP_Ultimo\UI\Form($field->id, $fields, array(
'views' => 'admin-pages/fields',
'classes' => 'wu-flex',
'field_wrapper_classes' => 'wu-bg-transparent',
));
$form->render();
?>
</div>
</li>
<?php
}
} else {
?>
<li id="<?php echo esc_attr($field->id); ?>-line" class="field-repeater wu-bg-gray-100 <?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$form = new \WP_Ultimo\UI\Form($field->id, $fields, array(
'views' => 'admin-pages/fields',
'classes' => 'wu-flex',
'field_wrapper_classes' => 'wu-bg-transparent',
));
$form->render();
?>
</div>
</li>
<?php
}
</li>
<?php
}
?>
<li class="<?php echo esc_attr($field->wrapper_classes); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<a class="button wu-w-full wu-text-center" href="#" v-on:click.prevent="duplicate_and_clean($event, '.field-repeater')">
<?php _e('Add new Line', 'wp-ultimo'); ?>
</a>
<a class="button wu-w-full wu-text-center" href="#"
v-on:click.prevent="duplicate_and_clean($event, '.field-repeater')">
<?php esc_html_e('Add new Line', 'wp-ultimo'); ?>
</a>
</li>

View File

@ -7,69 +7,80 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
<div class="wu-flex wu-flex-wrap wu--mx-2 wu-mt-2">
<div class="wu-flex wu-flex-wrap wu--mx-2 wu-mt-2">
<?php foreach ($field->options as $option_value => $option) : ?>
<?php foreach ($field->options as $option_value => $option) : ?>
<?php
<?php
/*
* Set the default keys.
*/
$option = wp_parse_args($option, array(
'tooltip' => '',
));
/*
* Set the default keys.
*/
$option = wp_parse_args(
$option,
array(
'tooltip' => '',
)
);
?>
?>
<div class="wu-p-2 wu-box-border wu-flex <?php echo esc_attr($field->classes); ?>" style="height: 110px;">
<div class="wu-p-2 wu-box-border wu-flex <?php echo esc_attr($field->classes); ?>" style="height: 110px;">
<label class="wu-w-full wu-relative wu-rounded wu-p-1 wu-border-solid wu-border wu-flex wu-items-center wu-justify-center wu-bg-gray-100 wu-text-gray-600 wu-border-gray-300" v-bind:class="require('<?php echo esc_attr($field->id); ?>', '<?php echo esc_attr($option_value); ?>') ? 'wu-bg-gray-200 wu-text-gray-700 wu-border-gray-400 selected' : '' " for="<?php echo esc_attr($field->id.'-'.$option_value); ?>">
<label class="wu-w-full wu-relative wu-rounded wu-p-1 wu-border-solid wu-border wu-flex wu-items-center wu-justify-center wu-bg-gray-100 wu-text-gray-600 wu-border-gray-300" v-bind:class="require('<?php echo esc_attr($field->id); ?>', '<?php echo esc_attr($option_value); ?>') ? 'wu-bg-gray-200 wu-text-gray-700 wu-border-gray-400 selected' : '' " for="<?php echo esc_attr($field->id . '-' . $option_value); ?>">
<div class="wu-text-center" <?php echo wu_tooltip_text($option['tooltip']); ?>>
<div class="wu-text-center" <?php echo wu_tooltip_text($option['tooltip']); ?>>
<span class="wu-block wu-text-2xl wu-mb-2 <?php echo esc_attr($option['icon']); ?>"></span>
<span class="wu-block wu-text-2xl wu-mb-2 <?php echo esc_attr($option['icon']); ?>"></span>
<input class="wu-w-0 wu-h-0 wu-hidden" id="<?php echo esc_attr($field->id.'-'.$option_value); ?>" type="radio" <?php checked($option_value, $field->value); ?> value="<?php echo esc_attr($option_value); ?>" name="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="wu-w-0 wu-h-0 wu-hidden" id="<?php echo esc_attr($field->id . '-' . $option_value); ?>" type="radio" <?php checked($option_value, $field->value); ?> value="<?php echo esc_attr($option_value); ?>" name="<?php echo esc_attr($field->id); ?>" <?php echo $field->get_html_attributes(); ?>>
<span class="wu-uppercase wu-text-2xs wu-font-semibold">
<span class="wu-uppercase wu-text-2xs wu-font-semibold">
<?php echo $option['title']; ?>
<?php echo $option['title']; ?>
</span>
</span>
</div>
</div>
</label>
</label>
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
</li>

View File

@ -7,52 +7,60 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<select class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?><?php echo isset($field->html_attr['multiple']) && $field->html_attr['multiple'] ? '[]' : ''; ?>" <?php echo $field->get_html_attributes(); ?> placeholder="<?php echo $field->placeholder; ?>">
<select class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?><?php echo isset($field->html_attr['multiple']) && $field->html_attr['multiple'] ? '[]' : ''; ?>" <?php echo $field->get_html_attributes(); ?> placeholder="<?php echo $field->placeholder; ?>">
<?php foreach ($field->options as $option_value => $option_label) : ?>
<?php foreach ($field->options as $option_value => $option_label) : ?>
<option <?php selected($option_value === $field->value || (is_array($field->value) && in_array($option_value, $field->value))); ?> value="<?php echo esc_attr($option_value); ?>">
<option <?php selected($option_value === $field->value || (is_array($field->value) && in_array($option_value, $field->value))); ?> value="<?php echo esc_attr($option_value); ?>">
<?php echo $option_label; ?>
<?php echo $option_label; ?>
</option>
</option>
<?php endforeach; ?>
<?php endforeach; ?>
<?php if ($field->options_template) : ?>
<?php if ($field->options_template) : ?>
<?php echo $field->options_template; ?>
<?php echo $field->options_template; ?>
<?php endif; ?>
<?php endif; ?>
</select>
</select>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -7,26 +7,30 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block">
<div class="wu-block">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->desc) : ?>
<?php if ($field->desc) : ?>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; ?></span>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; ?></span>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</li>

View File

@ -5,12 +5,12 @@
* @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) . (strpos($field->wrapper_classes, '-bg-') === false ? ' 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)); ?>">
<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)); ?>">
<?php echo $field->title; ?>
<?php echo $field->title; ?>
</button>
</button>
</li>

View File

@ -7,23 +7,23 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?> wu-bg-gray-200" style="margin-bottom: -1px;" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu--m-4 wu-px-1">
<div class="wu--m-4 wu-px-1">
<?php foreach ($field->options as $option_value => $option_label) : ?>
<?php foreach ($field->options as $option_value => $option_label) : ?>
<label
class="wu-mt-1 wu-inline-block wu-uppercase wu-text-xs wu-text-gray-500 wu-px-4 wu-py-3 wu-font-bold wu-border-solid wu-border wu-border-b-0 wu-border-transparent wu-rounded-tl wu-rounded-tr "
v-bind:class="'<?php echo esc_attr($option_value); ?>' == <?php echo esc_attr($field->id); ?> ? 'wu-bg-white wu-text-gray-600 wu-border-gray-300' : ''"
>
<label
class="wu-mt-1 wu-inline-block wu-uppercase wu-text-xs wu-text-gray-500 wu-px-4 wu-py-3 wu-font-bold wu-border-solid wu-border wu-border-b-0 wu-border-transparent wu-rounded-tl wu-rounded-tr "
v-bind:class="'<?php echo esc_attr($option_value); ?>' == <?php echo esc_attr($field->id); ?> ? 'wu-bg-white wu-text-gray-600 wu-border-gray-300' : ''"
>
<?php echo $option_label; ?>
<?php echo $option_label; ?>
<input class="wu-w-0 wu-h-0 wu-overflow-hidden wu-hidden" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="wu-w-0 wu-h-0 wu-overflow-hidden wu-hidden" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?>>
</label>
</label>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</li>

View File

@ -7,76 +7,80 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block">
<div class="wu-block">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->type === 'date' || $field->date === true) : ?>
<?php if ($field->type === 'date' || $field->date === true) : ?>
<?php
<?php
if (wu_validate_date($field->value)) {
if (wu_validate_date($field->value)) {
$date = $field->value;
$date = $field->value;
$time = strtotime(get_date_from_gmt($date));
$time = strtotime(get_date_from_gmt($date));
$formatted_value = date_i18n(get_option('date_format'), $time);
$formatted_value = date_i18n(get_option('date_format'), $time);
$placeholder = wu_get_current_time('timestamp') > $time ? __('%s ago', 'wp-ultimo') : __('In %s', 'wp-ultimo'); // phpcs:ignore
echo sprintf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', $formatted_value, sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp'))), get_date_from_gmt($date));
printf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', $formatted_value, sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp'))), get_date_from_gmt($date));
} else {
_e('None', 'wp-ultimo');
} // end if;
} else {
?>
_e('None', 'wp-ultimo');
<?php else : ?>
} // end if;
<span class="wu-my-1 wu-inline-block">
?>
<span id="<?php echo $field->id; ?>_value"><?php echo $field->display_value; ?></span>
<?php else : ?>
<?php if ($field->copy) : ?>
<span class="wu-my-1 wu-inline-block">
<a <?php echo wu_tooltip_text(__('Copy', 'wp-ultimo')); ?> class="wu-no-underline wp-ui-text-highlight wu-copy" data-clipboard-action="copy" data-clipboard-target="#<?php echo $field->id; ?>_value">
<span id="<?php echo $field->id; ?>_value"><?php echo $field->display_value; ?></span>
<span class="dashicons-wu-copy wu-align-middle"></span>
<?php if ($field->copy) : ?>
</a>
<a <?php echo wu_tooltip_text(__('Copy', 'wp-ultimo')); ?> class="wu-no-underline wp-ui-text-highlight wu-copy" data-clipboard-action="copy" data-clipboard-target="#<?php echo $field->id; ?>_value">
<?php endif; ?>
<span class="dashicons-wu-copy wu-align-middle"></span>
</span>
</a>
<?php endif; ?>
<?php endif; ?>
<?php
</span>
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
<?php endif; ?>
?>
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
?>
</div>
</div>
</li>

View File

@ -7,112 +7,116 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" data-wu-app="<?php echo esc_attr($field->id); ?>" data-state='{"edit":false}'>
<div class="wu-block" v-show="!edit">
<div class="wu-block" v-show="!edit">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->type === 'date' || $field->date === true) : ?>
<?php if ($field->type === 'date' || $field->date === true) : ?>
<?php
<?php
if (wu_validate_date($field->value)) {
if (wu_validate_date($field->value)) {
if ($field->display_value == false) {
echo __('No date', 'wp-ultimo');
} else {
$date = $field->value;
if ($field->display_value == false) {
$time = strtotime(get_date_from_gmt($date));
echo __('No date', 'wp-ultimo');
$formatted_value = date_i18n(get_option('date_format'), $time);
} else {
$placeholder = wu_get_current_time('timestamp') > $time ? __('%s ago', 'wp-ultimo') : __('In %s', 'wp-ultimo'); // phpcs:ignore
$date = $field->value;
printf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', $formatted_value, sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp'))), get_date_from_gmt($date));
} // end if;
} else {
_e('None', 'wp-ultimo');
} // end if;
$time = strtotime(get_date_from_gmt($date));
?>
$formatted_value = date_i18n(get_option('date_format'), $time);
<?php else : ?>
$placeholder = wu_get_current_time('timestamp') > $time ? __('%s ago', 'wp-ultimo') : __('In %s', 'wp-ultimo'); // phpcs:ignore
<span class="wu-my-1 wu-inline-block">
echo sprintf('<time datetime="%3$s">%1$s</time><br><small>%2$s</small>', $formatted_value, sprintf($placeholder, human_time_diff($time, wu_get_current_time('timestamp'))), get_date_from_gmt($date));
<?php echo $field->display_value; ?>
} // end if;
</span>
} else {
<?php endif; ?>
_e('None', 'wp-ultimo');
</div>
} // end if;
<?php if ($field->edit) : ?>
?>
<div class="wu-block" v-show="!edit">
<a href="#" class="wu-p-2 wu--m-2 wp-ui-text-highlight" v-on:click="open($event)" data-field="<?php echo esc_attr($field_slug); ?>">
<?php echo wu_tooltip(__('Edit'), 'dashicons-edit'); ?>
</a>
</div>
<?php else : ?>
<div v-cloak class="wu-block wu-w-full" v-show="edit">
<span class="wu-my-1 wu-inline-block">
<?php
<?php echo $field->display_value; ?>
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
</span>
?>
<?php endif; ?>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
</div>
<?php
<?php if ($field->edit) : ?>
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
<div class="wu-block" v-show="!edit">
<a href="#" class="wu-p-2 wu--m-2 wp-ui-text-highlight" v-on:click="open($event)" data-field="<?php echo esc_attr($field_slug); ?>">
<?php echo wu_tooltip(__('Edit'), 'dashicons-edit'); ?>
</a>
</div>
?>
<div v-cloak class="wu-block wu-w-full" v-show="edit">
</div>
<?php
<?php endif; ?>
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
<?php if ($field->copy) : ?>
?>
<div class="wu-block" v-show="!edit">
<a href="#" class="wu-p-2 wu--m-2" v-on:click="edit($event, '<?php echo esc_js($field_slug); ?>')" data-field="<?php echo esc_attr($field_slug); ?>">
<?php echo wu_tooltip(__('Copy'), 'dashicons-admin-page'); ?>
</a>
</div>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
?>
</div>
<?php endif; ?>
<?php if ($field->copy) : ?>
<div class="wu-block" v-show="!edit">
<a href="#" class="wu-p-2 wu--m-2" v-on:click="edit($event, '<?php echo esc_js($field_slug); ?>')" data-field="<?php echo esc_attr($field_slug); ?>">
<?php echo wu_tooltip(__('Copy'), 'dashicons-admin-page'); ?>
</a>
</div>
<?php endif; ?>
<?php endif; ?>
</li>

View File

@ -7,70 +7,78 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->type === 'model') : ?>
<?php if ($field->type === 'model') : ?>
<div class="wu-flex">
<div class="wu-flex">
<div class="wu-w-full wu-my-1">
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
</div>
<div class="wu-w-full wu-my-1">
<input class="form-control wu-w-full" name="<?php echo esc_attr($field->id); ?>" type="text" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
</div>
<?php if (wu_get_isset($field->html_attr, 'data-base-link')) : ?>
<?php if (wu_get_isset($field->html_attr, 'data-base-link')) : ?>
<div class="wu-ml-1 wu-my-1" v-cloak>
<a
v-bind:href="'<?php echo wu_get_isset($field->html_attr, 'data-base-link'); ?>' + '=' + <?php echo wu_get_isset($field->html_attr, 'v-model'); ?>"
target="_blank"
class="button"
v-show='<?php echo wu_get_isset($field->html_attr, 'v-model'); ?>'
<?php echo wu_tooltip_text(__('View', 'wp-ultimo')); ?>
>
<span class="dashicons-wu-popup wu-m-0 wu-p-0"></span>
</a>
</div>
<div class="wu-ml-1 wu-my-1" v-cloak>
<a
v-bind:href="'<?php echo wu_get_isset($field->html_attr, 'data-base-link'); ?>' + '=' + <?php echo wu_get_isset($field->html_attr, 'v-model'); ?>"
target="_blank"
class="button"
v-show='<?php echo wu_get_isset($field->html_attr, 'v-model'); ?>'
<?php echo wu_tooltip_text(__('View', 'wp-ultimo')); ?>
>
<span class="dashicons-wu-popup wu-m-0 wu-p-0"></span>
</a>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<?php elseif ($field->money) : ?>
<?php elseif ($field->money) : ?>
<money class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>></money>
<money class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>></money>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> v-if="false">
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?> v-if="false">
<?php else : ?>
<?php else : ?>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php endif; ?>
<?php endif; ?>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -7,34 +7,42 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<textarea class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); ?>><?php echo esc_attr($field->value); ?></textarea>
<textarea class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" name="<?php echo esc_attr($field->id); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" <?php echo $field->get_html_attributes(); ?>><?php echo esc_attr($field->value); ?></textarea>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</li>

View File

@ -7,38 +7,42 @@
?>
<li class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block">
<div class="wu-block">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->desc) : ?>
<?php if ($field->desc) : ?>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; ?></span>
<span class="wu-my-1 wu-inline-block wu-text-xs"><?php echo $field->desc; ?></span>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="wu-block wu-ml-2">
<div class="wu-block wu-ml-2">
<div class="wu-toggle">
<div class="wu-toggle">
<input class="wu-tgl wu-tgl-ios" value="1" <?php checked($field->value == 1); ?> id="wu-tg-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field_slug); ?>" <?php echo $field->get_html_attributes(); ?> />
<input class="wu-tgl wu-tgl-ios" value="1" <?php checked($field->value == 1); ?> id="wu-tg-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field_slug); ?>" <?php echo $field->get_html_attributes(); ?> />
<label class="wu-tgl-btn wp-ui-highlight wu-bg-blue-500" for="wu-tg-<?php echo esc_attr($field->id); ?>"></label>
<label class="wu-tgl-btn wp-ui-highlight wu-bg-blue-500" for="wu-tg-<?php echo esc_attr($field->id); ?>"></label>
</div>
</div>
</div>
</div>
</li>

View File

@ -15,11 +15,15 @@
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-title', array(
'field' => $field,
));
wu_get_template(
'admin-pages/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
@ -42,11 +46,15 @@
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template('admin-pages/fields/partials/field-description', array(
'field' => $field,
));
wu_get_template(
'admin-pages/fields/partials/field-description',
array(
'field' => $field,
)
);
?>

View File

@ -7,35 +7,35 @@
?>
<div class="wu-styling">
<?php echo $form->before; ?>
<?php echo $form->before; ?>
<div class="wu-flex wu-flex-wrap">
<div class="wu-flex wu-flex-wrap">
<?php if ($form->wrap_in_form_tag) : ?>
<?php if ($form->wrap_in_form_tag) : ?>
<form
id="<?php echo esc_attr($form_slug); ?>"
action="<?php echo esc_attr($form->action); ?>"
method="<?php echo esc_attr($form->method); ?>"
<?php echo $form->get_html_attributes(); ?>
>
<form
id="<?php echo esc_attr($form_slug); ?>"
action="<?php echo esc_attr($form->action); ?>"
method="<?php echo esc_attr($form->method); ?>"
<?php echo $form->get_html_attributes(); ?>
>
<?php endif; ?>
<?php endif; ?>
<ul id="wp-ultimo-form-<?php echo esc_attr($form->id); ?>" class="wu-flex-grow <?php echo esc_attr(trim($form->classes)); ?>" <?php echo $form->get_html_attributes(); ?>>
<ul id="wp-ultimo-form-<?php echo esc_attr($form->id); ?>" class="wu-flex-grow <?php echo esc_attr(trim($form->classes)); ?>" <?php echo $form->get_html_attributes(); ?>>
<?php echo $rendered_fields; ?>
<?php echo $rendered_fields; ?>
</ul>
</ul>
<?php if ($form->wrap_in_form_tag) : ?>
<?php if ($form->wrap_in_form_tag) : ?>
</form>
</form>
<?php endif; ?>
<?php endif; ?>
<?php echo $form->after; ?>
<?php echo $form->after; ?>
</div>
</div>
</div>

View File

@ -8,10 +8,10 @@
<?php if ($field->desc) : ?>
<p class="description wu-text-2xs" id="<?php echo $field->id; ?>-desc">
<p class="description wu-text-2xs" id="<?php echo $field->id; ?>-desc">
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</p>
</p>
<?php endif; ?>

View File

@ -8,16 +8,16 @@
<?php if ($field->title && is_string($field->title)) : ?>
<span class="wu-my-1 wu-text-2xs wu-uppercase wu-font-bold wu-block">
<span class="wu-my-1 wu-text-2xs wu-uppercase wu-font-bold wu-block">
<?php echo $field->title; ?>
<?php echo $field->title; ?>
<?php if ($field->tooltip) : ?>
<?php if ($field->tooltip) : ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php endif; ?>
<?php endif; ?>
</span>
</span>
<?php endif; ?>

View File

@ -7,190 +7,189 @@
?>
<div id="wp-ultimo-wrap" class="wrap wu-styling">
<div class="sm:wu-container sm:wu-mx-auto">
<div class="sm:wu-container sm:wu-mx-auto">
<h1 class="wp-heading-inline">
<h1 class="wp-heading-inline">
<?php echo $page_title; ?>
<?php echo $page_title; ?>
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
?>
?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<?php if ($action_link['icon']) : ?>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<?php endif; ?>
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo $action_link['label']; ?>
</a>
</a>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_centered_after_title', $page);
?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_centered_after_title', $page);
?>
</h1>
</h1>
<?php if (isset($_GET['updated'])) : ?>
<?php if (isset($_GET['updated'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<hr class="wp-header-end">
<hr class="wp-header-end">
<?php do_action('wu_centered_before_metaboxes', $page); ?>
<?php do_action('wu_centered_before_metaboxes', $page); ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<div id="dashboard-widgets-wrap">
<div id="dashboard-widgets-wrap">
<div id="dashboard-widgets" class="metabox-holder">
<div id="dashboard-widgets" class="metabox-holder">
<div class="wu-grid wu-grid-cols-1 md:wu-grid-cols-3 lg:wu-grid-cols-4">
<div class="wu-grid wu-grid-cols-1 md:wu-grid-cols-3 lg:wu-grid-cols-4">
<div id="postbox-container" class="wu-order-2 md:wu-order-1">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'left', null);
?>
</div>
<div id="postbox-container" class="wu-order-2 md:wu-order-1">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'left', null);
?>
</div>
<div id="postbox-container" class="md:wu-col-span-2 wu-order-1 md:wu-order-2">
<div id="postbox-container" class="md:wu-col-span-2 wu-order-1 md:wu-order-2">
<?php if ($content) : ?>
<?php if ($content) : ?>
<div class="wu-mx-2">
<div class="wu-mx-2">
<div id="wp-ultimo-checkout-element" class="postbox">
<div id="wp-ultimo-checkout-element" class="postbox">
<div class="wu-p-4 wu-flex wu-items-center wu-bg-gray-100 wu-border-solid wu-border-0 wu-border-b wu-border-gray-200 wu-leading-snug">
<div class="wu-p-4 wu-flex wu-items-center wu-bg-gray-100 wu-border-solid wu-border-0 wu-border-b wu-border-gray-200 wu-leading-snug">
<h3 class="wu-m-0 wu-widget-title">
<h3 class="wu-m-0 wu-widget-title">
<?php _e('Change Membership', 'wp-ultimo'); ?>
<?php _e('Change Membership', 'wp-ultimo'); ?>
</h3>
</h3>
</div>
</div>
<div class="wu-mx-2 wu-mt-2 wu-p-2">
<div class="wu-mx-2 wu-mt-2 wu-p-2">
<div class="inside">
<div class="inside">
<?php echo $content; ?>
<?php echo $content; ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', null);
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', null);
?>
?>
<div class="wu-px-2">
<div class="wu-px-2">
<?php
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_centered_content', $page);
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_centered_content', $page);
?>
?>
</div>
</div>
</div>
</div>
<div id="postbox-container" class="wu--mt-3 sm:wu-ml-2 wu-order-3 md:wu-order-3">
<?php
<div id="postbox-container" class="wu--mt-3 sm:wu-ml-2 wu-order-3 md:wu-order-3">
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_centered_right', $page);
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_centered_right', $page);
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'right', null);
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'right', null);
?>
</div>
?>
</div>
</div>
</div>
</div>
</div>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
</div>
</div>
<!-- dashboard-widgets-wrap -->
<!-- dashboard-widgets-wrap -->
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>

View File

@ -60,20 +60,20 @@
{{ field.name ? field.name : "<?php echo __('(no label)', 'wp-ultimo'); ?>" }}
<!-- Visibility -->
<span
<span
v-if="field.logged && field.logged == 'guests_only'"
class="wu-px-1 wu-ml-1 wu-text-xs wu-align-text-bottom wu-inline-block wu-rounded wu-bg-blue-100 wu-text-blue-600"
>
<?php echo wu_tooltip('Guests only', 'dashicons-wu-eye'); ?>
</span>
<?php echo wu_tooltip('Guests only', 'dashicons-wu-eye'); ?>
</span>
<span
<span
v-if="field.logged && field.logged == 'logged_only'"
class="wu-px-1 wu-ml-1 wu-text-xs wu-align-text-bottom wu-inline-block wu-rounded wu-bg-blue-100 wu-text-blue-600"
>
<?php echo wu_tooltip('Logged-in users only', 'dashicons-wu-eye'); ?>
</span>
<!-- Visibility - End -->
<?php echo wu_tooltip('Logged-in users only', 'dashicons-wu-eye'); ?>
</span>
<!-- Visibility - End -->
</span>
@ -82,10 +82,17 @@
<a
title="Edit Field"
class="wubox"
:href="'<?php echo wu_get_form_url('add_new_form_field', array(
'checkout_form' => $checkout_form,
'step' => '',
)); ?>=' + step_name + '&field=' + field.id"
:href="'
<?php
echo wu_get_form_url(
'add_new_form_field',
array(
'checkout_form' => $checkout_form,
'step' => '',
)
);
?>
=' + step_name + '&field=' + field.id"
>
<?php _e('Edit'); ?>
</a>

View File

@ -7,307 +7,335 @@
?>
<div id="wu-checkout-editor-app">
<!-- Add new Step Section -->
<div id="wp-ultimo-list-table-add-new-1" class="postbox wu-mb-0" v-cloak>
<div class="wu-bg-white wu-px-4 wu-py-3 wu-flex wu-items-center">
<div class="wu-w-1/2">
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php printf(__('%1$s steps and %2$s fields', 'wp-ultimo'), '{{ steps.length }}', '{{ field_count }}'); ?>
</span>
</div>
<div class="wu-w-1/2 wu-text-right">
<ul class="wu-m-0 wu-overflow-hidden wu-flex wu-justify-end">
<li class="wu-m-0 wu-ml-4">
<a
title="<?php _e('Preview', 'wp-ultimo'); ?>"
href="#"
type="button"
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
@click.prevent="get_preview()"
>
<span class="dashicons-wu-eye wu-align-middle"></span>
<span v-show="!preview"><?php _e('Preview', 'wp-ultimo'); ?></span>
<span v-cloak v-show="preview"><?php _e('Editor', 'wp-ultimo'); ?></span>
</a>
</li>
<!-- Add new Step Section -->
<div id="wp-ultimo-list-table-add-new-1" class="postbox wu-mb-0" v-cloak>
<div class="wu-bg-white wu-px-4 wu-py-3 wu-flex wu-items-center">
<div class="wu-w-1/2">
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php printf(__('%1$s steps and %2$s fields', 'wp-ultimo'), '{{ steps.length }}', '{{ field_count }}'); ?>
</span>
</div>
<div class="wu-w-1/2 wu-text-right">
<ul class="wu-m-0 wu-overflow-hidden wu-flex wu-justify-end">
<li class="wu-m-0 wu-ml-4">
<a
title="<?php _e('Preview', 'wp-ultimo'); ?>"
href="#"
type="button"
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
@click.prevent="get_preview()"
>
<span class="dashicons-wu-eye wu-align-middle"></span>
<span v-show="!preview"><?php _e('Preview', 'wp-ultimo'); ?></span>
<span v-cloak v-show="preview"><?php _e('Editor', 'wp-ultimo'); ?></span>
</a>
</li>
<li class="wu-m-0 wu-ml-4" v-show="!preview">
<a
title="<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>"
href="
<?php
echo wu_get_form_url(
'add_new_form_step',
array(
'checkout_form' => $checkout_form,
)
);
?>
"
type="button"
class="wubox wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
>
<span class="dashicons-wu-circle-with-plus wu-align-middle"></span>
<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>
</a>
</li>
</ul>
</div>
</div>
</div>
<!-- /Add new Step Section -->
<!-- Editor -->
<div
v-cloak
class="wu-px-4 wu-py-1 wu-bg-gray-200 wu-border wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-b-0"
:class="dragging ? 'is-dragging' : ''"
>
<!-- Editor Proper -->
<draggable
:list="steps"
:tag="'div'"
group="step"
handle=".hndle"
ghost-class="wu-draggable-ghost"
drag-class="wu-hide-inside"
@start="dragging = true"
@end="dragging = false"
v-show="!preview"
>
<div
:id="'wp-ultimo-list-table-' + step.id"
class="postbox wu-my-4"
v-cloak
v-for="(step, idx) in steps"
>
<div class="postbox-header">
<h2 class="hndle ui-sortable-handle">
<span class="wu-text-gray-700 ">
<span class="wu-text-2xs wu-font-mono wu-uppercase wu-mr-4"><?php printf(__('Step %s', 'wp-ultimo'), '{{ idx + 1 }}'); ?></span> {{ step.name }}
</span>
</h2>
</div>
<div class="inside" style="margin-top: 0 !important;">
<!-- Visibility -->
<div v-if="step.logged && step.logged !== 'always'" class="wu-py-2 wu-px-4 wu--mx-3 wu-bg-blue-100 wu-text-blue-600 wu-border-solid wu-border-0 wu-border-b wu-border-gray-400">
<span class="dashicons-wu-eye wu-mr-1 wu-align-middle"></span>
<span v-if="step.logged == 'guests_only'">
<?php _e('This step is only visible for <strong>guests</strong>', 'wp-ultimo'); ?>
</span>
<span v-else>
<?php _e('This step is only visible for <strong>logged-in users</strong>', 'wp-ultimo'); ?>
</span>
</div>
<!-- Visibility - End -->
<div class="wu-advanced-filters wu-widget-list-table wu--mx-3 wu--mb-3">
<div id="wu-checkout_form_section_list_table" class="wu-list-table wu-mode-list">
<wu-draggable-table
:list="step.fields"
:headers="headers"
:step_name="step.id"
></wu-draggable-table>
</div>
</div>
<div
class="wu-bg-gray-100 wu-px-4 wu-py-3 wu--m-3 wu-mt-3 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid wu-text-right">
<ul class="wu-m-0 wu-overflow-hidden md:wu-flex wu-w-full md:wu-w-auto wu-justify-end">
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
<a
v-show="delete_step_id !== step.id"
v-on:click.prevent="delete_step_id = step.id"
title="<?php _e('Delete'); ?>"
href="#"
class="wu-text-red-500 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-p-4 md:wu-p-0 wu-inline-block"
>
<?php _e('Delete Step'); ?>
</a>
<a
v-show="delete_step_id === step.id"
v-on:click.prevent="remove_step(step.id)"
title="<?php _e('Delete'); ?>"
href="#"
class="wu-text-red-700 wu-uppercase wu-text-2xs wu-font-bold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-p-4 md:wu-p-0 wu-inline-block"
>
<?php _e('Confirm?', 'wp-ultimo'); ?>
</a>
</li>
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
<a title="<?php _e('Edit Section', 'wp-ultimo'); ?>"
:href="'
<?php
echo wu_get_form_url(
'add_new_form_step',
array(
'checkout_form' => $checkout_form,
'step' => '',
)
);
?>
=' + step.id"
type="button"
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800 wubox wu-p-4 md:wu-p-0 wu-inline-block"
>
<?php _e('Edit Section', 'wp-ultimo'); ?>
</a>
<li class="wu-m-0 wu-ml-4" v-show="!preview">
<a
title="<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>"
href="<?php echo wu_get_form_url('add_new_form_step', array(
'checkout_form' => $checkout_form,
)); ?>"
type="button"
class="wubox wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
>
<span class="dashicons-wu-circle-with-plus wu-align-middle"></span>
<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>
</a>
</li>
</ul>
</div>
</div>
</div>
<!-- /Add new Step Section -->
<!-- Editor -->
<div
v-cloak
class="wu-px-4 wu-py-1 wu-bg-gray-200 wu-border wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-b-0"
:class="dragging ? 'is-dragging' : ''"
>
<!-- Editor Proper -->
<draggable
:list="steps"
:tag="'div'"
group="step"
handle=".hndle"
ghost-class="wu-draggable-ghost"
drag-class="wu-hide-inside"
@start="dragging = true"
@end="dragging = false"
v-show="!preview"
>
<div
:id="'wp-ultimo-list-table-' + step.id"
class="postbox wu-my-4"
v-cloak
v-for="(step, idx) in steps"
>
<div class="postbox-header">
<h2 class="hndle ui-sortable-handle">
<span class="wu-text-gray-700 ">
<span class="wu-text-2xs wu-font-mono wu-uppercase wu-mr-4"><?php printf(__('Step %s', 'wp-ultimo'), '{{ idx + 1 }}'); ?></span> {{ step.name }}
</span>
</h2>
</div>
<div class="inside" style="margin-top: 0 !important;">
<!-- Visibility -->
<div v-if="step.logged && step.logged !== 'always'" class="wu-py-2 wu-px-4 wu--mx-3 wu-bg-blue-100 wu-text-blue-600 wu-border-solid wu-border-0 wu-border-b wu-border-gray-400">
<span class="dashicons-wu-eye wu-mr-1 wu-align-middle"></span>
</li>
<span v-if="step.logged == 'guests_only'">
<?php _e('This step is only visible for <strong>guests</strong>', 'wp-ultimo'); ?>
</span>
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
<span v-else>
<?php _e('This step is only visible for <strong>logged-in users</strong>', 'wp-ultimo'); ?>
</span>
</div>
<!-- Visibility - End -->
<div class="wu-advanced-filters wu-widget-list-table wu--mx-3 wu--mb-3">
<div id="wu-checkout_form_section_list_table" class="wu-list-table wu-mode-list">
<wu-draggable-table
:list="step.fields"
:headers="headers"
:step_name="step.id"
></wu-draggable-table>
</div>
</div>
<div
class="wu-bg-gray-100 wu-px-4 wu-py-3 wu--m-3 wu-mt-3 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid wu-text-right">
<ul class="wu-m-0 wu-overflow-hidden md:wu-flex wu-w-full md:wu-w-auto wu-justify-end">
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
<a
v-show="delete_step_id !== step.id"
v-on:click.prevent="delete_step_id = step.id"
title="<?php _e('Delete'); ?>"
href="#"
class="wu-text-red-500 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-p-4 md:wu-p-0 wu-inline-block"
>
<?php _e('Delete Step'); ?>
</a>
<a title="<?php _e('Add new Field', 'wp-ultimo'); ?>"
:href="'
<?php
echo wu_get_form_url(
'add_new_form_field',
array(
'checkout_form' => $checkout_form,
'width' => 600,
'step' => '',
)
);
?>
=' + step.id"
type="button" class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800 wubox wu-p-4 md:wu-p-0 wu-inline-block">
<span class="dashicons-wu-circle-with-plus wu-align-text-bottom"></span>
<?php _e('Add new Field', 'wp-ultimo'); ?>
</a>
<a
v-show="delete_step_id === step.id"
v-on:click.prevent="remove_step(step.id)"
title="<?php _e('Delete'); ?>"
href="#"
class="wu-text-red-700 wu-uppercase wu-text-2xs wu-font-bold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-p-4 md:wu-p-0 wu-inline-block"
>
<?php _e('Confirm?', 'wp-ultimo'); ?>
</a>
</li>
</li>
</ul>
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
</div>
<a title="<?php _e('Edit Section', 'wp-ultimo'); ?>"
:href="'<?php echo wu_get_form_url('add_new_form_step', array(
'checkout_form' => $checkout_form,
'step' => '',
)); ?>=' + step.id"
type="button"
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800 wubox wu-p-4 md:wu-p-0 wu-inline-block"
>
<?php _e('Edit Section', 'wp-ultimo'); ?>
</a>
</div>
</li>
</div>
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
</draggable>
<!-- /Editor Proper -->
<!-- Preview Block -->
<div v-show="preview">
<div v-show="!loading_preview && !preview_error" class="wu-text-center wu-mt-3">
<a @click.prevent="get_preview('user')" href="#" class="wu-m-2 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800">
<?php _e('See as existing user', 'wp-ultimo'); ?>
</a>
<a @click.prevent="get_preview('visitor')" href="#" class="wu-m-2 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800">
<?php _e('See as visitor', 'wp-ultimo'); ?>
</a>
</div>
<!-- Preview Loading -->
<div v-show="loading_preview" class="wu-block wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400">
<span class="wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php _e('Loading Preview...', 'wp-ultimo'); ?>
</span>
</div>
<!-- /Preview Loading -->
<!-- Error -->
<div v-show="preview_error" class="wu-block wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400">
<span class="wu-text-red-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php _e('Something wrong happened along the way =(', 'wp-ultimo'); ?>
</span>
</div>
<!-- /Error -->
<!-- Preview Proper -->
<!-- <div v-show="!loading_preview && !preview_error" class="wu-block wu-p-8 wu-bg-white wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400" v-html="preview_content"></div> -->
<div v-show="!loading_preview && !preview_error" id="wu-iframe-content" class="wu-w-full wu-relative">
<a title="<?php _e('Add new Field', 'wp-ultimo'); ?>"
:href="'<?php echo wu_get_form_url('add_new_form_field', array(
'checkout_form' => $checkout_form,
'width' => 600,
'step' => '',
)); ?>=' + step.id"
type="button" class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800 wubox wu-p-4 md:wu-p-0 wu-inline-block">
<span class="dashicons-wu-circle-with-plus wu-align-text-bottom"></span>
<?php _e('Add new Field', 'wp-ultimo'); ?>
</a>
<iframe id="wp-ultimo-checkout-preview" v-bind:src="iframe_preview_url" class="wu-w-full wu-h-full wu-m-0 wu-mt-4 wu-mb-2 wu-p-0 wu-overflow-hidden wu-border-radius wu-border wu-border-solid wu-rounded wu-border-gray-400">
<?php _e('Your browser doesn\'t support iframes', 'wp-ultimo'); ?>
</iframe>
</li>
</div>
<!-- /Preview Proper -->
</ul>
</div>
<!-- /Preview Block -->
</div>
<!-- /Editor -->
</div>
<!-- Add new Step Section -->
<div id="wp-ultimo-list-table-add-new-2" class="postbox" v-cloak>
</div>
<div class="wu-bg-white wu-px-4 wu-py-3 wu-flex wu-items-center">
</div>
<div class="wu-w-1/2">
</draggable>
<!-- /Editor Proper -->
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<!-- Preview Block -->
<div v-show="preview">
<?php printf(__('%1$s steps and %2$s fields', 'wp-ultimo'), '{{ steps.length }}', '{{ field_count }}'); ?>
<div v-show="!loading_preview && !preview_error" class="wu-text-center wu-mt-3">
</span>
<a @click.prevent="get_preview('user')" href="#" class="wu-m-2 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800">
<?php _e('See as existing user', 'wp-ultimo'); ?>
</a>
</div>
<a @click.prevent="get_preview('visitor')" href="#" class="wu-m-2 wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800">
<?php _e('See as visitor', 'wp-ultimo'); ?>
</a>
<div class="wu-w-1/2 wu-text-right">
</div>
<ul class="wu-m-0 wu-overflow-hidden wu-flex wu-justify-end">
<!-- Preview Loading -->
<div v-show="loading_preview" class="wu-block wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400">
<li class="wu-m-0 wu-ml-4">
<a
title="<?php _e('Preview', 'wp-ultimo'); ?>"
href="#"
type="button"
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
@click.prevent="get_preview('user')"
>
<span class="dashicons-wu-eye wu-align-middle"></span>
<span v-show="!preview"><?php _e('Preview', 'wp-ultimo'); ?></span>
<span v-cloak v-show="preview"><?php _e('Editor', 'wp-ultimo'); ?></span>
</a>
</li>
<span class="wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php _e('Loading Preview...', 'wp-ultimo'); ?>
</span>
<li class="wu-m-0 wu-ml-4" v-show="!preview">
<a
title="<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>"
href="
<?php
echo wu_get_form_url(
'add_new_form_step',
array(
'checkout_form' => $checkout_form,
)
);
?>
"
type="button"
class="wubox wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
>
<span class="dashicons-wu-circle-with-plus wu-align-middle"></span>
<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>
</a>
</li>
</div>
<!-- /Preview Loading -->
</ul>
<!-- Error -->
<div v-show="preview_error" class="wu-block wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400">
</div>
<span class="wu-text-red-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php _e('Something wrong happened along the way =(', 'wp-ultimo'); ?>
</span>
</div>
</div>
<!-- /Error -->
</div>
<!-- /Add new Step Section -->
<!-- Preview Proper -->
<!-- <div v-show="!loading_preview && !preview_error" class="wu-block wu-p-8 wu-bg-white wu-my-4 wu-border wu-border-solid wu-rounded wu-border-gray-400" v-html="preview_content"></div> -->
<div v-show="!loading_preview && !preview_error" id="wu-iframe-content" class="wu-w-full wu-relative">
<iframe id="wp-ultimo-checkout-preview" v-bind:src="iframe_preview_url" class="wu-w-full wu-h-full wu-m-0 wu-mt-4 wu-mb-2 wu-p-0 wu-overflow-hidden wu-border-radius wu-border wu-border-solid wu-rounded wu-border-gray-400">
<?php _e('Your browser doesn\'t support iframes', 'wp-ultimo'); ?>
</iframe>
</div>
<!-- /Preview Proper -->
</div>
<!-- /Preview Block -->
</div>
<!-- /Editor -->
<!-- Add new Step Section -->
<div id="wp-ultimo-list-table-add-new-2" class="postbox" v-cloak>
<div class="wu-bg-white wu-px-4 wu-py-3 wu-flex wu-items-center">
<div class="wu-w-1/2">
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php printf(__('%1$s steps and %2$s fields', 'wp-ultimo'), '{{ steps.length }}', '{{ field_count }}'); ?>
</span>
</div>
<div class="wu-w-1/2 wu-text-right">
<ul class="wu-m-0 wu-overflow-hidden wu-flex wu-justify-end">
<li class="wu-m-0 wu-ml-4">
<a
title="<?php _e('Preview', 'wp-ultimo'); ?>"
href="#"
type="button"
class="wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
@click.prevent="get_preview('user')"
>
<span class="dashicons-wu-eye wu-align-middle"></span>
<span v-show="!preview"><?php _e('Preview', 'wp-ultimo'); ?></span>
<span v-cloak v-show="preview"><?php _e('Editor', 'wp-ultimo'); ?></span>
</a>
</li>
<li class="wu-m-0 wu-ml-4" v-show="!preview">
<a
title="<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>"
href="<?php echo wu_get_form_url('add_new_form_step', array(
'checkout_form' => $checkout_form,
)); ?>"
type="button"
class="wubox wu-uppercase wu-text-2xs wu-font-semibold wu-no-underline wu-outline-none hover:wu-shadow-none focus:wu-shadow-none wu-text-gray-600 hover:wu-text-gray-800"
>
<span class="dashicons-wu-circle-with-plus wu-align-middle"></span>
<?php _e('Add new Checkout Step', 'wp-ultimo'); ?>
</a>
</li>
</ul>
</div>
</div>
</div>
<!-- /Add new Step Section -->
<textarea class="wu-hidden" v-cloak name="_settings" v-html="JSON.stringify(steps)"></textarea>
<textarea class="wu-hidden" v-cloak name="_settings" v-html="JSON.stringify(steps)"></textarea>
</div>

View File

@ -7,130 +7,146 @@
?>
<div class="wu-border-transparent" tabindex="0">
<div class="wu-grid-item wu-border wu-border-solid wu-border-gray-300 wu-py-8 wu-bg-white wu-text-center">
<div class="wu-grid-item wu-border wu-border-solid wu-border-gray-300 wu-py-8 wu-bg-white wu-text-center">
<div
class="wu--mt-8 wu-py-8 wu-bg-gray-100 wu-bg-cover wu-bg-center"
style="opacity: 0.15; background-image: url(<?php echo get_avatar_url($item->get_user_id(), array(
'default' => 'identicon',
'size' => 320,
)); ?>)"
>
&nbsp;
</div>
<div
class="wu--mt-8 wu-py-8 wu-bg-gray-100 wu-bg-cover wu-bg-center"
style="opacity: 0.15; background-image: url(
<?php
echo get_avatar_url(
$item->get_user_id(),
array(
'default' => 'identicon',
'size' => 320,
)
);
?>
)"
>
&nbsp;
</div>
<div class="customer-avatar wu-relative wu--mt-8">
<?php echo get_avatar($item->get_user_id(), 92, 'identicon', '', array('force_display' => true, 'class' => 'wu-rounded-full wu-border wu-border-solid wu-border-gray-300 wu-bg-white')); ?>
</div>
<div class="customer-avatar wu-relative wu--mt-8">
<?php
echo get_avatar(
$item->get_user_id(),
92,
'identicon',
'',
array(
'force_display' => true,
'class' => 'wu-rounded-full wu-border wu-border-solid wu-border-gray-300 wu-bg-white',
)
);
?>
</div>
<div class="wu-text-base wu-mt-1">
<div>
<span class="wu-font-semibold"><?php echo $item->get_display_name(); ?></span>
<small>#<?php echo $item->get_id(); ?></small>
</div>
<div class="wu-text-xs wu-my-1">
<?php if ($item->get_email_address()) : ?>
<a class="wu-no-underline" href="mailto:<?php echo $item->get_email_address(); ?>">
<?php echo $item->get_email_address(); ?>
</a>
<?php else : ?>
<?php _e('No email address', 'wp-ultimo'); ?>
<?php endif; ?>
</div>
<div class="wu-text-xs">
<span class="<?php echo $item->is_vip() ? esc_attr('wu-font-semibold') : ''; ?>">
<?php echo $item->is_vip() ? __('VIP Customer', 'wp-ultimo') : __('Regular Customer', 'wp-ultimo'); ?>
</span>
</div>
</div>
<div class="wu-text-base wu-mt-1">
<div>
<span class="wu-font-semibold"><?php echo $item->get_display_name(); ?></span>
<small>#<?php echo $item->get_id(); ?></small>
</div>
<div class="wu-text-xs wu-my-1">
<?php if ($item->get_email_address()) : ?>
<a class="wu-no-underline" href="mailto:<?php echo $item->get_email_address(); ?>">
<?php echo $item->get_email_address(); ?>
</a>
<?php else : ?>
<?php _e('No email address', 'wp-ultimo'); ?>
<?php endif; ?>
</div>
<div class="wu-text-xs">
<span class="<?php echo $item->is_vip() ? esc_attr('wu-font-semibold') : ''; ?>">
<?php echo $item->is_vip() ? __('VIP Customer', 'wp-ultimo') : __('Regular Customer', 'wp-ultimo'); ?>
</span>
</div>
</div>
<div class="customer-secondary-info wu-mt-5">
<div class="customer-secondary-info wu-mt-5">
<div class="wu-flex wu-justify-between wu-border-0 wu-border-t wu-border-solid wu-border-gray-300 wu-py-2 wu-px-3">
<span>
<?php _e( 'Last Login:', 'wp-ultimo' ); ?>
</span>
<span class="wu-font-semibold">
<?php
if ($item->is_online()) {
echo '<span class="wu-inline-block wu-mr-1 wu-rounded-full wu-h-2 wu-w-2 wu-bg-green-500"></span>'.__('Online', 'wp-ultimo');
} else {
if ( '0000-00-00 00:00:00' !== $item->get_last_login() ) {
echo human_time_diff( strtotime( $item->get_last_login() ), time() ).' '.__('ago', 'wp-ultimo');
} else {
_e('Never logged in', 'wp-ultimo');
}
}
?>
</span>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-t wu-border-solid wu-border-gray-300 wu-py-2 wu-px-3">
<span>
<?php _e( 'Customer Since:', 'wp-ultimo' ); ?>
</span>
<span class="wu-font-semibold">
<?php echo human_time_diff( strtotime( $item->get_date_registered() ), time() ).' '.__('ago', 'wp-ultimo'); ?>
</span>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-t wu-border-solid wu-border-gray-300 wu-py-2 wu-px-3">
<span>
<?php _e('Last Login:', 'wp-ultimo'); ?>
</span>
<span class="wu-font-semibold">
<?php
if ($item->is_online()) {
echo '<span class="wu-inline-block wu-mr-1 wu-rounded-full wu-h-2 wu-w-2 wu-bg-green-500"></span>' . __('Online', 'wp-ultimo');
} elseif ( '0000-00-00 00:00:00' !== $item->get_last_login() ) {
echo human_time_diff(strtotime($item->get_last_login()), time()) . ' ' . __('ago', 'wp-ultimo');
} else {
_e('Never logged in', 'wp-ultimo');
}
?>
</span>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-t wu-border-solid wu-border-gray-300 wu-py-2 wu-px-3">
<span>
<?php _e('Customer Since:', 'wp-ultimo'); ?>
</span>
<span class="wu-font-semibold">
<?php echo human_time_diff(strtotime($item->get_date_registered()), time()) . ' ' . __('ago', 'wp-ultimo'); ?>
</span>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-gray-300 wu-border-t wu-border-b-0 wu-border-solid wu-py-2 wu-px-3">
<span>
<?php _e( 'Memberships:', 'wp-ultimo' ); ?>
</span>
<div>
<span class="wu-font-semibold">
<?php echo count($item->get_memberships()); ?>
</span>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-gray-300 wu-border-t wu-border-b-0 wu-border-solid wu-py-2 wu-px-3">
<span>
<?php _e('Memberships:', 'wp-ultimo'); ?>
</span>
<div>
<span class="wu-font-semibold">
<?php echo count($item->get_memberships()); ?>
</span>
<?php
if (!empty($item->get_memberships())) {
?>
<a href="<?php echo wu_network_admin_url('wp-ultimo-memberships', array( 'customer_id' => $item->get_id() ) ); ?>">
<?php _e( 'View', 'wp-ultimo' ); ?>
</a>
<?php
}
?>
<?php
if ( ! empty($item->get_memberships())) {
?>
<a href="<?php echo wu_network_admin_url('wp-ultimo-memberships', array('customer_id' => $item->get_id())); ?>">
<?php _e('View', 'wp-ultimo'); ?>
</a>
<?php
}
?>
</div>
</div>
</div>
</div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-gray-300 wu-border-t wu-border-b-0 wu-border-solid wu-py-2 wu-px-3">
<span>
<?php _e( 'Actions:', 'wp-ultimo' ); ?>
</span>
<div>
<div class="wu-flex wu-justify-between wu-border-0 wu-border-gray-300 wu-border-t wu-border-b-0 wu-border-solid wu-py-2 wu-px-3">
<span>
<?php _e('Actions:', 'wp-ultimo'); ?>
</span>
<div>
<?php
<?php
// Concatenate switch to url
$is_modal_switch_to = \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : 'wubox';
// Concatenate switch to url
$is_modal_switch_to = \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : 'wubox';
$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'));
$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(
'switch-to' => $item->get_user_id() !== get_current_user_id() ? $url_switch_to : __('None', 'wp-ultimo'),
);
$actions = array(
'switch-to' => $item->get_user_id() !== get_current_user_id() ? $url_switch_to : __('None', 'wp-ultimo'),
);
echo implode("<br />", $actions);
echo implode('<br />', $actions);
?>
?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="wu-flex wu-justify-between wu-items-center wu--mb-8 wu-p-4 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-b-0">
<div class="wu-flex wu-justify-between wu-items-center wu--mb-8 wu-p-4 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-b-0">
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?php _e( 'Select Customer', 'wp-ultimo' ); ?>
</label>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?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">
<?php _e('Manage', 'wp-ultimo'); ?>
</a>
</div>
</div>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-customer', array('id' => $item->get_id())); ?>" class="button button-primary">
<?php _e('Manage', 'wp-ultimo'); ?>
</a>
</div>
</div>
</div>

View File

@ -5,142 +5,141 @@
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-styling">
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap wu-styling">
<h1 class="wp-heading-inline">
<h1 class="wp-heading-inline">
<?php echo $page_title; ?>
<?php echo $page_title; ?>
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
?>
?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<?php if ($action_link['icon']) : ?>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<?php endif; ?>
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo $action_link['label']; ?>
</a>
</a>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_dash_after_title', $page);
?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_dash_after_title', $page);
?>
</h1>
</h1>
<hr class="wp-header-end">
<hr class="wp-header-end">
<?php do_action('wu_dash_before_metaboxes', $page); ?>
<?php do_action('wu_dash_before_metaboxes', $page); ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<div id="dashboard-widgets-wrap">
<div id="dashboard-widgets-wrap">
<div id="dashboard-widgets" class="metabox-holder">
<div id="dashboard-widgets" class="metabox-holder">
<?php if ($has_full_position) : ?>
<?php if ($has_full_position) : ?>
<div id="postbox-container" class="postbox-container wu-w-full wu--mb-5" style="width: 100% !important;">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'full', null);
?>
</div>
<div id="postbox-container" class="postbox-container wu-w-full wu--mb-5" style="width: 100% !important;">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'full', null);
?>
</div>
<div class="wu-mx-2">
<div class="wu-mx-2">
<?php do_action('wu_dash_after_full_metaboxes', $page); ?>
<?php do_action('wu_dash_after_full_metaboxes', $page); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="sm:wu-grid md:wu-grid-cols-2 xl:wu-grid-cols-3">
<div class="sm:wu-grid md:wu-grid-cols-2 xl:wu-grid-cols-3">
<div id="postbox-container" class="wu-postbox-container">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', null);
?>
</div>
<div id="postbox-container" class="wu-postbox-container">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', null);
?>
</div>
<div id="postbox-container" class="wu-postbox-container">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'side', null);
?>
</div>
<div id="postbox-container" class="wu-postbox-container">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'side', null);
?>
</div>
<div id="postbox-container" class="wu-postbox-container">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'column3', null);
?>
</div>
<div id="postbox-container" class="wu-postbox-container">
<?php
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'column3', null);
?>
</div>
</div>
</div>
</div>
</div>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
</div>
</div>
<!-- dashboard-widgets-wrap -->
<!-- dashboard-widgets-wrap -->
<?php endif; ?>
<?php endif; ?>
</div>

View File

@ -5,245 +5,250 @@
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap">
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap">
<h1 class="wp-heading-inline">
<h1 class="wp-heading-inline">
<?php echo $page->edit ? $labels['edit_label'] : $labels['add_new_label']; ?>
<?php echo $page->edit ? $labels['edit_label'] : $labels['add_new_label']; ?>
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$attrs = isset($action_link['attrs']) ? $action_link['attrs'] : '';
$attrs = isset($action_link['attrs']) ? $action_link['attrs'] : '';
?>
?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>" <?php echo $attrs; ?>>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>" <?php echo $attrs; ?>>
<?php if ($action_link['icon']) : ?>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<?php endif; ?>
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo $action_link['label']; ?>
</a>
</a>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to edit pages
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_edit_after_title', $object, $page);
?>
<?php
/**
* Allow plugin developers to add additional buttons to edit pages
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_edit_after_title', $object, $page);
?>
</h1>
</h1>
<?php if (isset($_GET['updated'])) : ?>
<?php if (isset($_GET['updated'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($_GET['notice'])) : ?>
<?php if (isset($_GET['notice'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $labels['updated_message']; ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<?php
/**
* Allow plugin developers to add additional handlers to URL query redirects
*
* @since 2.0.0
*
* @param WP_Ultimo\Admin_Pages\Base_Admin_Page $page The page object.
*/
do_action('wu_page_edit_redirect_handlers', $page);
?>
<?php
/**
* Allow plugin developers to add additional handlers to URL query redirects
*
* @since 2.0.0
*
* @param WP_Ultimo\Admin_Pages\Base_Admin_Page $page The page object.
*/
do_action('wu_page_edit_redirect_handlers', $page);
?>
<hr class="wp-header-end">
<hr class="wp-header-end">
<form id="form-<?php echo esc_attr($page->get_id()); ?>" name="post" method="post" autocomplete="off">
<form id="form-<?php echo esc_attr($page->get_id()); ?>" name="post" method="post" autocomplete="off">
<div id="poststuff">
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body" class="metabox-holder columns-2">
<?php if ($page->has_title()) : ?>
<?php if ($page->has_title()) : ?>
<div id="post-body-content">
<div id="post-body-content">
<div id="titlediv">
<div id="titlediv">
<div id="titlewrap">
<div id="titlewrap">
<input placeholder="<?php echo $labels['title_placeholder']; ?>" type="text" name="name" size="30" value="<?php echo method_exists($object, 'get_name') ? esc_attr($object->get_name()) : ''; ?>" id="title" spellcheck="true" autocomplete="off">
<input placeholder="<?php echo $labels['title_placeholder']; ?>" type="text" name="name" size="30" value="<?php echo method_exists($object, 'get_name') ? esc_attr($object->get_name()) : ''; ?>" id="title" spellcheck="true" autocomplete="off">
<?php if ( ! empty($labels['title_description'])) : ?>
<?php if (!empty($labels['title_description'])) : ?>
<span class="wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-l wu-border-b wu-border-r wu-text-xs wu-py-2 wu-p-2 wu-pt-3 wu--mt-2">
<?php echo $labels['title_description']; ?>
</span>
<span class="wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-l wu-border-b wu-border-r wu-text-xs wu-py-2 wu-p-2 wu-pt-3 wu--mt-2">
<?php echo $labels['title_description']; ?>
</span>
<?php endif; ?>
<?php endif; ?>
<?php
/**
* Allow plugin developers to add additional information below the text input
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_edit_page_after_title_input', $object, $page);
?>
<?php
/**
* Allow plugin developers to add additional information below the text input
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_edit_page_after_title_input', $object, $page);
?>
</div>
</div>
</div>
<!-- /titlediv -->
</div>
<!-- /titlediv -->
<?php if ($page->has_editor()) : ?>
<?php if ($page->has_editor()) : ?>
<div class="wu-mt-5">
<div class="wu-mt-5">
<?php remove_editor_styles(); ?>
<?php remove_editor_styles(); ?>
<?php $content = method_exists($object, 'get_content') ? esc_attr($object->get_content()) : ''; ?>
<?php
wp_editor(
html_entity_decode($content),
'content',
array(
'height' => 500,
)
);
?>
<?php $content = method_exists($object, 'get_content') ? esc_attr($object->get_content()) : ''; ?>
<?php wp_editor( html_entity_decode($content) , 'content', array(
'height' => 500,
)); ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- /post-body-content -->
</div>
<!-- /post-body-content -->
<?php endif; ?>
<?php endif; ?>
<div id="postbox-container-1" class="postbox-container">
<div id="postbox-container-1" class="postbox-container">
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'side', $object);
?>
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'side', $object);
?>
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'side-bottom', $object);
?>
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'side-bottom', $object);
?>
</div>
</div>
<div id="postbox-container-2" class="postbox-container">
<div id="postbox-container-2" class="postbox-container">
<?php
<?php
/**
* Print Normal Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', $object);
/**
* Print Normal Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', $object);
/**
* Allow developers to add additional elements after the modals are printed.
*
* @since 2.0.0
* @param object Object being edited right now
*/
do_action("wu_edit_{$screen->id}_after_normal", $object);
/**
* Allow developers to add additional elements after the modals are printed.
*
* @since 2.0.0
* @param object Object being edited right now
*/
do_action("wu_edit_{$screen->id}_after_normal", $object);
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'advanced', $object);
?>
</div>
<!-- /normal-sortables -->
/**
* Print Advanced Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'advanced', $object);
</div>
<!-- /post-body -->
?>
<br class="clear">
</div>
<!-- /normal-sortables -->
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
</div>
<!-- /post-body -->
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
<br class="clear">
<?php wp_nonce_field(sprintf('saving_%s', $page->object_id), sprintf('saving_%s', $page->object_id), false); ?>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $page->object_id), '_wpultimo_nonce'); ?>
<?php if ($page->edit) : ?>
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), sprintf('deleting_%s', $page->object_id), false); ?>
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), 'delete_wpultimo_nonce'); ?>
<input type="hidden" name="id" value="<?php echo $object->get_id(); ?>">
<?php endif; ?>
</div>
<!-- /poststuff -->
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
</form>
<?php wp_nonce_field(sprintf('saving_%s', $page->object_id), sprintf('saving_%s', $page->object_id), false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $page->object_id), '_wpultimo_nonce'); ?>
<?php if ($page->edit) : ?>
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), sprintf('deleting_%s', $page->object_id), false); ?>
<?php wp_nonce_field(sprintf('deleting_%s', $page->object_id), 'delete_wpultimo_nonce'); ?>
<input type="hidden" name="id" value="<?php echo $object->get_id(); ?>">
<?php endif; ?>
</div>
<!-- /poststuff -->
</form>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_edit_footer', $object, $page);
?>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param object Object holding the information
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_edit_footer', $object, $page);
?>
</div>

View File

@ -8,12 +8,16 @@
<?php if (empty($notes)) : ?>
<?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,
)); ?>
<?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,
)
);
?>
<?php else : ?>
@ -33,7 +37,21 @@
<div class="wu-flex wu-overflow-hidden wu-ml-3 wu-mt-1">
<?php echo wp_kses_post(get_avatar($note->author_id, 20, 'identicon', '', array('force_display' => true, 'class' => 'wu-rounded-full wu-mr-2'))); ?> <?php echo $user->display_name; ?>
<?php
echo wp_kses_post(
get_avatar(
$note->author_id,
20,
'identicon',
'',
array(
'force_display' => true,
'class' => 'wu-rounded-full wu-mr-2',
)
)
);
?>
<?php echo $user->display_name; ?>
</div>
@ -47,12 +65,14 @@
<?php if (current_user_can('delete_notes')) : ?>
<?php $modal_atts = array(
<?php
$modal_atts = array(
'object_id' => wu_request('id'),
'model' => $model,
'note_id' => $note->note_id,
'height' => 306,
); ?>
);
?>
<span class="wu-ml-2">

View File

@ -7,46 +7,46 @@
?>
<div id="preview-stage">
<div v-show="preview">
<div v-show="preview">
<div class="wu-block wu-flex wu-justify-center wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-h-screen">
<div class="wu-block wu-flex wu-justify-center wu-p-4 wu-py-8 wu-bg-white wu-text-center wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-h-screen">
<span class="wu-self-center wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<span class="wu-self-center wu-blinking-animation wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php echo _e('Loading Preview...', 'wp-ultimo'); ?>
<?php echo _e('Loading Preview...', 'wp-ultimo'); ?>
</span>
</span>
</div>
</div>
</div>
</div>
<div v-show="!preview" v-cloak>
<div v-show="!preview" v-cloak>
<div id="wp-ultimo-list-table-add-new-1" class="postbox wu-mb-0">
<div id="wp-ultimo-list-table-add-new-1" class="postbox wu-mb-0">
<div class="wu-bg-white wu-px-4 wu-py-3 wu-flex wu-items-center">
<div class="wu-bg-white wu-px-4 wu-py-3 wu-flex wu-items-center">
<div class="wu-w-1/2">
<div class="wu-w-1/2">
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php echo __('Template Preview', 'wp-ultimo'); ?>
<?php echo __('Template Preview', 'wp-ultimo'); ?>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="preview_content" class="wu-block wu-bg-gray wu-text-center wu-mb-5 wu-border wu-border-t-0 wu-border-solid wu-rounded wu-border-gray-400">
<div id="preview_content" class="wu-block wu-bg-gray wu-text-center wu-mb-5 wu-border wu-border-t-0 wu-border-solid wu-rounded wu-border-gray-400">
<iframe id="preview-stage-iframe" class="preview-stage-iframe" width="100%" style="height: <?php echo $preview_height; ?>;" frameborder="0" data-src="<?php echo esc_url($preview_iframe_url); ?>" src="<?php echo esc_url($preview_iframe_url); ?>"></iframe>
<iframe id="preview-stage-iframe" class="preview-stage-iframe" width="100%" style="height: <?php echo $preview_height; ?>;" frameborder="0" data-src="<?php echo esc_url($preview_iframe_url); ?>" src="<?php echo esc_url($preview_iframe_url); ?>"></iframe>
</div>
</div>
</div>
</div>
</div>

View File

@ -9,28 +9,28 @@
<?php if ($page->edit) : ?>
<div class="wu-advanced-filters wu-widget-list-table wu--m-3 wu--mt-1 wu--mb-3">
<div class="wu-advanced-filters wu-widget-list-table wu--m-3 wu--mt-1 wu--mb-3">
<?php $table->prepare_items(); ?>
<?php $table->prepare_items(); ?>
<!-- <form id="posts-filter" method="post"> -->
<!-- <form id="posts-filter" method="post"> -->
<input type="hidden" name="page" value="<?php echo $page->get_id(); ?>">
<input type="hidden" name="page" value="<?php echo $page->get_id(); ?>">
<?php $table->display(); ?>
<?php $table->display(); ?>
<!-- </form> -->
<!-- </form> -->
</div>
</div>
<?php else : ?>
<div class="wu-p-12 wu-h-12 wu--mt-1 wu--mx-3 wu--mb-3 wu-bg-gray-100 wu-text-gray-500 wu-text-xs wu-text-center">
<span class="dashicons dashicons-warning wu-h-8 wu-w-8 wu-mx-auto wu-text-center wu-text-4xl wu-block"></span>
<span class="wu-block wu-text-sm wu-mt-2">
<?php printf(__('%s will show up here once this item is saved.', 'wp-ultimo'), $title); ?>
</span>
</div>
<div class="wu-p-12 wu-h-12 wu--mt-1 wu--mx-3 wu--mb-3 wu-bg-gray-100 wu-text-gray-500 wu-text-xs wu-text-center">
<span class="dashicons dashicons-warning wu-h-8 wu-w-8 wu-mx-auto wu-text-center wu-text-4xl wu-block"></span>
<span class="wu-block wu-text-sm wu-mt-2">
<?php printf(__('%s will show up here once this item is saved.', 'wp-ultimo'), $title); ?>
</span>
</div>
<?php endif; ?>

View File

@ -5,18 +5,18 @@
* @since 2.0.0
*/
?>
<?php if (!empty($labels['save_description'])) : ?>
<?php if ( ! empty($labels['save_description'])) : ?>
<p class="wu-mb-5">
<?php echo $labels['save_description']; ?>
</p>
<p class="wu-mb-5">
<?php echo $labels['save_description']; ?>
</p>
<?php endif; ?>
<div class="wu-bg-gray-200 wu-p-4 wu--m-3 wu--mt-2 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
<button type="submit" name="action" value="save" class="button button-primary wu-w-full">
<?php echo $labels['save_button_label']; ?>
</button>
<button type="submit" name="action" value="save" class="button button-primary wu-w-full">
<?php echo $labels['save_button_label']; ?>
</button>
</div>

View File

@ -6,114 +6,114 @@
*/
?>
<div
class="wu-m-0"
data-wu-app="<?php echo esc_attr($html_attr['data-wu-app']); ?>"
data-state="<?php echo htmlspecialchars(json_encode(($html_attr['data-state']))); ?>"
<?php echo wu_get_isset($html_attr, 'data-on-load') ? 'data-on-load="'.esc_attr($html_attr['data-on-load']).'"' : ''; ?>
class="wu-m-0"
data-wu-app="<?php echo esc_attr($html_attr['data-wu-app']); ?>"
data-state="<?php echo htmlspecialchars(json_encode(($html_attr['data-state']))); ?>"
<?php echo wu_get_isset($html_attr, 'data-on-load') ? 'data-on-load="' . esc_attr($html_attr['data-on-load']) . '"' : ''; ?>
>
<div
class="wu-widget-inside md:wu-flex wu-flex-none md:wu--mx-3 md:wu--mb-3 wu--m-2"
v-bind:class="display_all ? 'wu-display-all' : ''"
>
<div
class="wu-widget-inside md:wu-flex wu-flex-none md:wu--mx-3 md:wu--mb-3 wu--m-2"
v-bind:class="display_all ? 'wu-display-all' : ''"
>
<div
class="wu-block md:wu-px-3 wu-w-full md:wu-w-1/4 wu-bg-gray-100 md:wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-l-0 wu-border-b-0 wu-border-r"
>
<div
class="wu-block md:wu-px-3 wu-w-full md:wu-w-1/4 wu-bg-gray-100 md:wu-border-solid wu-border-gray-400 wu-border-t-0 wu-border-l-0 wu-border-b-0 wu-border-r"
>
<ul class="wu-text-sm">
<ul class="wu-text-sm">
<ul>
<ul>
<!-- Menu Item -->
<li v-show="display_all" v-cloak>
<!-- Menu Item -->
<li v-show="display_all" v-cloak>
<!-- Menu Link -->
<a class="wu-cursor-pointer wu-block wu-py-2 wu-px-4 wu-no-underline wu-rounded wu-bg-gray-300 wu-text-gray-800">
<!-- Menu Link -->
<a class="wu-cursor-pointer wu-block wu-py-2 wu-px-4 wu-no-underline wu-rounded wu-bg-gray-300 wu-text-gray-800">
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons dashicons-wu-chevron-with-circle-down">&nbsp;</span>
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons dashicons-wu-chevron-with-circle-down">&nbsp;</span>
<?php _e('All Options', 'wp-ultimo'); ?>
<?php _e('All Options', 'wp-ultimo'); ?>
</a>
<!-- End Menu Link -->
</a>
<!-- End Menu Link -->
</li>
<!-- End Menu Item -->
</li>
<!-- End Menu Item -->
<?php foreach ($sections as $section_id => $section) : ?>
<?php foreach ($sections as $section_id => $section) : ?>
<!-- Menu Item -->
<li v-show="!display_all && <?php echo esc_attr($section['v-show']); ?>">
<!-- Menu Item -->
<li v-show="!display_all && <?php echo esc_attr($section['v-show']); ?>">
<!-- Menu Link -->
<a
class="wu-cursor-pointer wu-block md:wu-py-2 md:wu-px-4 wu-p-4 wu-no-underline wu-rounded wu-text-gray-600"
v-bind:class="section == '<?php echo esc_attr($section_id); ?>' ? 'wu-bg-gray-300 wu-text-gray-800' : ''"
v-on:click.prevent="section = '<?php echo esc_attr($section_id); ?>'"
>
<!-- Menu Link -->
<a
class="wu-cursor-pointer wu-block md:wu-py-2 md:wu-px-4 wu-p-4 wu-no-underline wu-rounded wu-text-gray-600"
v-bind:class="section == '<?php echo esc_attr($section_id); ?>' ? 'wu-bg-gray-300 wu-text-gray-800' : ''"
v-on:click.prevent="section = '<?php echo esc_attr($section_id); ?>'"
>
<?php if ($section['icon']) : ?>
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons <?php echo esc_attr($section['icon']); ?>">&nbsp;</span>
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons <?php echo esc_attr($section['icon']); ?>">&nbsp;</span>
<?php else : ?>
<?php else : ?>
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons dashicons-wu-sound-mix">&nbsp;</span>
<span class="wu-text-base wu-w-4 wu-h-4 wu-pt-2px wu-mr-1 dashicons dashicons-wu-sound-mix">&nbsp;</span>
<?php endif; ?>
<?php endif; ?>
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
</a>
<!-- End Menu Link -->
</li>
<!-- End Menu Item -->
</li>
<!-- End Menu Item -->
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
<a v-on:click="display_all = !display_all;" class="wu-cursor-pointer wu-block wu-py-2 wu-px-4 wu-pt-10 wu-no-underline wu-text-xs wu-rounded">
<a v-on:click="display_all = !display_all;" class="wu-cursor-pointer wu-block wu-py-2 wu-px-4 wu-pt-10 wu-no-underline wu-text-xs wu-rounded">
<span v-show="!display_all">
<span v-show="!display_all">
<?php _e('Display all fields', 'wp-ultimo'); ?>
<?php _e('Display all fields', 'wp-ultimo'); ?>
</span>
</span>
<span v-cloak v-show="display_all">
<span v-cloak v-show="display_all">
<?php _e('Hide other fields', 'wp-ultimo'); ?>
<?php _e('Hide other fields', 'wp-ultimo'); ?>
</span>
</span>
</a>
</a>
</ul>
</ul>
</div>
</div>
<div class="md:wu-w-3/4 wu-w-full">
<div class="md:wu-w-3/4 wu-w-full">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700">
<span class="wu-blinking-animation">
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php _e('Loading...', 'wp-ultimo'); ?>
</span>
</span>
</div>
</div>
<?php foreach ($sections as $section_id => $section) : ?>
<?php foreach ($sections as $section_id => $section) : ?>
<div
class="wu-tab-content"
v-cloak
id="<?php echo esc_attr("wu_tab_$section_id"); ?>"
>
<div
class="wu-tab-content"
v-cloak
id="<?php echo esc_attr("wu_tab_$section_id"); ?>"
>
<?php
@ -124,14 +124,14 @@
?>
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>
</div>
<?php echo $after; ?>
<?php echo $after; ?>
</div>

View File

@ -6,56 +6,56 @@
*/
?>
<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;" : ''; ?>"
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;' : ''; ?>"
>
<div class="wu-block wu-p-4 md:wu-pt-12 wu-self-center">
<div class="wu-block wu-p-4 md:wu-pt-12 wu-self-center">
<span class="wu-block wu-text-2xl wu-text-gray-600">
<span class="wu-block wu-text-2xl wu-text-gray-600">
<?php echo $message; ?>
<?php echo $message; ?>
</span>
</span>
<?php if (!empty($link_url)) : ?>
<?php if ( ! empty($link_url)) : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo $sub_message; ?>
<?php echo $sub_message; ?>
</div>
</div>
<div>
<div>
<a
href="<?php echo esc_attr($link_url); ?>"
title="<?php echo esc_attr($link_label); ?>"
class="button button-primary button-hero <?php echo esc_attr($link_classes); ?>"
>
<a
href="<?php echo esc_attr($link_url); ?>"
title="<?php echo esc_attr($link_label); ?>"
class="button button-primary button-hero <?php echo esc_attr($link_classes); ?>"
>
<?php if (!empty($link_icon)) : ?>
<?php if ( ! empty($link_icon)) : ?>
<span class="<?php echo esc_attr($link_icon); ?> wu-align-middle"></span>
<span class="<?php echo esc_attr($link_icon); ?> wu-align-middle"></span>
<?php endif; ?>
<?php endif; ?>
<?php echo $link_label; ?>
<?php echo $link_label; ?>
</a>
</a>
</div>
</div>
<?php else : ?>
<?php else : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo $sub_message; ?>
<?php echo $sub_message; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>

View File

@ -6,214 +6,214 @@
*/
?>
<div
id="<?php echo esc_attr($filters_el_id); ?>"
class="wp-filter wu-filter <?php echo !$table->has_items() ? 'wu-opacity-50 wu-pointer-events-none' : ''; ?>"
id="<?php echo esc_attr($filters_el_id); ?>"
class="wp-filter wu-filter <?php echo ! $table->has_items() ? 'wu-opacity-50 wu-pointer-events-none' : ''; ?>"
>
<?php if (!empty($views)) : ?>
<?php if ( ! empty($views)) : ?>
<ul class="filter-links">
<ul class="filter-links">
<?php foreach ($views as $view_slug => $view) : ?>
<?php foreach ($views as $view_slug => $view) : ?>
<li
class="<?php echo wu_request($view['field'], 'all') == $view_slug ? esc_attr('current') : ''; ?>"
:class="view && view === '<?php echo esc_attr($view_slug); ?>' ? 'current wu-font-medium' : ''"
>
<a
v-on:click.prevent="set_view('<?php echo esc_attr($view['field']); ?>', '<?php echo esc_attr($view_slug); ?>')"
href="<?php echo esc_attr($view['url']); ?>"
class="<?php echo wu_request($view['field'], 'all') == $view_slug ? esc_attr('current wu-font-medium') : ''; ?>"
:class="view && view === '<?php echo esc_attr($view_slug); ?>' ? 'current wu-font-medium' : ''"
>
<li
class="<?php echo wu_request($view['field'], 'all') == $view_slug ? esc_attr('current') : ''; ?>"
:class="view && view === '<?php echo esc_attr($view_slug); ?>' ? 'current wu-font-medium' : ''"
>
<a
v-on:click.prevent="set_view('<?php echo esc_attr($view['field']); ?>', '<?php echo esc_attr($view_slug); ?>')"
href="<?php echo esc_attr($view['url']); ?>"
class="<?php echo wu_request($view['field'], 'all') == $view_slug ? esc_attr('current wu-font-medium') : ''; ?>"
:class="view && view === '<?php echo esc_attr($view_slug); ?>' ? 'current wu-font-medium' : ''"
>
<?php echo esc_attr($view['label']); ?>
<?php echo esc_attr($view['label']); ?>
</a>
</li>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
<?php endif; ?>
<?php endif; ?>
<?php if (false) : ?>
<?php if (false) : ?>
<button
v-show="!open"
v-on:click.prevent="open_filters"
type="button"
class="button drawer-toggle"
v-bind:aria-expanded="open ? 'true' : 'false'"
>
<?php _e('Advanced Filters', 'wp-ultimo'); ?>
</button>
<button
v-show="!open"
v-on:click.prevent="open_filters"
type="button"
class="button drawer-toggle"
v-bind:aria-expanded="open ? 'true' : 'false'"
>
<?php _e('Advanced Filters', 'wp-ultimo'); ?>
</button>
<div class="wu-py-3 wu-px-2 wu-inline-block wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs" v-show="open" v-cloak>
<?php _e('Advanced Filters', 'wp-ultimo'); ?>
</div>
<div class="wu-py-3 wu-px-2 wu-inline-block wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs" v-show="open" v-cloak>
<?php _e('Advanced Filters', 'wp-ultimo'); ?>
</div>
<button
v-show="open"
v-on:click.prevent="close_filters"
type="button"
class="button drawer-toggle"
>
<?php _e('Close', 'wp-ultimo'); ?>
</button>
<button
v-show="open"
v-on:click.prevent="close_filters"
type="button"
class="button drawer-toggle"
>
<?php _e('Close', 'wp-ultimo'); ?>
</button>
<?php endif; ?>
<?php endif; ?>
<form class="search-form">
<form class="search-form">
<?php if (isset($has_search) && $has_search) : ?>
<?php if (isset($has_search) && $has_search) : ?>
<label class="screen-reader-text" for="wp-filter-search-input">
<?php echo esc_html($search_label); ?>
</label>
<label class="screen-reader-text" for="wp-filter-search-input">
<?php echo esc_html($search_label); ?>
</label>
<input
name='s' id="s"
value="<?php echo esc_attr(isset($_REQUEST['s']) ? $_REQUEST['s'] : ''); ?>"
placeholder="<?php echo esc_attr($search_label); ?>"
type="search"
aria-describedby="live-search-desc"
id="wp-filter-search-input"
class="wp-filter-search"
>
<input
name='s' id="s"
value="<?php echo esc_attr(isset($_REQUEST['s']) ? $_REQUEST['s'] : ''); ?>"
placeholder="<?php echo esc_attr($search_label); ?>"
type="search"
aria-describedby="live-search-desc"
id="wp-filter-search-input"
class="wp-filter-search"
>
<?php endif; ?>
<?php endif; ?>
</form>
</form>
<?php if (isset($has_view_switch) && $has_view_switch) : ?>
<?php if (isset($has_view_switch) && $has_view_switch) : ?>
<?php $table->view_switcher($table->current_mode); ?>
<?php $table->view_switcher($table->current_mode); ?>
<?php endif; ?>
<?php endif; ?>
<div v-cloak v-show="false" class="wu-hidden">
<div v-cloak v-show="false" class="wu-hidden">
<div class="wu-clear-both"></div>
<div class="wu-clear-both"></div>
<div class="wu-mb-3">
<div class="wu-mb-3">
<div
v-for="(filter, index) in filters"
class="wu-row wu-flex wu-p-4 wu-mt-0 wu-my-3 wu-bg-gray-100 wu-rounded wu-border wu-border-solid wu-border-gray-200"
>
<div
v-for="(filter, index) in filters"
class="wu-row wu-flex wu-p-4 wu-mt-0 wu-my-3 wu-bg-gray-100 wu-rounded wu-border wu-border-solid wu-border-gray-200"
>
<div class="wu-w-1/12 wu-mx-2 wu-text-right wu-self-center">
<div class="wu-w-1/12 wu-mx-2 wu-text-right wu-self-center">
<span
class="wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs"
v-if="index === 0"
>
<?php _e('Where', 'wp-ultimo'); ?>
</span>
<span
class="wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs"
v-if="index === 0"
>
<?php _e('Where', 'wp-ultimo'); ?>
</span>
<select
class="form-control wu-w-full"
v-if="index === 1"
v-model="relation"
>
<option value="and"><?php _e('and', 'wp-ultimo'); ?></option>
<option value="or"><?php _e('or', 'wp-ultimo'); ?></option>
</select>
<select
class="form-control wu-w-full"
v-if="index === 1"
v-model="relation"
>
<option value="and"><?php _e('and', 'wp-ultimo'); ?></option>
<option value="or"><?php _e('or', 'wp-ultimo'); ?></option>
</select>
<span
class="wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs"
v-if="index > 1"
>
<span v-show="relation === 'and'"><?php _e('and', 'wp-ultimo'); ?></span>
<span v-show="relation === 'or'"><?php _e('or', 'wp-ultimo'); ?></span>
</span>
<span
class="wu-uppercase wu-font-semibold wu-text-gray-600 wu-text-xs"
v-if="index > 1"
>
<span v-show="relation === 'and'"><?php _e('and', 'wp-ultimo'); ?></span>
<span v-show="relation === 'or'"><?php _e('or', 'wp-ultimo'); ?></span>
</span>
</div>
</div>
<div class="wu-w-2/12">
<div class="wu-w-2/12">
<select class="form-control wu-w-full" v-model="filter.field">
<select class="form-control wu-w-full" v-model="filter.field">
<option
v-for="available_filter in available_filters"
:value="available_filter.field"
v-html="available_filter.label"
>
&nbsp;
</option>
<option
v-for="available_filter in available_filters"
:value="available_filter.field"
v-html="available_filter.label"
>
&nbsp;
</option>
</select>
</select>
</div>
</div>
<div class="wu-w-2/12 wu-mx-2">
<div class="wu-w-2/12 wu-mx-2">
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'bool'" v-model="filter.value">
<option value="1"><?php _e('is true.', 'wp-ultimo'); ?></option>
<option value="0"><?php _e('is false.', 'wp-ultimo'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'bool'" v-model="filter.value">
<option value="1"><?php _e('is true.', 'wp-ultimo'); ?></option>
<option value="0"><?php _e('is false.', 'wp-ultimo'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'text'" v-bind:value="get_filter_rule(filter.field)">
<option value="is"><?php _e('is', 'wp-ultimo'); ?></option>
<option value="is_not"><?php _e('is not', 'wp-ultimo'); ?></option>
<option value="contains"><?php _e('contains', 'wp-ultimo'); ?></option>
<option value="does_not_contain"><?php _e('does not contain', 'wp-ultimo'); ?></option>
<option value="starts_with"><?php _e('starts with', 'wp-ultimo'); ?></option>
<option value="ends_with"><?php _e('ends with', 'wp-ultimo'); ?></option>
<option value="is_empty"><?php _e('is empty.', 'wp-ultimo'); ?></option>
<option value="is_not_empty"><?php _e('is not empty.', 'wp-ultimo'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'text'" v-bind:value="get_filter_rule(filter.field)">
<option value="is"><?php _e('is', 'wp-ultimo'); ?></option>
<option value="is_not"><?php _e('is not', 'wp-ultimo'); ?></option>
<option value="contains"><?php _e('contains', 'wp-ultimo'); ?></option>
<option value="does_not_contain"><?php _e('does not contain', 'wp-ultimo'); ?></option>
<option value="starts_with"><?php _e('starts with', 'wp-ultimo'); ?></option>
<option value="ends_with"><?php _e('ends with', 'wp-ultimo'); ?></option>
<option value="is_empty"><?php _e('is empty.', 'wp-ultimo'); ?></option>
<option value="is_not_empty"><?php _e('is not empty.', 'wp-ultimo'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'date'" v-bind:value="get_filter_rule(filter.field)">
<option value="before"><?php _e('is before', 'wp-ultimo'); ?></option>
<option value="after"><?php _e('is after', 'wp-ultimo'); ?></option>
</select>
<select class="form-control wu-w-full" v-if="get_filter_type(filter.field) == 'date'" v-bind:value="get_filter_rule(filter.field)">
<option value="before"><?php _e('is before', 'wp-ultimo'); ?></option>
<option value="after"><?php _e('is after', 'wp-ultimo'); ?></option>
</select>
</div>
</div>
<div class="wu-w-2/12">
<div class="wu-w-2/12">
<input
type="text"
class="form-control wu-w-full"
placeholder="<?php esc_attr_e('Value', 'wp-ultimo'); ?>"
v-if="_.contains(['text', 'date'], get_filter_type(filter.field)) && !_.contains(['is_empty', 'is_not_empty'], filter.rule)"
v-model="filter.value"
/>
<input
type="text"
class="form-control wu-w-full"
placeholder="<?php esc_attr_e('Value', 'wp-ultimo'); ?>"
v-if="_.contains(['text', 'date'], get_filter_type(filter.field)) && !_.contains(['is_empty', 'is_not_empty'], filter.rule)"
v-model="filter.value"
/>
</div>
</div>
<div class="wu-w-2/12 wu-self-center wu-mx-3">
<div class="wu-w-2/12 wu-self-center wu-mx-3">
<a
href="#"
v-on:click.prevent="remove_filter(index)"
class="button"
v-show="index > 0"
>
<?php _e('Remove Filter', 'wp-ultimo'); ?>
</a>
<a
href="#"
v-on:click.prevent="remove_filter(index)"
class="button"
v-show="index > 0"
>
<?php _e('Remove Filter', 'wp-ultimo'); ?>
</a>
</div>
</div>
<div class="wu-w-3/12 wu-self-center">
<div class="wu-w-3/12 wu-self-center">
<a
href="#"
v-on:click.prevent="add_new_filter"
class="button button-primary wu-float-right"
v-show="index === filters.length - 1"
>
<?php _e('Add new Filter', 'wp-ultimo'); ?>
</a>
<a
href="#"
v-on:click.prevent="add_new_filter"
class="button button-primary wu-float-right"
v-show="index === filters.length - 1"
>
<?php _e('Add new Filter', 'wp-ultimo'); ?>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,11 +7,11 @@
?>
<?php $table->display_tablenav('top'); ?>
<div class="wu-mt-4 <?php echo implode( ' ', $table->get_table_classes() ); ?>">
<div class="wu-mt-4 <?php echo implode(' ', $table->get_table_classes()); ?>">
<div id="the-list" class="wu-grid-content wu-grid wu-gap-4 wu-grid-cols-1 md:wu-grid-cols-2 lg:wu-grid-cols-3 xl:wu-grid-cols-4">
<div id="the-list" class="wu-grid-content wu-grid wu-gap-4 wu-grid-cols-1 md:wu-grid-cols-2 lg:wu-grid-cols-3 xl:wu-grid-cols-4">
<?php $table->display_rows_or_placeholder(); ?>
<?php $table->display_rows_or_placeholder(); ?>
</div>
</div>
</div>

View File

@ -5,113 +5,112 @@
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<h1 class="wp-heading-inline">
<?php echo $page->get_title(); ?>
<?php echo $page->get_title(); ?>
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
?>
?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<?php if ($action_link['icon']) : ?>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<?php endif; ?>
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo $action_link['label']; ?>
</a>
</a>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_list_after_title', $page);
?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_list_after_title', $page);
?>
</h1>
</h1>
<?php if (isset($_GET['deleted'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $page->get_labels()['deleted_message']; ?></p>
</div>
<?php endif; ?>
<?php if (isset($_GET['deleted'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $page->get_labels()['deleted_message']; ?></p>
</div>
<?php endif; ?>
<?php
/**
* Allow plugin developers to add additional handlers to URL query redirects
*
* @since 2.0.0
*
* @param WP_Ultimo\Admin_Pages\Base_Admin_Page $page The page object.
*/
do_action('wu_page_list_redirect_handlers', $page);
?>
<?php
/**
* Allow plugin developers to add additional handlers to URL query redirects
*
* @since 2.0.0
*
* @param WP_Ultimo\Admin_Pages\Base_Admin_Page $page The page object.
*/
do_action('wu_page_list_redirect_handlers', $page);
?>
<hr class="wp-header-end">
<hr class="wp-header-end">
<div id="poststuff">
<div id="poststuff">
<div id="post-body" class="">
<div id="post-body" class="">
<div id="post-body-content">
<div id="post-body-content">
<div class="">
<div class="">
<?php $table->prepare_items(); ?>
<?php $table->prepare_items(); ?>
<?php $table->filters(); ?>
<?php $table->filters(); ?>
<form id="posts-filter" method="post">
<form id="posts-filter" method="post">
<input type="hidden" name="page" value="<?php echo $page->get_id(); ?>">
<input type="hidden" name="page" value="<?php echo $page->get_id(); ?>">
<?php $table->display(); ?>
<?php $table->display(); ?>
</form>
</form>
</div>
<!-- /ui-sortable -->
</div>
<!-- /ui-sortable -->
</div>
<!-- /post-body-content -->
</div>
<!-- /post-body-content -->
</div>
<!-- /post-body -->
</div>
<!-- /post-body -->
<br class="clear">
<br class="clear">
</div>
<!-- /poststuff -->
</div>
<!-- /poststuff -->
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_list_footer', $page);
?>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_list_footer', $page);
?>
</div>

View File

@ -7,15 +7,15 @@
?>
<div class="wu-border-transparent wu-flex wu-flex-col wu-justify-end" tabindex="0">
<div class="wu-border wu-border-solid wu-border-gray-300 wu-pb-8 wu-bg-white wu-flex wu-flex-col wu-h-full" >
<div class="wu-border wu-border-solid wu-border-gray-300 wu-pb-8 wu-bg-white wu-flex wu-flex-col wu-h-full" >
<div class="wu-relative wu-flex-grow">
<div class="wu-relative wu-flex-grow">
<?php
$featured_image = $item->get_featured_image('wu-thumb-medium');
if ($featured_image) {
?>
?>
<img
style="opacity: 0.6; height: 16rem;"
class="wu-w-full"
@ -25,9 +25,9 @@
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
</div>
<?php
<?php
} else {
?>
?>
<div class="wu-w-full wu-bg-gray-200 wu-rounded wu-text-gray-600 wu-flex wu-items-center wu-justify-center wu-mr-3" style="height: 16rem;">
<span class="dashicons-wu-image wu-text-6xl"></span>
</div>
@ -35,39 +35,39 @@
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
</div>
<?php
<?php
}
?>
</div>
</div>
<div class="wu-text-base wu-mt-1 wu-px-3 wu-mt-3">
<div class="wu-text-base wu-mt-1 wu-px-3 wu-mt-3">
<div>
<span class="wu-font-semibold"><?php echo $item->get_name(); ?></span>
<!-- <small><?php echo $item->get_price_description(); ?></small> -->
</div>
<div>
<span class="wu-font-semibold"><?php echo $item->get_name(); ?></span>
<!-- <small><?php echo $item->get_price_description(); ?></small> -->
</div>
<div class="wu-text-xs wu-my-1">
<?php echo $item->get_price_description(); ?>
</div>
<div class="wu-text-xs wu-my-1">
<?php echo $item->get_price_description(); ?>
</div>
</div>
</div>
<div class="site-secondary-info wu-mt-3"></div>
<div class="site-secondary-info wu-mt-3"></div>
<div class="wu-flex wu-justify-between wu-items-center wu--mb-8 wu-p-4 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-b-0">
<div class="wu-flex wu-justify-between wu-items-center wu--mb-8 wu-p-4 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-b-0">
<!-- <label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?php _e( 'Select Site', 'wp-ultimo' ); ?>
</label> -->
<!-- <label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?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">
<?php _e('Read More', 'wp-ultimo'); ?>
</a>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-product', array('id' => $item->get_id())); ?>" class="button button-primary">
<?php _e('Read More', 'wp-ultimo'); ?>
</a>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,122 +7,136 @@
?>
<div class="wu-block">
<div class="wu-p-2 wu-flex">
<div class="wu-p-2 wu-flex">
<?php if ($args['image']) : ?>
<?php if ($args['image']) : ?>
<div class="wu-flex-shrink wu-mr-4 wu-items-center wu-justify-between wu-flex">
<div class="wu-flex-shrink wu-mr-4 wu-items-center wu-justify-between wu-flex">
<?php echo $args['image']; ?>
<?php echo $args['image']; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<div class="wu-flex-grow">
<div class="wu-flex-grow">
<div class="wu-flex wu-items-center wu-justify-between">
<div class="wu-flex wu-items-center wu-justify-between">
<span class="wu-font-semibold wu-truncate wu-text-gray-700">
<span class="wu-font-semibold wu-truncate wu-text-gray-700">
<?php echo $args['title']; ?>
<?php echo $args['title']; ?>
<?php if ($args['id']) : ?>
<?php if ($args['id']) : ?>
<span class="wu-font-normal wu-text-xs">(#<?php echo $args['id']; ?>)</span>
<span class="wu-font-normal wu-text-xs">(#<?php echo $args['id']; ?>)</span>
<?php endif; ?>
<?php endif; ?>
</span>
</span>
<div class="wu-ml-2 wu-flex-shrink-0 wu-flex">
<div class="wu-ml-2 wu-flex-shrink-0 wu-flex">
<?php echo $args['status']; ?>
<?php echo $args['status']; ?>
</div>
</div>
</div>
</div>
<div class="sm:wu-flex sm:wu-justify-between wu-mt-1">
<div class="sm:wu-flex sm:wu-justify-between wu-mt-1">
<div class="sm:wu-flex">
<div class="sm:wu-flex">
<?php $first = true; foreach ($first_row as $slug => $item) : $w_classes = wu_get_isset($item, 'wrapper_classes', ''); ?>
<?php
$first = true;
foreach ($first_row as $slug => $item) :
$w_classes = wu_get_isset($item, 'wrapper_classes', '');
?>
<?php if (wu_get_isset($item, 'url')) : ?>
<?php if (wu_get_isset($item, 'url')) : ?>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo !$first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo $item['value']; ?>
</a>
</a>
<?php else : ?>
<?php else : ?>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo !$first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo $item['value']; ?>
</span>
</span>
<?php endif; ?>
<?php endif; ?>
<?php $first = false; endforeach; ?>
<?php
$first = false;
endforeach;
?>
</div>
</div>
<div class="sm:wu-flex wu-items-center wu-text-xs wu-text-gray-600 sm:wu-mt-0">
<div class="sm:wu-flex wu-items-center wu-text-xs wu-text-gray-600 sm:wu-mt-0">
<?php $first = true; foreach ($second_row as $slug => $item) : $w_classes = wu_get_isset($item, 'wrapper_classes', ''); ?>
<?php
$first = true;
foreach ($second_row as $slug => $item) :
$w_classes = wu_get_isset($item, 'wrapper_classes', '');
?>
<?php if (wu_get_isset($item, 'url')) : ?>
<?php if (wu_get_isset($item, 'url')) : ?>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo !$first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<a title="<?php echo wu_get_isset($item, 'value', ''); ?>" href="<?php echo esc_attr($item['url']); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?>" <?php echo wu_tooltip_text($item['label']); ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo $item['value']; ?>
</a>
</a>
<?php else : ?>
<?php else : ?>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo !$first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?> " <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="wu-flex wu-items-center wu-text-xs wu-text-gray-600 <?php echo ! $first ? 'sm:wu-mt-0 sm:wu-ml-6' : ''; ?> <?php echo $w_classes; ?> " <?php echo wu_get_isset($item, 'label') ? wu_tooltip_text($item['label']) : ''; ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
<?php echo $item['value']; ?>
</span>
</span>
<?php endif; ?>
<?php endif; ?>
<?php $first = false; endforeach; ?>
<?php
$first = false;
endforeach;
?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php if ($args['url']) : ?>
<?php if ($args['url']) : ?>
<div class="wu-flex wu-ml-5 wu-flex-shrink-0 wu-items-center wu-justify-between">
<div class="wu-flex wu-ml-5 wu-flex-shrink-0 wu-items-center wu-justify-between">
<a href="<?php echo esc_attr($args['url']); ?>" title="<?php esc_attr_e('View', 'wp-ultimo'); ?>">
<svg class="wu-h-5 wu-w-5 wu-text-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
</a>
<a href="<?php echo esc_attr($args['url']); ?>" title="<?php esc_attr_e('View', 'wp-ultimo'); ?>">
<svg class="wu-h-5 wu-w-5 wu-text-gray-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
</svg>
</a>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>

View File

@ -5,307 +5,300 @@
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container(); ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<h1 class="wp-heading-inline">
<?php echo $page->get_title(); ?>
<?php echo $page->get_title(); ?>
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
<?php
/**
* You can filter the get_title_link using wu_page_list_get_title_link, see class-wu-page-list.php
*
* @since 1.8.2
*/
foreach ($page->get_title_links() as $action_link) :
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
?>
?>
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<a title="<?php echo esc_attr($action_link['label']); ?>" href="<?php echo esc_url($action_link['url']); ?>" class="page-title-action <?php echo esc_attr($action_classes); ?>">
<?php if ($action_link['icon']) : ?>
<?php if ($action_link['icon']) : ?>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<span class="dashicons dashicons-<?php echo esc_attr($action_link['icon']); ?> wu-text-sm wu-align-middle wu-h-4 wu-w-4">
&nbsp;
</span>
<?php endif; ?>
<?php endif; ?>
<?php echo $action_link['label']; ?>
<?php echo $action_link['label']; ?>
</a>
</a>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_wizard_after_title', $page);
?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_wizard_after_title', $page);
?>
</h1>
</h1>
<?php if (wu_request('updated')) : ?>
<?php if (wu_request('updated')) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php _e('Settings successfully saved.', 'wp-ultimo'); ?></p>
</div>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php _e('Settings successfully saved.', 'wp-ultimo') ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<hr class="wp-header-end">
<hr class="wp-header-end">
<form method="post">
<form method="post">
<div id="poststuff" class="sm:wu-grid sm:wu-grid-cols-12 wu-gap-4">
<div id="poststuff" class="sm:wu-grid sm:wu-grid-cols-12 wu-gap-4">
<div class="sm:wu-col-span-4 lg:wu-col-span-2">
<div class="sm:wu-col-span-4 lg:wu-col-span-2">
<div class="wu-py-4 wu-relative">
<div class="wu-py-4 wu-relative">
<input
data-model='setting'
data-value-field="setting_id"
data-label-field="title"
data-search-field="setting_id"
data-max-items="1"
selected type="text"
placeholder="Search Setting"
class="wu-w-full"
>
<input
data-model='setting'
data-value-field="setting_id"
data-label-field="title"
data-search-field="setting_id"
data-max-items="1"
selected type="text"
placeholder="Search Setting"
class="wu-w-full"
>
</div>
</div>
<div data-wu-app="settings_menu" data-state="{}">
<div data-wu-app="settings_menu" data-state="{}">
<!-- Navigator -->
<ul>
<!-- Navigator -->
<ul>
<li class="md:wu-hidden wu-p-4 wu-font-bold wu-uppercase wu-text-xs wu-text-gray-700">
<li class="md:wu-hidden wu-p-4 wu-font-bold wu-uppercase wu-text-xs wu-text-gray-700">
<?php _e('Menu', 'wp-ultimo'); ?>
<?php _e('Menu', 'wp-ultimo'); ?>
</li>
</li>
<?php
<?php
/**
* We need to set a couple of flags in here to control clickable navigation elements.
* This flag makes sure only steps the user already went through are clickable.
*/
$is_pre_current_section = true;
/**
* We need to set a couple of flags in here to control clickable navigation elements.
* This flag makes sure only steps the user already went through are clickable.
*/
$is_pre_current_section = true;
/**
* Holds add-on menus
*/
$addons = array();
/**
* Holds add-on menus
*/
$addons = array();
?>
?>
<?php foreach ($sections as $section_name => $section) : ?>
<?php foreach ($sections as $section_name => $section) : ?>
<?php
<?php
if (wu_get_isset($section, 'invisible')) {
continue; // skip add-ons for now.
if (wu_get_isset($section, 'invisible')) {
} // end if;
continue; // skip add-ons for now.
if (wu_get_isset($section, 'addon')) {
$addons[ $section_name ] = $section;
} // end if;
continue; // skip add-ons for now.
if (wu_get_isset($section, 'addon')) {
} // end if;
$addons[$section_name] = $section;
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
continue; // skip add-ons for now.
?>
} // end if;
<!-- Menu Item -->
<li id="tab-selector-<?php echo esc_attr($section_name); ?>" class="wu-sticky">
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
<!-- Menu Link -->
<a
id="tab-selector-<?php echo esc_attr($section_name); ?>-link"
href="<?php echo esc_url($page->get_section_link($section_name)); ?>"
class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo ! $clickable_navigation && ! $is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>"
>
$is_pre_current_section = false;
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
} // end if;
<?php echo $section['title']; ?>
?>
</a>
<!-- End Menu Link -->
<!-- Menu Item -->
<li id="tab-selector-<?php echo esc_attr($section_name); ?>" class="wu-sticky">
<?php if ( ! empty($section['sub-sections'])) : ?>
<!-- Menu Link -->
<a
id="tab-selector-<?php echo esc_attr($section_name); ?>-link"
href="<?php echo esc_url($page->get_section_link($section_name)); ?>"
class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo !$clickable_navigation && !$is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>"
>
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<?php echo $section['title']; ?>
<li class="classes">
<a href="<?php echo esc_url($page->get_section_link($section_name) . '#' . $sub_section_name); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
</a>
<!-- End Menu Link -->
<?php endforeach; ?>
<?php if (!empty($section['sub-sections'])) : ?>
</ul>
<!-- End Sub-menu -->
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<?php endif; ?>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
</li>
<!-- End Menu Item -->
<li class="classes">
<a href="<?php echo esc_url($page->get_section_link($section_name)."#".$sub_section_name); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
<!-- End Navigator -->
</ul>
<!-- End Sub-menu -->
<?php if ( ! empty($addons)) : ?>
<?php endif; ?>
<!-- Addon Navigator -->
<ul class="wu-pt-4">
</li>
<!-- End Menu Item -->
<li class="wu-px-4 wu-font-bold wu-uppercase wu-text-xs wu-text-gray-700">
<?php _e('Add-ons', 'wp-ultimo'); ?>
</li>
<?php endforeach; ?>
<?php foreach ($addons as $section_name => $section) : ?>
</ul>
<!-- End Navigator -->
<?php
<?php if (!empty($addons)) : ?>
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
<!-- Addon Navigator -->
<ul class="wu-pt-4">
?>
<li class="wu-px-4 wu-font-bold wu-uppercase wu-text-xs wu-text-gray-700">
<?php _e('Add-ons', 'wp-ultimo'); ?>
</li>
<!-- Menu Item -->
<li class="wu-sticky">
<?php foreach ($addons as $section_name => $section) : ?>
<!-- Menu Link -->
<a href="<?php echo esc_url($page->get_section_link($section_name)); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo ! $clickable_navigation && ! $is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>">
<?php
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
<?php echo $section['title']; ?>
$is_pre_current_section = false;
</a>
<!-- End Menu Link -->
} // end if;
<?php if ( ! empty($section['sub-sections'])) : ?>
?>
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<!-- Menu Item -->
<li class="wu-sticky">
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<!-- Menu Link -->
<a href="<?php echo esc_url($page->get_section_link($section_name)); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo !$clickable_navigation && !$is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>">
<li class="classes">
<a href="<?php echo esc_url($page->get_section_link($section_name) . '#' . $sub_section_name); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php endforeach; ?>
<?php echo $section['title']; ?>
</ul>
<!-- End Sub-menu -->
</a>
<!-- End Menu Link -->
<?php endif; ?>
<?php if (!empty($section['sub-sections'])) : ?>
</li>
<!-- End Menu Item -->
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<?php endforeach; ?>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
</ul>
<!-- End Addon Navigator -->
<li class="classes">
<a href="<?php echo esc_url($page->get_section_link($section_name)."#".$sub_section_name); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
<?php endif; ?>
<?php endforeach; ?>
</div>
</ul>
<!-- End Sub-menu -->
</div>
<?php endif; ?>
<div class="sm:wu-col-span-8 lg:wu-col-span-6 metabox-holder">
</li>
<!-- End Menu Item -->
<div class="wu-relative">
<?php endforeach; ?>
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', false);
?>
</ul>
<!-- End Addon Navigator -->
</div>
<?php endif; ?>
</div>
</div>
<div class="sm:wu-col-span-8 sm:wu-col-start-5 lg:wu-col-span-3 lg:wu-col-start-10 metabox-holder">
</div>
<?php
/**
* Print Normal Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes('wu_settings_admin_page', 'side', false);
?>
<div class="sm:wu-col-span-8 lg:wu-col-span-6 metabox-holder">
</div>
<div class="wu-relative">
</div>
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', false);
?>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_wizard_footer', $page);
?>
</div>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), sprintf('saving_%s', $current_section), false); ?>
</div>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), '_wpultimo_nonce'); ?>
<div class="sm:wu-col-span-8 sm:wu-col-start-5 lg:wu-col-span-3 lg:wu-col-start-10 metabox-holder">
<?php
/**
* Print Normal Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes('wu_settings_admin_page', 'side', false);
?>
</div>
</div>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_wizard_footer', $page);
?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), sprintf('saving_%s', $current_section), false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), '_wpultimo_nonce'); ?>
</form>
</form>
</div>
@ -323,7 +316,7 @@ settings_loader = wu_block_ui('#wp-ultimo-wizard-body');
*/
function remove_block_ui() {
settings_loader.unblock();
settings_loader.unblock();
} // end remove_block_ui;

View File

@ -7,78 +7,78 @@
?>
<div class="wu-border-transparent" tabindex="0">
<div class="wu-grid-item wu-border wu-border-solid wu-border-gray-300 wu-pb-8 wu-bg-white">
<div class="wu-grid-item wu-border wu-border-solid wu-border-gray-300 wu-pb-8 wu-bg-white">
<div class="wu-relative wu-bg-gray-100" style="max-height: 220px; overflow: hidden;">
<div class="wu-relative wu-bg-gray-100" style="max-height: 220px; overflow: hidden;">
<img
style="opacity: 0.6;"
class="wu-w-full wu-h-auto wu-image-preview"
data-image="<?php echo $item->get_featured_image('large'); ?>"
src="<?php echo $item->get_featured_image('wu-thumb-medium'); ?>"
/>
<img
style="opacity: 0.6;"
class="wu-w-full wu-h-auto wu-image-preview"
data-image="<?php echo $item->get_featured_image('large'); ?>"
src="<?php echo $item->get_featured_image('wu-thumb-medium'); ?>"
/>
<?php if (current_user_can('wu_read_sites')) : ?>
<?php if (current_user_can('wu_read_sites')) : ?>
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
</div>
<div class="wu-my-4 wu-mx-3 wu-inline-block wu-absolute wu-bottom-0 wu-right-0 wu-rounded wu-px-2 wu-py-1 wu-uppercase wu-text-xs wu-font-bold <?php echo esc_attr($item->get_type_class()); ?>">
<?php echo $item->get_type_label(); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="wu-text-base wu-px-3 wu-my-3">
<div class="wu-text-base wu-px-3 wu-my-3">
<div>
<span class="wu-font-semibold"><?php echo $item->get_title(); ?></span>
<small><?php echo $item->get_id() ? '#'.$item->get_id() : ''; ?></small>
</div>
<div>
<span class="wu-font-semibold"><?php echo $item->get_title(); ?></span>
<small><?php echo $item->get_id() ? '#' . $item->get_id() : ''; ?></small>
</div>
<div class="wu-text-xs wu-my-1">
<a class="wu-no-underline" href="<?php echo $item->get_active_site_url(); ?>"><?php echo $item->get_active_site_url(); ?></a>
</div>
<div class="wu-text-xs wu-my-1">
<a class="wu-no-underline" href="<?php echo $item->get_active_site_url(); ?>"><?php echo $item->get_active_site_url(); ?></a>
</div>
</div>
</div>
<div class="wu-flex wu-justify-between wu-items-center wu--mb-8 wu-p-4 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-b-0">
<div class="wu-flex wu-justify-between wu-items-center wu--mb-8 wu-p-4 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-b-0">
<?php if ($item->get_type() !== 'main') : ?>
<?php if ($item->get_type() !== 'main') : ?>
<?php if ($item->get_type() === 'pending') : ?>
<?php if ($item->get_type() === 'pending') : ?>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_membership_id(); ?>" />
<?php _e( 'Select Site', 'wp-ultimo' ); ?>
</label>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_membership_id(); ?>" />
<?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">
<?php _e('Publish Site', 'wp-ultimo'); ?>
</a>
<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">
<?php _e('Publish Site', 'wp-ultimo'); ?>
</a>
<?php else : ?>
<?php else : ?>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?php _e( 'Select Site', 'wp-ultimo' ); ?>
</label>
<label>
<input class="wu-rounded-none" type="checkbox" name="bulk-delete[]" value="<?php echo $item->get_id(); ?>" />
<?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">
<?php _e('Manage', 'wp-ultimo'); ?>
</a>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', array('id' => $item->get_id())); ?>" class="button button-primary">
<?php _e('Manage', 'wp-ultimo'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
<?php else : ?>
<?php else : ?>
<span>&nbsp;</span>
<span>&nbsp;</span>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', array('id' => $item->get_id())); ?>" class="button button-primary">
<?php _e('See Main Site', 'wp-ultimo'); ?>
</a>
<a href="<?php echo wu_network_admin_url('wp-ultimo-edit-site', array('id' => $item->get_id())); ?>" class="button button-primary">
<?php _e('See Main Site', 'wp-ultimo'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,66 +7,66 @@
?>
<div id="wp-ultimo-wrap" class="wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<!-- This is here for admin notices placement only -->
</h1>
<h1 class="wp-heading-inline">
<!-- This is here for admin notices placement only -->
</h1>
<?php if ($logo) : ?>
<?php if ($logo) : ?>
<div class="wu-text-center">
<div class="wu-text-center">
<img style="width: 200px;" src="<?php echo esc_attr($logo); ?>" alt="">
<img style="width: 200px;" src="<?php echo esc_attr($logo); ?>" alt="">
</div>
<?php endif; ?>
<?php if (isset($_GET['deleted'])) : ?>
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<p><?php echo $page->labels['deleted_message']; ?></p>
</div>
</div>
<?php endif; ?>
<hr class="wp-header-end">
<?php if (isset($_GET['deleted'])) : ?>
<div id="poststuff" class="md:wu-flex wu-mr-4 md:wu-mr-0">
<div id="message" class="updated notice wu-admin-notice notice-success is-dismissible below-h2">
<div class="md:wu-w-2/12 wu-pt-10">
<p><?php echo $page->labels['deleted_message']; ?></p>
<span class="wu-uppercase wu-block wu-px-4 wu-text-gray-700 wu-font-bold">
</div>
<?php echo $page->get_title(); ?>
<?php endif; ?>
</span>
<hr class="wp-header-end">
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_wizard_after_title', $page);
?>
<div id="poststuff" class="md:wu-flex wu-mr-4 md:wu-mr-0">
<!-- Navigator -->
<ul class="">
<div class="md:wu-w-2/12 wu-pt-10">
<?php
<span class="wu-uppercase wu-block wu-px-4 wu-text-gray-700 wu-font-bold">
/**
* We need to set a couple of flags in here to control clickable navigation elements.
* This flag makes sure only steps the user already went through are clickable.
*/
$is_pre_current_section = true;
<?php echo $page->get_title(); ?>
?>
</span>
<?php foreach ($sections as $section_name => $section) : ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Multisite WaaS Page instance
*/
do_action('wu_page_wizard_after_title', $page);
?>
<!-- Navigator -->
<ul class="">
<?php
/**
* We need to set a couple of flags in here to control clickable navigation elements.
* This flag makes sure only steps the user already went through are clickable.
*/
$is_pre_current_section = true;
?>
<?php foreach ($sections as $section_name => $section) : ?>
<?php
@ -74,88 +74,86 @@
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
?>
<?php if (wu_get_isset($section, 'separator')) : ?>
<?php if (wu_get_isset($section, 'separator')) : ?>
<!-- Separator Item -->
<li class="wu-sticky wu-py-2 wu-px-4">&nbsp;</li>
<!-- Separator Item -->
<li class="wu-sticky wu-py-2 wu-px-4">&nbsp;</li>
<?php else : ?>
<?php else : ?>
<!-- Menu Item -->
<li class="wu-sticky">
<!-- Menu Item -->
<li class="wu-sticky">
<!-- Menu Link -->
<a href="<?php echo esc_url($page->get_section_link($section_name)); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo !$clickable_navigation && !$is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>">
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
<!-- Menu Link -->
<a href="<?php echo esc_url($page->get_section_link($section_name)); ?>" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-sm wu-rounded <?php echo ! $clickable_navigation && ! $is_pre_current_section ? 'wu-pointer-events-none' : ''; ?> <?php echo $current_section === $section_name ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'; ?>">
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
<?php if (!empty($section['sub-sections'])) : ?>
<?php if ( ! empty($section['sub-sections'])) : ?>
<!-- Sub-menu -->
<ul class="classes">
<!-- Sub-menu -->
<ul class="classes">
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<li class="classes">
<a href="#" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
<li class="classes">
<a href="#" class="wu-block wu-py-2 wu-px-4 wu-no-underline wu-text-gray-500 hover:wu-text-gray-600 wu-text-sm">
&rarr; <?php echo $sub_section['title']; ?>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
<!-- End Sub-menu -->
</ul>
<!-- End Sub-menu -->
<?php endif; ?>
<?php endif; ?>
</li>
<!-- End Menu Item -->
</li>
<!-- End Menu Item -->
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
<!-- End Navigator -->
</ul>
<!-- End Navigator -->
</div>
</div>
<div class="md:wu-w-8/12 wu-px-4 metabox-holder">
<div class="md:wu-w-8/12 wu-px-4 metabox-holder">
<form method="post" id="<?php echo esc_attr($form_id); ?>">
<form method="post" id="<?php echo esc_attr($form_id); ?>">
<?php
<?php
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', false);
/**
* Print Side Metaboxes
*
* Allow plugin developers to add new metaboxes
*
* @since 1.8.2
* @param object Object being edited right now
*/
do_meta_boxes($screen->id, 'normal', false);
?>
?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), sprintf('saving_%s', $current_section), false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), sprintf('saving_%s', $current_section), false); ?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), '_wpultimo_nonce'); ?>
<?php wp_nonce_field(sprintf('saving_%s', $current_section), '_wpultimo_nonce'); ?>
</form>
</form>
</div>
</div>
</div>
</div>
<?php
/**

View File

@ -8,17 +8,17 @@
<!-- Submit Box -->
<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($page->get_prev_section_link()); ?>" class="wu-self-center button button-large wu-float-left">
<?php _e('&larr; Go Back', 'wp-ultimo'); ?>
</a>
<a href="<?php echo esc_url($page->get_prev_section_link()); ?>" class="wu-self-center button button-large wu-float-left">
<?php _e('&larr; Go Back', 'wp-ultimo'); ?>
</a>
<span class="wu-self-center wu-content-center wu-flex">
<span class="wu-self-center wu-content-center wu-flex">
<button name="submit" value="1" class="button button-primary button-large">
<?php _e('Continue', 'wp-ultimo'); ?>
</button>
<button name="submit" value="1" class="button button-primary button-large">
<?php _e('Continue', 'wp-ultimo'); ?>
</button>
</span>
</span>
</div>
<!-- End Submit Box -->

View File

@ -15,105 +15,104 @@
* @version 1.4.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
} // end if;
?>
<?php if (!$is_editor) : ?>
<?php if ( ! $is_editor) : ?>
<!DOCTYPE html>
<html style="">
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo $subject; ?></title>
</head>
<!DOCTYPE html>
<html style="">
<head>
<meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo $subject; ?></title>
</head>
<?php endif; ?>
<body style="line-height: 1.6em; -webkit-font-smoothing: antialiased; height: 100%; -webkit-text-size-adjust: none; width: 100% !important; margin: 0; padding: 0; background-color:#f6f6f6">
<table style="line-height: 1.6em; width: 100%; margin: 0; padding: 20px;">
<tr style="">
<td style=""></td>
<td style="line-height: 1.6em; clear: both !important; display: block !important; max-width: 600px !important; margin: 0 auto; padding: 20px; border: 1px solid #f0f0f0;background-color:#FFFFFF">
<div style="line-height: 1.6em; display: block; max-width: 600px; margin: 0 auto; padding: 0;">
<table style="line-height: 1.6em; width: 100%; margin: 0; padding: 0;">
<tr>
<td style="background: <?php echo $template_settings['background_color']; ?>; text-align: center; padding: 20px 40px; /* margin: -20px; */">
<a style="" href="<?php echo $site_url; ?>">
<?php if ($template_settings['use_custom_logo'] && $template_settings['custom_logo']) : ?>
<body style="line-height: 1.6em; -webkit-font-smoothing: antialiased; height: 100%; -webkit-text-size-adjust: none; width: 100% !important; margin: 0; padding: 0; background-color:#f6f6f6">
<table style="line-height: 1.6em; width: 100%; margin: 0; padding: 20px;">
<tr style="">
<td style=""></td>
<td style="line-height: 1.6em; clear: both !important; display: block !important; max-width: 600px !important; margin: 0 auto; padding: 20px; border: 1px solid #f0f0f0;background-color:#FFFFFF">
<div style="line-height: 1.6em; display: block; max-width: 600px; margin: 0 auto; padding: 0;">
<table style="line-height: 1.6em; width: 100%; margin: 0; padding: 0;">
<tr>
<td style="background: <?php echo $template_settings['background_color']; ?>; text-align: center; padding: 20px 40px; /* margin: -20px; */">
<a style="" href="<?php echo $site_url; ?>">
<?php if ($template_settings['use_custom_logo'] && $template_settings['custom_logo']) : ?>
<img style="max-width: 280px; width: auto; max-height: 70px;" src="<?php echo wp_get_attachment_url($template_settings['custom_logo']); ?>" alt="<?php echo esc_attr($site_name); ?>">
<img style="max-width: 280px; width: auto; max-height: 70px;" src="<?php echo wp_get_attachment_url($template_settings['custom_logo']); ?>" alt="<?php echo esc_attr($site_name); ?>">
<?php else : ?>
<?php else : ?>
<img style="max-width: 280px; width: auto; max-height: 70px;" src="<?php echo esc_attr($logo_url); ?>" alt="<?php echo esc_attr($site_name); ?>">
<img style="max-width: 280px; width: auto; max-height: 70px;" src="<?php echo esc_attr($logo_url); ?>" alt="<?php echo esc_attr($site_name); ?>">
<?php endif; ?>
</a>
</td>
</tr>
<tr style="">
<td style="">
<span style="font-family: <?php echo $template_settings['content_font']; ?>; font-size: 14px; line-height: 1.6em; color: <?php echo $template_settings['content_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['content_align']; ?>;"><?php echo $content; ?></span>
<br>
</td>
</tr>
</table>
</div>
</td>
<td style=""></td>
</tr>
</table>
<table style="line-height: 1.6em; clear: both !important; width: 100%; margin: 0; padding: 0;">
<tr style="">
<td style=""></td>
<td style="line-height: 1.6em; clear: both !important; display: block !important; max-width: 600px !important; margin: 0 auto; padding: 0;">
<div style="line-height: 1.6em; display: block; max-width: 600px; margin: 0 auto; padding: 0;">
<table style="line-height: 1.6em; width: 100%; margin: 0; padding: 0;">
<?php endif; ?>
</a>
</td>
</tr>
<tr style="">
<td style="">
<span style="font-family: <?php echo $template_settings['content_font']; ?>; font-size: 14px; line-height: 1.6em; color: <?php echo $template_settings['content_color']; ?>; font-weight: normal; margin: 0 0 10px; padding: 0; text-align: <?php echo $template_settings['content_align']; ?>;"><?php echo $content; ?></span>
<br>
</td>
</tr>
</table>
</div>
</td>
<td style=""></td>
</tr>
</table>
<table style="line-height: 1.6em; clear: both !important; width: 100%; margin: 0; padding: 0;">
<tr style="">
<td style=""></td>
<td style="line-height: 1.6em; clear: both !important; display: block !important; max-width: 600px !important; margin: 0 auto; padding: 0;">
<div style="line-height: 1.6em; display: block; max-width: 600px; margin: 0 auto; padding: 0;">
<table style="line-height: 1.6em; width: 100%; margin: 0; padding: 0;">
<?php if ($template_settings['footer_text']) : ?>
<?php if ($template_settings['footer_text']) : ?>
<tr style="">
<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']; ?>">
<tr style="">
<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']; ?>">
<?php echo $template_settings['footer_text']; ?>
</p>
</td>
</tr>
</p>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
<?php if ($template_settings['display_company_address']) : ?>
<tr style="">
<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 if ($template_settings['display_company_address']) : ?>
<tr style="">
<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())); ?>
</p>
</td>
</tr>
<?php endif; ?>
</p>
</td>
</tr>
<?php endif; ?>
<tr style="">
<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']; ?>">
<a href="<?php echo $site_url; ?>" style="line-height: 1.6em; color: #999999; margin: 0; padding: 0;">
<?php echo esc_attr($site_name); ?>
</a>
</p>
</td>
</tr>
</table>
</div>
</td>
<td style=""></td>
</tr>
</table>
</body>
<?php if (!$is_editor) : ?>
</html>
<?php endif; ?>
<tr style="">
<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']; ?>">
<a href="<?php echo $site_url; ?>" style="line-height: 1.6em; color: #999999; margin: 0; padding: 0;">
<?php echo esc_attr($site_name); ?>
</a>
</p>
</td>
</tr>
</table>
</div>
</td>
<td style=""></td>
</tr>
</table>
</body>
<?php if ( ! $is_editor) : ?>
</html>
<?php endif; ?>

View File

@ -15,8 +15,8 @@
* @version 1.4.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
}
?>

View File

@ -7,64 +7,64 @@
?>
<div class="<?php echo esc_attr($wrapper_class); ?>">
<?php if ($targets) : ?>
<?php if ($targets) : ?>
<ul class="wu-widget-list">
<ul class="wu-widget-list">
<?php foreach ($targets as $target_key => $target) : ?>
<?php foreach ($targets as $target_key => $target) : ?>
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-200 wu-border-solid">
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-200 wu-border-solid">
<a title="<?php echo $target['display_name']; ?>" href='<?php echo $target['link'] ?>' class='<?php echo $modal_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 title="<?php echo $target['display_name']; ?>" href='<?php echo $target['link']; ?>' class='<?php echo $modal_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-6 wu-w-6 wu-rounded-full wu-ring-2 wu-mx-4 wu-my-2 wu-box-border wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center">
<div class="wu-flex wu-relative wu-h-6 wu-w-6 wu-rounded-full wu-ring-2 wu-mx-4 wu-my-2 wu-box-border wu-ring-white wu-bg-gray-300 wu-items-center wu-justify-center">
<?php echo $target['avatar']; ?>
<?php echo $target['avatar']; ?>
</div>
</div>
<div class='wu-pl-2'>
<div class='wu-pl-2'>
<strong class='wu-block'><?php echo $target['display_name']; ?><small class='wu-font-normal'> (#<?php echo $target['id']; ?>)</small></strong>
<strong class='wu-block'><?php echo $target['display_name']; ?><small class='wu-font-normal'> (#<?php echo $target['id']; ?>)</small></strong>
<small><?php echo $target['description']; ?></small>
<small><?php echo $target['description']; ?></small>
</div>
</div>
</a>
</a>
</li>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
<?php else : ?>
<?php else : ?>
<ul class="wu-widget-list">
<ul class="wu-widget-list">
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
<li class="wu-p-2 wu-m-0 wu-border-t wu-border-l-0 wu-border-r-0 wu-border-b-0 wu-border-gray-400 wu-border-solid">
<div class="wu-p-2 wu-mr-1 wu-flex wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-white wu-relative wu-overflow-hidden">
<div class="wu-p-2 wu-mr-1 wu-flex wu-rounded wu-items-center wu-border wu-border-solid wu-border-gray-300 wu-bg-white wu-relative wu-overflow-hidden">
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'>&nbsp;</span>
<span class='dashicons dashicons-wu-block wu-text-gray-600 wu-px-1 wu-pr-3'>&nbsp;</span>
<div class=''>
<div class=''>
<span class='wu-block wu-py-3 wu-text-gray-600 wu-text-2xs wu-font-bold wu-uppercase'>
<span class='wu-block wu-py-3 wu-text-gray-600 wu-text-2xs wu-font-bold wu-uppercase'>
<?php echo esc_html(__('No Targets', 'wp-ultimo')); ?>
<?php echo esc_html(__('No Targets', 'wp-ultimo')); ?>
</span>
</span>
</div>
</div>
</div>
</div>
</li>
</li>
</ul>
</ul>
<?php endif; ?>
<?php endif; ?>
</div>

View File

@ -7,26 +7,26 @@
?>
<div class="wu-styling">
<p>Thank you for your membership to wphunt.org. Your Teste 2 membership is now active.</p>
<p>Thank you for your membership to wphunt.org. Your Teste 2 membership is now active.</p>
<p>Below are details about your membership account and a receipt for your initial membership invoice. A welcome email with a copy of your initial membership invoice has been sent to arindo@wpultimo.com.</p>
<p>Below are details about your membership account and a receipt for your initial membership invoice. A welcome email with a copy of your initial membership invoice has been sent to arindo@wpultimo.com.</p>
<p>Extra message</p>
<p>Extra message</p>
<h3>
<h3>
Invoice #DF232BD72B on May 2, 2020
</h3>
<a class="pmpro_a-print" href="javascript:window.print()">Print</a>
<a class="pmpro_a-print" href="javascript:window.print()">Print</a>
<ul>
<ul>
<li><strong>Account:</strong> aanduque (arindo@wpultimo.com)</li>
<li><strong>Membership Level:</strong> Teste 2</li>
</ul>
<hr>
<hr>
<div class="pmpro_invoice_details">
<div class="pmpro_invoice_details">
<div class="pmpro_invoice-billing-address">
<strong>Billing Address</strong>
<p>Quynn Mullins<br>
@ -49,14 +49,14 @@
</div>
<hr>
<hr>
<nav id="nav-below" class="navigation" role="navigation">
<nav id="nav-below" class="navigation" role="navigation">
<div class="nav-next alignright">
<div class="nav-next alignright">
<a href="https://wphunt.org/?page_id=28">View Your Membership Account →</a>
</div>
</nav>
</nav>
</div>

View File

@ -7,40 +7,48 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>[]" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>[]" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo $option_name; ?>
<?php echo $option_name; ?>
</label>
</label>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,28 +7,32 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<?php echo $field->title; ?>
<?php echo $field->title; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</label>
</label>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,59 +7,70 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<span class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
<span class="wu-block wu-w-full <?php echo esc_attr($field->classes); ?>">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$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(
'classes' => '',
),
));
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$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(
'classes' => '',
),
)
);
$form->render();
$form->render();
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->desc) : ?>
<?php if ($field->desc) : ?>
<span class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<span class="wu-mt-2 wu-block wu-bg-gray-100 wu-rounded wu-border-solid wu-border-gray-400 wu-border-t wu-border-l wu-border-b wu-border-r wu-text-2xs wu-py-2 wu-p-2">
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</span>
</span>
<?php endif; ?>
</span>
</span>
</div>

View File

@ -8,15 +8,15 @@
<?php if (is_array($field->value)) : ?>
<?php foreach ($field->value as $index => $value) : ?>
<?php foreach ($field->value as $index => $value) : ?>
<input id="field-<?php echo esc_attr($field->id).'-'.esc_attr($index); ?>" name="<?php echo esc_attr($field->id); ?>[]" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input id="field-<?php echo esc_attr($field->id) . '-' . esc_attr($index); ?>" name="<?php echo esc_attr($field->id); ?>[]" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($value); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php endforeach; ?>
<?php endforeach; ?>
<?php else : ?>
<input id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php endif; ?>
@ -24,10 +24,14 @@
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>

View File

@ -8,46 +8,58 @@
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<div class="wu-block wu-w-full">
<div class="wu-block wu-w-full">
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
/**
* Adds the partial description template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-description', array(
'field' => $field,
));
/**
* Adds the partial description template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-description',
array(
'field' => $field,
)
);
?>
?>
<div class="wu-block wu-w-full wu-mt-4">
<div class="wu-block wu-w-full wu-mt-4">
<?php echo $field->content; ?>
<?php echo $field->content; ?>
</div>
</div>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>
</div>
</div>

View File

@ -8,6 +8,6 @@
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</div>

View File

@ -7,49 +7,57 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php if ($field->meter) : ?>
<?php if ($field->meter) : ?>
<span class="wu-block">
<span class="wu-block">
<span id="pass-strength-result" class="wu-py-2 wu-px-4 wu-bg-gray-100 wu-block wu-text-sm">
<span id="pass-strength-result" class="wu-py-2 wu-px-4 wu-bg-gray-100 wu-block wu-text-sm">
<?php _e('Strength Meter', 'wp-ultimo'); ?>
<?php _e('Strength Meter', 'wp-ultimo'); ?>
</span>
</span>
</span>
</span>
<?php endif; ?>
<?php endif; ?>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
<!--
<div class="wu-border-red-300"></div>
<div class="wu-border-yellow-300"></div>
-->
<!--
<div class="wu-border-red-300"></div>
<div class="wu-border-yellow-300"></div>
-->
</div>

View File

@ -10,70 +10,79 @@ $active_gateways = wu_get_active_gateway_as_options();
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" v-cloak v-show="order && order.should_collect_payment" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php foreach ($active_gateways as $option_value => $option_name) : ?>
<?php foreach ($active_gateways as $option_value => $option_name) : ?>
<?php if (count($active_gateways) === 1) : ?>
<?php if (count($active_gateways) === 1) : ?>
<input
id="field-gateway"
type="hidden"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
<?php echo $field->get_html_attributes(); ?>
>
<input
id="field-gateway"
type="hidden"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
<?php echo $field->get_html_attributes(); ?>
>
<?php else : ?>
<?php else : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input
id="field-gateway-<?php echo esc_attr($option_value); ?>"
type="radio"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
class="<?php echo trim($field->classes); ?>"
<?php echo $field->get_html_attributes(); ?>
<?php checked($field->value == $option_value); ?>
>
<input
id="field-gateway-<?php echo esc_attr($option_value); ?>"
type="radio"
name="gateway"
value="<?php echo esc_attr($option_value); ?>"
v-model="gateway"
class="<?php echo trim($field->classes); ?>"
<?php echo $field->get_html_attributes(); ?>
<?php checked($field->value == $option_value); ?>
>
<?php echo $option_name; ?>
<?php echo $option_name; ?>
</label>
</label>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
/**
* Load Gateway fields
* @since 2.0.0
*/
do_action('wu_checkout_gateway_fields');
/**
* Load Gateway fields
*
* @since 2.0.0
*/
do_action('wu_checkout_gateway_fields');
?>
?>
</div>

View File

@ -7,40 +7,48 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php foreach (wu_get_plans() as $option) : ?>
<?php foreach (wu_get_plans() as $option) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option->get_id()); ?>">
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option->get_id()); ?>">
<input id="field-products-<?php echo esc_attr($option->get_id()); ?>" type="checkbox" name="products[]" value="<?php echo esc_attr($option->get_id()); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option->get_id()); ?> v-model="products">
<input id="field-products-<?php echo esc_attr($option->get_id()); ?>" type="checkbox" name="products[]" value="<?php echo esc_attr($option->get_id()); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option->get_id()); ?> v-model="products">
<?php echo $option->get_name(); ?>
<?php echo $option->get_name(); ?>
</label>
</label>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,40 +7,48 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<?php foreach ($field->options as $option_value => $option_name) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>-<?php echo esc_attr($option_value); ?>">
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<input id="field-gateway-<?php echo esc_attr($option_value); ?>" type="radio" name="<?php echo esc_attr($field->id); ?>" value="<?php echo esc_attr($option_value); ?>" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value == $option_value); ?>>
<?php echo $option_name; ?>
<?php echo $option_name; ?>
</label>
</label>
<?php endforeach; ?>
<?php endforeach; ?>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,61 +7,69 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<select
class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>"
id="field-<?php echo esc_attr($field->id); ?>"
name="<?php echo esc_attr($field->id); ?>"
value="<?php echo esc_attr($field->value); ?>"
<?php echo $field->get_html_attributes(); ?>
>
<select
class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>"
id="field-<?php echo esc_attr($field->id); ?>"
name="<?php echo esc_attr($field->id); ?>"
value="<?php echo esc_attr($field->value); ?>"
<?php echo $field->get_html_attributes(); ?>
>
<?php if ($field->placeholder) : ?>
<?php if ($field->placeholder) : ?>
<option <?php checked(!$field->value); ?> class="wu-opacity-75"><?php echo $field->placeholder; ?></option>
<option <?php checked(! $field->value); ?> class="wu-opacity-75"><?php echo $field->placeholder; ?></option>
<?php endif; ?>
<?php endif; ?>
<?php foreach ($field->options as $key => $label) : ?>
<?php foreach ($field->options as $key => $label) : ?>
<option
value="<?php echo esc_attr($key); ?>"
<?php checked($key, $field->value); ?>
>
<?php echo $label; ?>
</option>
<option
value="<?php echo esc_attr($key); ?>"
<?php checked($key, $field->value); ?>
>
<?php echo $label; ?>
</option>
<?php endforeach; ?>
<?php endforeach; ?>
<?php if ($field->options_template) : ?>
<?php if ($field->options_template) : ?>
<?php echo $field->options_template; ?>
<?php echo $field->options_template; ?>
<?php endif; ?>
<?php endif; ?>
</select>
</select>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,10 +7,10 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<button id="<?php echo esc_attr($field->id); ?>-btn" type="submit" name="<?php echo esc_attr($field->id); ?>-btn" <?php echo $field->get_html_attributes(); ?> class="button <?php echo esc_attr(trim($field->classes)); ?>">
<button id="<?php echo esc_attr($field->id); ?>-btn" type="submit" name="<?php echo esc_attr($field->id); ?>-btn" <?php echo $field->get_html_attributes(); ?> class="button <?php echo esc_attr(trim($field->classes)); ?>">
<?php echo $field->title; ?>
<?php echo $field->title; ?>
</button>
</button>
</div>

View File

@ -7,54 +7,62 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<?php
<?php
/**
* Adds the partial title template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-title', array(
'field' => $field,
));
/**
* Adds the partial title template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-title',
array(
'field' => $field,
)
);
?>
?>
<?php if ($field->prefix) : ?>
<?php if ($field->prefix) : ?>
<div class="sm:wu-flex wu-items-stretch wu-content-center">
<div class="sm:wu-flex wu-items-stretch wu-content-center">
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? array()); ?>>
<?php echo $field->prefix; ?>
</div>
<div <?php echo wu_array_to_html_attrs($field->prefix_html_attr ?? array()); ?>>
<?php echo $field->prefix; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<input class="form-control wu-w-full wu-my-1 <?php echo esc_attr(trim($field->classes)); ?>" id="field-<?php echo esc_attr($field->id); ?>" name="<?php echo esc_attr($field->id); ?>" type="<?php echo esc_attr($field->type); ?>" placeholder="<?php echo esc_attr($field->placeholder); ?>" value="<?php echo esc_attr($field->value); ?>" <?php echo $field->get_html_attributes(); ?>>
<?php if ($field->suffix) : ?>
<?php if ($field->suffix) : ?>
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? array()); ?>>
<?php echo $field->suffix; ?>
</div>
<div <?php echo wu_array_to_html_attrs($field->suffix_html_attr ?? array()); ?>>
<?php echo $field->suffix; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if ($field->prefix || $field->suffix) : ?>
<?php if ($field->prefix || $field->suffix) : ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,28 +7,32 @@
?>
<div class="<?php echo esc_attr(trim($field->wrapper_classes)); ?>" <?php echo $field->get_wrapper_html_attributes(); ?>>
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<label class="wu-block wu-my-4" for="field-<?php echo esc_attr($field->id); ?>">
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<input id="field-<?php echo esc_attr($field->id); ?>" type="checkbox" name="<?php echo esc_attr($field->id); ?>" value="1" <?php echo $field->get_html_attributes(); ?> <?php checked($field->value); ?>>
<?php echo $field->title; ?>
<?php echo $field->title; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
</label>
</label>
<?php
<?php
/**
* Adds the partial error template.
* @since 2.0.0
*/
wu_get_template('checkout/fields/partials/field-errors', array(
'field' => $field,
));
/**
* Adds the partial error template.
*
* @since 2.0.0
*/
wu_get_template(
'checkout/fields/partials/field-errors',
array(
'field' => $field,
)
);
?>
?>
</div>

View File

@ -7,28 +7,28 @@
?>
<?php if ($form->wrap_in_form_tag) : ?>
<form id="<?php echo esc_attr($form_slug); ?>" method="<?php echo esc_attr($form->method); ?>" <?php echo $form->get_html_attributes(); ?>>
<form id="<?php echo esc_attr($form_slug); ?>" method="<?php echo esc_attr($form->method); ?>" <?php echo $form->get_html_attributes(); ?>>
<?php else : ?>
<<?php echo $form->wrap_tag; ?> class="<?php echo esc_attr(trim($form->classes ? $form->classes.' '.$step->classes.' wu-mt-2' : $step->classes.' wu-mt-2')); ?>" <?php echo $form->get_html_attributes(); ?>>
<<?php echo $form->wrap_tag; ?> class="<?php echo esc_attr(trim($form->classes ? $form->classes . ' ' . $step->classes . ' wu-mt-2' : $step->classes . ' wu-mt-2')); ?>" <?php echo $form->get_html_attributes(); ?>>
<?php endif; ?>
<?php if ($form->title) : ?>
<?php if ($form->title) : ?>
<h3 class="wu-checkout-section-title"><?php echo $form->title; ?></h3>
<h3 class="wu-checkout-section-title"><?php echo $form->title; ?></h3>
<?php endif; ?>
<?php endif; ?>
<?php echo $rendered_fields; ?>
<?php echo $rendered_fields; ?>
<?php if ($form->wrap_in_form_tag) : ?>
</form>
</form>
<?php else : ?>
</<?php echo $form->wrap_tag; ?>>
</<?php echo $form->wrap_tag; ?>>
<?php endif; ?>

View File

@ -8,6 +8,7 @@
<?php if ($field->desc) : ?>
<?php echo $field->desc; ?>
<?php echo $field->desc; ?>
<?php endif; ?>
<?php
endif;

View File

@ -7,8 +7,8 @@
?>
<span
v-cloak
class="wu-block wu-bg-red-100 wu-p-2 wu-mb-4"
v-if="get_error('<?php echo esc_attr($field->id); ?>')"
v-html="get_error('<?php echo esc_attr($field->id); ?>').message"
v-cloak
class="wu-block wu-bg-red-100 wu-p-2 wu-mb-4"
v-if="get_error('<?php echo esc_attr($field->id); ?>')"
v-html="get_error('<?php echo esc_attr($field->id); ?>').message"
></span>

View File

@ -8,18 +8,18 @@
<?php if ($field->title) : ?>
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>">
<label class="wu-block" for="field-<?php echo esc_attr($field->id); ?>">
<?php echo $field->title; ?>
<?php echo $field->title; ?>
<?php if ($field->required) : ?>
<?php if ($field->required) : ?>
<span class="wu-checkout-required-field wu-text-red-500">*</span>
<span class="wu-checkout-required-field wu-text-red-500">*</span>
<?php endif; ?>
<?php endif; ?>
<?php echo wu_tooltip($field->tooltip); ?>
<?php echo wu_tooltip($field->tooltip); ?>
</label>
</label>
<?php endif; ?>

View File

@ -10,7 +10,7 @@
id="wu_form"
method="post"
class="wu_checkout_form_<?php echo esc_attr($checkout_form_name); ?> wu-relative"
<?php echo isset($checkout_form_action) ? 'action="'.esc_attr($checkout_form_action).'"' : ''; ?>
<?php echo isset($checkout_form_action) ? 'action="' . esc_attr($checkout_form_action) . '"' : ''; ?>
>
<?php
@ -25,18 +25,22 @@
*
* @since 2.0.0
*/
$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(
'step' => (object) $step,
),
));
$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(
'step' => (object) $step,
),
)
);
/**
* Render form fields.

View File

@ -1,12 +1,12 @@
<?php
/**
* Template File: Basic Pricing Table.
*
*
* To see what methods are available on the product variable, @see inc/models/class-producs.php.
*
* This template can also be overrid using template overrides.
*
* This template can also be overrid using template overrides.
* See more here: https://help.wpultimo.com/article/335-template-overrides.
*
*
* @since 2.0.0
* @param array $products List of product objects.
* @param string $name ID of the field.
@ -16,53 +16,53 @@
<?php if (empty($products)) : ?>
<div class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
<div class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4">
<?php _e('No Products Found.', 'wp-ultimo'); ?>
<?php _e('No Products Found.', 'wp-ultimo'); ?>
</div>
</div>
<?php endif; ?>
<div class="wu-flex wu-mb-4 wu--mx-2">
<?php foreach ($products as $product) : ?>
<?php foreach ($products as $product) : ?>
<div
class="<?php echo "wu-product-{$product->get_id()}"; ?> wu-bg-gray-100 wu-m-2 wu-px-4 wu-py-4 wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-box-border wu-flex-1 wu-flex wu-flex-col wu-justify-end"
>
<div
class="<?php echo "wu-product-{$product->get_id()}"; ?> wu-bg-gray-100 wu-m-2 wu-px-4 wu-py-4 wu-border wu-border-solid wu-rounded wu-border-gray-400 wu-box-border wu-flex-1 wu-flex wu-flex-col wu-justify-end"
>
<div class="wu-self-start">
<div class="wu-self-start">
<span class="wu-font-bold wu-block wu-text-xl"><?php echo $product->get_name(); ?></span>
<span class="wu-block wu-font-semibold"><?php echo $product->get_price_description(false); ?></span>
<span class="wu-font-bold wu-block wu-text-xl"><?php echo $product->get_name(); ?></span>
<span class="wu-block wu-font-semibold"><?php echo $product->get_price_description(false); ?></span>
</div>
</div>
<div class="wu-my-4">
<div class="wu-my-4">
<ul class="wu-m-0 wu-list-none">
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
<ul class="wu-m-0 wu-list-none">
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
<li class="<?php echo str_replace('_', '-', $key); ?>"><?php echo $line; ?></li>
<li class="<?php echo str_replace('_', '-', $key); ?>"><?php echo $line; ?></li>
<?php endforeach; ?>
</ul>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="wu-relative">
<div class="wu-relative">
<a href="#wu-checkout-add-<?php echo $product->get_slug(); ?>" class="button btn wu-w-full wu-text-center wu-inline-block">
<?php _e('Select', 'wp-ultimo'); ?>
</a>
<a href="#wu-checkout-add-<?php echo $product->get_slug(); ?>" class="button btn wu-w-full wu-text-center wu-inline-block">
<?php _e('Select', 'wp-ultimo'); ?>
</a>
</div>
</div>
<input type="checkbox" style="display: none;" name="products[]" value="<?php echo $product->get_slug(); ?>" v-model="products">
<input type="checkbox" style="display: none;" name="products[]" value="<?php echo $product->get_slug(); ?>" v-model="products">
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>

View File

@ -10,72 +10,52 @@ $is_trial_setup = $membership->is_trialing() && empty($payment->get_total());
$notes = array();
if ($is_trial_setup) {
$desc = $membership->get_recurring_description();
$date = wp_date(get_option('date_format'), strtotime( $membership->get_date_trial_end(), wu_get_current_time('timestamp', true)));
$date = wp_date(get_option('date_format'), strtotime($membership->get_date_trial_end(), wu_get_current_time('timestamp', true)));
$notes[] = sprintf(__('Your trial period will end on %1$s.', 'wp-ultimo'), $date);
} // end if;
$original_cart = $payment->get_meta('wu_original_cart');
$should_auto_renew = !empty($original_cart) ? $original_cart->should_auto_renew() : false;
$should_auto_renew = ! empty($original_cart) ? $original_cart->should_auto_renew() : false;
$recurring_total = $membership->get_amount();
if ($membership->is_recurring() && $should_auto_renew) {
$payment_total = $payment->get_total() ? $payment->get_total() : $membership->get_initial_amount();
$desc = $membership->get_recurring_description();
if ($recurring_total !== $payment_total) {
$recurring_total_format = wu_format_currency($recurring_total, $payment->get_currency());
if ($original_cart->get_cart_type() === 'downgrade') {
$subtotal = wu_format_currency($payment->get_subtotal(), $payment->get_currency());
if ($is_trial_setup) {
$notes[] = sprintf(__('Your updated membership will start on $1$s, from that date you will be billed %2$s %3$s.', 'wp-ultimo'), $date, $subtotal, $desc);
} else {
$date_renew = wp_date(get_option('date_format'), strtotime( $membership->get_date_expiration(), wu_get_current_time('timestamp', true)));
$date_renew = wp_date(get_option('date_format'), strtotime($membership->get_date_expiration(), wu_get_current_time('timestamp', true)));
$notes[] = sprintf(__('Your updated membership will start on %1$s, from that date you will be billed %2$s %3$s.', 'wp-ultimo'), $date_renew, $subtotal, $desc);
} // end if;
} elseif ($is_trial_setup) {
$initial_amount_format = wu_format_currency($membership->get_initial_amount(), $payment->get_currency());
$notes[] = sprintf(__('After the first payment of %1$s you will be billed %2$s %3$s.', 'wp-ultimo'), $initial_amount_format, $recurring_total_format, $desc);
} else {
$notes[] = sprintf(__('After this payment you will be billed %1$s %2$s.', 'wp-ultimo'), $recurring_total_format, $desc);
} // end if;
} else {
$recurring_total_format = wu_format_currency($recurring_total, $payment->get_currency());
if ($is_trial_setup) {
$notes[] = sprintf(__('From that date, you will be billed %1$s %2$s.', 'wp-ultimo'), $recurring_total_format, $desc);
} else {
$notes[] = sprintf(__('After this payment you will be billed %1$s.', 'wp-ultimo'), $desc);
} // end if;
} // end if;
} // end if;
$note = implode(' ', $notes);
@ -90,7 +70,7 @@ $subtotal = 0;
<div class="wu-text-sm wu-mb-4 wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4">
<span class="wu-font-semibold wu-block wu-text-gray-900">
<?php echo sprintf('%s %s', wu_get_isset($checkout_details, 'FIRSTNAME', ''), wu_get_isset($checkout_details, 'LASTNAME', '')); ?>
<?php printf('%s %s', wu_get_isset($checkout_details, 'FIRSTNAME', ''), wu_get_isset($checkout_details, 'LASTNAME', '')); ?>
</span>
<div class="wu-text-gray-600">
@ -112,7 +92,7 @@ $subtotal = 0;
<tbody>
<?php
foreach ($payment->get_line_items() as $line_item) :
foreach ($payment->get_line_items() as $line_item) :
$subtotal += $line_item->get_subtotal();
?>
@ -152,7 +132,7 @@ $subtotal = 0;
</tfoot>
</table>
<?php if (!empty($note)) : ?>
<?php if ( ! empty($note)) : ?>
<div class="wu-col-span-2 wu-mb-4">
<div class="wu-p-4 wu-bg-yellow-200">

View File

@ -1,24 +1,28 @@
<form id="wu_form" method="post" class="wu-styling wu-relative">
<?php
<?php
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$order_form = new \WP_Ultimo\UI\Form('product-fields', $product_fields, array(
'title' => __('Products', 'wp-ultimo'),
'views' => 'checkout/fields',
));
/**
* Instantiate the form for the order details.
*
* @since 2.0.0
*/
$order_form = new \WP_Ultimo\UI\Form(
'product-fields',
$product_fields,
array(
'title' => __('Products', 'wp-ultimo'),
'views' => 'checkout/fields',
)
);
/**
* Render form fields.
*
* @see /view/checkout/fields/ for the template files for each field type.
* @since 2.0.0
*/
$order_form->render();
/**
* Render form fields.
*
* @see /view/checkout/fields/ for the template files for each field type.
* @since 2.0.0
*/
$order_form->render();
/**
* Instantiate the form for the submit button and such.

View File

@ -13,58 +13,59 @@ $product = wu_get_product($product['id']);
$product_variation = $product->get_as_variation($duration, $duration_unit);
if ($product_variation !== false) {
$product = $product_variation;
$product = $product_variation;
} // end if;
?>
<div class="wu-relative wu-flex wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4 wu-items-center wu-justify-between">
<div class="wu-flex wu-items-center">
<div class="wu-flex wu-items-center">
<?php if ($display_product_image) : $image = $product->get_featured_image('thumbnail'); ?>
<?php
if ($display_product_image) :
$image = $product->get_featured_image('thumbnail');
?>
<?php if ($image) : ?>
<?php if ($image) : ?>
<div class="wu-w-thumb wu-h-thumb wu-rounded wu-overflow-hidden wu-text-center wu-inline-block wu-mr-4">
<img src="<?php echo esc_attr($image); ?>" class="wu-h-full">
</div>
<div class="wu-w-thumb wu-h-thumb wu-rounded wu-overflow-hidden wu-text-center wu-inline-block wu-mr-4">
<img src="<?php echo esc_attr($image); ?>" class="wu-h-full">
</div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<div class="wu-text-sm">
<span class="wu-font-semibold wu-block wu-text-gray-900"><?php echo empty($name) ? $product->get_name() : $name; ?></span>
<div class="wu-text-sm">
<span class="wu-font-semibold wu-block wu-text-gray-900"><?php echo empty($name) ? $product->get_name() : $name; ?></span>
<?php if ($display_product_description && $product->get_description()) : ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline-block wu-my-1">
<?php echo $product->get_description(); ?>
</p>
</div>
<?php endif; ?>
<?php if ($display_product_description && $product->get_description()) : ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline-block wu-my-1">
<?php echo $product->get_description(); ?>
</p>
</div>
<?php endif; ?>
<div class="wu-text-gray-600">
<p class="sm:wu-inline">
<?php echo $product->get_price_description(); ?>
</p>
</div>
</div>
</div>
<div class="wu-text-gray-600">
<p class="sm:wu-inline">
<?php echo $product->get_price_description(); ?>
</p>
</div>
</div>
</div>
<div v-if="!($parent.has_product('<?php echo $product->get_id(); ?>') || $parent.has_product('<?php echo $product->get_slug(); ?>'))" class="wu-ml-2">
<a href="#" @click.prevent="$parent.add_product('<?php echo $product->get_id(); ?>')" class="button btn"><?php _e('Add to Cart', 'wp-ultimo'); ?></a>
</div>
<div v-else class="wu-ml-2">
<a href="#" @click.prevent="$parent.remove_product('<?php echo $product->get_id(); ?>', '<?php echo $product->get_slug(); ?>')" class="button btn"><?php _e('Remove', 'wp-ultimo'); ?></a>
<input type="hidden" name="products[]" value="<?php echo $product->get_id(); ?>">
</div>
<div v-if="!($parent.has_product('<?php echo $product->get_id(); ?>') || $parent.has_product('<?php echo $product->get_slug(); ?>'))" class="wu-ml-2">
<a href="#" @click.prevent="$parent.add_product('<?php echo $product->get_id(); ?>')" class="button btn"><?php _e('Add to Cart', 'wp-ultimo'); ?></a>
</div>
<div v-else class="wu-ml-2">
<a href="#" @click.prevent="$parent.remove_product('<?php echo $product->get_id(); ?>', '<?php echo $product->get_slug(); ?>')" class="button btn"><?php _e('Remove', 'wp-ultimo'); ?></a>
<input type="hidden" name="products[]" value="<?php echo $product->get_id(); ?>">
</div>
<div
class="wu-absolute wu--inset-px wu-rounded-lg wu-border-solid wu-border-2 wu-pointer-events-none wu-top-0 wu-bottom-0 wu-right-0 wu-left-0"
:class="($parent.has_product('<?php echo $product->get_id(); ?>') || $parent.has_product('<?php echo $product->get_slug(); ?>'))? 'wu-border-blue-500' : 'wu-border-transparent'"
aria-hidden="true"
>
</div>
<div
class="wu-absolute wu--inset-px wu-rounded-lg wu-border-solid wu-border-2 wu-pointer-events-none wu-top-0 wu-bottom-0 wu-right-0 wu-left-0"
:class="($parent.has_product('<?php echo $product->get_id(); ?>') || $parent.has_product('<?php echo $product->get_slug(); ?>'))? 'wu-border-blue-500' : 'wu-border-transparent'"
aria-hidden="true"
>
</div>
</div>

View File

@ -7,264 +7,265 @@
?>
<div id="wu-order-summary-content" class="wu-relative">
<div v-show="!order" class="wu-bg-gray-100 wu-p-4 wu-text-center wu-border wu-border-solid wu-border-gray-300">
<div v-show="!order" class="wu-bg-gray-100 wu-p-4 wu-text-center wu-border wu-border-solid wu-border-gray-300">
<?php _e('Generating Order Summary...', 'wp-ultimo'); ?>
<?php _e('Generating Order Summary...', 'wp-ultimo'); ?>
</div>
</div>
<div v-if="order" v-cloak>
<div v-if="order" v-cloak>
<table id="wu-order-summary-table" class="wu-w-full wu-mb-0">
<table id="wu-order-summary-table" class="wu-w-full wu-mb-0">
<thead>
<thead>
<tr class="">
<tr class="">
<th class="col-description">
<?php _e('Description', 'wp-ultimo'); ?>
</th>
<th class="col-description">
<?php _e('Description', 'wp-ultimo'); ?>
</th>
<?php if ($table_columns === 'simple') : ?>
<?php if ($table_columns === 'simple') : ?>
<th class="col-total-gross">
<?php _e('Subtotal', 'wp-ultimo'); ?>
</th>
<th class="col-total-gross">
<?php _e('Subtotal', 'wp-ultimo'); ?>
</th>
<?php else : ?>
<?php else : ?>
<th class="col-total-net">
<?php _e('Net Total', 'wp-ultimo'); ?>
</th>
<th class="col-total-net">
<?php _e('Net Total', 'wp-ultimo'); ?>
</th>
<th class="col-total-vat-percentage">
<?php _e('Discounts', 'wp-ultimo'); ?>
</th>
<th class="col-total-vat-percentage">
<?php _e('Discounts', 'wp-ultimo'); ?>
</th>
<th class="col-total-tax">
<?php _e('Tax', 'wp-ultimo'); ?>
</th>
<th class="col-total-tax">
<?php _e('Tax', 'wp-ultimo'); ?>
</th>
<th class="col-total-gross">
<?php _e('Gross Total', 'wp-ultimo'); ?>
</th>
<th class="col-total-gross">
<?php _e('Gross Total', 'wp-ultimo'); ?>
</th>
<?php endif; ?>
<?php endif; ?>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr v-if="order.line_items.length === 0">
<tr v-if="order.line_items.length === 0">
<td class="" colspan="<?php echo esc_attr($table_columns === 'simple') ? 2 : 5; ?>" class="col-description">
<td class="" colspan="<?php echo esc_attr($table_columns === 'simple') ? 2 : 5; ?>" class="col-description">
<?php _e('No products in shopping cart.', 'wp-ultimo'); ?>
<?php _e('No products in shopping cart.', 'wp-ultimo'); ?>
</td>
</td>
</tr>
</tr>
<tr v-for="line_item in order.line_items">
<tr v-for="line_item in order.line_items">
<td class="wu-py-2 col-description" v-show="line_item.recurring">
<td class="wu-py-2 col-description" v-show="line_item.recurring">
<?php printf(__('Subscription - %s', 'wp-ultimo'), '{{ line_item.title }}'); ?>
<?php printf(__('Subscription - %s', 'wp-ultimo'), '{{ line_item.title }}'); ?>
<small v-if="line_item.type == 'product'" class="wu-ml-3 wu-text-xs">
<small v-if="line_item.type == 'product'" class="wu-ml-3 wu-text-xs">
<a href="#" class="wu-no-underline" v-on:click.prevent="remove_product(line_item.product_id, line_item.product_slug)">
<a href="#" class="wu-no-underline" v-on:click.prevent="remove_product(line_item.product_id, line_item.product_slug)">
<?php _e('Remove', 'wp-ultimo'); ?>
<?php _e('Remove', 'wp-ultimo'); ?>
</a>
</a>
</small>
</small>
</td>
</td>
<td class="wu-py-2 col-description" v-show="!line_item.recurring">
<td class="wu-py-2 col-description" v-show="!line_item.recurring">
{{ line_item.title }}
{{ line_item.title }}
<small v-if="line_item.type == 'product'" class="">
<small v-if="line_item.type == 'product'" class="">
<a href="#" class="wu-no-underline" v-on:click.prevent="remove_product(line_item.product_id, line_item.product_slug)">
<a href="#" class="wu-no-underline" v-on:click.prevent="remove_product(line_item.product_id, line_item.product_slug)">
<?php _e('Remove', 'wp-ultimo'); ?>
<?php _e('Remove', 'wp-ultimo'); ?>
</a>
</a>
</small>
</small>
</td>
</td>
<?php if ($table_columns === 'simple') : ?>
<?php if ($table_columns === 'simple') : ?>
<td v-show="line_item.recurring" class="wu-py-2 col-total-net">
<td v-show="line_item.recurring" class="wu-py-2 col-total-net">
{{ wu_format_money(line_item.subtotal) }} / {{ line_item.recurring_description }}
{{ wu_format_money(line_item.subtotal) }} / {{ line_item.recurring_description }}
</td>
</td>
<td v-show="!line_item.recurring" class="wu-py-2 col-total-net">
<td v-show="!line_item.recurring" class="wu-py-2 col-total-net">
{{ wu_format_money(line_item.subtotal) }}
{{ wu_format_money(line_item.subtotal) }}
</td>
</td>
<?php else : ?>
<?php else : ?>
<td v-show="line_item.recurring" class="wu-py-2 col-total-net">
<td v-show="line_item.recurring" class="wu-py-2 col-total-net">
{{ wu_format_money(line_item.subtotal) }} / {{ line_item.recurring_description }}
{{ wu_format_money(line_item.subtotal) }} / {{ line_item.recurring_description }}
</td>
</td>
<td v-show="!line_item.recurring" class="wu-py-2 col-total-net">
<td v-show="!line_item.recurring" class="wu-py-2 col-total-net">
{{ wu_format_money(line_item.subtotal) }}
{{ wu_format_money(line_item.subtotal) }}
</td>
</td>
<td class="wu-py-2 col-total-net">
<td class="wu-py-2 col-total-net">
{{ wu_format_money(line_item.discount_total) }}
{{ wu_format_money(line_item.discount_total) }}
</td>
</td>
<td class="wu-py-2 col-total-tax">
<td class="wu-py-2 col-total-tax">
{{ wu_format_money(line_item.tax_total) }}
{{ wu_format_money(line_item.tax_total) }}
<small v-if="line_item.tax_rate" class="wu-block">
<small v-if="line_item.tax_rate" class="wu-block">
{{ line_item.tax_label }} {{ line_item.tax_rate }}%
{{ line_item.tax_label }} {{ line_item.tax_rate }}%
</small>
</small>
</td>
</td>
<td class="wu-py-2 col-total-gross">
<td class="wu-py-2 col-total-gross">
{{ wu_format_money(line_item.total) }}
{{ wu_format_money(line_item.total) }}
</td>
</td>
<?php endif; ?>
<?php endif; ?>
</tr>
</tr>
</tbody>
</tbody>
<tfoot class="">
<tfoot class="">
<?php if ($table_columns === 'simple') : ?>
<?php if ($table_columns === 'simple') : ?>
<tr>
<tr>
<td>
<td>
<?php _e("Discounts", 'wp-ultimo'); ?>
<?php _e('Discounts', 'wp-ultimo'); ?>
</td>
</td>
<td>
<td>
{{ wu_format_money(order.totals.total_discounts) }}
{{ wu_format_money(order.totals.total_discounts) }}
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td>
<?php _e("Taxes", 'wp-ultimo'); ?>
<?php _e('Taxes', 'wp-ultimo'); ?>
</td>
</td>
<td>
<td>
{{ wu_format_money(order.totals.total_taxes) }}
{{ wu_format_money(order.totals.total_taxes) }}
</td>
</td>
</tr>
</tr>
<?php endif; ?>
<?php endif; ?>
<tr>
<tr>
<td class="" colspan="<?php echo esc_attr($table_columns === 'simple') ? 1 : 4; ?>">
<td class="" colspan="<?php echo esc_attr($table_columns === 'simple') ? 1 : 4; ?>">
<strong><?php _e("Today's Grand Total", 'wp-ultimo'); ?></strong>
<strong><?php _e("Today's Grand Total", 'wp-ultimo'); ?></strong>
</td>
</td>
<td class="" v-show="order.has_trial">
<td class="" v-show="order.has_trial">
{{ wu_format_money(0) }}
{{ wu_format_money(0) }}
</td>
</td>
<td class="" v-show="!order.has_trial">
<td class="" v-show="!order.has_trial">
{{ wu_format_money(order.totals.total) }}
{{ wu_format_money(order.totals.total) }}
</td>
</td>
</tr>
</tr>
<tr v-if="order.has_trial">
<tr v-if="order.has_trial">
<td class="" colspan="<?php echo esc_attr($table_columns === 'simple') ? 1 : 4; ?>">
<td class="" colspan="<?php echo esc_attr($table_columns === 'simple') ? 1 : 4; ?>">
<small>
<?php printf(__('Total in %1$s - end of trial period.', 'wp-ultimo'), '{{ $moment.unix(order.dates.date_trial_end).format(`LL`) }}'); ?>
</small>
<small>
<?php printf(__('Total in %1$s - end of trial period.', 'wp-ultimo'), '{{ $moment.unix(order.dates.date_trial_end).format(`LL`) }}'); ?>
</small>
</td>
</td>
<td class="">
<td class="">
{{ wu_format_money(order.totals.total) }}
{{ wu_format_money(order.totals.total) }}
</td>
</td>
</tr>
</tr>
</tfoot>
</tfoot>
</table>
</table>
<ul class="wu-p-0 wu-m-0 wu-mt-2 wu-list-none wu-order-summary-additional-info wu-text-sm">
<ul class="wu-p-0 wu-m-0 wu-mt-2 wu-list-none wu-order-summary-additional-info wu-text-sm">
<li v-if="!order.has_trial && order.has_recurring">
<li v-if="!order.has_trial && order.has_recurring">
<?php printf(__('Next fee of %1$s will be billed in %2$s.', 'wp-ultimo'), '{{ wu_format_money(order.totals.recurring.total) }}', "{{ \$moment.unix(order.dates.date_next_charge).format(`LL`) }}"); ?>
<?php printf(__('Next fee of %1$s will be billed in %2$s.', 'wp-ultimo'), '{{ wu_format_money(order.totals.recurring.total) }}', '{{ $moment.unix(order.dates.date_next_charge).format(`LL`) }}'); ?>
</li>
</li>
<li class="order-description" v-if="order.totals.total_discounts < 0">
<li class="order-description" v-if="order.totals.total_discounts < 0">
<?php
// translators: 1 is the discount name (e.g. Launch Promo). 2 is the coupon code (e.g PROMO10), 3 is the coupon amount and 4 is the discount total.
printf(__('Discount applied: %1$s - %2$s (%3$s) %4$s', 'wp-ultimo'), '{{ order.discount_code.name }}', '{{ order.discount_code.code }}', '{{ order.discount_code.discount_description }}', '{{ wu_format_money(-order.totals.total_discounts) }}'); ?>
<?php
// translators: 1 is the discount name (e.g. Launch Promo). 2 is the coupon code (e.g PROMO10), 3 is the coupon amount and 4 is the discount total.
printf(__('Discount applied: %1$s - %2$s (%3$s) %4$s', 'wp-ultimo'), '{{ order.discount_code.name }}', '{{ order.discount_code.code }}', '{{ order.discount_code.discount_description }}', '{{ wu_format_money(-order.totals.total_discounts) }}');
?>
<a class="wu-no-underline wu-ml-2" href="#" v-on:click.prevent="discount_code = ''">
<a class="wu-no-underline wu-ml-2" href="#" v-on:click.prevent="discount_code = ''">
<?php _e('Remove', 'wp-ultimo'); ?>
<?php _e('Remove', 'wp-ultimo'); ?>
</a>
</a>
</li>
</li>
</ul>
</ul>
</div>
</div>
</div>

View File

@ -21,18 +21,18 @@ defined('ABSPATH') || exit;
?>
<ul class="wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-flex wu-rounded wu-relative wu-m-0 wu-mb-4 wu-list-none wu-justify-center">
<?php foreach ($period_options as $index => $period_option) : ?>
<?php foreach ($period_options as $index => $period_option) : ?>
<li class="wu-mx-2">
<a
:class="(duration == <?php echo $period_option['duration']; ?> && duration_unit == '<?php echo $period_option['duration_unit']; ?>') || (<?php echo json_encode($index === 0); ?> && duration === '') ? 'wu-font-semibold active' : ''"
v-on:click.prevent="duration = <?php echo $period_option['duration']; ?>; duration_unit = '<?php echo $period_option['duration_unit']; ?>'"
href="#"
>
<?php echo $period_option['label']; ?>
</a>
</li>
<li class="wu-mx-2">
<a
:class="(duration == <?php echo $period_option['duration']; ?> && duration_unit == '<?php echo $period_option['duration_unit']; ?>') || (<?php echo json_encode($index === 0); ?> && duration === '') ? 'wu-font-semibold active' : ''"
v-on:click.prevent="duration = <?php echo $period_option['duration']; ?>; duration_unit = '<?php echo $period_option['duration_unit']; ?>'"
href="#"
>
<?php echo $period_option['label']; ?>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>

View File

@ -22,18 +22,18 @@ defined('ABSPATH') || exit;
<div class="wu-mx-auto wu-text-center wu-mb-4">
<ul class="wu-plans-frequency-selector">
<ul class="wu-plans-frequency-selector">
<?php foreach ($period_options as $index => $period_option) : ?>
<?php foreach ($period_options as $index => $period_option) : ?>
<li>
<a class="wu-text-center" :class="(duration == <?php echo $period_option['duration']; ?> && duration_unit == '<?php echo $period_option['duration_unit']; ?>') || (<?php echo json_encode($index === 0); ?> && duration === '') ? 'active' : ''" v-on:click.prevent="duration = <?php echo $period_option['duration']; ?>; duration_unit = '<?php echo $period_option['duration_unit']; ?>'" href="#">
<?php echo $period_option['label']; ?>
</a>
</li>
<li>
<a class="wu-text-center" :class="(duration == <?php echo $period_option['duration']; ?> && duration_unit == '<?php echo $period_option['duration_unit']; ?>') || (<?php echo json_encode($index === 0); ?> && duration === '') ? 'active' : ''" v-on:click.prevent="duration = <?php echo $period_option['duration']; ?>; duration_unit = '<?php echo $period_option['duration_unit']; ?>'" href="#">
<?php echo $period_option['label']; ?>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
</div>

View File

@ -15,31 +15,34 @@
$products_to_reduce = array_merge(array(false), $products);
$first_recurring_product = array_reduce($products_to_reduce, function($chosen_product, $product) {
$first_recurring_product = array_reduce(
$products_to_reduce,
function ($chosen_product, $product) {
if ($product && $product->is_recurring() && $chosen_product == false) {
if ($product && $product->is_recurring() && $chosen_product == false) {
$chosen_product = $product;
} // end if;
$chosen_product = $product;
return $chosen_product;
}
);
} // end if;
$legacy_mode = array_reduce(
$products_to_reduce,
function ($all_have_same_duration, $product) use ($first_recurring_product) {
return $chosen_product;
if ($product && $product->is_recurring()) {
$all_have_same_duration = $first_recurring_product->get_recurring_description() == $product->get_recurring_description();
} // end if;
});
return $all_have_same_duration;
}
);
$legacy_mode = array_reduce($products_to_reduce, function($all_have_same_duration, $product) use ($first_recurring_product) {
if ($product && $product->is_recurring()) {
$all_have_same_duration = $first_recurring_product->get_recurring_description() == $product->get_recurring_description();
} // end if;
return $all_have_same_duration;
});
wp_add_inline_script('wu-checkout', sprintf('
wp_add_inline_script(
'wu-checkout',
sprintf(
'
/**
* Force different durations.
@ -48,11 +51,18 @@ wp_add_inline_script('wu-checkout', sprintf('
window.wu_legacy_mode = %s;
', json_encode($force_different_durations), json_encode($legacy_mode)), 'after');
',
json_encode($force_different_durations),
json_encode($legacy_mode)
),
'after'
);
if ($first_recurring_product !== null) {
wp_add_inline_script('wu-checkout', sprintf("
wp_add_inline_script(
'wu-checkout',
sprintf(
"
/**
* Add durations if necessary.
@ -78,8 +88,12 @@ if ($first_recurring_product !== null) {
});
", json_encode($first_recurring_product->get_duration()), json_encode($first_recurring_product->get_duration_unit())), 'after');
",
json_encode($first_recurring_product->get_duration()),
json_encode($first_recurring_product->get_duration_unit())
),
'after'
);
}
?>
@ -93,281 +107,267 @@ if ($first_recurring_product !== null) {
<?php else : ?>
<div class="wu-content-plan">
<div class="wu-content-plan">
<div class="layer plans wu-overflow-hidden wu-flex">
<div class="layer plans wu-overflow-hidden wu-flex">
<?php foreach ($products as $product) : ?>
<?php foreach ($products as $product) : ?>
<div
id="plan-<?php echo esc_attr($product->get_id()); ?>"
class="<?php echo "wu-product-{$product->get_id()}"; ?> lift wu-plan plan-tier wu-flex-1 <?php echo esc_attr($product->is_featured_plan() ? 'callout' : ''); ?> wu-flex wu-flex-col wu-justify-between"
v-show="wu_force_different_durations || (duration && wu_legacy_mode) || (( (!duration) || duration == <?php echo $product->get_duration(); ?> && duration_unit == '<?php echo $product->get_duration_unit(); ?>' ) || <?php echo json_encode($product->get_pricing_type() !== 'paid'); ?>)"
>
<div
id="plan-<?php echo esc_attr($product->get_id()); ?>"
class="<?php echo "wu-product-{$product->get_id()}"; ?> lift wu-plan plan-tier wu-flex-1 <?php echo esc_attr($product->is_featured_plan() ? 'callout' : ''); ?> wu-flex wu-flex-col wu-justify-between"
v-show="wu_force_different_durations || (duration && wu_legacy_mode) || (( (!duration) || duration == <?php echo $product->get_duration(); ?> && duration_unit == '<?php echo $product->get_duration_unit(); ?>' ) || <?php echo json_encode($product->get_pricing_type() !== 'paid'); ?>)"
>
<div class="wu-relative">
<div class="wu-relative">
<?php if ($product->is_featured_plan()) : ?>
<?php if ($product->is_featured_plan()) : ?>
<h6>
<h6>
<?php
<?php
/**
* Featured tag.
*/
echo apply_filters('wu_featured_plan_label', __('Featured Plan', 'wp-ultimo'), $product);
/**
* Featured tag.
*/
echo apply_filters('wu_featured_plan_label', __('Featured Plan', 'wp-ultimo'), $product);
?>
?>
</h6>
</h6>
<?php endif; ?>
<?php endif; ?>
<h4 class="wp-ui-primary">
<h4 class="wp-ui-primary">
<?php echo $product->get_name(); ?>
<?php echo $product->get_name(); ?>
</h4>
</h4>
<?php
<?php
/**
* Case Free
*/
if ($product->get_pricing_type() === 'free') :
/**
* Case Free
*/
if ($product->get_pricing_type() === 'free') :
?>
?>
<!-- Price -->
<h5>
<!-- Price -->
<h5>
<span class="plan-price">
<span class="plan-price">
<?php _e('Free!', 'wp-ultimo'); ?>
<?php _e('Free!', 'wp-ultimo'); ?>
</span>
</span>
</h5>
</h5>
<?php
<?php
/**
* Case Free
*/
elseif ($product->get_pricing_type() === 'contact_us') :
/**
* Case Free
*/
elseif ($product->get_pricing_type() === 'contact_us') :
?>
?>
<!-- Price -->
<h5>
<!-- Price -->
<h5>
<span class="plan-price">
<span class="plan-price">
<?php echo apply_filters('wu_plan_contact_us_price_line', __('--', 'wp-ultimo')); ?>
<?php echo apply_filters('wu_plan_contact_us_price_line', __('--', 'wp-ultimo')); ?>
</span>
</span>
</h5>
</h5>
<?php else : ?>
<?php else : ?>
<!-- Price -->
<h5>
<!-- Price -->
<h5>
<?php
<?php
/**
* Price display.
*/
/**
* 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'), array('%s%v', '%s %v'));
?>
?>
<?php if ($symbol_left) : ?>
<?php if ($symbol_left) : ?>
<sup class="superscript">
<sup class="superscript">
<?php echo wu_get_currency_symbol($product->get_currency()); ?>
<?php echo wu_get_currency_symbol($product->get_currency()); ?>
</sup>
</sup>
<?php endif; ?>
<?php endif; ?>
<span class="plan-price" v-if="wu_force_different_durations || (duration == <?php echo $product->get_duration(); ?> && duration_unit == '<?php echo $product->get_duration_unit(); ?>')">
<span class="plan-price" v-if="wu_force_different_durations || (duration == <?php echo $product->get_duration(); ?> && duration_unit == '<?php echo $product->get_duration_unit(); ?>')">
<?php
<?php
$n = $product->get_amount();
$n = $product->get_amount();
echo str_replace(wu_get_currency_symbol(), '', wu_format_currency($n));
echo str_replace(wu_get_currency_symbol(), '', wu_format_currency($n));
?>
?>
</span>
</span>
<?php foreach (array(3, 12) as $freq) :
<?php
foreach (array(3, 12) as $freq) :
$price_variation = $product->get_price_variation($freq, 'month');
$price_variation = $product->get_price_variation($freq, 'month');
if ( ! $price_variation) {
continue;
} // end if;
if (!$price_variation) {
?>
continue;
<span class="plan-price" v-cloak v-if="duration == <?php echo $price_variation['duration']; ?> && duration_unit == '<?php echo $price_variation['duration_unit']; ?>'">
} // end if;
<?php
?>
$n = $price_variation ? $price_variation['monthly_amount'] : false;
<span class="plan-price" v-cloak v-if="duration == <?php echo $price_variation['duration']; ?> && duration_unit == '<?php echo $price_variation['duration_unit']; ?>'">
if ($n) {
echo str_replace(wu_get_currency_symbol(), '', wu_format_currency($n));
} else {
echo '--';
} // end if;
<?php
?>
$n = $price_variation ? $price_variation['monthly_amount'] : false;
if ($n) {
echo str_replace(wu_get_currency_symbol(), '', wu_format_currency($n));
} else {
echo '--';
} // end if;
?>
</span>
<?php endforeach;?>
<sub v-if="1 == <?php echo $product->get_duration(); ?> && 'month' == '<?php echo $product->get_duration_unit(); ?>'">
<?php
/**
* Period Unit.
*/
$symbol = $product->is_recurring() ? __('/mo', 'wp-ultimo') : '';
echo (!$symbol_left ? wu_get_currency_symbol() : '').' '.$symbol;
?>
</sub>
<sub v-else>
<?php
/**
* Period Unit.
*/
$symbol = $product->is_recurring() ? $product->get_recurring_description() : '';
echo (!$symbol_left ? wu_get_currency_symbol() : '').' '.$symbol;
?>
</sub>
</h5>
<!-- end Price -->
<?php endif; ?>
<p class="early-adopter-price">
<?php echo $product->get_description(); ?>
</p>
</div>
<br>
<!-- Feature List Begins -->
<ul>
<?php
/**
*
* Display quarterly and Annually plans, to be hidden.
*/
$prices_total = array(
3 => __('every 3 months', 'wp-ultimo'),
12 => __('yearly', 'wp-ultimo'),
);
foreach ($prices_total as $freq => $string) {
$price_variation = $product->get_price_variation($freq, 'month');
if (!$price_variation || $product->get_pricing_type() == 'free' || $product->get_pricing_type() == 'contact_us') {
echo "<li v-cloak v-show='duration == ".$freq."' class='total-price total-price-$freq'>-</li>";
} else {
$text = sprintf(__('%1$s, billed %2$s', 'wp-ultimo'), wu_format_currency($price_variation['amount']), $string);
$extra_check_for_annual = '';
if ($freq === 12) {
$extra_check_for_annual = ' || (duration == "1" && duration_unit == "year")';
} // end if;
echo "<li v-cloak v-show='duration == ".$freq.$extra_check_for_annual."' class='total-price total-price-$freq'>$text</li>";
} // end if;
} // end foreach;
?>
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
<li class="<?php echo str_replace('_', '-', $key); ?>"><?php echo $line; ?></li>
<?php endforeach; ?>
<li class="wu-cta">
<button
v-if="<?php echo json_encode($product->get_pricing_type() !== 'contact_us'); ?>"
v-on:click="add_plan(<?php echo $product->get_id(); ?>)"
type="button"
name="products[]"
value="<?php echo $product->get_id(); ?>"
class="button button-primary button-next"
>
<?php _e('Select Plan', 'wp-ultimo'); ?>
</button>
<button
v-else
v-on:click="open_url('<?php echo esc_url($product->get_contact_us_link()); ?>', '_blank');" type="button"
name="products[]"
value="<?php echo $product->get_id(); ?>"
class="button button-primary button-next"
>
<?php _e('Select Plan', 'wp-ultimo'); ?>
</button>
</li>
</ul>
<!-- Feature List Ends -->
</div>
</span>
<?php endforeach; ?>
</div>
</div>
<sub v-if="1 == <?php echo $product->get_duration(); ?> && 'month' == '<?php echo $product->get_duration_unit(); ?>'">
<?php
/**
* Period Unit.
*/
$symbol = $product->is_recurring() ? __('/mo', 'wp-ultimo') : '';
echo (! $symbol_left ? wu_get_currency_symbol() : '') . ' ' . $symbol;
?>
</sub>
<sub v-else>
<?php
/**
* Period Unit.
*/
$symbol = $product->is_recurring() ? $product->get_recurring_description() : '';
echo (! $symbol_left ? wu_get_currency_symbol() : '') . ' ' . $symbol;
?>
</sub>
</h5>
<!-- end Price -->
<?php endif; ?>
<p class="early-adopter-price">
<?php echo $product->get_description(); ?>
</p>
</div>
<br>
<!-- Feature List Begins -->
<ul>
<?php
/**
*
* Display quarterly and Annually plans, to be hidden.
*/
$prices_total = array(
3 => __('every 3 months', 'wp-ultimo'),
12 => __('yearly', 'wp-ultimo'),
);
foreach ($prices_total as $freq => $string) {
$price_variation = $product->get_price_variation($freq, 'month');
if ( ! $price_variation || $product->get_pricing_type() == 'free' || $product->get_pricing_type() == 'contact_us') {
echo "<li v-cloak v-show='duration == " . $freq . "' class='total-price total-price-$freq'>-</li>";
} else {
$text = sprintf(__('%1$s, billed %2$s', 'wp-ultimo'), wu_format_currency($price_variation['amount']), $string);
$extra_check_for_annual = '';
if ($freq === 12) {
$extra_check_for_annual = ' || (duration == "1" && duration_unit == "year")';
} // end if;
echo "<li v-cloak v-show='duration == " . $freq . $extra_check_for_annual . "' class='total-price total-price-$freq'>$text</li>";
} // end if;
} // end foreach;
?>
<?php foreach ($product->get_pricing_table_lines() as $key => $line) : ?>
<li class="<?php echo str_replace('_', '-', $key); ?>"><?php echo $line; ?></li>
<?php endforeach; ?>
<li class="wu-cta">
<button
v-if="<?php echo json_encode($product->get_pricing_type() !== 'contact_us'); ?>"
v-on:click="add_plan(<?php echo $product->get_id(); ?>)"
type="button"
name="products[]"
value="<?php echo $product->get_id(); ?>"
class="button button-primary button-next"
>
<?php _e('Select Plan', 'wp-ultimo'); ?>
</button>
<button
v-else
v-on:click="open_url('<?php echo esc_url($product->get_contact_us_link()); ?>', '_blank');" type="button"
name="products[]"
value="<?php echo $product->get_id(); ?>"
class="button button-primary button-next"
>
<?php _e('Select Plan', 'wp-ultimo'); ?>
</button>
</li>
</ul>
<!-- Feature List Ends -->
</div>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>

View File

@ -9,63 +9,59 @@
* Deal with different pricing options
*/
foreach ($products as $index => &$_product) {
$_product = wu_get_product($_product['id']);
$_product = wu_get_product($_product['id']);
$product_variation = $_product->get_as_variation($duration, $duration_unit);
$product_variation = $_product->get_as_variation($duration, $duration_unit);
if ($product_variation === false && !$force_different_durations) {
unset($products[$index]);
$_product = $product_variation;
} // end if;
if ($product_variation === false && ! $force_different_durations) {
unset($products[ $index ]);
$_product = $product_variation;
} // end if;
} // end foreach;
?>
<div class="">
<div class="wu-grid wu-grid-flow-row wu-gap-4 <?php echo $classes; ?>">
<div class="wu-grid wu-grid-flow-row wu-gap-4 <?php echo $classes; ?>">
<?php foreach ($products as $product) : ?>
<?php foreach ($products as $product) : ?>
<label
id="wu-product-<?php echo $product->get_id(); ?>"
class="wu-relative wu-block wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4 wu-cursor-pointer hover:wu-border-gray-400 sm:wu-flex sm:wu-justify-between focus-within:wu-ring-1 focus-within:wu-ring-offset-2 focus-within:wu-ring-indigo-500">
<label
id="wu-product-<?php echo $product->get_id(); ?>"
class="wu-relative wu-block wu-rounded-lg wu-border wu-border-gray-300 wu-bg-white wu-border-solid wu-shadow-sm wu-px-6 wu-py-4 wu-cursor-pointer hover:wu-border-gray-400 sm:wu-flex sm:wu-justify-between focus-within:wu-ring-1 focus-within:wu-ring-offset-2 focus-within:wu-ring-indigo-500">
<input v-if="<?php echo json_encode($product->get_pricing_type() !== 'contact_us'); ?>" v-on:click="$parent.add_plan(<?php echo $product->get_id(); ?>)" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">
<input v-if="<?php echo json_encode($product->get_pricing_type() !== 'contact_us'); ?>" v-on:click="$parent.add_plan(<?php echo $product->get_id(); ?>)" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">
<input v-else v-on:click="$parent.open_url('<?php echo esc_url($product->get_contact_us_link()); ?>', '_blank');" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">
<input v-else v-on:click="$parent.open_url('<?php echo esc_url($product->get_contact_us_link()); ?>', '_blank');" type="checkbox" name="products[]" value="<?php echo $product->get_id(); ?>" class="screen-reader-text wu-hidden">
<div class="wu-flex wu-items-center">
<div class="wu-text-sm">
<span id="server-size-0-label" class="wu-font-semibold wu-block wu-text-gray-900">
<?php echo $product->get_name(); ?>
</span>
<div id="server-size-0-description-0" class="wu-text-gray-600">
<p class="sm:wu-inline">
<?php echo $product->get_description(); ?>
</p>
</div>
</div>
</div>
<div id="server-size-0-description-1" class="wu-mt-2 wu-flex wu-text-md sm:wu-mt-0 sm:wu-block sm:wu-ml-4 sm:wu-text-right">
<div class="wu-font-semibold wu-text-gray-900"><?php echo $product->get_formatted_amount(); ?></div>
<div class="wu-ml-1 wu-text-sm wu-text-gray-500 sm:wu-ml-0"><?php echo $product->get_recurring_description(); ?></div>
</div>
<div class="wu-flex wu-items-center">
<div class="wu-text-sm">
<span id="server-size-0-label" class="wu-font-semibold wu-block wu-text-gray-900">
<?php echo $product->get_name(); ?>
</span>
<div id="server-size-0-description-0" class="wu-text-gray-600">
<p class="sm:wu-inline">
<?php echo $product->get_description(); ?>
</p>
</div>
</div>
</div>
<div id="server-size-0-description-1" class="wu-mt-2 wu-flex wu-text-md sm:wu-mt-0 sm:wu-block sm:wu-ml-4 sm:wu-text-right">
<div class="wu-font-semibold wu-text-gray-900"><?php echo $product->get_formatted_amount(); ?></div>
<div class="wu-ml-1 wu-text-sm wu-text-gray-500 sm:wu-ml-0"><?php echo $product->get_recurring_description(); ?></div>
</div>
<div
class="wu-absolute wu--inset-px wu-rounded-lg wu-border-solid wu-border-2 wu-pointer-events-none wu-top-0 wu-bottom-0 wu-right-0 wu-left-0"
:class="$parent.has_product(<?php echo $product->get_id(); ?>) || $parent.has_product('<?php echo $product->get_slug(); ?>') ? 'wu-border-blue-500' : 'wu-border-transparent'"
aria-hidden="true"
>
</div>
</label>
<div
class="wu-absolute wu--inset-px wu-rounded-lg wu-border-solid wu-border-2 wu-pointer-events-none wu-top-0 wu-bottom-0 wu-right-0 wu-left-0"
:class="$parent.has_product(<?php echo $product->get_id(); ?>) || $parent.has_product('<?php echo $product->get_slug(); ?>') ? 'wu-border-blue-500' : 'wu-border-transparent'"
aria-hidden="true"
>
</div>
</label>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@ -15,48 +15,45 @@
* @version 1.4.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
}
?>
<!-- This example requires Tailwind CSS v2.0+ -->
<nav aria-label="<?php esc_attr_e('Progress', 'wp-ultimo'); ?>">
<ul class="wu-clean-steps wu-list-none md:wu-flex wu-p-0 wu--mx-2 wu-my-4">
<ul class="wu-clean-steps wu-list-none md:wu-flex wu-p-0 wu--mx-2 wu-my-4">
<?php foreach ($steps as $index => $step) :
<?php
foreach ($steps as $index => $step) :
$step_key = $step['id'];
$step_key = $step['id'];
/**
* Class element of the Step Status Bar
*
* @var string
*/
$container_class = '';
$color = 'gray';
/**
* Class element of the Step Status Bar
* @var string
*/
$container_class = '';
$color = 'gray';
if ($step_key === $current_step) {
$color = 'blue';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$container_class = 'wu-opacity-50';
$color = 'blue';
} // end if;
if ($step_key === $current_step) {
?>
$color = 'blue';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$container_class = 'wu-opacity-50';
$color = 'blue';
} // end if;
?>
<li class="wu-py-0 md:wu-flex-1 wu-px-2 <?php echo esc_attr($container_class); ?>">
<span class="wu-h-2 wu-block wu-mb-2 wu-bg-<?php echo esc_attr($color); ?>-500">&nbsp;</span>
<span class="wu-block wu-text-2xs wu-font-medium wu-tracking-wide wu-uppercase wu-text-<?php echo esc_attr($color); ?>-500"><?php printf(__('Step %d', 'wp-ultimo'), $index + 1); ?></span>
<span class="wu-block wu-text-sm wu-font-medium wu-text-<?php echo esc_attr($color); ?>-600"><?php echo $step['name']; ?></span>
</li>
<li class="wu-py-0 md:wu-flex-1 wu-px-2 <?php echo esc_attr($container_class); ?>">
<span class="wu-h-2 wu-block wu-mb-2 wu-bg-<?php echo esc_attr($color); ?>-500">&nbsp;</span>
<span class="wu-block wu-text-2xs wu-font-medium wu-tracking-wide wu-uppercase wu-text-<?php echo esc_attr($color); ?>-500"><?php printf(__('Step %d', 'wp-ultimo'), $index + 1); ?></span>
<span class="wu-block wu-text-sm wu-font-medium wu-text-<?php echo esc_attr($color); ?>-600"><?php echo $step['name']; ?></span>
</li>
<?php endforeach; ?>
</ul>
</ul>
</nav>

View File

@ -15,42 +15,39 @@
* @version 1.4.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
}
?>
<ol class="wu-setup-steps wu-flex">
<?php foreach ($steps as $index => $step) :
<?php
foreach ($steps as $index => $step) :
$step_key = $step['id'];
$step_key = $step['id'];
/**
* Class element of the Step Status Bar
*
* @var string
*/
$class = '';
/**
* Class element of the Step Status Bar
* @var string
*/
$class = '';
if ($step_key === $current_step) {
$class = 'active';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$class = 'done';
} // end if;
if ($step_key === $current_step) {
?>
$class = 'active';
<li class="<?php echo $class; ?> wu-flex-1">
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
<?php echo esc_html($step['name']); ?>
$class = 'done';
</li>
} // end if;
?>
<li class="<?php echo $class; ?> wu-flex-1">
<?php echo esc_html($step['name']); ?>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ol>

View File

@ -15,46 +15,43 @@
* @version 1.4.0
*/
if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
if ( ! defined('ABSPATH')) {
exit; // Exit if accessed directly
}
?>
<!-- This example requires Tailwind CSS v2.0+ -->
<nav aria-label="<?php esc_attr_e('Progress', 'wp-ultimo'); ?>">
<ul class="wu-minimal-steps">
<ul class="wu-minimal-steps">
<?php foreach ($steps as $index => $step) :
<?php
foreach ($steps as $index => $step) :
$step_key = $step['id'];
$step_key = $step['id'];
/**
* Class element of the Step Status Bar
*
* @var string
*/
$class = '';
/**
* Class element of the Step Status Bar
* @var string
*/
$class = '';
if ($step_key === $current_step) {
$class = 'step-current';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$class = 'step-done';
} // end if;
if ($step_key === $current_step) {
?>
$class = 'step-current';
} elseif (array_search($current_step, array_column($steps, 'id')) > array_search($step_key, array_column($steps, 'id'))) {
$class = 'step-done';
} // end if;
?>
<li class="<?php echo esc_attr($class); ?>">
<span class="wu-minimal-steps-bar">&nbsp;</span>
<span class="wu-minimal-steps-step-count"><?php printf(__('Step %d', 'wp-ultimo'), $index + 1); ?></span>
<span class="wu-minimal-steps-step-label"><?php echo $step['name']; ?></span>
</li>
<li class="<?php echo esc_attr($class); ?>">
<span class="wu-minimal-steps-bar">&nbsp;</span>
<span class="wu-minimal-steps-step-count"><?php printf(__('Step %d', 'wp-ultimo'), $index + 1); ?></span>
<span class="wu-minimal-steps-step-label"><?php echo $step['name']; ?></span>
</li>
<?php endforeach; ?>
</ul>
</ul>
</nav>

View File

@ -16,14 +16,13 @@
// Exit if accessed directly
defined('ABSPATH') || exit;
if (isset($should_display) && !$should_display) {
if (isset($should_display) && ! $should_display) {
?>
<div id="wu-site-template-container"></div>
<?php
return;
?>
<div id="wu-site-template-container"></div>
<?php
return;
} // end if;
$sites = array_map('wu_get_site', isset($sites) ? $sites : array());
@ -38,110 +37,113 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
<div id="wu-site-template-container">
<ul id="wu-site-template-filter" class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-flex wu-rounded wu-relative wu-m-0 wu-mb-4 wu-list-none">
<ul id="wu-site-template-filter" class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-flex wu-rounded wu-relative wu-m-0 wu-mb-4 wu-list-none">
<li class="wu-site-template-filter-all wu-mx-2 wu-my-0">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All', 'wp-ultimo'); ?>
</a>
</li>
<li class="wu-site-template-filter-all wu-mx-2 wu-my-0">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All', 'wp-ultimo'); ?>
</a>
</li>
<?php if (!empty($customer_sites)) : ?>
<?php if ( ! empty($customer_sites)) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo $customer_sites_category; ?></a>
</li>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo $customer_sites_category; ?></a>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($categories) && $categories) : ?>
<?php if (isset($categories) && $categories) : ?>
<?php foreach ($categories as $category) : ?>
<?php foreach ($categories as $category) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
><?php echo $category; ?></a>
</li>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?> wu-mx-2 wu-my-0">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
><?php echo $category; ?></a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
</ul>
</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 isset($cols) ? $cols : '3'; ?> wu-gap-4">
<?php foreach ($sites as $site_template) : ?>
<?php foreach ($sites as $site_template) : ?>
<?php if ($site_template->get_type() !== 'site_template' && !in_array($site_template->get_id(), $customer_sites, true)) { continue; } ?>
<?php
if ($site_template->get_type() !== 'site_template' && ! in_array($site_template->get_id(), $customer_sites, true)) {
continue; }
?>
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
<?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 ? array($customer_sites_category) : array()); ?>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-rounded wu-relative"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
class="wu-bg-white wu-border-solid wu-border wu-border-gray-300 wu-shadow-sm wu-p-4 wu-rounded wu-relative"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<div class="wu-site-template-image-container wu-relative">
<div class="wu-site-template-image-container wu-relative">
<a
title="<?php esc_attr_e('View Template Preview', 'wp-ultimo'); ?>"
class="wu-site-template-selector wu-cursor-pointer wu-no-underline"
<?php echo $is_template ? $site_template->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site_template->get_active_site_url()); ?>
>
<a
title="<?php esc_attr_e('View Template Preview', 'wp-ultimo'); ?>"
class="wu-site-template-selector wu-cursor-pointer wu-no-underline"
<?php echo $is_template ? $site_template->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site_template->get_active_site_url()); ?>
>
<img class="wu-site-template-image wu-w-full wu-border-solid wu-border wu-border-gray-300 wu-mb-4 wu-bg-white" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo $site_template->get_title(); ?>">
<img class="wu-site-template-image wu-w-full wu-border-solid wu-border wu-border-gray-300 wu-mb-4 wu-bg-white" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo $site_template->get_title(); ?>">
</a>
</a>
</div>
</div>
<h3 class="wu-site-template-title wu-text-lg wu-font-semibold">
<h3 class="wu-site-template-title wu-text-lg wu-font-semibold">
<?php echo $site_template->get_title(); ?>
<?php echo $site_template->get_title(); ?>
</h3>
</h3>
<p class="wu-site-template-description wu-text-sm">
<p class="wu-site-template-description wu-text-sm">
<?php echo $site_template->get_description(); ?>
<?php echo $site_template->get_description(); ?>
</p>
</p>
<div class="wu-mt-4">
<div class="wu-mt-4">
<button v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site_template->get_id()); ?>" type="button" class="wu-site-template-selector button btn button-primary btn-primary wu-w-full wu-text-center wu-cursor-pointer">
<button v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site_template->get_id()); ?>" type="button" class="wu-site-template-selector button btn button-primary btn-primary wu-w-full wu-text-center wu-cursor-pointer">
<span v-if="$parent.template_id == <?php echo esc_attr($site_template->get_id()); ?>"><?php _e('Selected', 'wp-ultimo'); ?></span>
<span v-if="$parent.template_id == <?php echo esc_attr($site_template->get_id()); ?>"><?php _e('Selected', 'wp-ultimo'); ?></span>
<span v-else><?php _e('Select', 'wp-ultimo'); ?></span>
<span v-else><?php _e('Select', 'wp-ultimo'); ?></span>
</button>
</button>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@ -16,12 +16,10 @@
// Exit if accessed directly
defined('ABSPATH') || exit;
if (!$should_display) {
echo "<div></div>";
return;
if ( ! $should_display) {
echo '<div></div>';
return;
} // end if;
$sites = array_map('wu_get_site', isset($sites) ? $sites : array());
@ -37,7 +35,7 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
<?php if (empty($sites)) : ?>
<div
class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4"
class="wu-text-center wu-bg-gray-100 wu-rounded wu-uppercase wu-font-semibold wu-text-xs wu-text-gray-700 wu-p-4"
>
<?php _e('No Site Templates Found.', 'wp-ultimo'); ?>
@ -48,217 +46,219 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
<div class="themes-php wu-styling">
<div class="wrap wu-template-selection">
<div class="wrap wu-template-selection">
<?php
<?php
/**
* Allow developers to hide the title.
*/
if (apply_filters('wu_step_template_display_header', true)) :
/**
* Allow developers to hide the title.
*/
if (apply_filters('wu_step_template_display_header', true)) :
?>
<h2>
<h2>
<?php _e('Pick your Template', 'wp-ultimo'); ?>
<?php _e('Pick your Template', 'wp-ultimo'); ?>
<span class="title-count theme-count">
<span class="title-count theme-count">
<?php echo count($sites); ?>
<?php echo count($sites); ?>
</span>
</span>
</h2>
</h2>
<?php endif; ?>
<?php endif; ?>
<div class="wp-filter">
<div class="wp-filter">
<div class="wp-filter-responsive">
<div class="wp-filter-responsive">
<h4><?php _e('Template Categories', 'wp-ultimo'); ?></h4>
<h4><?php _e('Template Categories', 'wp-ultimo'); ?></h4>
<select class="">
<select class="">
<option value="">
<?php _e('All Templates', 'wp-ultimo'); ?>
</option>
<option value="">
<?php _e('All Templates', 'wp-ultimo'); ?>
</option>
<?php if (!empty($customer_sites)) : ?>
<?php if ( ! empty($customer_sites)) : ?>
<option value="<?php echo esc_attr($customer_sites_category); ?>">
<?php echo $customer_sites_category; ?>
</option>
<option value="<?php echo esc_attr($customer_sites_category); ?>">
<?php echo $customer_sites_category; ?>
</option>
<?php endif; ?>
<?php endif; ?>
<?php foreach ($categories as $category) : ?>
<?php foreach ($categories as $category) : ?>
<option value="<?php echo esc_attr($category); ?>">
<?php echo $category; ?>
</option>
<option value="<?php echo esc_attr($category); ?>">
<?php echo $category; ?>
</option>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
</select>
</div>
</div>
<ul class="filter-links wp-filter-template">
<ul class="filter-links wp-filter-template">
<li class="selector-inactive">
<li class="selector-inactive">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All Templates', 'wp-ultimo'); ?>
</a>
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All Templates', 'wp-ultimo'); ?>
</a>
</li>
</li>
<?php if (!empty($customer_sites)) : ?>
<?php if ( ! empty($customer_sites)) : ?>
<li class="selector-inactive">
<li class="selector-inactive">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
>
<?php echo $customer_sites_category; ?>
</a>
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
>
<?php echo $customer_sites_category; ?>
</a>
</li>
</li>
<?php endif; ?>
<?php endif; ?>
<?php foreach ($categories as $category) : ?>
<?php foreach ($categories as $category) : ?>
<li class="selector-inactive">
<li class="selector-inactive">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
>
<?php echo $category; ?>
</a>
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
>
<?php echo $category; ?>
</a>
</li>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
</div>
</div>
<div class="theme-browser rendered">
<div class="theme-browser rendered">
<div class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo $cols; ?> wu-gap-4 wp-clearfix">
<div class="wu-grid wu-grid-cols-1 sm:wu-grid-cols-2 md:wu-grid-cols-<?php echo $cols; ?> wu-gap-4 wp-clearfix">
<?php $i = 0; foreach ($sites as $site) : ?>
<?php $i = 0; foreach ($sites as $site) : ?>
<?php if ($site->get_type() !== 'site_template' && !in_array($site->get_id(), $customer_sites, true)) { continue; } ?>
<?php
if ($site->get_type() !== 'site_template' && ! in_array($site->get_id(), $customer_sites, true)) {
continue; }
?>
<?php $is_template = $site->get_type() === 'site_template'; ?>
<?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 ? array($customer_sites_category) : array()); ?>
<div
class="theme"
tabindex="<?php echo $i; ?>"
aria-describedby="<?php echo $site->get_id(); ?>-action <?php echo $site->get_id(); ?>-name"
data-slug="<?php echo $site->get_id(); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<div
class="theme"
tabindex="<?php echo $i; ?>"
aria-describedby="<?php echo $site->get_id(); ?>-action <?php echo $site->get_id(); ?>-name"
data-slug="<?php echo $site->get_id(); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<div class="theme-screenshot">
<div class="theme-screenshot">
<img
src="<?php echo $site->get_featured_image(); ?>"
alt="<?php echo $site->get_title(); ?>"
>
<img
src="<?php echo $site->get_featured_image(); ?>"
alt="<?php echo $site->get_title(); ?>"
>
</div>
</div>
<a
<?php echo $is_template ? $site->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site->get_active_site_url()); ?>
class="more-details"
id="<?php echo $site->get_id(); ?>-action"
>
<a
<?php echo $is_template ? $site->get_preview_url_attrs() : sprintf('href="%s" target="_blank"', $site->get_active_site_url()); ?>
class="more-details"
id="<?php echo $site->get_id(); ?>-action"
>
<?php $is_template ? _e('View Template', 'wp-ultimo') : _e('View Site', 'wp-ultimo'); ?>
<?php $is_template ? _e('View Template', 'wp-ultimo') : _e('View Site', 'wp-ultimo'); ?>
</a>
</a>
<div class="wu-flex theme-name-header wu-items-center wu-relative">
<div class="wu-flex theme-name-header wu-items-center wu-relative">
<h2 class="theme-name wu-flex-grow wu-h-full" id="<?php echo $site->get_id(); ?>-name">
<h2 class="theme-name wu-flex-grow wu-h-full" id="<?php echo $site->get_id(); ?>-name">
<?php echo $site->get_title(); ?>
</h2>
<?php echo $site->get_title(); ?>
</h2>
<div class="theme-actions wu-flex">
<div class="theme-actions wu-flex">
<button
class="button button-primary"
type="button"
v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site->get_id()); ?>"
>
<button
class="button button-primary"
type="button"
v-on:click.prevent="$parent.template_id = <?php echo esc_attr($site->get_id()); ?>"
>
<span v-if="$parent.template_id == <?php echo esc_attr($site->get_id()); ?>"><?php _e('Selected', 'wp-ultimo'); ?></span>
<span v-if="$parent.template_id == <?php echo esc_attr($site->get_id()); ?>"><?php _e('Selected', 'wp-ultimo'); ?></span>
<span v-else><?php _e('Select', 'wp-ultimo'); ?></span>
<span v-else><?php _e('Select', 'wp-ultimo'); ?></span>
</button>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
$i++;
endforeach;
?>
<?php
</div>
++$i;
endforeach;
</div>
?>
<div class="theme-overlay"></div>
</div>
<p class="no-themes">
</div>
<?php _e('No Templates Found', 'wp-ultimo'); ?>
</p>
<div class="theme-overlay"></div>
</div>
<p class="no-themes">
<?php _e('No Templates Found', 'wp-ultimo'); ?>
</p>
</div>
</div>

View File

@ -18,10 +18,8 @@
// Exit if accessed directly
defined('ABSPATH') || exit;
if (!$should_display) {
return;
if ( ! $should_display) {
return;
} // end if;
$sites = array_map('wu_get_site', isset($sites) ? $sites : array());
@ -35,107 +33,110 @@ $customer_sites = isset($customer_sites) ? array_map('intval', $customer_sites)
?>
<div id="wu-site-template-container">
<ul id="wu-site-template-filter">
<ul id="wu-site-template-filter">
<li class="wu-site-template-filter-all">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All', 'wp-ultimo'); ?>
</a>
</li>
<li class="wu-site-template-filter-all">
<a
href="#"
data-category=""
:class="$parent.template_category === '' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = ''"
>
<?php _e('All', 'wp-ultimo'); ?>
</a>
</li>
<?php if (!empty($customer_sites)) : ?>
<?php if ( ! empty($customer_sites)) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo $customer_sites_category; ?></a>
</li>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($customer_sites_category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($customer_sites_category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($customer_sites_category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($customer_sites_category); ?>'"
><?php echo $customer_sites_category; ?></a>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($categories) && $categories) : ?>
<?php if (isset($categories) && $categories) : ?>
<?php foreach ($categories as $category) : ?>
<?php foreach ($categories as $category) : ?>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
><?php echo $category; ?></a>
</li>
<li class="wu-site-template-filter-<?php echo esc_attr(sanitize_title($category)); ?>">
<a
href="#"
data-category="<?php echo esc_attr($category); ?>"
:class="$parent.template_category === '<?php echo esc_attr($category); ?>' ? 'current wu-font-semibold' : ''"
v-on:click.prevent="$parent.template_category = '<?php echo esc_attr($category); ?>'"
><?php echo $category; ?></a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php endif; ?>
</ul>
</ul>
<div id="wu-site-template-container-grid">
<div id="wu-site-template-container-grid">
<?php foreach ($sites as $site_template) : ?>
<?php foreach ($sites as $site_template) : ?>
<?php if ($site_template->get_type() !== 'site_template' && !in_array($site_template->get_id(), $customer_sites, true)) { continue; } ?>
<?php
if ($site_template->get_type() !== 'site_template' && ! in_array($site_template->get_id(), $customer_sites, true)) {
continue; }
?>
<?php $is_template = $site_template->get_type() === 'site_template'; ?>
<?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 ? array($customer_sites_category) : array()); ?>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<div
id="wu-site-template-<?php echo esc_attr($site_template->get_id()); ?>"
v-show="!$parent.template_category || <?php echo esc_attr(json_encode($categories)); ?>.join(',').indexOf($parent.template_category) > -1"
v-cloak
>
<img class="wu-site-template-image" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo $site_template->get_title(); ?>">
<img class="wu-site-template-image" src="<?php echo esc_attr($site_template->get_featured_image()); ?>" alt="<?php echo $site_template->get_title(); ?>">
<h3 class="wu-site-template-title">
<h3 class="wu-site-template-title">
<?php echo $site_template->get_title(); ?>
<?php echo $site_template->get_title(); ?>
</h3>
</h3>
<p class="wu-site-template-description">
<p class="wu-site-template-description">
<?php echo $site_template->get_description(); ?>
<?php echo $site_template->get_description(); ?>
</p>
</p>
<div class="wu-site-template-preview-block">
<div class="wu-site-template-preview-block">
<a class="wu-site-template-selector" <?php echo $site_template->get_preview_url_attrs(); ?>>
<a class="wu-site-template-selector" <?php echo $site_template->get_preview_url_attrs(); ?>>
<?php _e('View Template Preview', 'wp-ultimo'); ?>
<?php _e('View Template Preview', 'wp-ultimo'); ?>
</a>
</a>
</div>
</div>
<label for="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>">
<label for="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>">
<input id="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>" type="radio" name="template_id" v-model="$parent.template_id" value="<?php echo esc_attr($site_template->get_id()); ?>" />
<input id="wu-site-template-id-<?php echo esc_attr($site_template->get_id()); ?>" type="radio" name="template_id" v-model="$parent.template_id" value="<?php echo esc_attr($site_template->get_id()); ?>" />
<a class="wu-site-template-selector" @click.prevent="" href="#">
<a class="wu-site-template-selector" @click.prevent="" href="#">
<?php _e('Select this Template', 'wp-ultimo'); ?>
<?php _e('Select this Template', 'wp-ultimo'); ?>
</a>
</a>
</label>
</label>
</div>
</div>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
</div>
</div>

View File

@ -7,71 +7,86 @@
?>
<div class="wu-striped wu-m-0 wu--mt-2 wu-mb-2 wu--mx-3">
<div class="wu-w-full wu-box-border wu-p-4 wu-m-0 wu-border-t-0 wu-border-l-0 wu-border-r-0 wu-border-b wu-border-gray-400 wu-border-solid wu-text-center">
<div class="wu-w-full wu-box-border wu-p-4 wu-m-0 wu-border-t-0 wu-border-l-0 wu-border-r-0 wu-border-b wu-border-gray-400 wu-border-solid wu-text-center">
<div class="customer-actions wu--mt-widget-inset wu--mx-4 wu-p-6 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-t-0" style="background-image: url('<?php echo get_avatar_url($user->ID, array(
'force_display' => true,
'size' => 300,
'default' => 'identicon',
)); ?>');">
&nbsp;
</div>
<div class="customer-actions wu--mt-widget-inset wu--mx-4 wu-p-6 wu-bg-gray-100 wu-border wu-border-solid wu-border-gray-300 wu-border-l-0 wu-border-r-0 wu-border-t-0" style="background-image: url('
<?php
echo get_avatar_url(
$user->ID,
array(
'force_display' => true,
'size' => 300,
'default' => 'identicon',
)
);
?>
');">
&nbsp;
</div>
<div class="wu-mb-2 wu--mt-8">
<div class="wu-mb-2 wu--mt-8">
<?php echo get_avatar($user->ID, 86, 'identicon', '', array(
'force_display' => true,
'class' => 'wu-rounded-full wu-border wu-border-solid wu-border-gray-300 wu-relative',
)); ?>
<?php
echo get_avatar(
$user->ID,
86,
'identicon',
'',
array(
'force_display' => true,
'class' => 'wu-rounded-full wu-border wu-border-solid wu-border-gray-300 wu-relative',
)
);
?>
</div>
</div>
<div class="">
<div class="">
<div class="wu-block wu-my-1 wu-text-base wu-font-semibold">
<?php echo $user->display_name; ?>
</div>
<div class="wu-block wu-my-1 wu-text-base wu-font-semibold">
<?php echo $user->display_name; ?>
</div>
<div class="wu-block wu-my-2">
<div class="wu-block wu-my-2">
<a href="mailto:<?php echo esc_attr($user->user_email); ?>" class="wu-no-underline" <?php echo wu_tooltip_text(__('Send an email to this customer.', 'wp-ultimo')); ?>>
<?php echo $user->user_email; ?>
</a>
<a href="mailto:<?php echo esc_attr($user->user_email); ?>" class="wu-no-underline" <?php echo wu_tooltip_text(__('Send an email to this customer.', 'wp-ultimo')); ?>>
<?php echo $user->user_email; ?>
</a>
</div>
</div>
<div class="wu-block wu-pt-2">
<div class="wu-block wu-pt-2">
<?php if ($user->ID !== get_current_user_id()) : ?>
<?php if ($user->ID !== get_current_user_id()) : ?>
<a
href="<?php echo \WP_Ultimo\User_Switching::get_instance()->render($user->ID); ?>"
class="button wu-w-full <?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : 'wubox' ?> wu-block wu-text-center"
title="<?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : __('Install User Switching', 'wp-ultimo'); ?>"
>
<?php _e('Switch To &rarr;', 'wp-ultimo'); ?>
</a>
<a
href="<?php echo \WP_Ultimo\User_Switching::get_instance()->render($user->ID); ?>"
class="button wu-w-full <?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : 'wubox'; ?> wu-block wu-text-center"
title="<?php echo \WP_Ultimo\User_Switching::get_instance()->check_user_switching_is_activated() ? '' : __('Install User Switching', 'wp-ultimo'); ?>"
>
<?php _e('Switch To &rarr;', 'wp-ultimo'); ?>
</a>
<?php else : ?>
<?php else : ?>
<button class="button wu-w-full" disabled="disabled">
<span <?php echo wu_tooltip_text(__('Switching to your own account is not possible.', 'wp-ultimo')); ?>>
<?php _e('Switch To &rarr;', 'wp-ultimo'); ?>
</span>
</button>
<button class="button wu-w-full" disabled="disabled">
<span <?php echo wu_tooltip_text(__('Switching to your own account is not possible.', 'wp-ultimo')); ?>>
<?php _e('Switch To &rarr;', 'wp-ultimo'); ?>
</span>
</button>
<?php endif; ?>
<?php endif; ?>
<a href="<?php echo get_edit_user_link($user->ID); ?>" target="_blank" class="wu-w-full wu-block wu-text-center wu-no-underline wu-mt-4">
<a href="<?php echo get_edit_user_link($user->ID); ?>" target="_blank" class="wu-w-full wu-block wu-text-center wu-no-underline wu-mt-4">
<?php _e('Visit Profile &rarr;', 'wp-ultimo'); ?>
<?php _e('Visit Profile &rarr;', 'wp-ultimo'); ?>
</a>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -7,58 +7,60 @@
?>
<div id="dashboard-filters" class="wp-filter wu-filter">
<ul class="filter-links">
<ul class="filter-links">
<?php foreach ($views as $tab => $view) : ?>
<?php foreach ($views as $tab => $view) : ?>
<li class="<?php echo $tab === $active_tab ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($view['url']); ?>"
class="<?php echo $tab === $active_tab ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $view['label']; ?>
</a>
</li>
<li class="<?php echo $tab === $active_tab ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($view['url']); ?>"
class="<?php echo $tab === $active_tab ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $view['label']; ?>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
<ul class="filter-links sm:wu-float-right sm:wu-w-1/2 lg:wu-w-1/4 wu--mx-2 wu-block sm:wu-inline-block">
<li class="wu-w-full wu-relative">
<span class="dashicons-wu-calendar wu-absolute wu-text-base wu-text-gray-600" style="top: 18px; left: 12px;"></span>
<input
id="wu-date-range"
style="min-height: 28px;"
class="wu-border-0 wu-border-l wu-border-gray-300 wu-bg-gray-100 wu-w-full wu-text-right wu-py-3 wu-outline-none wu-rounded-none"
placeholder="Loading..."
>
</li>
</ul>
<ul class="filter-links sm:wu-float-right sm:wu-w-1/2 lg:wu-w-1/4 wu--mx-2 wu-block sm:wu-inline-block">
<li class="wu-w-full wu-relative">
<span class="dashicons-wu-calendar wu-absolute wu-text-base wu-text-gray-600" style="top: 18px; left: 12px;"></span>
<input
id="wu-date-range"
style="min-height: 28px;"
class="wu-border-0 wu-border-l wu-border-gray-300 wu-bg-gray-100 wu-w-full wu-text-right wu-py-3 wu-outline-none wu-rounded-none"
placeholder="Loading..."
>
</li>
</ul>
<ul class="wu-hidden md:wu-inline-block filter-links sm:wu-float-right md:wu-mr-6">
<ul class="wu-hidden md:wu-inline-block filter-links sm:wu-float-right md:wu-mr-6">
<?php foreach ($preset_options as $slug => $preset) : ?>
<?php foreach ($preset_options as $slug => $preset) : ?>
<?php
<?php
$link = add_query_arg(array(
'start_date' => $preset['start_date'],
'end_date' => $preset['end_date'],
'preset' => $slug,
));
$link = add_query_arg(
array(
'start_date' => $preset['start_date'],
'end_date' => $preset['end_date'],
'preset' => $slug,
)
);
$request_slug = wu_request('preset', 'none');
$request_slug = wu_request('preset', 'none');
?>
?>
<li class="<?php echo $slug === $request_slug ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($link); ?>"
class="<?php echo $slug === $request_slug ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $preset['label']; ?>
</a>
</li>
<li class="<?php echo $slug === $request_slug ? 'current' : ''; ?>">
<a href="<?php echo esc_attr($link); ?>"
class="<?php echo $slug === $request_slug ? 'current wu-font-medium' : ''; ?> wu-loader">
<?php echo $preset['label']; ?>
</a>
</li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</ul>
</div>

View File

@ -11,29 +11,29 @@
<?php
$data = array();
$slug = 'signup_countries';
$data = array();
$slug = 'signup_countries';
$headers = array(
__('Country', 'wp-ultimo'),
__('Customer Count', 'wp-ultimo'),
__('Country', 'wp-ultimo'),
__('Customer Count', 'wp-ultimo'),
);
foreach ($countries as $country_code => $count) {
$line = array(
wu_get_country_name($country_code),
$count,
);
$line = array(
wu_get_country_name($country_code),
$count,
);
$data[] = $line;
$data[] = $line;
} // end foreach;
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
));
$page->render_csv_button(
array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
);
?>
@ -41,77 +41,81 @@ $page->render_csv_button(array(
</div>
<?php if (!empty($countries)) : ?>
<?php if ( ! empty($countries)) : ?>
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Country', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Customer Count', 'wp-ultimo'); ?></th>
</tr>
</thead>
<thead>
<tr>
<th><?php _e('Country', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Customer Count', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<?php foreach ($countries as $country_code => $count) : ?>
<?php foreach ($countries as $country_code => $count) : ?>
<tr>
<td>
<?php
<tr>
<td>
<?php
printf('<span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-mr-1" %s></span>',
strtolower($country_code),
wu_tooltip_text(wu_get_country_name($country_code))
);
printf(
'<span class="wu-flag-icon wu-flag-icon-%s wu-w-5 wu-mr-1" %s></span>',
strtolower($country_code),
wu_tooltip_text(wu_get_country_name($country_code))
);
?>
<?php echo wu_get_country_name($country_code); ?>
</td>
<td class="wu-text-right"><?php echo $count; ?></td>
</tr>
?>
<?php echo wu_get_country_name($country_code); ?>
</td>
<td class="wu-text-right"><?php echo $count; ?></td>
</tr>
<?php
<?php
$state_list = wu_get_states_of_customers($country_code);
$_state_count = 0;
$state_list = wu_get_states_of_customers($country_code);
$_state_count = 0;
?>
?>
<?php foreach ($state_list as $state => $state_count) : $_state_count = $_state_count + $state_count; ?>
<?php
foreach ($state_list as $state => $state_count) :
$_state_count = $_state_count + $state_count;
?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo $state; ?></td>
<td class="wu-text-right"><?php echo $state_count; ?></td>
</tr>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php echo $state; ?></td>
<td class="wu-text-right"><?php echo $state_count; ?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php if ($state_list && $count - $_state_count >= 0) : ?>
<?php if ($state_list && $count - $_state_count >= 0) : ?>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php _e('Other', 'wp-ultimo') ?></td>
<td class="wu-text-right"><?php echo $count - $_state_count; ?></td>
</tr>
<tr>
<td class="wu-text-xs">|&longrightarrow; <?php _e('Other', 'wp-ultimo'); ?></td>
<td class="wu-text-right"><?php echo $count - $_state_count; ?></td>
</tr>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<?php else : ?>
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No countries registered yet.', 'wp-ultimo'); ?>
<?php _e('No countries registered yet.', 'wp-ultimo'); ?>
</div>
</div>
<?php endif; ?>

View File

@ -12,29 +12,29 @@
<?php
$data = array();
$slug = 'signup_forms';
$data = array();
$slug = 'signup_forms';
$headers = array(
__('Checkout Form', 'wp-ultimo'),
__('Signups', 'wp-ultimo'),
__('Checkout Form', 'wp-ultimo'),
__('Signups', 'wp-ultimo'),
);
foreach ($forms as $form) {
$line = array(
$form->signup_form,
$form->count,
);
$line = array(
$form->signup_form,
$form->count,
);
$data[] = $line;
$data[] = $line;
} // end foreach;
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
));
$page->render_csv_button(
array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
);
?>
@ -42,47 +42,47 @@ $page->render_csv_button(array(
</div>
<?php if (!empty($forms)) : ?>
<?php if ( ! empty($forms)) : ?>
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Checkout Form', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Signups', 'wp-ultimo'); ?></th>
</tr>
</thead>
<thead>
<tr>
<th><?php _e('Checkout Form', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Signups', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<?php foreach ($forms as $form) : ?>
<?php foreach ($forms as $form) : ?>
<tr>
<td>
<?php echo $form->signup_form; ?>
<?php if ($form->signup_form === 'by-admin') : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-ultimo')); ?>
<?php endif;?>
</td>
<td class="wu-text-right"><?php echo $form->count; ?></td>
</tr>
<tr>
<td>
<?php echo $form->signup_form; ?>
<?php if ($form->signup_form === 'by-admin') : ?>
<?php echo wu_tooltip(__('Customers created via the admin panel, by super admins.', 'wp-ultimo')); ?>
<?php endif; ?>
</td>
<td class="wu-text-right"><?php echo $form->count; ?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<?php else : ?>
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No data yet.', 'wp-ultimo'); ?>
<?php _e('No data yet.', 'wp-ultimo'); ?>
</div>
</div>
<?php endif; ?>

View File

@ -20,8 +20,7 @@ $headers = array(
);
foreach ($sites as $site_visits) {
$site_line = $site_visits->site->get_title().' '.get_admin_url($site_visits->site->get_id());
$site_line = $site_visits->site->get_title() . ' ' . get_admin_url($site_visits->site->get_id());
$line = array(
$site_line,
@ -29,14 +28,15 @@ foreach ($sites as $site_visits) {
);
$data[] = $line;
} // end foreach;
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
));
$page->render_csv_button(
array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
);
?>
@ -44,66 +44,66 @@ $page->render_csv_button(array(
</div>
<?php if (!empty($sites)) : ?>
<?php if ( ! empty($sites)) : ?>
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<div class="wu-advanced-filters wu--mx-3 wu--mb-3 wu-mt-3">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<table class="wp-list-table widefat fixed striped wu-border-t-0 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th class="wu-w-8/12"><?php _e('Site', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Visits', 'wp-ultimo'); ?></th>
</tr>
</thead>
<thead>
<tr>
<th class="wu-w-8/12"><?php _e('Site', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Visits', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<?php foreach ($sites as $site_visits) : ?>
<?php foreach ($sites as $site_visits) : ?>
<tr>
<td class="wu-align-middle">
<span class="wu-uppercase wu-text-xs wu-text-gray-700 wu-font-bold">
<?php echo $site_visits->site->get_title(); ?>
</span>
<tr>
<td class="wu-align-middle">
<span class="wu-uppercase wu-text-xs wu-text-gray-700 wu-font-bold">
<?php echo $site_visits->site->get_title(); ?>
</span>
<div class="sm:wu-flex">
<div class="sm:wu-flex">
<a title="<?php _e('Homepage', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<a title="<?php _e('Homepage', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_home_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight">
<span class="dashicons-wu-link1 wu-align-middle wu-mr-1"></span>
<?php _e('Homepage', 'wp-ultimo'); ?>
<span class="dashicons-wu-link1 wu-align-middle wu-mr-1"></span>
<?php _e('Homepage', 'wp-ultimo'); ?>
</a>
</a>
<a title="<?php _e('Dashboard', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<a title="<?php _e('Dashboard', 'wp-ultimo'); ?>" href="<?php echo esc_attr(get_admin_url($site_visits->site->get_id())); ?>" class="wu-no-underline wu-flex wu-items-center wu-text-xs wp-ui-text-highlight sm:wu-mt-0 sm:wu-ml-6">
<span class="dashicons-wu-browser wu-align-middle wu-mr-1"></span>
<?php _e('Dashboard', 'wp-ultimo'); ?>
<span class="dashicons-wu-browser wu-align-middle wu-mr-1"></span>
<?php _e('Dashboard', 'wp-ultimo'); ?>
</a>
</a>
</div>
</td>
<td class="wu-align-middle wu-text-right">
<?php echo sprintf(_n('%d visit', '%d visits', $site_visits->count, 'wp-ultimo'), $site_visits->count); ?>
</td>
</tr>
</div>
</td>
<td class="wu-align-middle wu-text-right">
<?php printf(_n('%d visit', '%d visits', $site_visits->count, 'wp-ultimo'), $site_visits->count); ?>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
<?php else : ?>
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<div class="wu-bg-gray-100 wu-p-4 wu-rounded wu-mt-6">
<?php _e('No visits registered in this period.', 'wp-ultimo'); ?>
<?php _e('No visits registered in this period.', 'wp-ultimo'); ?>
</div>
</div>
<?php endif; ?>

View File

@ -7,26 +7,26 @@
?>
<div class="wu-mt-6 wu-mb-0">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700" style="height: 300px;">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700" style="height: 300px;">
<span class="wu-blinking-animation">
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php _e('Loading...', 'wp-ultimo'); ?>
</span>
</span>
</div>
</div>
<div id="chart_mrr_growth">
<apexchart
v-cloak
height="300"
:type="chart_options.mrr_growth.chartOptions.chart.type"
:options="chart_options.mrr_growth.chartOptions"
:series="chart_options.mrr_growth.series"
>
</apexchart>
</div>
<div id="chart_mrr_growth">
<apexchart
v-cloak
height="300"
:type="chart_options.mrr_growth.chartOptions.chart.type"
:options="chart_options.mrr_growth.chartOptions"
:series="chart_options.mrr_growth.series"
>
</apexchart>
</div>
</div>

View File

@ -7,69 +7,69 @@
?>
<div class="wu-styling">
<ul class="md:wu-flex wu-my-0 wu-mx-0">
<ul class="md:wu-flex wu-my-0 wu-mx-0">
<li class="wu-p-2 wu-w-full md:wu-w-full wu-relative">
<li class="wu-p-2 wu-w-full md:wu-w-full wu-relative">
<div>
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo $new_accounts; ?>
</strong>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo $new_accounts; ?>
</strong>
</div>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('New Memberships', 'wp-ultimo'); ?></span>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('New Memberships', 'wp-ultimo'); ?></span>
</div>
</li>
</li>
</ul>
</ul>
<div class="wu--mx-3 wu--mb-3 wu-mt-2">
<div class="wu--mx-3 wu--mb-3 wu-mt-2">
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Product Name', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('New Memberships', 'wp-ultimo'); ?></th>
</tr>
</thead>
<thead>
<tr>
<th><?php _e('Product Name', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('New Memberships', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<?php if ($products) : ?>
<?php if ($products) : ?>
<?php foreach ($products as $product) : ?>
<?php foreach ($products as $product) : ?>
<tr>
<td>
<?php echo $product->name; ?>
</td>
<td class="wu-text-right">
<?php echo $product->count; ?>
</td>
</tr>
<tr>
<td>
<?php echo $product->name; ?>
</td>
<td class="wu-text-right">
<?php echo $product->count; ?>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php else : ?>
<?php else : ?>
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
</td>
</tr>
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>

View File

@ -7,100 +7,100 @@
?>
<div class="wu-styling">
<ul class="lg:wu-flex wu-my-0 wu-mx-0">
<ul class="lg:wu-flex wu-my-0 wu-mx-0">
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative" <?php echo wu_tooltip_text(__('MRR stands for Monthly Recurring Revenue', 'wp-ultimo')); ?>>
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative" <?php echo wu_tooltip_text(__('MRR stands for Monthly Recurring Revenue', 'wp-ultimo')); ?>>
<div>
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo wu_format_currency($mrr); ?>
</strong>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo wu_format_currency($mrr); ?>
</strong>
</div>
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('MRR', 'wp-ultimo'); ?></span>
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('MRR', 'wp-ultimo'); ?></span>
</div>
</li>
</li>
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative">
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative">
<div>
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo wu_format_currency($gross_revenue); ?>
</strong>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo wu_format_currency($gross_revenue); ?>
</strong>
</div>
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Gross Revenue', 'wp-ultimo'); ?></span>
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Gross Revenue', 'wp-ultimo'); ?></span>
</div>
</li>
</li>
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative">
<li class="wu-p-2 wu-w-full md:wu-w-4/12 wu-relative">
<div>
<div>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo wu_format_currency($refunds); ?>
</strong>
<strong class="wu-text-gray-800 wu-text-2xl md:wu-text-xl">
<?php echo wu_format_currency($refunds); ?>
</strong>
</div>
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Refunded', 'wp-ultimo'); ?></span>
</div>
<div class="wu-text-md wu-text-gray-600">
<span class="wu-block"><?php _e('Refunded', 'wp-ultimo'); ?></span>
</div>
</li>
</li>
</ul>
</ul>
<div class="wu--mx-3 wu--mb-3 wu-mt-2">
<div class="wu--mx-3 wu--mb-3 wu-mt-2">
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<table class="wp-list-table widefat fixed striped wu-border-t-1 wu-border-l-0 wu-border-r-0">
<thead>
<tr>
<th><?php _e('Product', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Revenue', 'wp-ultimo'); ?></th>
</tr>
</thead>
<thead>
<tr>
<th><?php _e('Product', 'wp-ultimo'); ?></th>
<th class="wu-text-right"><?php _e('Revenue', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<?php if (wu_get_products()) : ?>
<?php if (wu_get_products()) : ?>
<?php foreach ($product_stats as $stats) : ?>
<?php foreach ($product_stats as $stats) : ?>
<tr>
<td>
<?php echo $stats['label']; ?>
</td>
<td class="wu-text-right">
<?php echo wu_format_currency($stats['revenue']); ?>
</td>
</tr>
<tr>
<td>
<?php echo $stats['label']; ?>
</td>
<td class="wu-text-right">
<?php echo wu_format_currency($stats['revenue']); ?>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php else : ?>
<?php else : ?>
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
</td>
</tr>
<tr>
<td colspan="2">
<?php _e('No Products found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>

View File

@ -7,88 +7,88 @@
?>
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = array();
$slug = 'taxes_by_code';
$headers = array(
__('Tax', 'wp-ultimo'),
__('Rate', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
);
$data = array();
$slug = 'taxes_by_code';
$headers = array(
__('Tax', 'wp-ultimo'),
__('Rate', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
);
foreach ($taxes_by_rate as $tax_line) {
foreach ($taxes_by_rate as $tax_line) {
$line = array(
wu_get_isset($tax_line, 'title', 'No Name'),
$tax_line['tax_rate'],
$tax_line['order_count'],
wu_format_currency($tax_line['tax_total']),
);
$line = array(
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;
$data[] = $line;
$page->render_csv_button(
array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
);
} // end foreach;
?>
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug
));
<table class="wp-list-table widefat fixed striped wu-border-none">
?>
<thead>
<tr>
<th><?php _e('Tax', 'wp-ultimo'); ?></th>
<th><?php _e('Rate', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
</tr>
</thead>
<table class="wp-list-table widefat fixed striped wu-border-none">
<tbody>
<thead>
<tr>
<th><?php _e('Tax', 'wp-ultimo'); ?></th>
<th><?php _e('Rate', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
</tr>
</thead>
<?php if ($taxes_by_rate) : ?>
<tbody>
<?php foreach ($taxes_by_rate as $tax_line) : ?>
<?php if ($taxes_by_rate) : ?>
<tr>
<td>
<?php echo wu_get_isset($tax_line, 'title', 'No Name'); ?>
</td>
<td>
<?php echo $tax_line['tax_rate']; ?>%
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
</tr>
<?php foreach ($taxes_by_rate as $tax_line) : ?>
<?php endforeach; ?>
<tr>
<td>
<?php echo wu_get_isset($tax_line, 'title', 'No Name'); ?>
</td>
<td>
<?php echo $tax_line['tax_rate']; ?>%
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
</tr>
<?php else : ?>
<?php endforeach; ?>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php else : ?>
<?php endif; ?>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
</tbody>
<?php endif; ?>
</table>
</tbody>
</table>
</div>
</div>
</div>

View File

@ -7,12 +7,12 @@
?>
<div class="wu-styling">
<div class="wu-widget-inset">
<div class="wu-widget-inset">
<?php
<?php
$data = array();
$slug = 'taxes_by_day';
$data = array();
$slug = 'taxes_by_day';
$headers = array(
__('Day', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
@ -22,79 +22,79 @@
);
foreach ($taxes_by_day as $day => $tax_line) {
$line = array(
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'])
wu_format_currency($tax_line['net_profit']),
);
$data[] = $line;
$data[] = $line;
} // end foreach;
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug
));
$page->render_csv_button(
array(
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
);
?>
<table class="wp-list-table widefat fixed striped wu-border-none">
<table class="wp-list-table widefat fixed striped wu-border-none">
<thead>
<tr>
<th class="wu-w-1/3"><?php _e('Day', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Total Sales', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php _e('Net Profit', 'wp-ultimo'); ?></th>
</tr>
</thead>
<thead>
<tr>
<th class="wu-w-1/3"><?php _e('Day', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Total Sales', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php _e('Net Profit', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<?php if ($taxes_by_day) : ?>
<?php if ($taxes_by_day) : ?>
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<tr>
<td>
<?php echo date_i18n(get_option('date_format'), strtotime($day)); ?>
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['net_profit']); ?>
</td>
</tr>
<tr>
<td>
<?php echo date_i18n(get_option('date_format'), strtotime($day)); ?>
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['net_profit']); ?>
</td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php else : ?>
<?php else : ?>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
<?php endif; ?>
</tbody>
</tbody>
</table>
</table>
</div>
</div>
</div>

View File

@ -7,26 +7,26 @@
?>
<div class="wu-mt-6 wu-mb-0">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700" style="height: 300px;">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700" style="height: 300px;">
<span class="wu-blinking-animation">
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php _e('Loading...', 'wp-ultimo'); ?>
</span>
</span>
</div>
</div>
<div id="chart_mrr_growth">
<apexchart
v-cloak
height="300"
:type="chart_options.mrr_growth.chartOptions.chart.type"
:options="chart_options.mrr_growth.chartOptions"
:series="chart_options.mrr_growth.series"
>
</apexchart>
</div>
<div id="chart_mrr_growth">
<apexchart
v-cloak
height="300"
:type="chart_options.mrr_growth.chartOptions.chart.type"
:options="chart_options.mrr_growth.chartOptions"
:series="chart_options.mrr_growth.series"
>
</apexchart>
</div>
</div>

View File

@ -7,26 +7,26 @@
?>
<div class="wu-mt-6 wu-mb-0">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700" style="height: 300px;">
<div v-show="false" class="wu-text-center wu-rounded wu-flex wu-items-center wu-justify-center wu-uppercase wu-font-semibold wu-text-xs wu-h-full wu-text-gray-700" style="height: 300px;">
<span class="wu-blinking-animation">
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
<?php _e('Loading...', 'wp-ultimo'); ?>
</span>
</span>
</div>
</div>
<div id="chart_mrr_growth">
<apexchart
v-cloak
height="300"
:type="chart_options.mrr_growth.chartOptions.chart.type"
:options="chart_options.mrr_growth.chartOptions"
:series="chart_options.mrr_growth.series"
>
</apexchart>
</div>
<div id="chart_mrr_growth">
<apexchart
v-cloak
height="300"
:type="chart_options.mrr_growth.chartOptions.chart.type"
:options="chart_options.mrr_growth.chartOptions"
:series="chart_options.mrr_growth.series"
>
</apexchart>
</div>
</div>

View File

@ -7,119 +7,119 @@
?>
<div class="wu-styling <?php echo esc_attr($className); ?>">
<div class="<?php echo wu_env_picker('', 'wu-widget-inset'); ?>">
<div class="<?php echo wu_env_picker('', 'wu-widget-inset'); ?>">
<!-- Title Element -->
<div class="wu-p-4 wu-flex wu-items-center <?php echo wu_env_picker('', 'wu-bg-gray-100 wu-border-solid wu-border-0 wu-border-b wu-border-gray-200'); ?>">
<!-- Title Element -->
<div class="wu-p-4 wu-flex wu-items-center <?php echo wu_env_picker('', 'wu-bg-gray-100 wu-border-solid wu-border-0 wu-border-b wu-border-gray-200'); ?>">
<?php if ($title) : ?>
<?php if ($title) : ?>
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<h3 class="wu-m-0 <?php echo wu_env_picker('', 'wu-widget-title'); ?>">
<?php echo $title; ?>
<?php echo $title; ?>
</h3>
</h3>
<?php endif; ?>
<?php endif; ?>
<?php if (wu_request('page') !== 'account') : ?>
<?php if (wu_request('page') !== 'account') : ?>
<div class="wu-ml-auto">
<div class="wu-ml-auto">
<a
title="<?php esc_attr_e('See More', 'wp-ultimo'); ?>"
class="wu-text-sm wu-no-underline button"
href="<?php echo $element->get_manage_url($site->get_id()); ?>"
>
<a
title="<?php esc_attr_e('See More', 'wp-ultimo'); ?>"
class="wu-text-sm wu-no-underline button"
href="<?php echo $element->get_manage_url($site->get_id()); ?>"
>
<?php _e('See More', 'wp-ultimo'); ?>
<?php _e('See More', 'wp-ultimo'); ?>
</a>
</a>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- Title Element - End -->
</div>
<!-- Title Element - End -->
<ul class="md:wu-flex wu-m-0 wu-list-none wu-p-4">
<ul class="md:wu-flex wu-m-0 wu-list-none wu-p-4">
<?php if ($product) : ?>
<?php if ($product) : ?>
<li class="wu-flex-1 wu-relative wu-m-0">
<li class="wu-flex-1 wu-relative wu-m-0">
<div>
<div>
<strong class="wu-text-gray-800 wu-text-base">
<strong class="wu-text-gray-800 wu-text-base">
<?php echo $product->get_name(); ?>
<?php echo $product->get_name(); ?>
</strong>
</strong>
</div>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Your current plan', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Manage &rarr;', 'wp-ultimo'); ?></a> -->
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Your current plan', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Manage &rarr;', 'wp-ultimo'); ?></a> -->
</div>
</li>
</li>
<?php endif; ?>
<?php endif; ?>
<?php if ($site_trial) : ?>
<?php if ($site_trial) : ?>
<li class="wu-flex-1 wu-relative wu-m-0">
<li class="wu-flex-1 wu-relative wu-m-0">
<div>
<div>
<strong class="wu-text-gray-800 wu-text-base">
<?php printf(_n('%s day', '%s days', $site_trial, 'wp-ultimo'), $site_trial); ?>
</strong>
<strong class="wu-text-gray-800 wu-text-base">
<?php printf(_n('%s day', '%s days', $site_trial, 'wp-ultimo'), $site_trial); ?>
</strong>
</div>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Remaining time in trial', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Upgrade &rarr;', 'wp-ultimo'); ?></a> -->
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Remaining time in trial', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Upgrade &rarr;', 'wp-ultimo'); ?></a> -->
</div>
</li>
</li>
<?php endif; ?>
<?php endif; ?>
<li class="wu-flex-1 wu-relative wu-m-0">
<li class="wu-flex-1 wu-relative wu-m-0">
<div>
<div>
<strong class="wu-text-gray-800 wu-text-base">
<?php
<strong class="wu-text-gray-800 wu-text-base">
<?php
/**
* Display space used
*/
printf($message, size_format($space_used), size_format($space_allowed));
?>
</strong>
</strong>
<?php if (!$unlimited_space) : ?>
<?php if ( ! $unlimited_space) : ?>
<span class="wu-p-1 wu-bg-gray-200 wu-inline wu-align-text-bottom wu-rounded wu-text-center wu-text-xs wu-text-gray-600">
<?php echo $percentage; ?>%
</span>
<span class="wu-p-1 wu-bg-gray-200 wu-inline wu-align-text-bottom wu-rounded wu-text-center wu-text-xs wu-text-gray-600">
<?php echo $percentage; ?>%
</span>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Disk space used', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Upgrade &rarr;', 'wp-ultimo'); ?></a> -->
</div>
<div class="wu-text-sm wu-text-gray-600">
<span class="wu-block"><?php _e('Disk space used', 'wp-ultimo'); ?></span>
<!-- <a href="#" class="wu-no-underline"><?php _e('Upgrade &rarr;', 'wp-ultimo'); ?></a> -->
</div>
</li>
</li>
</ul>
</ul>
</div>

Some files were not shown because too many files have changed in this diff Show More