first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
@media screen and (max-width: 1023px){#wpforms-notice-bar{display:none !important}}#wpforms-notice-bar{background-color:#DDDDDD;border-top:3px solid #e27730;color:#777777;text-align:center;position:relative;padding:7px;margin-bottom:-4px;opacity:1;transition:all .3s ease-in-out;max-height:100px;overflow:hidden}#wpforms-notice-bar.out{opacity:.5;max-height:0}#wpforms-notice-bar a{color:#e27730}#wpforms-notice-bar a:hover{color:#b85a1b}#wpforms-notice-bar .wpforms-dismiss-button{position:absolute;top:0;right:0;border:none;padding:5px;margin-top:1px;background:0 0;color:#72777c;cursor:pointer}#wpforms-notice-bar .wpforms-dismiss-button:before{background:0 0;color:#72777c;content:"\f335";display:block;font:normal 20px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased}#screen-meta-links .screen-meta-toggle{position:absolute;right:20px;top:auto}.wpforms-admin-settings-access{font-size:14px;color:#444444}.wpforms-admin-settings-access .wpforms-setting-row{padding:30px 0}.wpforms-admin-settings-access .wpforms-setting-field{margin:0;max-width:none}.wpforms-admin-settings-access .heading h4{font-weight:600;margin-bottom:10px;color:#23282D}.wpforms-admin-settings-access .heading h4 img{margin-left:10px}.wpforms-admin-settings-access .heading p{margin:0;line-height:20px;letter-spacing:0}.wpforms-admin-settings-access .screenshots{padding-bottom:55px}.wpforms-admin-settings-access .screenshots>*{vertical-align:middle}.wpforms-admin-settings-access .screenshots .cont{display:inline-block;position:relative;width:240px;padding:5px;background-color:#ffffff;-webkit-box-shadow:0px 2px 5px 0px rgba(0,0,0,0.05);-moz-box-shadow:0px 2px 5px 0px rgba(0,0,0,0.05);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.05);border-radius:3px;margin-right:40px}.wpforms-admin-settings-access .screenshots .cont img{max-width:100%;display:block}.wpforms-admin-settings-access .screenshots .cont .hover{position:absolute;opacity:0;height:100%;width:100%;top:0;left:0;border:5px solid #ffffff;background-color:rgba(68,68,68,0.15);background-image:url("../../../assets/images/zoom.svg");background-repeat:no-repeat;background-position:center;background-size:50px;transition:all 0.3s}.wpforms-admin-settings-access .screenshots .cont .hover:focus{box-shadow:none}.wpforms-admin-settings-access .screenshots .cont:hover .hover{opacity:1;transition:all 0.3s}.wpforms-admin-settings-access .screenshots .cont span{position:absolute;bottom:-25px;left:50%;transform:translateX(-50%);font-size:14px;color:#777777;white-space:nowrap}.wpforms-admin-settings-access .caps p{margin:0}.wpforms-admin-settings-access .caps ul{display:inline-block;width:240px;margin:20px 40px 0 0;vertical-align:top}.wpforms-admin-settings-access .caps ul li:last-child{margin-bottom:0}.wpforms-admin-settings-access .caps li{line-height:14px;margin:0 0 22px 0;padding:0 0 0 30px;background-image:url("../../../assets/images/check-solid.svg");background-position:left center;background-repeat:no-repeat;background-size:16px 12px}.wpforms-admin-settings-access .upgrade{border-bottom:none}@media (max-width: 917px){#wpforms-settings-access .screenshots .cont{margin-bottom:40px}#wpforms-settings-access .screenshots .cont:last-child{margin-bottom:0}#wpforms-settings-access .caps ul{margin-bottom:20px}#wpforms-settings-access .caps ul:last-child{margin-bottom:0}}

View File

@@ -0,0 +1,84 @@
/* global wpforms_builder_lite, wpforms_builder */
'use strict';
var WPFormsBuilderLite = window.WPFormsBuilderLite || ( function( document, window, $ ) {
/**
* Public functions and properties.
*
* @since 1.0.0
*
* @type {object}
*/
var app = {
/**
* Start the engine.
*
* @since 1.0.0
*/
init: function() {
// Document ready
$( app.ready() );
app.bindUIActions();
},
/**
* Document ready.
*
* @since 1.0.0
*/
ready: function() {},
/**
* Element bindings.
*
* @since 1.0.0
*/
bindUIActions: function() {
// Warn users if they disable email notifications.
$( document ).on( 'change', '#wpforms-panel-field-settings-notification_enable', function() {
app.formBuilderNotificationAlert( $( this ).is( ':checked' ) );
} );
},
/**
* Warn users if they disable email notifications.
*
* @since 1.5.0
*
* @param {string} value Whether notifications enabled or not. 0 is disabled, 1 is enabled.
*/
formBuilderNotificationAlert: function( value ) {
if ( value !== false ) {
return;
}
$.alert( {
title: wpforms_builder.heads_up,
content: wpforms_builder_lite.disable_notifications,
icon: 'fa fa-exclamation-circle',
type: 'orange',
buttons: {
confirm: {
text: wpforms_builder.ok,
btnClass: 'btn-confirm',
keys: [ 'enter' ],
},
},
} );
},
};
// Provide access to public functions/properties.
return app;
}( document, window, jQuery ) );
WPFormsBuilderLite.init();

View File

@@ -0,0 +1,182 @@
/* global wpforms_admin */
/**
* Connect functionality.
*
* @since 1.5.4
*/
'use strict';
var WPFormsConnect = window.WPFormsConnect || ( function( document, window, $ ) {
/**
* Elements reference.
*
* @since 1.5.5
*
* @type {object}
*/
var el = {
$connectBtn: $( '#wpforms-settings-connect-btn' ),
$connectKey: $( '#wpforms-settings-upgrade-license-key' ),
};
/**
* Public functions and properties.
*
* @since 1.5.5
*
* @type {object}
*/
var app = {
/**
* Start the engine.
*
* @since 1.5.5
*/
init: function() {
$( app.ready );
},
/**
* Document ready.
*
* @since 1.5.5
*/
ready: function() {
app.events();
},
/**
* Register JS events.
*
* @since 1.5.5
*/
events: function() {
app.connectBtnClick();
},
/**
* Register connect button event.
*
* @since 1.5.5
*/
connectBtnClick: function() {
el.$connectBtn.on( 'click', function() {
app.gotoUpgradeUrl();
} );
},
/**
* Get the alert arguments in case of Pro already installed.
*
* @since 1.5.5
*
* @param {object} res Ajax query result object.
*
* @returns {object} Alert arguments.
*/
proAlreadyInstalled: function( res ) {
var buttons = {
confirm: {
text: wpforms_admin.plugin_activate_btn,
btnClass: 'btn-confirm',
keys: [ 'enter' ],
action: function() {
window.location.reload();
},
},
};
return {
title: wpforms_admin.almost_done,
content: res.data.message,
icon: 'fa fa-check-circle',
type: 'green',
buttons: buttons,
};
},
/**
* Go to upgrade url.
*
* @since 1.5.5
*/
gotoUpgradeUrl: function() {
var data = {
action: 'wpforms_connect_url',
key: el.$connectKey.val(),
nonce: wpforms_admin.nonce,
};
$.post( wpforms_admin.ajax_url, data )
.done( function( res ) {
if ( res.success ) {
if ( res.data.reload ) {
$.alert( app.proAlreadyInstalled( res ) );
return;
}
window.location.href = res.data.url;
return;
}
$.alert( {
title: wpforms_admin.oops,
content: res.data.message,
icon: 'fa fa-exclamation-circle',
type: 'orange',
buttons: {
confirm: {
text: wpforms_admin.ok,
btnClass: 'btn-confirm',
keys: [ 'enter' ],
},
},
} );
} )
.fail( function( xhr ) {
app.failAlert( xhr );
} );
},
/**
* Alert in case of server error.
*
* @since 1.5.5
*
* @param {object} xhr XHR object.
*/
failAlert: function( xhr ) {
$.alert( {
title: wpforms_admin.oops,
content: wpforms_admin.server_error + '<br>' + xhr.status + ' ' + xhr.statusText + ' ' + xhr.responseText,
icon: 'fa fa-exclamation-circle',
type: 'orange',
buttons: {
confirm: {
text: wpforms_admin.ok,
btnClass: 'btn-confirm',
keys: [ 'enter' ],
},
},
} );
},
};
// Provide access to public functions/properties.
return app;
}( document, window, jQuery ) );
// Initialize.
WPFormsConnect.init();

View File

@@ -0,0 +1 @@
"use strict";var WPFormsConnect=window.WPFormsConnect||function(e,t){var o={$connectBtn:t("#wpforms-settings-connect-btn"),$connectKey:t("#wpforms-settings-upgrade-license-key")},r={init:function(){t(r.ready)},ready:function(){r.events()},events:function(){r.connectBtnClick()},connectBtnClick:function(){o.$connectBtn.on("click",function(){r.gotoUpgradeUrl()})},proAlreadyInstalled:function(n){var t={confirm:{text:wpforms_admin.plugin_activate_btn,btnClass:"btn-confirm",keys:["enter"],action:function(){e.location.reload()}}};return{title:wpforms_admin.almost_done,content:n.data.message,icon:"fa fa-check-circle",type:"green",buttons:t}},gotoUpgradeUrl:function(){var n={action:"wpforms_connect_url",key:o.$connectKey.val(),nonce:wpforms_admin.nonce};t.post(wpforms_admin.ajax_url,n).done(function(n){return n.success?n.data.reload?void t.alert(r.proAlreadyInstalled(n)):void(e.location.href=n.data.url):void t.alert({title:wpforms_admin.oops,content:n.data.message,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_admin.ok,btnClass:"btn-confirm",keys:["enter"]}}})}).fail(function(n){r.failAlert(n)})},failAlert:function(n){t.alert({title:wpforms_admin.oops,content:wpforms_admin.server_error+"<br>"+n.status+" "+n.statusText+" "+n.responseText,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:wpforms_admin.ok,btnClass:"btn-confirm",keys:["enter"]}}})}};return r}((document,window),jQuery);WPFormsConnect.init();

View File

@@ -0,0 +1,262 @@
/* global wpforms_dashboard_widget, moment, Chart */
/**
* WPForms Dashboard Widget function.
*
* @since 1.5.0
*/
'use strict';
var WPFormsDashboardWidget = window.WPFormsDashboardWidget || ( function( document, window, $ ) {
/**
* Elements reference.
*
* @since 1.5.0
*
* @type {Object}
*/
var el = {
$widget: $( '#wpforms_reports_widget_lite' ),
$canvas: $( '#wpforms-dash-widget-chart' ),
};
/**
* Chart.js functions and properties.
*
* @since 1.5.0
*
* @type {Object}
*/
var chart = {
/**
* Chart.js instance.
*
* @since 1.5.0
*/
instance: null,
/**
* Chart.js settings.
*
* @since 1.5.0
*/
settings: {
type : 'line',
data : {
labels : [],
datasets: [ {
label : wpforms_dashboard_widget.i18n.entries,
data : [],
backgroundColor : 'rgba(255, 129, 0, 0.135)',
borderColor : 'rgba(211, 126, 71, 1)',
borderWidth : 2,
pointRadius : 4,
pointBorderWidth : 1,
pointBackgroundColor: 'rgba(255, 255, 255, 1)',
} ],
},
options: {
scales : {
xAxes: [ {
type : 'time',
time : {
unit: 'day',
},
distribution: 'series',
ticks : {
beginAtZero: true,
source : 'labels',
padding : 10,
minRotation: 25,
maxRotation: 25,
callback : function( value, index, values ) {
// Distribute the ticks equally starting from a right side of xAxis.
var gap = Math.floor( values.length / 7 );
if ( gap < 1 ) {
return value;
}
if ( ( values.length - index - 1 ) % gap === 0 ) {
return value;
}
},
},
} ],
yAxes: [ {
ticks: {
beginAtZero : true,
maxTicksLimit: 6,
padding : 20,
callback : function( value ) {
// Make sure the tick value has no decimals.
if ( Math.floor( value ) === value ) {
return value;
}
},
},
} ],
},
elements : {
line: {
tension: 0,
},
},
animation : {
duration: 0,
},
hover : {
animationDuration: 0,
},
legend : {
display: false,
},
tooltips : {
displayColors: false,
},
responsiveAnimationDuration: 0,
},
},
/**
* Init Chart.js.
*
* @since 1.5.0
*/
init: function() {
var ctx;
if ( ! el.$canvas.length ) {
return;
}
ctx = el.$canvas[ 0 ].getContext( '2d' );
chart.instance = new Chart( ctx, chart.settings );
chart.updateUI();
},
/**
* Update Chart.js canvas.
*
* @since 1.5.0
*/
updateUI: function() {
chart.updateWithDummyData();
chart.instance.data.labels = chart.settings.data.labels;
chart.instance.data.datasets[ 0 ].data = chart.settings.data.datasets[ 0 ].data;
chart.instance.update();
},
/**
* Update Chart.js settings with dummy data.
*
* @since 1.5.0
*/
updateWithDummyData: function() {
var end = moment().endOf( 'day' );
var date;
var minY = 5;
var maxY = 20;
var i;
for ( i = 1; i <= 7; i ++ ) {
date = end.clone().subtract( i, 'days' );
chart.settings.data.labels.push( date );
chart.settings.data.datasets[ 0 ].data.push( {
t: date,
y: Math.floor( Math.random() * ( maxY - minY + 1 ) ) + minY,
} );
}
},
};
/**
* Public functions and properties.
*
* @since 1.5.0
*
* @type {Object}
*/
var app = {
/**
* Publicly accessible Chart.js functions and properties.
*
* @since 1.5.0
*/
// chart: chart,
/**
* Start the engine.
*
* @since 1.5.0
*/
init: function() {
$( app.ready );
},
/**
* Document ready.
*
* @since 1.5.0
*/
ready: function() {
chart.init();
app.events();
},
/**
* Register JS events.
*
* @since 1.5.0
*/
events: function() {
app.formsListEvents();
},
/**
* Register forms list area JS events.
*
* @since 1.5.0
*/
formsListEvents: function() {
el.$widget.on( 'click', '#wpforms-dash-widget-forms-more', function() {
app.toggleCompleteFormsList();
} );
},
/**
* Toggle forms list hidden entries.
*
* @since 1.5.0.4
*/
toggleCompleteFormsList: function() {
$( '#wpforms-dash-widget-forms-list-table .wpforms-dash-widget-forms-list-hidden-el' ).toggle();
$( '#wpforms-dash-widget-forms-more' ).html( function( i, html ) {
return html === wpforms_dashboard_widget.show_less_html ? wpforms_dashboard_widget.show_more_html : wpforms_dashboard_widget.show_less_html;
} );
},
};
// Provide access to public functions/properties.
return app;
}( document, window, jQuery ) );
// Initialize.
WPFormsDashboardWidget.init();

View File

@@ -0,0 +1 @@
"use strict";var WPFormsDashboardWidget=window.WPFormsDashboardWidget||function(t){var a={$widget:t("#wpforms_reports_widget_lite"),$canvas:t("#wpforms-dash-widget-chart")},s={instance:null,settings:{type:"line",data:{labels:[],datasets:[{label:wpforms_dashboard_widget.i18n.entries,data:[],backgroundColor:"rgba(255, 129, 0, 0.135)",borderColor:"rgba(211, 126, 71, 1)",borderWidth:2,pointRadius:4,pointBorderWidth:1,pointBackgroundColor:"rgba(255, 255, 255, 1)"}]},options:{scales:{xAxes:[{type:"time",time:{unit:"day"},distribution:"series",ticks:{beginAtZero:!0,source:"labels",padding:10,minRotation:25,maxRotation:25,callback:function(t,a,e){var s=Math.floor(e.length/7);return s<1||(e.length-a-1)%s==0?t:void 0}}}],yAxes:[{ticks:{beginAtZero:!0,maxTicksLimit:6,padding:20,callback:function(t){if(Math.floor(t)===t)return t}}}]},elements:{line:{tension:0}},animation:{duration:0},hover:{animationDuration:0},legend:{display:!1},tooltips:{displayColors:!1},responsiveAnimationDuration:0}},init:function(){var t;a.$canvas.length&&(t=a.$canvas[0].getContext("2d"),s.instance=new Chart(t,s.settings),s.updateUI())},updateUI:function(){s.updateWithDummyData(),s.instance.data.labels=s.settings.data.labels,s.instance.data.datasets[0].data=s.settings.data.datasets[0].data,s.instance.update()},updateWithDummyData:function(){for(var t,a=moment().endOf("day"),e=1;e<=7;e++)t=a.clone().subtract(e,"days"),s.settings.data.labels.push(t),s.settings.data.datasets[0].data.push({t:t,y:Math.floor(16*Math.random())+5})}},e={init:function(){t(e.ready)},ready:function(){s.init(),e.events()},events:function(){e.formsListEvents()},formsListEvents:function(){a.$widget.on("click","#wpforms-dash-widget-forms-more",function(){e.toggleCompleteFormsList()})},toggleCompleteFormsList:function(){t("#wpforms-dash-widget-forms-list-table .wpforms-dash-widget-forms-list-hidden-el").toggle(),t("#wpforms-dash-widget-forms-more").html(function(t,a){return a===wpforms_dashboard_widget.show_less_html?wpforms_dashboard_widget.show_more_html:wpforms_dashboard_widget.show_less_html})}};return e}((document,window,jQuery));WPFormsDashboardWidget.init();

View File

@@ -0,0 +1,171 @@
/* global wpforms_builder, wpforms_education */
/**
* WPForms Education core for Lite.
*
* @since 1.6.6
*/
'use strict';
var WPFormsEducation = window.WPFormsEducation || {};
WPFormsEducation.liteCore = window.WPFormsEducation.liteCore || ( function( document, window, $ ) {
/**
* Public functions and properties.
*
* @since 1.6.6
*
* @type {object}
*/
var app = {
/**
* Start the engine.
*
* @since 1.6.6
*/
init: function() {
$( app.ready );
},
/**
* Document ready.
*
* @since 1.6.6
*/
ready: function() {
app.events();
},
/**
* Register JS events.
*
* @since 1.6.6
*/
events: function() {
app.openModalButtonClick();
},
/**
* Registers click events that should open upgrade modal.
*
* @since 1.6.6
*/
openModalButtonClick: function() {
$( document ).on(
'click',
'.education-modal',
function( event ) {
var $this = $( this ),
name = $this.data( 'name' ),
utmContent = WPFormsEducation.core.getUTMContentValue( $this );
if ( $this.data( 'action' ) && [ 'activate', 'install' ].includes( $this.data( 'action' ) ) ) {
return;
}
event.preventDefault();
event.stopImmediatePropagation();
if ( $this.hasClass( 'wpforms-add-fields-button' ) ) {
name = $this.text();
name += name.indexOf( wpforms_builder.field ) < 0 ? ' ' + wpforms_builder.field : '';
}
app.upgradeModal( name, utmContent, $this.data( 'license' ), $this.data( 'video' ) );
}
);
},
/**
* Upgrade modal.
*
* @since 1.6.6
*
* @param {string} feature Feature name.
* @param {string} utmContent UTM content.
* @param {string} type Feature license type: pro or elite.
* @param {string} video Feature video URL.
*/
upgradeModal: function( feature, utmContent, type, video ) {
// Provide a default value.
if ( typeof type === 'undefined' || type.length === 0 ) {
type = 'pro';
}
// Make sure we received only supported type.
if ( $.inArray( type, [ 'pro', 'elite' ] ) < 0 ) {
return;
}
var message = wpforms_education.upgrade[ type ].message.replace( /%name%/g, feature );
$.alert( {
title: feature + ' ' + wpforms_education.upgrade[type].title,
icon: 'fa fa-lock',
content: message,
boxWidth: '550px',
theme: 'modern,wpforms-education',
closeIcon: true,
onOpenBefore: function() {
var videoHtml = ! _.isEmpty( video ) ? '<iframe src="' + video + '" class="feature-video" frameborder="0" allowfullscreen="" width="490" height="276"></iframe>' : '';
this.$btnc.after( '<div class="discount-note">' + wpforms_education.upgrade_bonus + videoHtml + wpforms_education.upgrade[type].doc + '</div>' );
this.$body.find( '.jconfirm-content' ).addClass( 'lite-upgrade' );
},
buttons : {
confirm: {
text : wpforms_education.upgrade[type].button,
btnClass: 'btn-confirm',
keys : [ 'enter' ],
action: function() {
window.open( WPFormsEducation.core.getUpgradeURL( utmContent, type ), '_blank' );
app.upgradeModalThankYou( type );
},
},
},
} );
},
/**
* Upgrade modal second state.
*
* @since 1.6.6
*
* @param {string} type Feature license type: pro or elite.
*/
upgradeModalThankYou: function( type ) {
$.alert( {
title : false,
content : wpforms_education.upgrade[type].modal,
icon : 'fa fa-info-circle',
type : 'blue',
boxWidth: '565px',
buttons : {
confirm: {
text : wpforms_education.ok,
btnClass: 'btn-confirm',
keys : [ 'enter' ],
},
},
} );
},
};
// Provide access to public functions/properties.
return app;
}( document, window, jQuery ) );
// Initialize.
WPFormsEducation.liteCore.init();

View File

@@ -0,0 +1 @@
"use strict";var WPFormsEducation=window.WPFormsEducation||{};WPFormsEducation.liteCore=window.WPFormsEducation.liteCore||function(t,i,r){var d={init:function(){r(d.ready)},ready:function(){d.events()},events:function(){d.openModalButtonClick()},openModalButtonClick:function(){r(t).on("click",".education-modal",function(t){var o=r(this),e=o.data("name"),n=WPFormsEducation.core.getUTMContentValue(o);o.data("action")&&["activate","install"].includes(o.data("action"))||(t.preventDefault(),t.stopImmediatePropagation(),o.hasClass("wpforms-add-fields-button")&&(e=o.text(),e+=e.indexOf(wpforms_builder.field)<0?" "+wpforms_builder.field:""),d.upgradeModal(e,n,o.data("license"),o.data("video")))})},upgradeModal:function(t,o,e,n){var a;void 0!==e&&0!==e.length||(e="pro"),r.inArray(e,["pro","elite"])<0||(a=wpforms_education.upgrade[e].message.replace(/%name%/g,t),r.alert({title:t+" "+wpforms_education.upgrade[e].title,icon:"fa fa-lock",content:a,boxWidth:"550px",theme:"modern,wpforms-education",closeIcon:!0,onOpenBefore:function(){var t=_.isEmpty(n)?"":'<iframe src="'+n+'" class="feature-video" frameborder="0" allowfullscreen="" width="490" height="276"></iframe>';this.$btnc.after('<div class="discount-note">'+wpforms_education.upgrade_bonus+t+wpforms_education.upgrade[e].doc+"</div>"),this.$body.find(".jconfirm-content").addClass("lite-upgrade")},buttons:{confirm:{text:wpforms_education.upgrade[e].button,btnClass:"btn-confirm",keys:["enter"],action:function(){i.open(WPFormsEducation.core.getUpgradeURL(o,e),"_blank"),d.upgradeModalThankYou(e)}}}}))},upgradeModalThankYou:function(t){r.alert({title:!1,content:wpforms_education.upgrade[t].modal,icon:"fa fa-info-circle",type:"blue",boxWidth:"565px",buttons:{confirm:{text:wpforms_education.ok,btnClass:"btn-confirm",keys:["enter"]}}})}};return d}(document,window,jQuery),WPFormsEducation.liteCore.init();

View File

@@ -0,0 +1,65 @@
<?php
/**
* Admin > Addons page template.
*
* @since 1.6.7
*
* @var string $upgrade_link_base Upgrade link base.
* @var array $addons Addons data.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-admin-addons" class="wrap wpforms-admin-wrap">
<h1 class="page-title">
<?php esc_html_e( 'WPForms Addons', 'wpforms-lite' ); ?>
<input type="search" placeholder="<?php esc_html_e( 'Search Addons', 'wpforms-lite' ); ?>" id="wpforms-admin-addons-search">
</h1>
<div class="wpforms-admin-content">
<div id="wpforms-admin-addons-list">
<div class="list">
<?php
foreach ( $addons as $addon ) :
$addon['icon'] = ! empty( $addon['icon'] ) ? $addon['icon'] : '';
$addon['title'] = ! empty( $addon['title'] ) ? $addon['title'] : __( 'Unknown Addon', 'wpforms-lite' );
$addon['excerpt'] = ! empty( $addon['excerpt'] ) ? $addon['excerpt'] : '';
$upgrade_link = add_query_arg(
[
'utm_content' => $addon['title'],
],
$upgrade_link_base
);
?>
<div class="addon-container">
<div class="addon-item">
<div class="details wpforms-clear" style="">
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/' . $addon['icon'] ); ?>">
<h5 class="addon-name">
<?php
printf(
'<a href="%1$s" title="%2$s" target="_blank" rel="noopener noreferrer">%3$s</a>',
esc_url( $upgrade_link ),
esc_attr__( 'Learn more', 'wpforms-lite' ),
esc_html( $addon['title'] )
);
?>
</h5>
<p class="addon-desc"><?php echo esc_html( $addon['excerpt'] ); ?></p>
</div>
<div class="actions wpforms-clear">
<div class="upgrade-button">
<a href="<?php echo esc_url( $upgrade_link ); ?>" target="_blank" rel="noopener noreferrer" class="wpforms-btn wpforms-btn-orange wpforms-upgrade-modal">
<?php esc_html_e( 'Upgrade Now', 'wpforms-lite' ); ?>
</a>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,35 @@
<?php
/**
* Admin/NoticeBar Education template for Lite.
*
* @since 1.6.6
*
* @var string $upgrade_link Upgrade to Pro page URL.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-notice-bar" class="wpforms-dismiss-container">
<span class="wpforms-notice-bar-message">
<?php
printf(
wp_kses(
/* translators: %s - WPForms.com Upgrade page URL. */
__( 'You\'re using WPForms Lite. To unlock more features consider <a href="%s" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'wpforms-lite' ),
[
'a' => [
'href' => [],
'rel' => [],
'target' => [],
],
]
),
esc_url( $upgrade_link )
);
?>
</span>
<button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="admin-notice-bar"></button>
</div>

View File

@@ -0,0 +1,41 @@
<?php
/**
* Admin/Integrations item Education template for Lite.
*
* @since 1.6.6
*
* @var string $clear_slug Clear slug (without `wpforms-` prefix).
* @var string $modal_name Name of the addon used in modal window.
* @var string $license_level License level.
* @var string $name Name of the addon.
* @var string $icon Addon icon.
* @var string $video Video URL.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="wpforms-integration-<?php echo esc_attr( $clear_slug ); ?>"
class="wpforms-settings-provider wpforms-clear focus-out education-modal"
data-name="<?php echo esc_attr( $modal_name ); ?>"
data-action="upgrade"
data-video="<?php echo esc_url( $video ); ?>"
data-license="<?php echo esc_attr( $license_level ); ?>">
<div class="wpforms-settings-provider-header wpforms-clear">
<div class="wpforms-settings-provider-logo ">
<i class="fa fa-chevron-right"></i>
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/' . $icon ); ?>" alt="<?php echo esc_attr( $modal_name ); ?>">
</div>
<div class="wpforms-settings-provider-info">
<h3><?php echo esc_html( $name ); ?></h3>
<p>
<?php
/* translators: %s - addon name. */
printf( esc_html__( 'Integrate %s with WPForms', 'wpforms-lite' ), esc_html( $name ) );
?>
</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,34 @@
<?php
/**
* Builder/DidYouKnow Education template for Lite.
*
* @since 1.6.6
*
* @var string $desc Message body.
* @var string $more Learn More button URL.
* @var string $link Upgrade to Pro page URL.
* @var string $section The slug of the dismissible section.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<section class="wpforms-dyk wpforms-dismiss-container">
<div class="wpforms-dyk-fbox wpforms-dismiss-out">
<div class="wpforms-dyk-message">
<b><?php esc_html_e( 'Did You Know?', 'wpforms-lite' ); ?></b><br>
<?php echo esc_html( $desc ); ?>
</div>
<div class="wpforms-dyk-buttons">
<?php
if ( ! empty( $more ) ) {
echo '<a href="' . esc_url( $more ) . '" class="learn-more">' . esc_html__( 'Learn More', 'wpforms-lite' ) . '</a>';
}
?>
<a href="<?php echo esc_url( $link ); ?>" target="_blank" rel="noopener noreferrer" class="wpforms-btn wpforms-btn-md wpforms-btn-light-grey"><?php esc_html_e( 'Upgrade to Pro', 'wpforms-lite' ); ?></a>
<button type="button" class="wpforms-dismiss-button" title="<?php esc_attr_e( 'Dismiss this message.', 'wpforms-lite' ); ?>" data-section="builder-did-you-know-<?php echo esc_attr( $section ); ?>"></button>
</div>
</div>
</section>

View File

@@ -0,0 +1,31 @@
<?php
/**
* Builder/Providers and Payments Education template for Lite.
*
* @since 1.6.6
*
* @var string $clear_slug Clear slug (without `wpforms-` prefix).
* @var string $modal_name Name of the addon used in modal window.
* @var string $license_level License level.
* @var string $name Name of the addon.
* @var string $icon Addon icon.
* @var string $video Video URL.
* @var string $utm_content UTM content.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<a href="#"
class="wpforms-panel-sidebar-section icon wpforms-panel-sidebar-section-<?php echo esc_attr( $clear_slug ); ?> education-modal"
data-name="<?php echo esc_attr( $modal_name ); ?>"
data-slug="<?php echo esc_attr( $clear_slug ); ?>"
data-video="<?php echo esc_url( $video ); ?>"
data-license="<?php echo esc_attr( $license_level ); ?>"
data-utm-content="<?php echo esc_attr( $utm_content ); ?>">
<img src="<?php echo esc_url( WPFORMS_PLUGIN_URL . 'assets/images/' . $icon ); ?>" alt="<?php echo esc_attr( $modal_name ); ?>">
<?php echo esc_html( $name ); ?>
<i class="fa fa-angle-right wpforms-toggle-arrow"></i>
</a>

View File

@@ -0,0 +1,29 @@
<?php
/**
* Builder/Settings Education template for Lite.
*
* @since 1.6.6
*
* @var string $clear_slug Clear slug (without `wpforms-` prefix).
* @var string $modal_name Name of the addon used in modal window.
* @var string $license_level License level.
* @var string $name Name of the addon.
* @var string $video Video URL.
* @var string $utm_content UTM content.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<a href="#"
class="wpforms-panel-sidebar-section wpforms-panel-sidebar-section-<?php echo esc_attr( $clear_slug ); ?> education-modal"
data-name="<?php echo esc_attr( $modal_name ); ?>"
data-slug="<?php echo esc_attr( $clear_slug ); ?>"
data-video="<?php echo esc_url( $video ); ?>"
data-license="<?php echo esc_attr( $license_level ); ?>"
data-utm-content="<?php echo esc_attr( $utm_content ); ?>">
<?php echo esc_html( $name ); ?>
<i class="fa fa-angle-right wpforms-toggle-arrow"></i>
</a>

File diff suppressed because it is too large Load Diff