Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* Coupons education template.
|
||||
*
|
||||
* @since 1.8.2.2
|
||||
*
|
||||
* @var string $action Is plugin installed?
|
||||
* @var string $path Plugin file.
|
||||
* @var string $url URL for download plugin.
|
||||
* @var bool $plugin_allow Allow using plugin.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$features = [
|
||||
__( 'Custom Coupon Codes', 'wpforms-lite' ),
|
||||
__( 'Maximum Usage Limit', 'wpforms-lite' ),
|
||||
__( 'Percentage or Fixed Discounts', 'wpforms-lite' ),
|
||||
__( 'Once Per Email Address Limit', 'wpforms-lite' ),
|
||||
__( 'Start and End Dates', 'wpforms-lite' ),
|
||||
__( 'Usage Statistics', 'wpforms-lite' ),
|
||||
];
|
||||
|
||||
$images_url = WPFORMS_PLUGIN_URL . 'assets/images/coupons-education/';
|
||||
|
||||
$images = [
|
||||
[
|
||||
'url' => 'coupons-addon-thumbnail-01.png',
|
||||
'url2x' => 'coupons-addon-screenshot-01.png',
|
||||
'title' => __( 'Coupons Overview', 'wpforms-lite' ),
|
||||
],
|
||||
[
|
||||
'url' => 'coupons-addon-thumbnail-02.png',
|
||||
'url2x' => 'coupons-addon-screenshot-02.png',
|
||||
'title' => __( 'Coupon Settings', 'wpforms-lite' ),
|
||||
],
|
||||
];
|
||||
|
||||
$utm_medium = 'Payments - Coupons';
|
||||
$utm_content = 'Coupons Addon';
|
||||
|
||||
$upgrade_link = $action === 'upgrade'
|
||||
? sprintf(
|
||||
' <strong><a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a></strong>',
|
||||
esc_url( wpforms_admin_upgrade_link( $utm_medium, $utm_content ) ),
|
||||
esc_html__( 'Upgrade to WPForms Pro', 'wpforms-lite' )
|
||||
)
|
||||
: '';
|
||||
?>
|
||||
|
||||
<div class="coupons-education-page">
|
||||
<div class="coupons-education-page-heading">
|
||||
<p>
|
||||
<?php
|
||||
printf( /* translators: %s - WPForms.com Upgrade page URL. */
|
||||
esc_html__( 'With the Coupons addon, you can offer customers discounts using custom coupon codes. Create your own percentage or fixed rate discount, then add the Coupon field to any payment form. When a customer enters your unique code, they’ll receive the specified discount. You can also add limits to restrict when coupons are available and how often they can be used. The Coupons addon requires a license level of Pro or higher.%s', 'wpforms-lite' ),
|
||||
wp_kses(
|
||||
$upgrade_link,
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'rel' => [],
|
||||
'target' => [],
|
||||
],
|
||||
'strong' => [],
|
||||
]
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="coupons-education-page-media">
|
||||
<div class="coupons-education-page-images">
|
||||
<?php foreach ( $images as $image ) : ?>
|
||||
<figure>
|
||||
<div class="coupons-education-page-images-image">
|
||||
<img src="<?php echo esc_url( $images_url . $image['url'] ); ?>" alt="<?php echo esc_attr( $image['title'] ); ?>" />
|
||||
<a href="<?php echo esc_url( $images_url . $image['url2x'] ); ?>" class="hover" data-lity data-lity-desc="<?php echo esc_attr( $image['title'] ); ?>"></a>
|
||||
</div>
|
||||
<figcaption><?php echo esc_html( $image['title'] ); ?></figcaption>
|
||||
</figure>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="coupons-education-page-caps">
|
||||
<p><?php esc_html_e( 'Easy to Use, Yet Powerful', 'wpforms-lite' ); ?></p>
|
||||
<ul>
|
||||
<?php foreach ( $features as $feature ) : ?>
|
||||
<li>
|
||||
<i class="fa fa-solid fa-check"></i>
|
||||
<?php echo esc_html( $feature ); ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="coupons-education-page-button">
|
||||
<?php
|
||||
wpforms_edu_get_button(
|
||||
$action,
|
||||
$plugin_allow,
|
||||
$path,
|
||||
$url,
|
||||
[
|
||||
'medium' => $utm_medium,
|
||||
'content' => $utm_content,
|
||||
]
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Payment single page education notice.
|
||||
*
|
||||
* @since 1.8.2
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpforms-payment-single-education-notice postbox wpforms-dismiss-container">
|
||||
<div class="wpforms-payment-single-education-notice-title">
|
||||
<?php esc_html_e( 'Get More Out of Payments', 'wpforms-lite' ); ?>
|
||||
</div>
|
||||
<div class="wpforms-payment-single-education-notice-description">
|
||||
<?php
|
||||
printf(
|
||||
wp_kses( /* translators: %s - WPForms.com Upgrade page URL. */
|
||||
__( 'Unlock conditional logic, coupons, lower Stripe fees, and more. <a href="%s" target="_blank" rel="noopener noreferrer">Upgrade to Pro!</a>', 'wpforms-lite' ),
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'rel' => [],
|
||||
'target' => [],
|
||||
],
|
||||
]
|
||||
),
|
||||
esc_url(
|
||||
wpforms_admin_upgrade_link(
|
||||
'Single Payment Page',
|
||||
'Stripe Pro - Remove Fees'
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div
|
||||
class="wpforms-payment-single-education-notice-dismiss-button wpforms-dismiss-button"
|
||||
data-section="single-payment"
|
||||
aria-label="<?php esc_html_e( 'Dismiss this notice', 'wpforms-lite' ); ?>">
|
||||
<span class="dashicons dashicons-no-alt"></span>
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Capabilities for geolocation settings page.
|
||||
*
|
||||
* @since 1.6.6
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$lists = [
|
||||
[
|
||||
esc_html__( 'City', 'wpforms-lite' ),
|
||||
esc_html__( 'Country', 'wpforms-lite' ),
|
||||
esc_html__( 'Postal/Zip Code', 'wpforms-lite' ),
|
||||
],
|
||||
[
|
||||
esc_html__( 'Latitude/Longitude', 'wpforms-lite' ),
|
||||
esc_html__( 'Address Autocomplete', 'wpforms-lite' ),
|
||||
esc_html__( 'Embedded Map in Forms', 'wpforms-lite' ),
|
||||
],
|
||||
[
|
||||
esc_html__( 'Google Places API', 'wpforms-lite' ),
|
||||
esc_html__( 'Mapbox API', 'wpforms-lite' ),
|
||||
],
|
||||
];
|
||||
|
||||
?>
|
||||
<p><?php esc_html_e( 'Powerful location-based insights and features…', 'wpforms-lite' ); ?></p>
|
||||
|
||||
<?php foreach ( $lists as $list ) { ?>
|
||||
<ul>
|
||||
<?php foreach ( $list as $item ) { ?>
|
||||
<li><?php echo esc_html( $item ); ?></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Heading for geolocation settings page.
|
||||
*
|
||||
* @since 1.6.6
|
||||
*
|
||||
* @var bool $plugin_allow Allow using plugin.
|
||||
*/
|
||||
|
||||
use WPForms\Admin\Education\Helpers;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<h4>
|
||||
<?php
|
||||
esc_html_e( 'Geolocation', 'wpforms-lite' );
|
||||
|
||||
if ( ! $plugin_allow ) {
|
||||
Helpers::print_badge( 'Pro' );
|
||||
}
|
||||
?>
|
||||
</h4>
|
||||
<p><?php esc_html_e( 'Do you want to learn more about visitors who fill out your online forms? Our geolocation addon allows you to collect and store your website visitors geolocation data along with their form submission. This insight can help you to be better informed and turn more leads into customers. Furthermore, add a smart address field that autocompletes using the Google Places API.', 'wpforms-lite' ); ?></p>
|
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Screenshots for geolocation settings page.
|
||||
*
|
||||
* @since 1.6.6
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$images_url = WPFORMS_PLUGIN_URL . 'assets/images/geolocation-education/';
|
||||
$screenshots = [
|
||||
[
|
||||
'url' => $images_url . 'entry-location.jpg',
|
||||
'url2x' => $images_url . 'entry-location@2x.jpg',
|
||||
'title' => __( 'Location Info in Entries', 'wpforms-lite' ),
|
||||
],
|
||||
[
|
||||
'url' => $images_url . 'address-autocomplete.jpg',
|
||||
'url2x' => $images_url . 'address-autocomplete@2x.jpg',
|
||||
'title' => __( 'Address Autocomplete Field', 'wpforms-lite' ),
|
||||
],
|
||||
[
|
||||
'url' => $images_url . 'smart-address-field.jpg',
|
||||
'url2x' => $images_url . 'smart-address-field@2x.jpg',
|
||||
'title' => __( 'Smart Address Field', 'wpforms-lite' ),
|
||||
],
|
||||
];
|
||||
|
||||
foreach ( $screenshots as $screenshot ) {
|
||||
?>
|
||||
<div class="cont">
|
||||
<img src="<?php echo esc_url( $screenshot['url'] ); ?>" alt="<?php echo esc_attr( $screenshot['title'] ); ?>" />
|
||||
<a href="<?php echo esc_url( $screenshot['url2x'] ); ?>" class="hover" data-lity data-lity-desc="<?php echo esc_attr( $screenshot['title'] ); ?>"></a>
|
||||
<span><?php echo esc_html( $screenshot['title'] ); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* Button for geolocation settings page.
|
||||
*
|
||||
* @since 1.6.6
|
||||
*
|
||||
* @var string $action Is plugin installed?
|
||||
* @var string $path Plugin file.
|
||||
* @var string $url URL for download plugin.
|
||||
* @var bool $plugin_allow Allow using plugin.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $plugin_allow && $action === 'activate' ) {
|
||||
?>
|
||||
<button
|
||||
class="status-inactive wpforms-btn wpforms-btn-lg wpforms-btn-blue wpforms-education-toggle-plugin-btn"
|
||||
data-type="addon"
|
||||
data-action="<?php echo esc_attr( $action ); ?>"
|
||||
data-plugin="<?php echo esc_attr( $path ); ?>">
|
||||
<i></i><?php esc_html_e( 'Activate', 'wpforms-lite' ); ?>
|
||||
</button>
|
||||
<?php } elseif ( $plugin_allow && $action === 'install' ) { ?>
|
||||
<button
|
||||
class="status-download wpforms-btn wpforms-btn-lg wpforms-btn-blue wpforms-education-toggle-plugin-btn"
|
||||
data-type="addon"
|
||||
data-action="<?php echo esc_attr( $action ); ?>"
|
||||
data-plugin="<?php echo esc_url( $url ); ?>">
|
||||
<i></i><?php esc_html_e( 'Install & Activate', 'wpforms-lite' ); ?>
|
||||
</button>
|
||||
<?php
|
||||
} else {
|
||||
$btn_classes = [ 'wpforms-btn', 'wpforms-btn-lg', 'wpforms-btn-orange' ];
|
||||
$btn_classes[] = ! wpforms()->is_pro() ? 'wpforms-upgrade-modal' : '';
|
||||
?>
|
||||
<a
|
||||
href="<?php echo esc_url( wpforms_admin_upgrade_link( 'Settings - Geolocation', 'Geolocation Addon' ) ); ?>"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="<?php echo esc_attr( implode( ' ', array_filter( $btn_classes ) ) ); ?>">
|
||||
<?php esc_html_e( 'Upgrade to WPForms Pro', 'wpforms-lite' ); ?>
|
||||
</a>
|
||||
<?php
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* SMTP education notice.
|
||||
*
|
||||
* @since 1.8.1
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpforms-smtp-education-notice wpforms-dismiss-container">
|
||||
<div class="wpforms-smtp-education-notice-title"><?php esc_html_e( 'Make Sure Important Emails Reach Your Customers', 'wpforms-lite' ); ?></div>
|
||||
<div class="wpforms-smtp-education-notice-description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf( /* translators: %1$s - link to WPForms SMTP page. */
|
||||
__( 'Solve common email deliverability issues for good. <a href="%1$s" target="%2$s" rel="noopener noreferrer">Get WP Mail SMTP!</a>', 'wpforms-lite' ),
|
||||
esc_url( add_query_arg( 'page', 'wpforms-smtp', admin_url( 'admin.php' ) ) ),
|
||||
wpforms_is_admin_page( 'builder' ) ? '_blank' : '_self'
|
||||
),
|
||||
[
|
||||
'a' => [
|
||||
'href' => [],
|
||||
'rel' => [],
|
||||
'target' => [],
|
||||
],
|
||||
]
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div
|
||||
class="wpforms-smtp-education-notice-dismiss-button wpforms-dismiss-button"
|
||||
data-section="smtp-notice"
|
||||
aria-label="<?php esc_html_e( 'Dismiss this notice', 'wpforms-lite' ); ?>">
|
||||
<span class="dashicons dashicons-no-alt"></span>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user