Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Also Available block.
|
||||
*
|
||||
* @since 1.7.8
|
||||
*
|
||||
* @var array $blocks All educational content blocks.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<div class="wpforms-panel-content-also-available">
|
||||
<?php
|
||||
foreach ( $blocks as $key => $block ) :
|
||||
|
||||
if ( empty( $block['show'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$slug = strtolower( $key );
|
||||
$class = ! empty( $block['class'] ) ? $block['class'] : '';
|
||||
?>
|
||||
|
||||
<div class="wpforms-panel-content-also-available-item <?php echo sanitize_html_class( "wpforms-panel-content-also-available-item-{$slug}" ); ?>">
|
||||
<div class='wpforms-panel-content-also-available-item-logo'>
|
||||
<img src="<?php echo esc_url( $block['logo'] ); ?>" alt="<?php echo esc_attr( $block['title'] ); ?>">
|
||||
</div>
|
||||
|
||||
<div class='wpforms-panel-content-also-available-item-info'>
|
||||
<h3><?php echo esc_html( $block['title'] ); ?></h3>
|
||||
<p><?php echo esc_html( $block['description'] ); ?></p>
|
||||
<a class="<?php echo sanitize_html_class( $class ); ?>"
|
||||
href="<?php echo esc_url( $block['link'] ); ?>"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">
|
||||
<?php echo esc_html( $block['link_text'] ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</div>
|
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* Form Builder abort message screen template.
|
||||
*
|
||||
* @since 1.7.3
|
||||
*
|
||||
* @var string $message An abort message to display.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id="wpforms-builder-abort-message" class="wpforms-fullscreen-notice wpforms-fullscreen-notice-light">
|
||||
|
||||
<h3 class="waving-hand-emoji"><?php esc_html_e( 'Hi there!', 'wpforms-lite' ); ?></h3>
|
||||
<p><?php echo esc_html( $message ); ?></p>
|
||||
|
||||
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/empty-states/no-forms.svg' ); ?>" alt="">
|
||||
|
||||
<?php if ( wpforms_current_user_can( 'view_forms' ) ) : ?>
|
||||
<div class="wpforms-fullscreen-notice-buttons">
|
||||
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wpforms-overview' ) ); ?>"
|
||||
class="wpforms-fullscreen-notice-button wpforms-fullscreen-notice-button-primary">
|
||||
<?php esc_html_e( 'Back to All Forms', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Form Builder IE / unsupported browser notice template.
|
||||
*
|
||||
* @since 1.7.8
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id='wpforms-builder-ie-notice' class='wpforms-fullscreen-notice'>
|
||||
|
||||
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/builder/ie-logo.svg' ); ?>" alt='Internet Explorer ®'>
|
||||
<h3><?php esc_html_e( 'You are using an outdated browser!', 'wpforms-lite' ); ?></h3>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses( /* translators: %1$s - link to the update Internet Explorer page, %2$s - link to the browse happy page. */
|
||||
__( 'The Internet Explorer browser no more supported.<br>Our form builder is optimized for modern browsers.<br>Please <a href="%1$s" target="_blank" rel="nofollow noopener">install Microsoft Edge</a> or learn<br>how to <a href="%2$s" target="_blank" rel="nofollow noopener">browse happy</a>.', 'wpforms-lite' ),
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'target' => [],
|
||||
'rel' => [],
|
||||
],
|
||||
'br' => [],
|
||||
]
|
||||
),
|
||||
'https://www.microsoft.com/en-us/edge',
|
||||
'https://browsehappy.com/'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<div class="wpforms-fullscreen-notice-buttons">
|
||||
<a href="<?php echo esc_url( wpforms_current_user_can( 'view_forms' ) ? admin_url( 'admin.php?page=wpforms-overview' ) : admin_url() ); ?>" class="wpforms-fullscreen-notice-button wpforms-fullscreen-notice-button-primary">
|
||||
<?php esc_html_e( 'Back to All Forms', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* Form Builder mobile / small screen notice template.
|
||||
*
|
||||
* @since 1.7.8
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div id='wpforms-builder-mobile-notice' class='wpforms-fullscreen-notice'>
|
||||
|
||||
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/sullie-builder-mobile.png' ); ?>" class='sullie-icon' alt="<?php esc_attr_e( 'Sullie the WPForms mascot', 'wpforms-lite' ); ?>">
|
||||
|
||||
<h3><?php esc_html_e( 'Our form builder is optimized for desktop computers.', 'wpforms-lite' ); ?></h3>
|
||||
<p><?php esc_html_e( 'We recommend that you edit your forms on a bigger screen. If you\'d like to proceed, please understand that some functionality might not behave as expected.', 'wpforms-lite' ); ?></p>
|
||||
|
||||
<div class="wpforms-fullscreen-notice-buttons">
|
||||
<button type="button" class="wpforms-fullscreen-notice-button wpforms-fullscreen-notice-button-primary">
|
||||
<?php esc_html_e( 'Back to All Forms', 'wpforms-lite' ); ?>
|
||||
</button>
|
||||
<button type="button" class="wpforms-fullscreen-notice-button wpforms-fullscreen-notice-button-secondary">
|
||||
<?php esc_html_e( 'Continue', 'wpforms-lite' ); ?>
|
||||
</button>
|
||||
|
||||
<button type="button" class="close"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'wpforms-lite' ); ?></span></button>
|
||||
</div>
|
||||
|
||||
</div>
|
145
wp-content/plugins/wpforms-lite/templates/builder/help.php
Normal file
145
wp-content/plugins/wpforms-lite/templates/builder/help.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
/**
|
||||
* Form Builder Help Screen template.
|
||||
*
|
||||
* @since 1.6.3
|
||||
*
|
||||
* @var array $settings Help Screen settings.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$times_svg = '<svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/></svg>';
|
||||
$url_parameters = add_query_arg(
|
||||
[
|
||||
'utm_campaign' => wpforms()->is_pro() ? 'plugin' : 'liteplugin',
|
||||
'utm_source' => 'WordPress',
|
||||
'utm_medium' => rawurlencode( 'Builder Help Modal' ),
|
||||
'utm_content' => '',
|
||||
],
|
||||
''
|
||||
);
|
||||
|
||||
$links_utm_medium = 'Builder Help Modal';
|
||||
|
||||
?>
|
||||
<div id="wpforms-builder-help" style="display: none; opacity: 0;" class="wpforms-admin-page">
|
||||
|
||||
<img id="wpforms-builder-help-logo"
|
||||
src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/sullie-alt.png' ); ?>"
|
||||
title="<?php esc_attr_e( 'Sullie the WPForms mascot', 'wpforms-lite' ); ?>"
|
||||
alt="WPForms Logo">
|
||||
|
||||
<div id="wpforms-builder-help-close" title="<?php esc_attr_e( 'Close', 'wpforms-lite' ); ?>">
|
||||
<?php echo $times_svg; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
|
||||
<div id="wpforms-builder-help-content">
|
||||
|
||||
<div id="wpforms-builder-help-search">
|
||||
<input type="text" placeholder="<?php esc_attr_e( 'Ask a question or search the docs...', 'wpforms-lite' ); ?>">
|
||||
<div id="wpforms-builder-help-search-clear" title="<?php esc_attr_e( 'Clear', 'wpforms-lite' ); ?>">
|
||||
<?php echo $times_svg; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="wpforms-builder-help-no-result" style="display: none;">
|
||||
<ul class="wpforms-builder-help-docs">
|
||||
<li>
|
||||
<i class="fa fa-info-circle"></i><span><?php esc_html_e( 'No docs found', 'wpforms-lite' ); ?></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="wpforms-builder-help-result"></div>
|
||||
<div id="wpforms-builder-help-categories"></div>
|
||||
|
||||
<div id="wpforms-builder-help-footer">
|
||||
|
||||
<div class="wpforms-builder-help-footer-block">
|
||||
<i class="fa fa-file-text-o"></i>
|
||||
<h3><?php esc_html_e( 'View Documentation', 'wpforms-lite' ); ?></h3>
|
||||
<p><?php esc_html_e( 'Browse documentation, reference material, and tutorials for WPForms.', 'wpforms-lite' ); ?></p>
|
||||
<a href="<?php echo esc_url( wpforms_utm_link( $settings['docs_url'], $links_utm_medium, 'View Documentation' ) ); ?>"
|
||||
class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank">
|
||||
<?php esc_html_e( 'View All Documentation', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="wpforms-builder-help-footer-block">
|
||||
<i class="fa fa-support"></i>
|
||||
<h3><?php esc_html_e( 'Get Support', 'wpforms-lite' ); ?></h3>
|
||||
|
||||
<?php if ( wpforms()->is_pro() ) { ?>
|
||||
<p><?php esc_html_e( 'Submit a ticket and our world class support team will be in touch soon.', 'wpforms-lite' ); ?></p>
|
||||
<a href="<?php echo esc_url( wpforms_utm_link( $settings['support_ticket_url'], $links_utm_medium, 'Contact Support' ) ); ?>"
|
||||
class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank">
|
||||
<?php esc_html_e( 'Submit a Support Ticket', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
|
||||
<?php } else { ?>
|
||||
<p><?php esc_html_e( 'Upgrade to WPForms Pro to access our world class customer support.', 'wpforms-lite' ); ?></p>
|
||||
<a href="<?php echo esc_url( wpforms_utm_link( $settings['upgrade_url'], $links_utm_medium, 'Upgrade For Support' ) ); ?>"
|
||||
class="wpforms-btn wpforms-btn-md wpforms-btn-orange"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank">
|
||||
<?php esc_html_e( 'Upgrade to WPForms Pro', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="tmpl-wpforms-builder-help-categories">
|
||||
<ul class="wpforms-builder-help-categories-toggle">
|
||||
<# _.each( data.categories, function( categoryTitle, categorySlug ) { #>
|
||||
<li class="wpforms-builder-help-category">
|
||||
<header>
|
||||
<i class="fa fa-folder-open-o wpforms-folder"></i>
|
||||
<span>{{{ categoryTitle }}}</span>
|
||||
<i class="fa fa-angle-right wpforms-arrow"></i>
|
||||
</header>
|
||||
<ul class="wpforms-builder-help-docs" style="display: none;">
|
||||
<# _.each( data.docs[ categorySlug ], function( doc, index ) {
|
||||
utmContent = encodeURIComponent( doc.title ); #>
|
||||
<li>
|
||||
<i class="fa fa-file-text-o"></i><a href="{{ doc.url }}<?php echo esc_url( $url_parameters ); ?>={{ utmContent }}" rel="noopener noreferrer" target="_blank">{{{ doc.title }}}</a>
|
||||
</li>
|
||||
<# if ( index === 4 && data.docs[ categorySlug ].length > 4 ) { #>
|
||||
<div style="display: none;">
|
||||
<# } #>
|
||||
<# } ) #>
|
||||
<# if ( data.docs[ categorySlug ].length > 4 ) { #>
|
||||
</div>
|
||||
<button class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey viewall" type="button"><?php esc_html_e( 'View All', 'wpforms-lite' ); ?> {{{ categoryTitle }}} <?php esc_html_e( 'Docs', 'wpforms-lite' ); ?></button>
|
||||
<# } #>
|
||||
</ul>
|
||||
</li>
|
||||
<# } ) #>
|
||||
</ul>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-wpforms-builder-help-categories-error">
|
||||
<h4 class="wpforms-builder-help-error">
|
||||
<?php esc_html_e( 'Unfortunately the error occurred while downloading help data.', 'wpforms-lite' ); ?>
|
||||
</h4>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-wpforms-builder-help-docs">
|
||||
<ul class="wpforms-builder-help-docs">
|
||||
<# _.each( data.docs, function( doc, index ) {
|
||||
utmContent = encodeURIComponent( doc.title ); #>
|
||||
<li>
|
||||
<i class="fa fa-file-text-o"></i><a href="{{ doc.url }}<?php echo esc_url( $url_parameters ); ?>={{ utmContent }}" rel="noopener noreferrer" target="_blank">{{{ doc.title }}}</a>
|
||||
</li>
|
||||
<# } ) #>
|
||||
</ul>
|
||||
</script>
|
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Template modal link.
|
||||
*
|
||||
* This template will display a link to select a template for a notification.
|
||||
* It is used in the context of both WPForms Lite and Pro.
|
||||
*
|
||||
* @since 1.8.5
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<p class="note">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %1$s - Opening anchor tag, %2$s - Closing anchor tag. */
|
||||
esc_html__( 'Select a template to use for this notification or %1$sview templates%2$s.', 'wpforms-lite' ),
|
||||
'<a href="#" class="wpforms-all-email-template-modal">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
|
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* Email Template modal content.
|
||||
*
|
||||
* This template is used for rendering the email template modal content
|
||||
* and is injected into the DOM via JS. The JS backbone template is used to render loop iterations.
|
||||
*
|
||||
* @since 1.8.5
|
||||
*
|
||||
* @var string $pro_badge Pro badge HTML.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/html" id="tmpl-wpforms-email-template-modal">
|
||||
<div class="wpforms-modal-header">
|
||||
<h1>
|
||||
<?php esc_html_e( 'Choose a Template', 'wpforms-lite' ); ?>
|
||||
</h1>
|
||||
<p>
|
||||
<?php esc_html_e( 'Browse through our collection of email notification templates.', 'wpforms-lite' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="wpforms-email-template-modal-content wpforms-modal-content">
|
||||
<div class="wpforms-card-image-group">
|
||||
<div class="wpforms-setting-field">
|
||||
<# _.each( data.templates, function( template, key ) { #>
|
||||
<div class="wpforms-card-image<# if ( ! data.is_pro && template.is_pro ) { #> education-modal<# } #>"<# if ( ! data.is_pro && template.is_pro ) { #> data-name="<?php esc_attr_e( 'Email Templates', 'wpforms-lite' ); ?>" data-plural="1" data-action="upgrade"<# } #>>
|
||||
<input type="radio" name="wpforms-email-template-modal-choice" id="wpforms-email-template-modal-choice-{{ data.id }}-{{ key }}" value="{{ key }}"<# if ( key === data.selected ) { #> checked="checked"<# } #> />
|
||||
<label for="wpforms-email-template-modal-choice-{{ data.id }}-{{ key }}" class="option-{{ key }}">
|
||||
{{ template.name }}
|
||||
<# if ( ! data.is_pro && template.is_pro ) { #>
|
||||
<?php echo wp_kses( $pro_badge, [ 'span' => [ 'class' => [] ] ] ); ?>
|
||||
<# } #>
|
||||
<span class="wpforms-card-image-overlay">
|
||||
<span class="wpforms-btn-choose wpforms-btn wpforms-btn-md wpforms-btn-orange">
|
||||
<?php esc_html_e( 'Choose', 'wpforms-lite' ); ?>
|
||||
</span>
|
||||
<# if ( template.preview ) { #>
|
||||
<a href="{{{ template.preview }}}" target="_blank" class="wpforms-btn-preview wpforms-btn wpforms-btn-md wpforms-btn-light-grey">
|
||||
<?php esc_html_e( 'Preview', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
<# } #>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<# } ); #>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<?php
|
||||
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
|
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Payment Recurring Item HTML template.
|
||||
*
|
||||
* @since 1.8.4
|
||||
*
|
||||
* @var string $plan_id Plan ID.
|
||||
* @var string $content Recurring payment content.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="wpforms-panel-content-section-payment-plan" data-plan-id="<?php echo esc_attr( $plan_id ); ?>">
|
||||
<div class="wpforms-panel-content-section-payment-plan-head">
|
||||
<div class="wpforms-panel-content-section-payment-plan-head-title"></div>
|
||||
<div class="wpforms-panel-content-section-payment-plan-head-buttons">
|
||||
<i class="wpforms-panel-content-section-payment-plan-head-buttons-delete fa fa-trash-o"></i>
|
||||
<i class="wpforms-panel-content-section-payment-plan-head-buttons-toggle fa fa-chevron-circle-down"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpforms-panel-content-section-payment-plan-body"><?php echo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
</div>
|
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Payments sidebar button in the builder.
|
||||
*
|
||||
* @since 1.8.2
|
||||
*
|
||||
* @var string $configured Whether payment is configured.
|
||||
* @var string $slug Slug of the payment integration.
|
||||
* @var string $icon Icon of the payment integration.
|
||||
* @var string $name Name of the payment integration.
|
||||
* @var bool $recommended Whether payment is recommended.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<a href="#" class="wpforms-panel-sidebar-section icon <?php echo esc_attr( $configured ); ?> wpforms-panel-sidebar-section-<?php echo esc_attr( $slug ); ?>" data-section="<?php echo esc_attr( $slug ); ?>">
|
||||
|
||||
<img src="<?php echo esc_url( $icon ); ?>" alt="<?php echo esc_attr( $name ); ?>">
|
||||
|
||||
<?php echo esc_html( $name ); ?>
|
||||
|
||||
<?php if ( ! empty( $recommended ) ) : ?>
|
||||
<span class="wpforms-panel-sidebar-recommended">
|
||||
<i class="fa fa-star" aria-hidden="true"></i>
|
||||
<?php esc_html_e( 'Recommended', 'wpforms-lite' ); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
<i class="fa fa-angle-right wpforms-toggle-arrow"></i>
|
||||
|
||||
<?php if ( ! empty( $configured ) ) : ?>
|
||||
<i class="fa fa-check-circle-o"></i>
|
||||
<?php endif; ?>
|
||||
</a>
|
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* A list of form revisions in the Form Builder Revisions panel.
|
||||
*
|
||||
* @since 1.7.3
|
||||
*
|
||||
* @var string $active_class Active item class.
|
||||
* @var string $current_version_url The URL to load the current form version.
|
||||
* @var string $author_id Current form author ID.
|
||||
* @var array $revisions A list of all form revisions.
|
||||
* @var string $show_avatars Whether the site settings for showing avatars is enabled.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class='wpforms-revisions-content'>
|
||||
<div class="wpforms-revision-current-version<?php echo esc_attr( $active_class ); ?>">
|
||||
<a href="<?php echo esc_url( $current_version_url ); ?>">
|
||||
<?php if ( $show_avatars ) : ?>
|
||||
<div class="wpforms-revision-gravatar">
|
||||
<?php echo get_avatar( $author_id, 40 ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class='wpforms-revision-details'>
|
||||
<p class='wpforms-revision-created'>
|
||||
<strong><?php esc_html_e( 'Current Version', 'wpforms-lite' ); ?></strong>
|
||||
</p>
|
||||
|
||||
<p class='wpforms-revision-author'>
|
||||
<?php
|
||||
$display_name = get_the_author_meta( 'display_name', $author_id );
|
||||
|
||||
printf( /* translators: %s - form revision author name. */
|
||||
esc_html__( 'by %s', 'wpforms-lite' ),
|
||||
! empty( $display_name ) ? esc_html( $display_name ) : esc_html__( 'Unknown user', 'wpforms-lite' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<ul class="wpforms-revisions-list">
|
||||
<?php foreach ( $revisions as $revision ) : ?>
|
||||
|
||||
<li class="wpforms-revision<?php echo esc_attr( $revision['active_class'] ); ?>">
|
||||
<a href="<?php echo esc_url( $revision['url'] ); ?>">
|
||||
<?php if ( $show_avatars ) : ?>
|
||||
<div class="wpforms-revision-gravatar">
|
||||
<?php echo get_avatar( $revision['author_id'], 40 ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class='wpforms-revision-details'>
|
||||
<p class='wpforms-revision-created'>
|
||||
<strong><?php echo esc_html( $revision['time_diff'] ); ?></strong> (<?php echo esc_html( $revision['date_time'] ); ?>)
|
||||
</p>
|
||||
|
||||
<p class='wpforms-revision-author'>
|
||||
<?php
|
||||
$display_name = get_the_author_meta( 'display_name', $revision['author_id'] );
|
||||
|
||||
printf( /* translators: %s - form revision author name. */
|
||||
esc_html__( 'by %s', 'wpforms-lite' ),
|
||||
! empty( $display_name ) ? esc_html( $display_name ) : esc_html__( 'Unknown user', 'wpforms-lite' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* "Revisions are disabled" notice in the Form Builder Revisions panel.
|
||||
*
|
||||
* @since 1.7.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$url = wpforms_utm_link(
|
||||
'https://wpforms.com/docs/how-to-use-form-revisions-in-wpforms/#enable-post-revisions',
|
||||
'Builder Revisions',
|
||||
'Revisions Disabled Notice'
|
||||
);
|
||||
?>
|
||||
|
||||
<div class='wpforms-revisions-notice wpforms-revisions-notice-error'>
|
||||
<h2><?php esc_html_e( 'Form Revisions Are Disabled', 'wpforms-lite' ); ?></h2>
|
||||
<p><?php esc_html_e( 'It appears that revisions are disabled on your WordPress installation. You can enable revisions for WPForms while leaving posts revisions disabled.', 'wpforms-lite' ); ?></p>
|
||||
|
||||
<a href="<?php echo esc_url( $url ); ?>" target='_blank' rel='noopener noreferrer' class='button button-primary button-large'>
|
||||
<?php esc_html_e( 'Learn How', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
</div>
|
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* "Revisions are limited" notice in the Form Builder Revisions panel.
|
||||
*
|
||||
* @since 1.7.3
|
||||
*
|
||||
* @var int $revisions_to_keep How many revisions are kept.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$url = wpforms_utm_link(
|
||||
'https://wpforms.com/docs/how-to-use-form-revisions-in-wpforms/#enable-post-revisions',
|
||||
'Builder Revisions',
|
||||
'Revisions Limited Notice'
|
||||
);
|
||||
?>
|
||||
|
||||
<div class='wpforms-revisions-notice wpforms-revisions-notice-warning'>
|
||||
<h2><?php esc_html_e( 'Form Revisions Are Limited', 'wpforms-lite' ); ?></h2>
|
||||
<p>
|
||||
<?php
|
||||
printf( /* translators: %d - maximum number of revisions to keep. */
|
||||
esc_html__( 'Revisions are enabled, but they’re limited to %d. You can increase this by making a simple change to your WordPress configuration.', 'wpforms-lite' ),
|
||||
absint( $revisions_to_keep )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<a href="<?php echo esc_url( $url ); ?>" target="_blank" rel="noopener noreferrer" class='button button-primary button-large'>
|
||||
<?php esc_html_e( 'Learn How', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
</div>
|
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* Panel Setup (form templates).
|
||||
* Form templates list item template.
|
||||
*
|
||||
* @since 1.6.8
|
||||
* @since 1.8.4 Added subcategories attribute.
|
||||
*
|
||||
* @var string $selected_class Selected item class.
|
||||
* @var bool $selected Is template selected.
|
||||
* @var string $license_class License class (in the case of higher license needed).
|
||||
* @var string $categories Categories, coma separated.
|
||||
* @var string $subcategories Subcategories, comma separated.
|
||||
* @var string $badge_text Badge text.
|
||||
* @var string $demo_url Template demo URL.
|
||||
* @var string $template_id Template ID (Slug or ID if available).
|
||||
* @var string $education_class Education class (in the case of higher license needed).
|
||||
* @var string $education_attributes Education attributes.
|
||||
* @var string $addons_attributes Required addons attributes.
|
||||
* @var array $template Template data.
|
||||
* @var string $action_text Template action button text.
|
||||
* @var string $badge_class Badge class in case if there is any badge text exists.
|
||||
*/
|
||||
|
||||
use WPForms\Admin\Education\Helpers;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="wpforms-template<?php echo esc_attr( $selected_class ); ?><?php echo esc_attr( $license_class ); ?><?php echo esc_attr( $badge_class ); ?>"
|
||||
id="wpforms-template-<?php echo sanitize_html_class( $template['slug'] ); ?>">
|
||||
|
||||
<div class="wpforms-template-thumbnail">
|
||||
<?php if ( empty( $template['thumbnail'] ) ) { ?>
|
||||
<div class="wpforms-template-thumbnail-placeholder">
|
||||
<?php if ( $template['slug'] === 'blank' ) { ?>
|
||||
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/icon-file.svg' ); ?>" alt="Blank Form Template" loading="lazy" />
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/icon-wpforms.svg' ); ?>" alt="Customizable Form Template" loading="lazy" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo esc_url( $template['thumbnail'] ); ?>" alt="<?php echo esc_attr( $template['name'] ); ?> Template" loading="lazy" />
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<!-- As requirment for Lists.js library data attribute slug is used in classes list. -->
|
||||
<h3 class="wpforms-template-name categories has-access favorite slug subcategories" data-categories="<?php echo esc_attr( $categories ); ?>" data-subcategories="<?php echo esc_attr( $subcategories ); ?>" data-has-access="<?php echo esc_attr( $template['has_access'] ); ?>" data-favorite="<?php echo esc_attr( $template['favorite'] ); ?>" data-slug="<?php echo esc_attr( $template['slug'] ); ?>">
|
||||
<?php echo esc_html( $template['name'] ); ?>
|
||||
</h3>
|
||||
|
||||
<span class="wpforms-template-favorite">
|
||||
<i class="fa fa-heart <?php echo $template['favorite'] ? '' : 'wpforms-hidden'; ?>" title="<?php esc_attr_e( 'Remove from Favorites', 'wpforms-lite' ); ?>"></i>
|
||||
<i class="fa fa-heart-o <?php echo $template['favorite'] ? 'wpforms-hidden' : ''; ?>" title="<?php esc_attr_e( 'Mark as Favorite', 'wpforms-lite' ); ?>"></i>
|
||||
</span>
|
||||
|
||||
<?php
|
||||
if ( ! empty( $badge_text ) && ! $selected ) {
|
||||
Helpers::print_badge( $badge_text, 'sm', 'corner', 'steel', 'rounded-bl' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ( ! empty( $template['description'] ) ) : ?>
|
||||
<p class="wpforms-template-desc"><?php echo esc_html( $template['description'] ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wpforms-template-buttons">
|
||||
<a href="#" class="wpforms-template-select wpforms-btn wpforms-btn-md wpforms-btn-orange<?php echo esc_attr( $education_class ); ?>"
|
||||
data-template-name-raw="<?php echo esc_attr( $template['name'] ); ?>"
|
||||
data-template="<?php echo esc_attr( $template_id ); ?>"
|
||||
data-slug="<?php echo esc_attr( $template['slug'] ); ?>"
|
||||
<?php echo $education_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php echo $addons_attributes; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>>
|
||||
<?php echo esc_html( $action_text ); ?>
|
||||
</a>
|
||||
<?php if ( $template['url'] !== '' ) : ?>
|
||||
<a class="wpforms-template-demo wpforms-btn wpforms-btn-md wpforms-btn-light-grey"
|
||||
href="<?php echo esc_url( $demo_url ); ?>"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
<?php esc_html_e( 'View Demo', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user