Files
.circleci
assets
bin
data
inc
admin-pages
api
builders
checkout
signup-fields
field-templates
order-bump
order-summary
period-selection
class-clean-period-selection-field-template.php
class-legacy-period-selection-field-template.php
pricing-table
steps
template-selection
class-base-field-template.php
class-base-signup-field.php
class-signup-field-billing-address.php
class-signup-field-checkbox.php
class-signup-field-color.php
class-signup-field-discount-code.php
class-signup-field-email.php
class-signup-field-hidden.php
class-signup-field-order-bump.php
class-signup-field-order-summary.php
class-signup-field-password.php
class-signup-field-payment.php
class-signup-field-period-selection.php
class-signup-field-pricing-table.php
class-signup-field-products.php
class-signup-field-select.php
class-signup-field-shortcode.php
class-signup-field-site-title.php
class-signup-field-site-url.php
class-signup-field-steps.php
class-signup-field-submit-button.php
class-signup-field-template-selection.php
class-signup-field-terms-of-use.php
class-signup-field-text.php
class-signup-field-username.php
class-cart.php
class-checkout-pages.php
class-checkout.php
class-legacy-checkout.php
class-line-item.php
compat
contracts
country
database
debug
deprecated
development
domain-mapping
duplication
exception
functions
gateways
helpers
installers
integrations
internal
invoices
limitations
limits
list-tables
loaders
managers
mercator
models
next
objects
site-templates
sso
tax
traits
ui
updater
class-admin-notices.php
class-admin-themes-compatibility.php
class-ajax.php
class-api.php
class-async-calls.php
class-autoloader.php
class-cron.php
class-current.php
class-dashboard-statistics.php
class-dashboard-widgets.php
class-documentation.php
class-domain-mapping.php
class-faker.php
class-geolocation.php
class-helper.php
class-hooks.php
class-license.php
class-light-ajax.php
class-logger.php
class-maintenance-mode.php
class-newsletter.php
class-requirements.php
class-scripts.php
class-session-cookie.php
class-settings.php
class-sunrise.php
class-user-switching.php
class-views.php
class-whitelabel.php
class-wp-ultimo.php
lang
patches
tests
views
.gitignore
.phpcs.xml.dist
LICENSE
autoload.php
composer.json
composer.lock
constants.php
loco.xml
phpunit.xml.dist
readme.txt
sunrise.php
uninstall.php
wp-multisite-waas.php
wp-multisite-waas/inc/checkout/signup-fields/field-templates/period-selection/class-clean-period-selection-field-template.php
2024-11-30 18:24:12 -07:00

115 lines
2.4 KiB
PHP

<?php
/**
* Template Selection Clean
*
* @package WP_Ultimo
* @subpackage Checkout\Signup_Fields
* @since 2.0.0
*/
namespace WP_Ultimo\Checkout\Signup_Fields\Field_Templates\Period_Selection;
// Exit if accessed directly
defined('ABSPATH') || exit;
use \WP_Ultimo\Checkout\Signup_Fields\Field_Templates\Base_Field_Template;
/**
* Template Selection Clean
*
* @since 2.0.0
*/
class Clean_Period_Selection_Field_Template extends Base_Field_Template {
/**
* Field template id.
*
* Needs to take the following format: field-type/id.
* e.g. pricing-table/clean.
*
* @since 2.0.0
* @var string
*/
protected $id = 'period-selection/clean';
/**
* The render type for the template.
*
* Field templates can have two different render types, ajax and dynamic.
* If ajax is selected, when we detect a change in the billing period and other
* sensitive info, an ajax request is made to fetch the new pricing table HTML
* markup.
*
* If dynamic is selected, nothing is done as the template can handle
* reactive updates natively (using Vue.js)
*
* In terms of performance, dynamic is preferred, but ajax should
* work just fine.
*
* @since 2.0.0
* @return string Either ajax or dynamic
*/
public function get_render_type(): string {
return 'dynamic';
} // end get_render_type;
/**
* The title of the field template.
*
* This is used on the template selector.
*
* @since 2.0.0
* @return string
*/
public function get_title() {
return __('Clean', 'wp-ultimo');
} // end get_title;
/**
* The description of the field template.
*
* This is used on the template selector.
*
* @since 2.0.0
* @return string
*/
public function get_description() {
return __('A simple template with clean markup and no styling, ready to be customized with custom CSS.', 'wp-ultimo');
} // end get_description;
/**
* The preview image of the field template.
*
* The URL of the image preview.
*
* @since 2.0.0
* @return string
*/
public function get_preview(): string {
return wu_get_asset('checkout-forms/clean-period-selection.png');
} // end get_preview;
/**
* The content of the template.
*
* @since 2.0.0
*
* @param array $attributes The field template attributes.
* @return void
*/
public function output($attributes) {
wu_get_template('checkout/templates/period-selection/clean', $attributes);
} // end output;
} // end class Clean_Period_Selection_Field_Template;