Initial Commit

This commit is contained in:
David Stone
2024-11-30 18:24:12 -07:00
commit e8f7955c1c
5432 changed files with 1397750 additions and 0 deletions

375
views/base/addons.php Normal file
View File

@ -0,0 +1,375 @@
<?php
/**
* Add-ons list page.
*
* @since 2.0.0
*/
?>
<style>
body .theme-browser .theme .theme-name {
height: auto;
}
</style>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<?php echo $page->get_title(); ?> <span v-cloak v-if="count > 0" class="title-count theme-count" v-text="count"></span>
<?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'] : '';
?>
<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']) : ?>
<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 echo $action_link['label']; ?>
</a>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_addon_after_title', $page);
?>
</h1>
<?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>
<?php endif; ?>
<hr class="wp-header-end">
<form method="post">
<div id="poststuff" class="md:wu-flex">
<div class="wu-w-full md:wu-w-4/12 lg:wu-w-2/12">
<div class="wu-py-4 wu-relative" id="search-addons">
<input
type="text"
placeholder="<?php esc_attr_e('Search Add-ons', 'wp-ultimo'); ?>"
class="wu-w-full"
v-model="search"
>
</div>
<!-- Navigator -->
<ul id="addons-menu">
<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'); ?>
</li>
<?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
/**
* 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')) : ?>
<!-- Separator Item -->
<li class="wu-sticky wu-py-2 wu-px-4">&nbsp;</li>
<?php else : ?>
<!-- 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 wu-text-gray-600 hover:wu-text-gray-700"
:class="category === '<?php echo esc_attr($section_name); ?>' ? 'wu-bg-gray-300 wu-text-gray-800' : 'wu-text-gray-600 hover:wu-text-gray-700'"
@click.prevent="set_category('<?php echo esc_attr($section_name); ?>')"
>
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
<?php if (!empty($section['sub-sections'])) : ?>
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<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; ?>
</ul>
<!-- End Sub-menu -->
<?php endif; ?>
</li>
<!-- End Menu Item -->
<?php endif; ?>
<?php endforeach; ?>
</ul>
<!-- End Navigator -->
<div class="wu-mt-10 wu-p-4">
<div>
<span class="wu-bg-orange-600 wu-text-gray-100 wu-text-xs wu-inline-block wu-rounded wu-py-1 wu-px-2 wu-font-bold wu-uppercase wu-opacity-50">
<?php _e('Beta', 'wp-ultimo'); ?>
</span>
<span class="wu-block wu-mt-2 wu-text-xs wu-text-gray-600"><?php _e('Ready for testing, but not necessarily production-ready.', 'wp-ultimo'); ?></span>
</div>
<div class="wu-mt-4">
<span class="wu-bg-gray-800 wu-text-gray-200 wu-text-xs wu-inline-block wu-rounded wu-py-1 wu-px-2 wu-font-bold wu-uppercase wu-opacity-50">
<?php _e('Coming Soon', 'wp-ultimo'); ?>
</span>
<span class="wu-block wu-mt-2 wu-text-xs wu-text-gray-600"><?php _e('In active development, but not yet available.', 'wp-ultimo'); ?></span>
</div>
<div class="wu-mt-4">
<span class="wu-bg-purple-800 wu-text-gray-200 wu-text-xs wu-inline-block wu-rounded wu-py-1 wu-px-2 wu-font-bold wu-uppercase wu-opacity-50">
<?php _e('Legacy', 'wp-ultimo'); ?>
</span>
<span class="wu-block wu-mt-2 wu-text-xs wu-text-gray-600"><?php _e('Developed for 1.X, but compatible with 2.X.', 'wp-ultimo'); ?></span>
</div>
</div>
</div>
<div class="wu-w-full md:wu-w-8/12 lg:wu-w-10/12 md:wu-pl-4 metabox-holder">
<div id="wu-addon" class="wu-relative">
<!--
<div class="wp-filter" v-cloak>
<ul class="filter-links">
<li :class="category == 'all' ? '' : 'selector-inactive'">
<a
v-cloak
href="#"
:class="category == 'all' ? 'current wu-font-medium' : ''"
@click.prevent="category = 'all'"
>{{ i18n.all }}</a>
</li>
<li
v-for="_category in categories"
:class="category == _category ? '' : 'selector-inactive'"
>
<a
v-cloak
href="#"
:class="category == _category.toLowerCase() ? 'current wu-font-medium' : ''"
@click.prevent="category = _category.toLowerCase()"
>{{ _category }}</a>
</li>
</ul>
</div> -->
<div class="theme-browser rendered">
<div v-if="loading"
class="">
<?php echo wu_render_empty_state(array(
'message' => __("Loading...", 'wp-ultimo'),
'sub_message' => __('We are fetching the list of WP Ultimo add-ons.', 'wp-ultimo'),
'link_url' => false,
)); ?>
</div>
<div class="themes wp-clearfix wu-grid wu-gap-6 wu-grid-cols-1 sm:wu-grid-cols-2 lg:wu-grid-cols-3">
<div
class="theme wu-col-span-1"
style="width: 100% !important; margin: 0 !important;"
tabindex="0"
v-cloak
v-for="addon in addons_list"
:data-slug="addon.slug"
>
<div class="theme-screenshot wu-bg-gray-100">
<img :class="addon.available ? '' : 'wu-opacity-50'" :src="addon.image_url" :alt="addon.name" />
</div>
<span class="wu-absolute wu-m-6 wu-bg-gray-800 wu-text-gray-200 wu-text-xs wu-inline-block wu-rounded wu-top-0 wu-right-0 wu-py-1 wu-px-2 wu-font-bold wu-uppercase" v-cloak v-if="!addon.available">
<?php _e('Coming Soon', 'wp-ultimo'); ?>
</span>
<span class="wu-absolute wu-m-6 wu-bg-purple-800 wu-text-gray-200 wu-text-xs wu-inline-block wu-rounded wu-top-0 wu-right-0 wu-py-1 wu-px-2 wu-font-bold wu-uppercase" v-cloak v-show="addon.legacy">
<?php _e('Legacy', 'wp-ultimo'); ?>
</span>
<span class="wu-absolute wu-m-6 wu-bg-orange-600 wu-text-gray-100 wu-text-xs wu-inline-block wu-rounded wu-top-0 wu-right-0 wu-py-1 wu-px-2 wu-font-bold wu-uppercase" v-cloak v-show="addon.beta">
<?php _e('Beta', 'wp-ultimo'); ?>
</span>
<a
class="more-details wubox wu-no-underline"
:title="addon.name"
:href="'<?php echo $more_info_url; ?>'.replace('ADDON_SLUG', addon.slug)"
>
<?php _e('Add-on Details', 'wp-ultimo'); ?>
</a>
<div class="theme-author">
<?php _e('By WP Ultimo', 'wp-ultimo'); ?>
</div>
<h2 class="theme-name" :id="addon.slug" :class="addon.available ? '' : 'wu-opacity-50'" >
{{ addon.name }}
<div class="wu-pt-1 wu-block">
<span
v-cloak
class="wu-text-gray-600 wu-font-normal wu-text-xs"
v-if="addon.free"
>
<?php _e('Free Add-on', 'wp-ultimo'); ?>
</span>
<span
v-cloak
class="wu-text-gray-600 wu-font-normal wu-text-xs"
v-else
>
<?php _e('Premium Add-on', 'wp-ultimo'); ?>
</span>
<span
v-cloak
class="wu-ml-2 wu-text-green-600 wu-font-normal wu-text-xs"
v-if="addon.installed"
>
<span class="dashicons-wu-check"></span>
<?php _e('Installed', 'wp-ultimo'); ?>
</span>
</div>
</h2>
</div>
</div>
</div>
<div class="theme-overlay"></div>
<div
v-cloak
v-if="! loading && addons_list.length == 0"
>
<?php echo wu_render_empty_state(array(
'message' => __("No add-ons found...", 'wp-ultimo'),
'sub_message' => __('Check the search terms or navigate between categories to see what add-ons we have available.', 'wp-ultimo'),
'link_label' => __('See all add-ons', 'wp-ultimo'),
'link_url' => remove_query_arg('tab'),
'link_classes' => '',
'link_icon' => 'dashicons-wu-reply',
)); ?>
</div>
</div>
</div>
</div>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_addon_footer', $page);
?>
</form>
</div>

View File

@ -0,0 +1,712 @@
<?php
/**
* Add-on details modal.
*
* @since 2.0.0
*/
?>
<style type="text/css">
#plugin-information {
position: static;
}
#plugin-information-footer {
height: auto !important;
}
#plugin-information-title.with-banner {
background-position: center;
background-image: url("<?php echo $addon->image_url; ?>");
}
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
#plugin-information-title.with-banner {
background-position: center;
background-image: url("<?php echo $addon->image_url; ?>");
}
}
</style>
<div id="plugin-information">
<div id="plugin-information-scrollable">
<div id="plugin-information-title" class="with-banner">
<div class="vignette"></div>
<h2><?php echo $addon->name; ?></h2>
</div>
<div id="plugin-information-tabs" class="with-banner">
<a name="description" href="#" class="current">
<?php _e('Description', 'wp-ultimo'); ?>
</a>
<!--
<a name="faq" href="#">
<?php _e('FAQ', 'wp-ultimo'); ?>
</a>
<a name="changelog" href="#">
<?php _e('Changelog', 'wp-ultimo'); ?>
</a>
<a name="screenshots" href="#">
<?php _e('Screenshots', 'wp-ultimo'); ?>
</a>
<a name="reviews" href="#">
<?php _e('Reviews', 'wp-ultimo'); ?>
</a>
-->
</div>
<div id="plugin-information-content" class="with-banner">
<div class="fyi">
<ul>
<li>
<strong><?php _e('Author:', 'wp-ultimo'); ?></strong>
<a class="wu-no-underline" href="<?php echo $addon->author_url; ?>" target="_blank">
<?php echo $addon->author; ?>
</a>
</li>
<!-- <li><strong>Version:</strong> 1.6</li>
<li><strong>Last Updated:</strong> 2 months ago</li>
<li>
<strong>Requires WordPress Version:</strong>
4.9 or higher
</li>
<li><strong>Compatible up to:</strong> 5.5.1</li> -->
<?php if (isset($addon->requires_version)) : ?>
<li>
<strong><?php _e('Requires WP Ultimo Version:', 'wp-ultimo'); ?></strong>
<?php echo sprintf(__('%s or higher', 'wp-ultimo'), $addon->requires_version); ?>
</li>
<?php endif; ?>
<li>
<a class="wu-no-underline" target="_blank" href="https://wpultimo.com/addons?addon=<?php echo $addon_slug; ?>">
<?php _e('See on the Oficial Site »', 'wp-ultimo'); ?>
</a>
</li>
</ul>
<!--
<h3>Average Rating</h3>
<div class="star-rating">
<span class="screen-reader-text">5.0 rating based on 890 ratings</span>
<div class="star star-full" aria-hidden="true"></div>
<div class="star star-full" aria-hidden="true"></div>
<div class="star star-full" aria-hidden="true"></div>
<div class="star star-full" aria-hidden="true"></div>
<div class="star star-full" aria-hidden="true"></div>
</div>
<p aria-hidden="true" class="fyi-description">
(based on 890 ratings)
</p>
<h3>Reviews</h3>
<p class="fyi-description">Read all reviews on WordPress.org or write your own!</p>
<div class="counter-container">
<span class="counter-label"> <a href="https://wordpress.org/support/plugin/classic-editor/reviews/?filter=5" target="_blank" aria-label="Reviews with 5 stars: 859. Opens in a new tab.">5 stars</a> </span>
<span class="counter-back">
<span class="counter-bar" style="width: 88.795505617978px;"></span>
</span>
<span class="counter-count" aria-hidden="true">859</span>
</div>
<div class="counter-container">
<span class="counter-label"> <a href="https://wordpress.org/support/plugin/classic-editor/reviews/?filter=4" target="_blank" aria-label="Reviews with 4 stars: 15. Opens in a new tab.">4 stars</a> </span>
<span class="counter-back">
<span class="counter-bar" style="width: 1.5505617977528px;"></span>
</span>
<span class="counter-count" aria-hidden="true">15</span>
</div>
<div class="counter-container">
<span class="counter-label"> <a href="https://wordpress.org/support/plugin/classic-editor/reviews/?filter=3" target="_blank" aria-label="Reviews with 3 stars: 6. Opens in a new tab.">3 stars</a> </span>
<span class="counter-back">
<span class="counter-bar" style="width: 0.62022471910112px;"></span>
</span>
<span class="counter-count" aria-hidden="true">6</span>
</div>
<div class="counter-container">
<span class="counter-label"> <a href="https://wordpress.org/support/plugin/classic-editor/reviews/?filter=2" target="_blank" aria-label="Reviews with 2 stars: 1. Opens in a new tab.">2 stars</a> </span>
<span class="counter-back">
<span class="counter-bar" style="width: 0.10337078651685px;"></span>
</span>
<span class="counter-count" aria-hidden="true">1</span>
</div>
<div class="counter-container">
<span class="counter-label"> <a href="https://wordpress.org/support/plugin/classic-editor/reviews/?filter=1" target="_blank" aria-label="Reviews with 1 star: 9. Opens in a new tab.">1 star</a> </span>
<span class="counter-back">
<span class="counter-bar" style="width: 0.93033707865169px;"></span>
</span>
<span class="counter-count" aria-hidden="true">9</span>
</div>
<h3>Contributors</h3>
<ul class="contributors">
<li>
<a href="https://profiles.wordpress.org/wordpressdotorg" target="_blank">
<img src="https://secure.gravatar.com/avatar/61ee2579b8905e62b4b4045bdc92c11a?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />WordPress.org
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/azaozz" target="_blank">
<img src="https://secure.gravatar.com/avatar/4e84843ebff0918d72ade21c6ee7b1e4?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Andrew Ozz
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/melchoyce" target="_blank">
<img src="https://secure.gravatar.com/avatar/9ffb8027a6f8cb090148a2ea8310b64f?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Mel Choyce-Dwan
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/chanthaboune" target="_blank">
<img src="https://secure.gravatar.com/avatar/da526066c9f187ca1e16263158d2e9a3?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Josepha
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/alexislloyd" target="_blank">
<img src="https://secure.gravatar.com/avatar/41261ee7861fe1331bf1cd32bb24f4ea?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Alexis Lloyd
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/pento" target="_blank">
<img src="https://secure.gravatar.com/avatar/1ad9e5c98d81c6815a65dab5b6e1f669?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Gary Pendergast
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/youknowriad" target="_blank">
<img src="https://secure.gravatar.com/avatar/9929daa7594d5afa910a777ccb9e88e4?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Riad Benguella
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/desrosj" target="_blank">
<img src="https://secure.gravatar.com/avatar/f22c0ec09eb5a6df4da4239a37dbdf9d?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />Jonathan Desrosiers
</a>
</li>
<li>
<a href="https://profiles.wordpress.org/luciano-croce" target="_blank">
<img src="https://secure.gravatar.com/avatar/e598c948e82a783e0f40634c0766c965?s=36&amp;d=monsterid&amp;r=g" width="18" height="18" alt="" />luciano-croce
</a>
</li>
</ul> -->
</div>
<div id="section-holder">
<!-- Description Section -->
<div id="section-description" class="section" style="display: block; min-height: 200px;">
<?php echo $addon->description; ?>
</div>
<!-- /Description Section -->
<!-- <div id="section-faq" class="section" style="display: none;">
<h4>
Default settings
</h4>
<p></p>
<p>
When activated this plugin will restore the previous (“classic”) WordPress editor and hide the new block editor (“Gutenberg”).<br />
These settings can be changed at the Settings =&gt; Writing screen.
</p>
<p></p>
<h4>
Default settings for network installation
</h4>
<p></p>
<p>There are two options:</p>
<ul>
<li>
When network-activated this plugin will set the classic editor as default and prevent site administrators and users from changing editors.<br />
The settings can be changed and default network-wide editor can be selected on the Network Settings screen.
</li>
<li>When not network-activated each site administrator will be able to activate the plugin and choose options for their users.</li>
</ul>
<p></p>
<h4>
Cannot find the “Switch to classic editor” link
</h4>
<p></p>
<p>It is in the main block editor menu, see this <a href="https://ps.w.org/classic-editor/assets/screenshot-7.png?rev=2023480" target="_blank">screenshot</a>.</p>
<p></p>
</div> -->
<!-- <div id="section-changelog" class="section" style="display: none;">
<h4>1.6</h4>
<ul>
<li>Updated for WordPress 5.5.</li>
<li>Fixed minor issues with calling deprecated functions, needlessly registering uninstall hook, and capitalization of some strings.</li>
</ul>
<h4>1.5</h4>
<ul>
<li>Updated for WordPress 5.2 and Gutenberg 5.3.</li>
<li>Enhanced and fixed the “open posts in the last editor used to edit them” logic.</li>
<li>Fixed adding post state so it can easily be accessed from other plugins.</li>
</ul>
<h4>1.4</h4>
<ul>
<li>On network installations removed the restriction for only network activation.</li>
<li>Added support for network administrators to choose the default network-wide editor.</li>
<li>Fixed the settings link in the warning on network About screen.</li>
<li>Properly added the “Switch to classic editor” menu item to the block editor menu.</li>
</ul>
<h4>1.3</h4>
<ul>
<li>Fixed removal of the “Try Gutenberg” dashboard widget.</li>
<li>Fixed condition for displaying of the after upgrade notice on the “Whats New” screen. Shown when the classic editor is selected and users cannot switch editors.</li>
</ul>
<h4>1.2</h4>
<ul>
<li>Fixed switching editors from the Add New (post) screen before a draft post is saved.</li>
<li>Fixed typo that was appending the edit URL to the <code>classic-editor</code> query var.</li>
<li>Changed detecting of WordPress 5.0 to not use version check. Fixes a bug when testing 5.1-alpha.</li>
<li>Changed the default value of the option to allow users to switch editors to false.</li>
<li>Added disabling of the Gutenberg plugin and lowered the required WordPress version to 4.9.</li>
<li>Added <code>classic_editor_network_default_settings</code> filter.</li>
</ul>
<h4>1.1</h4>
<p>Fixed a bug where it may attempt to load the block editor for post types that do not support editor when users are allowed to switch editors.</p>
<h4>1.0</h4>
<ul>
<li>Updated for WordPress 5.0.</li>
<li>Changed all “Gutenberg” names/references to “block editor”.</li>
<li>Refreshed the settings UI.</li>
<li>
Removed disabling of the Gutenberg plugin. This was added for testing in WordPress 4.9. Users who want to continue following the development of Gutenberg in WordPress 5.0 and beyond will not need another plugin
to disable it.
</li>
<li>Added support for per-user settings of default editor.</li>
<li>Added support for admins to set the default editor for the site.</li>
<li>Added support for admins to allow users to change their default editor.</li>
<li>Added support for network admins to prevent site admins from changing the default settings.</li>
<li>Added support to store the last editor used for each post and open it next time. Enabled when users can choose default editor.</li>
<li>Added “post editor state” in the listing of posts on the Posts screen. Shows the editor that will be opened for the post. Enabled when users can choose default editor.</li>
<li>
Added <code>classic_editor_enabled_editors_for_post</code> and <code>classic_editor_enabled_editors_for_post_type</code> filters. Can be used by other plugins to control or override the editor used for a
particular post of post type.
</li>
<li>Added <code>classic_editor_plugin_settings</code> filter. Can be used by other plugins to override the settings and disable the settings UI.</li>
</ul>
<h4>0.5</h4>
<ul>
<li>Updated for Gutenberg 4.1 and WordPress 5.0-beta1.</li>
<li>Removed some functionality that now exists in Gutenberg.</li>
<li>Fixed redirecting back to the classic editor after looking at post revisions.</li>
</ul>
<h4>0.4</h4>
<ul>
<li>Fixed removing of the “Try Gutenberg” call-out when the Gutenberg plugin is not activated.</li>
<li>Fixed to always show the settings and the settings link in the plugins list table.</li>
<li>Updated the readme text.</li>
</ul>
<h4>0.3</h4>
<ul>
<li>Updated the option from a checkbox to couple of radio buttons, seems clearer. Thanks to @designsimply for the label text suggestions.</li>
<li>Some general updates and cleanup.</li>
</ul>
<h4>0.2</h4>
<ul>
<li>Update for Gutenberg 1.9.</li>
<li>Remove warning and automatic deactivation when Gutenberg is not active.</li>
</ul>
<h4>0.1</h4>
<p>Initial release.</p>
</div> -->
<!-- <div id="section-screenshots" class="section" style="display: none;">
<ol>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-1.png?rev=1998671" target="_blank">
<img src="https://ps.w.org/classic-editor/assets/screenshot-1.png?rev=1998671" alt="Admin settings on the Settings -> Writing screen." />
</a>
<p>Admin settings on the Settings -&gt; Writing screen.</p>
</li>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-2.png?rev=1998671" target="_blank">
<img src="https://ps.w.org/classic-editor/assets/screenshot-2.png?rev=1998671" alt="User settings on the Profile screen. Visible when the users are allowed to switch editors." />
</a>
<p>User settings on the Profile screen. Visible when the users are allowed to switch editors.</p>
</li>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-3.png?rev=1998671" target="_blank">
<img src="https://ps.w.org/classic-editor/assets/screenshot-3.png?rev=1998671" alt='"Action links" to choose alternative editor. Visible when the users are allowed to switch editors.' />
</a>
<p>"Action links" to choose alternative editor. Visible when the users are allowed to switch editors.</p>
</li>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-4.png?rev=1998671" target="_blank">
<img
src="https://ps.w.org/classic-editor/assets/screenshot-4.png?rev=1998671"
alt="Link to switch to the block editor while editing a post in the classic editor. Visible when the users are allowed to switch editors."
/>
</a>
<p>Link to switch to the block editor while editing a post in the classic editor. Visible when the users are allowed to switch editors.</p>
</li>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-5.png?rev=1998671" target="_blank">
<img
src="https://ps.w.org/classic-editor/assets/screenshot-5.png?rev=1998671"
alt="Link to switch to the classic editor while editing a post in the block editor. Visible when the users are allowed to switch editors."
/>
</a>
<p>Link to switch to the classic editor while editing a post in the block editor. Visible when the users are allowed to switch editors.</p>
</li>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-6.png?rev=1998671" target="_blank">
<img src="https://ps.w.org/classic-editor/assets/screenshot-6.png?rev=1998671" alt="Network settings to select the default editor for the network and allow site admins to change it." />
</a>
<p>Network settings to select the default editor for the network and allow site admins to change it.</p>
</li>
<li>
<a href="https://ps.w.org/classic-editor/assets/screenshot-7.png?rev=2023480" target="_blank">
<img src="https://ps.w.org/classic-editor/assets/screenshot-7.png?rev=2023480" alt='The "Switch to classic editor" link.' />
</a>
<p>The "Switch to classic editor" link.</p>
</li>
</ol>
</div> -->
<!-- <div id="section-reviews" class="section" style="display: none;">
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Great!</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/sandrardillard" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/46635dba153f976268f9f9206c8de3eb?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/sandrardillard" target="_blank">sandrardillard</a> on <span class="review-date">October 4, 2020</span>
</p>
</div>
</div>
<div class="review-body">Nice tool!</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Best Editor Out</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/rechtvanhuyssteen" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/61569e7b98df7fa0e961638f2fe4e493?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/rechtvanhuyssteen" target="_blank">rechtvanhuyssteen</a> on <span class="review-date">September 30, 2020</span>
</p>
</div>
</div>
<div class="review-body">The best, can we get it updateted for latest WP seems to conflict with some other plugins after update. Will never use another plugin except this for editing. Well done</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Must need plugin</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/adeebc" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/68cee995a65b40da73d51818576c9007?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/adeebc" target="_blank">adeebc</a> on <span class="review-date">September 30, 2020</span>
</p>
</div>
</div>
<div class="review-body">I'm using WordPress because of this editor. Classic Editor changed my life. I'm using this plugin for more than 50 websites.</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Must have</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/cleoni" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/1e5d1686cc26b244794744b07cb74ee4?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/cleoni" target="_blank">cleoni</a> on <span class="review-date">September 24, 2020</span>
</p>
</div>
</div>
<div class="review-body">Must have plugin. Watch out, it seems it currently does not work under WP 5.5 due to deprecated jquery methods.</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Until at least 2022</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/kirbyfoster" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/5eda3070b8145f285e03561e7bccb249?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/kirbyfoster" target="_blank">kirbyfoster</a> on <span class="review-date">September 23, 2020</span>
</p>
</div>
</div>
<div class="review-body">
Thankfully this is still available on WP. However it states that 'Classic Editor is an official WordPress plugin, and will be fully supported and maintained until at least 2022' What's going to happen after 2022?
Am I going to have to rewrite my websites? Maybe I ought to start looking at other options instead of WP? Gutenberg is really starting to piss me off. I wish I'd never heard of WP and instead just use html/css/js
like I used to do.
</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>So much better!</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/sknydrinks" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/368188434b0840cba8c31e15a8208132?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/sknydrinks" target="_blank">sknydrinks</a> on <span class="review-date">September 21, 2020</span>
</p>
</div>
</div>
<div class="review-body">This is so much better. Thank you!</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Please go back to Classic Editor</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/passegua" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/4c8f34536195de842099db7de654dc64?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/passegua" target="_blank">passegua</a> on <span class="review-date">September 17, 2020</span>
</p>
</div>
</div>
<div class="review-body">Please get rid of Gutenberg horrible Block Editor! Please ask WordPress user about it, no one uses block editor! Please please go back to the beautiful classic editor!</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>BROKEN</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-empty"></span><span class="star dashicons dashicons-star-empty"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/lexiol" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/06251c1360f2d474b199c130c7ce509c?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/lexiol" target="_blank">Lexiol</a> on <span class="review-date">September 13, 2020</span>
</p>
</div>
</div>
<div class="review-body">Not sure how to remove my review</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>I still use the classic editor</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/janejsmaster" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/8a823e5639bc30c2ac79be5168d82285?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/janejsmaster" target="_blank">Jane (janejsmaster)</a> on <span class="review-date">September 10, 2020</span>
</p>
</div>
</div>
<div class="review-body">
I still prefer the classic editor compared to the Gutenberg one. The classic editor is what we have used for years and I hope it will always be maintained by its developers. Many of us still depend on it
everyday.
</div>
</div>
<div class="review">
<div class="review-head">
<div class="reviewer-info">
<div class="review-title-section">
<h4>Gave up</h4>
<div class="star-rating">
<div class="wporg-ratings">
<span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span><span class="star dashicons dashicons-star-filled"></span>
<span class="star dashicons dashicons-star-empty"></span><span class="star dashicons dashicons-star-empty"></span>
</div>
</div>
</div>
<p>
By
<a href="https://profiles.wordpress.org/kielce" target="_blank">
<img alt="" src="https://secure.gravatar.com/avatar/036809f4dfd63fcf041af812ac28a4cb?s=16&amp;d=monsterid&amp;r=g" class="avatar avatar-16 photo" />
</a>
<a href="https://profiles.wordpress.org/kielce" target="_blank">kielce</a> on <span class="review-date">September 8, 2020</span>
</p>
</div>
</div>
<div class="review-body">I gave up on Classic Editor and shifted to the "Disable Gutenberg" plugin months ago. "Disable Gutenberg" has no issues with the WordPress 5.5 update.</div>
</div>
</div> -->
</div>
</div>
</div>
<div id="plugin-information-footer">
<?php if (!$addon->free) : ?>
<span class="wu-text-green-800 wu-inline-block wu-py-1">
<?php _e('This is a Premium Add-on.', 'wp-ultimo'); ?>
</span>
<?php endif; ?>
<form id="plugin-install" class="wu_form">
<?php if ($addon->installed) : ?>
<button
disabled="disabled"
data-slug="<?php echo $addon_slug; ?>"
class="button button-disabled right"
>
<?php _e('Already Installed', 'wp-ultimo'); ?>
</button>
<?php else : ?>
<?php if ($addon->available) : ?>
<?php if ($license->allowed('wpultimo') || $addon->free) : ?>
<button
type="submit"
name="install"
data-slug="<?php echo $addon_slug; ?>"
class="button button-primary right"
>
<?php _e('Install Now', 'wp-ultimo'); ?>
</button>
<?php else : ?>
<a
href="<?php echo $upgrade_url; ?>"
class="button button-primary right"
>
<?php _e('Upgrade your License', 'wp-ultimo'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
<input type="hidden" name="action" value="wu_form_handler">
<input type="hidden" name="addon" value="<?php echo $addon_slug; ?>">
<input type="hidden" name="wu-when" value="<?php echo base64_encode('after_setup_theme'); ?>">
<?php wp_nonce_field('wu_form_addon_more_info'); ?>
<?php endif; ?>
</div>
</div>

196
views/base/centered.php Normal file
View File

@ -0,0 +1,196 @@
<?php
/**
* Dash view.
*
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="wrap wu-styling">
<div class="sm:wu-container sm:wu-mx-auto">
<h1 class="wp-heading-inline">
<?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) :
$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); ?>">
<?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>
<?php endif; ?>
<?php echo $action_link['label']; ?>
</a>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_centered_after_title', $page);
?>
</h1>
<?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>
<?php endif; ?>
<hr class="wp-header-end">
<?php do_action('wu_centered_before_metaboxes', $page); ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<div id="dashboard-widgets-wrap">
<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 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">
<?php if ($content) : ?>
<div class="wu-mx-2">
<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">
<h3 class="wu-m-0 wu-widget-title">
<?php _e('Change Membership', 'wp-ultimo'); ?>
</h3>
</div>
<div class="wu-mx-2 wu-mt-2 wu-p-2">
<div class="inside">
<?php echo $content; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?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 class="wu-px-2">
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_centered_content', $page);
?>
</div>
</div>
<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 Ultimo 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);
?>
</div>
</div>
</div>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
</div>
<!-- dashboard-widgets-wrap -->
<?php endif; ?>
</div>
</div>

View File

@ -0,0 +1,142 @@
<?php
/**
* JS templates view.
*
* @since 2.0.0
*/
?>
<script type="text/x-template" id="wu-table">
<table class="wp-list-table widefat fixed striped">
<thead>
<tr>
<th v-for="(header_label, header) in headers" :key="header" scope="col" v-html="header_label" :class="'manage-column column-' + header"></th>
</tr>
</thead>
<tbody v-if="list.length === 0">
<tr class="no-items">
<td :colspan="Object.keys(headers).length" class="colspanchange">
<div class="wu-p-6 wu-text-gray-600 wu-text-base wu-text-center">
<span><?php _e('Add the first field!', 'wp-ultimo'); ?></span>
</div>
</td>
</tr>
</tbody>
<draggable
:list="list"
:tag="'tbody'"
group="field"
handle=".wu-placeholder-sortable"
ghost-class="wu-draggable-field-ghost"
drag-class="wu-bg-white"
>
<tr v-for="(field, idx) in list" :key="field.id" :id="'wp-ultimo-field-' + field.id">
<td class="order column-order has-row-actions column-primary" data-colname="<?php _e('Order', 'wp-ultimo'); ?>">
<span
class="wu-inline-block wu-bg-gray-100 wu-text-center wu-align-middle wu-p-1 wu-font-mono wu-px-3 wu-border wu-border-gray-300 wu-border-solid wu-rounded">
{{ parseInt(idx, 10) + 1 }}
</span>
<button type="button" class="toggle-row">
<span class="screen-reader-text"><?php _e('Show more details', 'wp-ultimo'); ?></span>
</button>
</td>
<td class="name column-name" data-colname="<?php _e('Name', 'wp-ultimo'); ?>">
<span class="wu-inline-block wu-font-medium">
{{ field.name ? field.name : "<?php echo __('(no label)', 'wp-ultimo'); ?>" }}
<!-- Visibility -->
<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>
<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 -->
</span>
<div class="row-actions">
<span class="edit">
<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"
>
<?php _e('Edit'); ?>
</a>
|
</span>
<span class="delete">
<a
v-show="delete_field_id !== field.id"
v-on:click.prevent="delete_field_id = field.id"
title="<?php _e('Delete'); ?>"
href="#"
><?php _e('Delete'); ?></a>
<a
v-show="delete_field_id === field.id"
v-on:click.prevent="remove_field(field.id)"
title="<?php _e('Delete'); ?>"
href="#"
class="wu-font-bold"
><?php _e('Confirm?', 'wp-ultimo'); ?></a>
</span>
</div>
<button type="button" class="toggle-row">
<span class="screen-reader-text">
<?php _e('Show more details', 'wp-ultimo'); ?>
</span>
</button>
</td>
<td class="type column-type" data-colname="<?php _e('Type', 'wp-ultimo'); ?>">
<span class="wu-bg-gray-200 wu-text-gray-700 wu-py-1 wu-px-2 wu-rounded-sm wu-text-xs wu-font-mono">{{ field.type }}</span>
</td>
<td class="type column-slug" data-colname="<?php _e('Slug', 'wp-ultimo'); ?>">
<span class="wu-bg-gray-200 wu-text-gray-700 wu-py-1 wu-px-2 wu-rounded-sm wu-text-xs wu-font-mono">{{ field.id }}</span>
</td>
<td class="move column-move wu-text-right" data-colname="<?php _e('Move', 'wp-ultimo'); ?>">
<span class="wu-placeholder-sortable dashicons-wu-menu"></span>
</td>
</tr>
</draggable>
</table>
</script>

View File

@ -0,0 +1,313 @@
<?php
/**
* Steps view.
*
* @since 2.0.0
*/
?>
<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>
<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>
<li class="wu-m-0 md:wu-ml-4 wu-text-center">
<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>
</li>
</ul>
</div>
</div>
</div>
</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">
<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>
</div>

View File

@ -0,0 +1,136 @@
<?php
/**
* Grid item view.
*
* @since 2.0.0
*/
?>
<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--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="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="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-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
}
?>
</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>
<?php
// 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'));
$actions = array(
'switch-to' => $item->get_user_id() !== get_current_user_id() ? $url_switch_to : __('None', 'wp-ultimo'),
);
echo implode("<br />", $actions);
?>
</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">
<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>
</div>

146
views/base/dash.php Normal file
View File

@ -0,0 +1,146 @@
<?php
/**
* Dash view.
*
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-styling">
<h1 class="wp-heading-inline">
<?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) :
$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); ?>">
<?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>
<?php endif; ?>
<?php echo $action_link['label']; ?>
</a>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_dash_after_title', $page);
?>
</h1>
<hr class="wp-header-end">
<?php do_action('wu_dash_before_metaboxes', $page); ?>
<?php if (apply_filters('wu_dashboard_display_widgets', true)) : ?>
<div id="dashboard-widgets-wrap">
<div id="dashboard-widgets" class="metabox-holder">
<?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 class="wu-mx-2">
<?php do_action('wu_dash_after_full_metaboxes', $page); ?>
</div>
<?php endif; ?>
<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, '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>
</div>
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
</div>
<!-- dashboard-widgets-wrap -->
<?php endif; ?>
</div>

249
views/base/edit.php Normal file
View File

@ -0,0 +1,249 @@
<?php
/**
* Edit view.
*
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap">
<h1 class="wp-heading-inline">
<?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) :
$action_classes = isset($action_link['classes']) ? $action_link['classes'] : '';
$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; ?>>
<?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>
<?php endif; ?>
<?php echo $action_link['label']; ?>
</a>
<?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 Ultimo Page instance
*/
do_action('wu_page_edit_after_title', $object, $page);
?>
</h1>
<?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>
<?php endif; ?>
<?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>
<?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);
?>
<hr class="wp-header-end">
<form id="form-<?php echo esc_attr($page->get_id()); ?>" name="post" method="post" autocomplete="off">
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<?php if ($page->has_title()) : ?>
<div id="post-body-content">
<div id="titlediv">
<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">
<?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>
<?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 Ultimo Page instance
*/
do_action('wu_edit_page_after_title_input', $object, $page);
?>
</div>
</div>
<!-- /titlediv -->
<?php if ($page->has_editor()) : ?>
<div class="wu-mt-5">
<?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,
)); ?>
</div>
<?php endif; ?>
</div>
<!-- /post-body-content -->
<?php endif; ?>
<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-bottom', $object);
?>
</div>
<div id="postbox-container-2" class="postbox-container">
<?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);
/**
* 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 -->
</div>
<!-- /post-body -->
<br class="clear">
<?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false); ?>
<?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false); ?>
<?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 Ultimo Page instance
*/
do_action('wu_page_edit_footer', $object, $page);
?>
</div>

View File

@ -0,0 +1,74 @@
<?php
/**
* Display notes widget view.
*
* @since 2.0.0
*/
?>
<?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 else : ?>
<?php foreach ($notes as $note) : ?>
<div class="wu-flex wu-justify-end wu-items-end wu-flex-col wu-mt-4">
<div class="wu-m-0 wu-p-3 wu-rounded wu-bg-gray-200 wu-text-right" id="wu-text-note">
<?php echo wu_remove_empty_p($note->text); ?>
</div>
<div class="wu-m-0 wu-mb-4 wu-p-0" id="wu-date-avatar">
<?php $user = get_user_by('ID', $note->author_id); ?>
<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; ?>
</div>
<div class="wu-text-right">
<span class="wu-text-xs wu-text-gray-500">
<?php echo esc_html(date_i18n('M d, H:i', strtotime($note->date_created))); ?>
</span>
<?php if (current_user_can('delete_notes')) : ?>
<?php $modal_atts = array(
'object_id' => wu_request('id'),
'model' => $model,
'note_id' => $note->note_id,
'height' => 306,
); ?>
<span class="wu-ml-2">
<a class="dashicons-wu-trash wu-p-0 wu-border-none wu-text-red-600 wu-button-delete wu-no-underline wubox" href="<?php echo esc_url(wu_get_form_url('delete_note', $modal_atts)); ?>"
title="<?php echo esc_attr__('Clear Note', 'wp-ultimo'); ?>"></a>
</span>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -0,0 +1,52 @@
<?php
/**
* Customizer editor view.
*
* @since 2.0.0
*/
?>
<div id="preview-stage">
<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">
<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'); ?>
</span>
</div>
</div>
<div v-show="!preview" v-cloak>
<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-w-1/2">
<span class="wu-text-gray-600 wu-my-1 wu-text-2xs wu-uppercase wu-font-semibold">
<?php echo __('Template Preview', 'wp-ultimo'); ?>
</span>
</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">
<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>

View File

@ -0,0 +1,37 @@
<?php
/**
* List table widget view.
*
* @since 2.0.0
*/
?>
<?php echo $before; ?>
<?php if ($page->edit) : ?>
<div class="wu-advanced-filters wu-widget-list-table wu--m-3 wu--mt-1 wu--mb-3">
<?php $table->prepare_items(); ?>
<!-- <form id="posts-filter" method="post"> -->
<input type="hidden" name="page" value="<?php echo $page->get_id(); ?>">
<?php $table->display(); ?>
<!-- </form> -->
</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>
<?php endif; ?>
<?php echo $after; ?>

View File

@ -0,0 +1,22 @@
<?php
/**
* Save widget view.
*
* @since 2.0.0
*/
?>
<?php if (!empty($labels['save_description'])) : ?>
<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>
</div>

View File

@ -0,0 +1,137 @@
<?php
/**
* Tabs widget view.
*
* @since 2.0.0
*/
?>
<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']).'"' : ''; ?>
>
<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"
>
<ul class="wu-text-sm">
<ul>
<!-- 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">
<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'); ?>
</a>
<!-- End Menu Link -->
</li>
<!-- End Menu Item -->
<?php foreach ($sections as $section_id => $section) : ?>
<!-- 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); ?>'"
>
<?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>
<?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>
<?php endif; ?>
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
</li>
<!-- End Menu Item -->
<?php endforeach; ?>
</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">
<span v-show="!display_all">
<?php _e('Display all fields', 'wp-ultimo'); ?>
</span>
<span v-cloak v-show="display_all">
<?php _e('Hide other fields', 'wp-ultimo'); ?>
</span>
</a>
</ul>
</div>
<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">
<span class="wu-blinking-animation">
<?php _e('Loading...', 'wp-ultimo'); ?>
</span>
</div>
<?php foreach ($sections as $section_id => $section) : ?>
<div
class="wu-tab-content"
v-cloak
id="<?php echo esc_attr("wu_tab_$section_id"); ?>"
>
<?php
/**
* Render Form
*/
$section['form']->render();
?>
</div>
<?php endforeach; ?>
</div>
</div>
<?php echo $after; ?>
</div>

View File

@ -0,0 +1,61 @@
<?php
/**
* Empty List Table View
*
* @since 2.0.0
*/
?>
<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;" : ''; ?>"
>
<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">
<?php echo $message; ?>
</span>
<?php if (!empty($link_url)) : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo $sub_message; ?>
</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); ?>"
>
<?php if (!empty($link_icon)) : ?>
<span class="<?php echo esc_attr($link_icon); ?> wu-align-middle"></span>
<?php endif; ?>
<?php echo $link_label; ?>
</a>
</div>
<?php else : ?>
<div class="wu-block wu-text-base wu-text-gray-500 wu-py-6">
<?php echo $sub_message; ?>
</div>
<?php endif; ?>
</div>
</div>

219
views/base/filter.php Normal file
View File

@ -0,0 +1,219 @@
<?php
/**
* Filter view.
*
* @since 2.0.0
*/
?>
<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' : ''; ?>"
>
<?php if (!empty($views)) : ?>
<ul class="filter-links">
<?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' : ''"
>
<?php echo esc_attr($view['label']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<?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>
<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>
<?php endif; ?>
<form class="search-form">
<?php if (isset($has_search) && $has_search) : ?>
<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"
>
<?php endif; ?>
</form>
<?php if (isset($has_view_switch) && $has_view_switch) : ?>
<?php $table->view_switcher($table->current_mode); ?>
<?php endif; ?>
<div v-cloak v-show="false" class="wu-hidden">
<div class="wu-clear-both"></div>
<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 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>
<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>
</div>
<div class="wu-w-2/12">
<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>
</select>
</div>
<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) == '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>
</div>
<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"
/>
</div>
<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>
</div>
<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>
</div>
</div>
</div>
</div>
</div>

17
views/base/grid.php Normal file
View File

@ -0,0 +1,17 @@
<?php
/**
* Grid view.
*
* @since 2.0.0
*/
?>
<?php $table->display_tablenav('top'); ?>
<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">
<?php $table->display_rows_or_placeholder(); ?>
</div>
</div>

117
views/base/list.php Normal file
View File

@ -0,0 +1,117 @@
<?php
/**
* List view.
*
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<?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) :
$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); ?>">
<?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>
<?php endif; ?>
<?php echo $action_link['label']; ?>
</a>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_list_after_title', $page);
?>
</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
/**
* 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">
<div id="poststuff">
<div id="post-body" class="">
<div id="post-body-content">
<div class="">
<?php $table->prepare_items(); ?>
<?php $table->filters(); ?>
<form id="posts-filter" method="post">
<input type="hidden" name="page" value="<?php echo $page->get_id(); ?>">
<?php $table->display(); ?>
</form>
</div>
<!-- /ui-sortable -->
</div>
<!-- /post-body-content -->
</div>
<!-- /post-body -->
<br class="clear">
</div>
<!-- /poststuff -->
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_list_footer', $page);
?>
</div>

View File

@ -0,0 +1,73 @@
<?php
/**
* Grid item view.
*
* @since 2.0.0
*/
?>
<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-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"
src="<?php echo $featured_image; ?>"
/>
<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
} 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>
<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
}
?>
</div>
<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 class="wu-text-xs wu-my-1">
<?php echo $item->get_price_description(); ?>
</div>
</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">
<!-- <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>
</div>
</div>
</div>

View File

@ -0,0 +1,128 @@
<?php
/**
* Empty List Table View
*
* @since 2.0.0
*/
?>
<div class="wu-block">
<div class="wu-p-2 wu-flex">
<?php if ($args['image']) : ?>
<div class="wu-flex-shrink wu-mr-4 wu-items-center wu-justify-between wu-flex">
<?php echo $args['image']; ?>
</div>
<?php endif; ?>
<div class="wu-flex-grow">
<div class="wu-flex wu-items-center wu-justify-between">
<span class="wu-font-semibold wu-truncate wu-text-gray-700">
<?php echo $args['title']; ?>
<?php if ($args['id']) : ?>
<span class="wu-font-normal wu-text-xs">(#<?php echo $args['id']; ?>)</span>
<?php endif; ?>
</span>
<div class="wu-ml-2 wu-flex-shrink-0 wu-flex">
<?php echo $args['status']; ?>
</div>
</div>
<div class="sm:wu-flex sm:wu-justify-between wu-mt-1">
<div class="sm:wu-flex">
<?php $first = true; foreach ($first_row as $slug => $item) : $w_classes = wu_get_isset($item, 'wrapper_classes', ''); ?>
<?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']); ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
</a>
<?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="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
</span>
<?php endif; ?>
<?php $first = false; endforeach; ?>
</div>
<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 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']); ?>>
<span class="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
</a>
<?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="<?php echo esc_attr($item['icon']); ?>"></span>
<?php echo $item['value']; ?>
</span>
<?php endif; ?>
<?php $first = false; endforeach; ?>
</div>
</div>
</div>
<?php if ($args['url']) : ?>
<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>
</div>
<?php endif; ?>
</div>
</div>

330
views/base/settings.php Normal file
View File

@ -0,0 +1,330 @@
<?php
/**
* Settings view.
*
* @since 2.0.0
*/
?>
<div id="wp-ultimo-wrap" class="<?php wu_wrap_use_container() ?> wrap wu-wrap <?php echo esc_attr($classes); ?>">
<h1 class="wp-heading-inline">
<?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) :
$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); ?>">
<?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>
<?php endif; ?>
<?php echo $action_link['label']; ?>
</a>
<?php endforeach; ?>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_wizard_after_title', $page);
?>
</h1>
<?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>
<?php endif; ?>
<hr class="wp-header-end">
<form method="post">
<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="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"
>
</div>
<div data-wu-app="settings_menu" data-state="{}">
<!-- Navigator -->
<ul>
<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'); ?>
</li>
<?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;
/**
* Holds add-on menus
*/
$addons = array();
?>
<?php foreach ($sections as $section_name => $section) : ?>
<?php
if (wu_get_isset($section, 'invisible')) {
continue; // skip add-ons for now.
} // end if;
if (wu_get_isset($section, 'addon')) {
$addons[$section_name] = $section;
continue; // skip add-ons for now.
} // end if;
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
?>
<!-- Menu Item -->
<li id="tab-selector-<?php echo esc_attr($section_name); ?>" class="wu-sticky">
<!-- 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'; ?>"
>
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
<?php if (!empty($section['sub-sections'])) : ?>
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<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; ?>
</ul>
<!-- End Sub-menu -->
<?php endif; ?>
</li>
<!-- End Menu Item -->
<?php endforeach; ?>
</ul>
<!-- End Navigator -->
<?php if (!empty($addons)) : ?>
<!-- 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>
<?php foreach ($addons as $section_name => $section) : ?>
<?php
/**
* Updates the flag after the current section is looped.
*/
if ($current_section === $section_name) {
$is_pre_current_section = false;
} // end if;
?>
<!-- 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'; ?>">
<span class="<?php echo esc_attr($section['icon']); ?> wu-align-text-bottom wu-mr-1"></span>
<?php echo $section['title']; ?>
</a>
<!-- End Menu Link -->
<?php if (!empty($section['sub-sections'])) : ?>
<!-- Sub-menu -->
<ul class="classes" v-show="false" v-cloak>
<?php foreach ($section['sub-sections'] as $sub_section_name => $sub_section) : ?>
<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; ?>
</ul>
<!-- End Sub-menu -->
<?php endif; ?>
</li>
<!-- End Menu Item -->
<?php endforeach; ?>
</ul>
<!-- End Addon Navigator -->
<?php endif; ?>
</div>
</div>
<div class="sm:wu-col-span-8 lg:wu-col-span-6 metabox-holder">
<div class="wu-relative">
<?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);
?>
</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">
<?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 Ultimo 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>
</div>
<script type="text/javascript">
/** Not a huge fan of having this here, but it's better than having
a file for this alone. */
settings_loader = wu_block_ui('#wp-ultimo-wizard-body');
/**
* Remove the block ui after the settings loaded.
*
* @since 2.0.0
* @return void
*/
function remove_block_ui() {
settings_loader.unblock();
} // end remove_block_ui;
</script>

View File

@ -0,0 +1,84 @@
<?php
/**
* grid item view.
*
* @since 2.0.0
*/
?>
<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-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'); ?>"
/>
<?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>
<?php endif; ?>
</div>
<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 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 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() === '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>
<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 : ?>
<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>
<?php endif; ?>
<?php else : ?>
<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>
<?php endif; ?>
</div>
</div>
</div>

View File

170
views/base/wizard.php Normal file
View File

@ -0,0 +1,170 @@
<?php
/**
* Wizard view.
*
* @since 2.0.0
*/
?>
<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>
<?php if ($logo) : ?>
<div class="wu-text-center">
<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>
<?php endif; ?>
<hr class="wp-header-end">
<div id="poststuff" class="md:wu-flex wu-mr-4 md:wu-mr-0">
<div class="md:wu-w-2/12 wu-pt-10">
<span class="wu-uppercase wu-block wu-px-4 wu-text-gray-700 wu-font-bold">
<?php echo $page->get_title(); ?>
</span>
<?php
/**
* Allow plugin developers to add additional buttons to list pages
*
* @since 1.8.2
* @param WU_Page WP Ultimo 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
/**
* 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')) : ?>
<!-- Separator Item -->
<li class="wu-sticky wu-py-2 wu-px-4">&nbsp;</li>
<?php else : ?>
<!-- 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 -->
<?php if (!empty($section['sub-sections'])) : ?>
<!-- Sub-menu -->
<ul class="classes">
<?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>
<?php endforeach; ?>
</ul>
<!-- End Sub-menu -->
<?php endif; ?>
</li>
<!-- End Menu Item -->
<?php endif; ?>
<?php endforeach; ?>
</ul>
<!-- End Navigator -->
</div>
<div class="md:wu-w-8/12 wu-px-4 metabox-holder">
<form method="post" id="<?php echo esc_attr($form_id); ?>">
<?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 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>
</div>
</div>
<?php
/**
* Allow plugin developers to add scripts to the bottom of the page
*
* @since 1.8.2
* @param WU_Page WP Ultimo Page instance
*/
do_action('wu_page_wizard_footer', $page);
?>
</div>

View File

@ -0,0 +1,24 @@
<?php
/**
* Submit box view.
*
* @since 2.0.0
*/
?>
<!-- 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>
<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>
</span>
</div>
<!-- End Submit Box -->