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

@ -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 -->