7268c45b by Jeff Balicki

emails

1 parent ad31dfdd
Showing 82 changed files with 1822 additions and 336 deletions
......@@ -35,9 +35,24 @@
/*
* Welcome Panel
*/
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
padding: 0 0 0 2%;
.wpcf7-welcome-panel .welcome-panel-close {
left: 10px;
right: auto;
padding: 10px 21px 10px 15px;
}
.wpcf7-welcome-panel .welcome-panel-close::before {
right: 0;
left: auto;
}
.wpcf7-welcome-panel .welcome-panel-content {
margin-right: 13px;
}
.wpcf7-welcome-panel .welcome-panel-column {
float: right;
padding: 0 0 0 2%;
}
/*
......
......@@ -359,30 +359,26 @@ ul.config-error li {
/*
* Welcome Panel
*/
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
width: 48%;
padding: 0 2% 0 0;
margin: 0 0 1em 0;
}
@media screen and (max-width: 870px) {
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
display: block;
float: none;
width: 100%;
}
.wpcf7-welcome-panel {
position: relative;
overflow: auto;
margin: 16px 0;
padding: 23px 10px 0;
border: 1px solid #c3c4c7;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
background: #fff;
font-size: 13px;
line-height: 1.7;
}
.welcome-panel h3 {
.wpcf7-welcome-panel h3 {
font-size: 16px;
font-weight: 600;
line-height: 2.1em;
margin: 1em 0 1.2em;
}
.welcome-panel h3 .dashicons {
.wpcf7-welcome-panel h3 .dashicons {
position: relative;
top: -2px;
display: inline-block;
......@@ -391,12 +387,75 @@ ul.config-error li {
font-size: 40px;
}
.welcome-panel p a {
.wpcf7-welcome-panel p {
color: #646970;
}
.wpcf7-welcome-panel p a {
font-weight: bold;
}
.welcome-panel-close {
.wpcf7-welcome-panel .welcome-panel-close {
position: absolute;
z-index: 2;
top: 10px;
right: 10px;
padding: 10px 15px 10px 21px;
font-size: 13px;
line-height: 1.23076923; /* Chrome rounding, needs to be 16px equivalent */
text-decoration: none;
}
.wpcf7-welcome-panel .welcome-panel-close::before {
background: 0 0;
color: #787c82;
content: "\f153";
display: block;
font: normal 16px/20px dashicons;
speak: never;
height: 20px;
text-align: center;
width: 20px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
position: absolute;
top: 8px;
left: 0;
transition: all .1s ease-in-out;
}
.wpcf7-welcome-panel .welcome-panel-content {
display: block;
margin-left: 13px;
max-width: 1500px;
min-height: auto;
}
.wpcf7-welcome-panel .welcome-panel-column-container {
clear: both;
position: relative;
}
.wpcf7-welcome-panel .welcome-panel-column {
display: block;
width: 48%;
min-width: 200px;
float: left;
padding: 0 2% 0 0;
margin: 0 0 1em 0;
}
@media screen and (max-width: 870px) {
.wpcf7-welcome-panel .welcome-panel-column {
display: block;
float: none;
width: 100%;
}
}
.wpcf7-welcome-panel .welcome-panel-column p {
margin-top: 7px;
color: #3c434a;
}
/*
......
......@@ -200,7 +200,7 @@ function wpcf7_welcome_panel() {
$columns[] = new WPCF7_WelcomePanelColumn_Integration();
}
$classes = 'welcome-panel';
$classes = 'wpcf7-welcome-panel';
$vers = (array) get_user_meta( get_current_user_id(),
'wpcf7_hide_welcome_panel_on', true
......@@ -211,7 +211,7 @@ function wpcf7_welcome_panel() {
}
?>
<div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
<div id="wpcf7-welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
<?php wp_nonce_field( 'wpcf7-welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
<a class="welcome-panel-close" href="<?php echo esc_url( menu_page_url( 'wpcf7', false ) ); ?>"><?php echo esc_html( __( 'Dismiss', 'contact-form-7' ) ); ?></a>
......
......@@ -7,7 +7,7 @@
}
$( function() {
var welcomePanel = $( '#welcome-panel' );
var welcomePanel = $( '#wpcf7-welcome-panel' );
var updateWelcomePanel;
updateWelcomePanel = function( visible ) {
......
!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var c in r)e.o(r,c)&&!e.o(t,c)&&Object.defineProperty(t,c,{enumerable:!0,get:r[c]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,r=window.wp.i18n,c=window.wp.blocks,n=(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 242.5 239.46"},(0,t.createElement)("defs",null,(0,t.createElement)("clipPath",{id:"clip-path",transform:"translate(1.72)"},(0,t.createElement)("circle",{className:"cls-1",cx:"119.73",cy:"119.73",r:"116.15",fill:"none"}))),(0,t.createElement)("g",{id:"Layer_2","data-name":"Layer 2"},(0,t.createElement)("g",{id:"Layer_1","data-name":"Layer 1"},(0,t.createElement)("g",{className:"cls-2",clipPath:"url(#clip-path)"},(0,t.createElement)("circle",{className:"cls-3",cx:"121.45",cy:"119.73",r:"116.15",fill:"#33c6f4"}),(0,t.createElement)("path",{className:"cls-4",d:"M239.32,167.79c-53.41-24-108.37-91.46-113-94.55s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11S36.94,237.79,122,237.79C208.48,237.79,239.32,167.79,239.32,167.79Z",transform:"translate(1.72)",fill:"#1b447e"}),(0,t.createElement)("path",{className:"cls-5",d:"M67.48,116.58s15.48-7,12.38,4.65-15.48,28.64-11.61,29.41S83,140.58,86.06,142.12s5.42.78,3.87,6.2-3.1,9.29,0,9.29,5.42-7,9.29-13.94,10.06-3.87,12.38-1.55,9.29,15.49,14.71,13.94,8.51-8.52,6.19-24,1.55-20.12,1.55-20.12,4.64-2.32,13.16,8.51,24,27.09,26.31,26.32-10.83-17.8-7.74-19.35,15.48,2.32,21.68,7.74c0,0,2.12,8.87,2.12.36L126.31,73.24,115.47,74l-10.06.77S80.64,111.94,67.48,116.58Z",transform:"translate(1.72)",fill:"#fff"}),(0,t.createElement)("path",{className:"cls-6",d:"M239.32,170.11c-53.41-24-108.37-93.78-113-96.87s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11",transform:"translate(1.72)",fill:"none",stroke:"#221e1f",strokeMiterlimit:"10",strokeWidth:"8px"})),(0,t.createElement)("circle",{className:"cls-6",cx:"121.45",cy:"119.73",r:"116.15",fill:"none",stroke:"#1b447e",strokeMiterlimit:"10",strokeWidth:"8px"})))),a=window.wp.apiFetch,o=e.n(a),l=window.wp.compose,s=window.wp.components;const i=new Map;o()({path:"contact-form-7/v1/contact-forms?per_page=20"}).then((e=>{Object.entries(e).forEach((([e,t])=>{i.set(t.id,t)}))}));var m={from:[{type:"shortcode",tag:"contact-form-7",attributes:{id:{type:"integer",shortcode:function(e){var t=e.named.id;return parseInt(t)}},title:{type:"string",shortcode:function(e){return e.named.title}}}}],to:[{type:"block",blocks:["core/shortcode"],transform:function(e){return(0,c.createBlock)("core/shortcode",{text:'[contact-form-7 id="'.concat(e.id,'" title="').concat(e.title,'"]')})}}]};(0,c.registerBlockType)("contact-form-7/contact-form-selector",{title:(0,r.__)("Contact Form 7","contact-form-7"),description:(0,r.__)("Insert a contact form you have created with Contact Form 7.","contact-form-7"),category:"widgets",attributes:{id:{type:"integer"},title:{type:"string"}},icon:n,transforms:m,edit:function e({attributes:c,setAttributes:n}){if(!i.size&&!c.id)return(0,t.createElement)("div",{className:"components-placeholder"},(0,t.createElement)("p",null,(0,r.__)("No contact forms were found. Create a contact form first.","contact-form-7")));const a=Array.from(i.values(),(e=>({value:e.id,label:e.title})));if(c.id)a.length||a.push({value:c.id,label:c.title});else{const e=a[0];c={id:parseInt(e.value),title:e.label}}const o=`contact-form-7-contact-form-selector-${(0,l.useInstanceId)(e)}`;return(0,t.createElement)("div",{className:"components-placeholder"},(0,t.createElement)("label",{htmlFor:o,className:"components-placeholder__label"},(0,r.__)("Select a contact form:","contact-form-7")),(0,t.createElement)(s.SelectControl,{id:o,options:a,value:c.id,onChange:e=>n({id:parseInt(e),title:i.get(parseInt(e)).title})}))},save:function(e){var r=e.attributes;return(0,t.createElement)("div",null,'[contact-form-7 id="',r.id,'" title="',r.title,'"]')}})}();
\ No newline at end of file
!function(){"use strict";var t,e={n:function(t){var c=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(c,{a:c}),c},d:function(t,c){for(var r in c)e.o(c,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:c[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},c=window.wp.element,r=window.wp.apiFetch,o=e.n(r),n=window.wp.i18n,a=window.wp.blocks,l=(0,c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 242.5 239.46"},(0,c.createElement)("defs",null,(0,c.createElement)("clipPath",{id:"clip-path",transform:"translate(1.72)"},(0,c.createElement)("circle",{className:"cls-1",cx:"119.73",cy:"119.73",r:"116.15",fill:"none"}))),(0,c.createElement)("g",{id:"Layer_2","data-name":"Layer 2"},(0,c.createElement)("g",{id:"Layer_1","data-name":"Layer 1"},(0,c.createElement)("g",{className:"cls-2",clipPath:"url(#clip-path)"},(0,c.createElement)("circle",{className:"cls-3",cx:"121.45",cy:"119.73",r:"116.15",fill:"#33c6f4"}),(0,c.createElement)("path",{className:"cls-4",d:"M239.32,167.79c-53.41-24-108.37-91.46-113-94.55s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11S36.94,237.79,122,237.79C208.48,237.79,239.32,167.79,239.32,167.79Z",transform:"translate(1.72)",fill:"#1b447e"}),(0,c.createElement)("path",{className:"cls-5",d:"M67.48,116.58s15.48-7,12.38,4.65-15.48,28.64-11.61,29.41S83,140.58,86.06,142.12s5.42.78,3.87,6.2-3.1,9.29,0,9.29,5.42-7,9.29-13.94,10.06-3.87,12.38-1.55,9.29,15.49,14.71,13.94,8.51-8.52,6.19-24,1.55-20.12,1.55-20.12,4.64-2.32,13.16,8.51,24,27.09,26.31,26.32-10.83-17.8-7.74-19.35,15.48,2.32,21.68,7.74c0,0,2.12,8.87,2.12.36L126.31,73.24,115.47,74l-10.06.77S80.64,111.94,67.48,116.58Z",transform:"translate(1.72)",fill:"#fff"}),(0,c.createElement)("path",{className:"cls-6",d:"M239.32,170.11c-53.41-24-108.37-93.78-113-96.87s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11",transform:"translate(1.72)",fill:"none",stroke:"#221e1f",strokeMiterlimit:"10",strokeWidth:"8px"})),(0,c.createElement)("circle",{className:"cls-6",cx:"121.45",cy:"119.73",r:"116.15",fill:"none",stroke:"#1b447e",strokeMiterlimit:"10",strokeWidth:"8px"})))),i=window.wp.compose,s=window.wp.components,m={from:[{type:"shortcode",tag:"contact-form-7",attributes:{id:{type:"integer",shortcode:t=>{let{named:{id:e}}=t;return parseInt(e)}},title:{type:"string",shortcode:t=>{let{named:{title:e}}=t;return e}}}}],to:[{type:"block",blocks:["core/shortcode"],transform:t=>(0,a.createBlock)("core/shortcode",{text:`[contact-form-7 id="${t.id}" title="${t.title}"]`})}]};window.wpcf7=null!==(t=window.wpcf7)&&void 0!==t?t:{},o()({path:"contact-form-7/v1/contact-forms?per_page=20"}).then((t=>{window.wpcf7.contactForms=t})),(0,a.registerBlockType)("contact-form-7/contact-form-selector",{title:(0,n.__)("Contact Form 7","contact-form-7"),description:(0,n.__)("Insert a contact form you have created with Contact Form 7.","contact-form-7"),category:"widgets",attributes:{id:{type:"integer"},title:{type:"string"}},icon:l,transforms:m,edit:function t(e){let{attributes:r,setAttributes:o}=e;const a=new Map;if(Object.entries(window.wpcf7.contactForms).forEach((t=>{let[e,c]=t;a.set(c.id,c)})),!a.size&&!r.id)return(0,c.createElement)("div",{className:"components-placeholder"},(0,c.createElement)("p",null,(0,n.__)("No contact forms were found. Create a contact form first.","contact-form-7")));const l=Array.from(a.values(),(t=>({value:t.id,label:t.title})));if(r.id)l.length||l.push({value:r.id,label:r.title});else{const t=l[0];r={id:parseInt(t.value),title:t.label}}const m=`contact-form-7-contact-form-selector-${(0,i.useInstanceId)(t)}`;return(0,c.createElement)("div",{className:"components-placeholder"},(0,c.createElement)("label",{htmlFor:m,className:"components-placeholder__label"},(0,n.__)("Select a contact form:","contact-form-7")),(0,c.createElement)(s.SelectControl,{id:m,options:l,value:r.id,onChange:t=>o({id:parseInt(t),title:a.get(parseInt(t)).title})}))},save:t=>{var e,r,o,n;let{attributes:a}=t;return a={id:null!==(e=a.id)&&void 0!==e?e:null===(r=window.wpcf7.contactForms[0])||void 0===r?void 0:r.id,title:null!==(o=a.title)&&void 0!==o?o:null===(n=window.wpcf7.contactForms[0])||void 0===n?void 0:n.title},(0,c.createElement)("div",null,'[contact-form-7 id="',a.id,'" title="',a.title,'"]')}})}();
\ No newline at end of file
......
<?php
/**
* Pipe-related classes.
*
* @link https://contactform7.com/selectable-recipient-with-pipes/
*/
/**
* Class representing a pair of pipe.
*/
class WPCF7_Pipe {
public $before = '';
......@@ -19,6 +28,10 @@ class WPCF7_Pipe {
}
}
/**
* Class representing a list of pipes.
*/
class WPCF7_Pipes {
private $pipes = array();
......@@ -40,18 +53,12 @@ class WPCF7_Pipes {
) );
foreach ( $this->pipes as $pipe ) {
$before_canonical = wpcf7_canonicalize( $pipe->before, array(
'strto' => 'as-is',
) );
list( $before, $after ) = array_map(
function ( $item ) {
return wpcf7_canonicalize( $item, array(
'strto' => 'as-is',
) );
},
array( $pipe->before, $pipe->after )
);
if ( $input_canonical === $before ) {
return $after;
if ( $input_canonical === $before_canonical ) {
return $pipe->after;
}
}
......
......@@ -43,6 +43,7 @@ class WPCF7 {
self::load_module( 'count' );
self::load_module( 'date' );
self::load_module( 'disallowed-list' );
self::load_module( 'doi-helper' );
self::load_module( 'file' );
self::load_module( 'flamingo' );
self::load_module( 'hidden' );
......
......@@ -3,6 +3,7 @@
wpcf7_include_module_file( 'constant-contact/service.php' );
wpcf7_include_module_file( 'constant-contact/contact-post-request.php' );
wpcf7_include_module_file( 'constant-contact/contact-form-properties.php' );
wpcf7_include_module_file( 'constant-contact/doi.php' );
add_action(
......@@ -96,9 +97,27 @@ function wpcf7_constant_contact_submit( $contact_form, $result ) {
return;
}
if ( $email = $request_builder->get_email_address()
and $service->email_exists( $email ) ) {
return;
$email = $request_builder->get_email_address();
if ( $email ) {
if ( $service->email_exists( $email ) ) {
return;
}
$token = null;
do_action_ref_array( 'wpcf7_doi', array(
'wpcf7_constant_contact',
array(
'email_to' => $email,
'properties' => $request_builder->to_array(),
),
&$token,
) );
if ( isset( $token ) ) {
return;
}
}
$service->create_contact( $request_builder->to_array() );
......
<?php
/**
* Double Opt-In Helper-related functions
*
* @link https://contactform7.com/doi-helper/
*/
add_action(
'doihelper_init',
'wpcf7_constant_contact_doi_register_agent',
10, 0
);
/**
* Registers wpcf7_constant_contact as an agent.
*/
function wpcf7_constant_contact_doi_register_agent() {
if ( ! function_exists( 'doihelper_register_agent' ) ) {
return;
}
doihelper_register_agent( 'wpcf7_constant_contact', array(
'optin_callback' => apply_filters(
'wpcf7_constant_contact_doi_optin_callback',
'wpcf7_constant_contact_doi_default_optin_callback'
),
'email_callback' => apply_filters(
'wpcf7_constant_contact_doi_email_callback',
'wpcf7_constant_contact_doi_default_email_callback'
),
) );
}
/**
* Default optin_callback function.
*/
function wpcf7_constant_contact_doi_default_optin_callback( $properties ) {
$service = WPCF7_ConstantContact::get_instance();
if ( $service->is_active() ) {
$service->create_contact( $properties );
}
}
/**
* Default email_callback function.
*/
function wpcf7_constant_contact_doi_default_email_callback( $args ) {
if ( ! isset( $args['token'] ) or ! isset( $args['email_to'] ) ) {
return;
}
$site_title = wp_specialchars_decode(
get_bloginfo( 'name' ),
ENT_QUOTES
);
$link = add_query_arg(
array( 'doitoken' => $args['token'] ),
home_url()
);
$to = $args['email_to'];
$subject = sprintf(
/* translators: %s: blog name */
__( 'Opt-in confirmation from %s', 'contact-form-7' ),
$site_title
);
$message = sprintf(
/* translators: 1: blog name, 2: confirmation link */
__( 'Hello,
This is a confirmation email sent from %1$s.
We have received your submission to our web form, according to which you have allowed us to add you to our contact list. But, the process has not yet been completed. To complete it, please click the following link.
%2$s
If it was not your intention, or if you have no idea why you received this message, please do not click on the link, and ignore this message. We will never collect or use your personal data without your clear consent.
Sincerely,
%1$s', 'contact-form-7' ),
$site_title,
$link
);
wp_mail( $to, $subject, $message );
}
<?php
/**
* Double Opt-In Helper module
*
* @link https://contactform7.com/doi-helper/
*/
add_action( 'wpcf7_doi', 'wpcf7_doihelper_start_session', 10, 3 );
/**
* Starts a double opt-in session.
*/
function wpcf7_doihelper_start_session( $agent_name, $args, &$token ) {
if ( isset( $token ) ) {
return;
}
if ( ! function_exists( 'doihelper_start_session' ) ) {
return;
}
$submission = WPCF7_Submission::get_instance();
if ( ! $submission ) {
return;
}
$contact_form = $submission->get_contact_form();
$do_doi = ! array_filter(
$contact_form->additional_setting( 'doi', false ),
function ( $setting ) {
return in_array( $setting, array( 'off', 'false', '0' ), true );
}
);
$do_doi = apply_filters( 'wpcf7_do_doi', $do_doi, $agent_name, $args );
if ( ! $do_doi ) {
return;
}
$token = doihelper_start_session( $agent_name, $args );
}
document.addEventListener("DOMContentLoaded",(e=>{var t;wpcf7_recaptcha={...null!==(t=wpcf7_recaptcha)&&void 0!==t?t:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=e=>{const{action:t,func:n,params:a}=e;grecaptcha.execute(c,{action:t}).then((e=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:t,token:e}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((e=>console.error(e)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(e=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const e=wpcf7.submit;wpcf7.submit=(t,c={})=>{o({action:a,func:e,params:[t,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(e=>{const t=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<t.length;c++)t[c].setAttribute("value",e.detail.token)}))}));
\ No newline at end of file
document.addEventListener("DOMContentLoaded",(t=>{var e;wpcf7_recaptcha={...null!==(e=wpcf7_recaptcha)&&void 0!==e?e:{}};const c=wpcf7_recaptcha.sitekey,{homepage:n,contactform:a}=wpcf7_recaptcha.actions,o=t=>{const{action:e,func:n,params:a}=t;grecaptcha.execute(c,{action:e}).then((t=>{const c=new CustomEvent("wpcf7grecaptchaexecuted",{detail:{action:e,token:t}});document.dispatchEvent(c)})).then((()=>{"function"==typeof n&&n(...a)})).catch((t=>console.error(t)))};if(grecaptcha.ready((()=>{o({action:n})})),document.addEventListener("change",(t=>{o({action:a})})),"undefined"!=typeof wpcf7&&"function"==typeof wpcf7.submit){const t=wpcf7.submit;wpcf7.submit=function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o({action:a,func:t,params:[e,c]})}}document.addEventListener("wpcf7grecaptchaexecuted",(t=>{const e=document.querySelectorAll('form.wpcf7-form input[name="_wpcf7_recaptcha_response"]');for(let c=0;c<e.length;c++)e[c].setAttribute("value",t.detail.token)}))}));
\ No newline at end of file
......
<?php
/**
* Double Opt-In Helper-related functions
*
* @link https://contactform7.com/doi-helper/
*/
add_action(
'doihelper_init',
'wpcf7_sendinblue_doi_register_agent',
10, 0
);
/**
* Registers wpcf7_sendinblue as an agent.
*/
function wpcf7_sendinblue_doi_register_agent() {
if ( ! function_exists( 'doihelper_register_agent' ) ) {
return;
}
doihelper_register_agent( 'wpcf7_sendinblue', array(
'optin_callback' => apply_filters(
'wpcf7_sendinblue_doi_optin_callback',
'wpcf7_sendinblue_doi_default_optin_callback'
),
'email_callback' => apply_filters(
'wpcf7_sendinblue_doi_email_callback',
'wpcf7_sendinblue_doi_default_email_callback'
),
) );
}
/**
* Default optin_callback function.
*/
function wpcf7_sendinblue_doi_default_optin_callback( $properties ) {
$service = WPCF7_Sendinblue::get_instance();
if ( ! $service->is_active() ) {
return;
}
if ( ! empty( $properties['contact'] ) ) {
$contact_id = $service->create_contact( $properties['contact'] );
if ( $contact_id and ! empty( $properties['email'] ) ) {
$service->send_email( $properties['email'] );
}
}
}
/**
* Default email_callback function.
*/
function wpcf7_sendinblue_doi_default_email_callback( $args ) {
if ( ! isset( $args['token'] ) or ! isset( $args['email_to'] ) ) {
return;
}
$site_title = wp_specialchars_decode(
get_bloginfo( 'name' ),
ENT_QUOTES
);
$link = add_query_arg(
array( 'doitoken' => $args['token'] ),
home_url()
);
$to = $args['email_to'];
$subject = sprintf(
/* translators: %s: blog name */
__( 'Opt-in confirmation from %s', 'contact-form-7' ),
$site_title
);
$message = sprintf(
/* translators: 1: blog name, 2: confirmation link */
__( 'Hello,
This is a confirmation email sent from %1$s.
We have received your submission to our web form, according to which you have allowed us to add you to our contact list. But, the process has not yet been completed. To complete it, please click the following link.
%2$s
If it was not your intention, or if you have no idea why you received this message, please do not click on the link, and ignore this message. We will never collect or use your personal data without your clear consent.
Sincerely,
%1$s', 'contact-form-7' ),
$site_title,
$link
);
wp_mail( $to, $subject, $message );
}
......@@ -2,6 +2,7 @@
wpcf7_include_module_file( 'sendinblue/service.php' );
wpcf7_include_module_file( 'sendinblue/contact-form-properties.php' );
wpcf7_include_module_file( 'sendinblue/doi.php' );
add_action( 'wpcf7_init', 'wpcf7_sendinblue_register_service', 1, 0 );
......@@ -69,65 +70,83 @@ function wpcf7_sendinblue_submit( $contact_form, $result ) {
$attributes = wpcf7_sendinblue_collect_parameters();
if ( empty( $attributes['EMAIL'] ) and empty( $attributes['SMS'] ) ) {
return;
}
$contact_params = apply_filters(
'wpcf7_sendinblue_contact_parameters',
array(
'email' => $attributes['EMAIL'],
'attributes' => (object) $attributes,
'listIds' => (array) $prop['contact_lists'],
'updateEnabled' => false,
)
$params = array(
'contact' => array(),
'email' => array(),
);
$contact_id = $service->create_contact( $contact_params );
if ( ! $contact_id ) {
return;
if ( ! empty( $attributes['EMAIL'] ) or ! empty( $attributes['SMS'] ) ) {
$params['contact'] = apply_filters(
'wpcf7_sendinblue_contact_parameters',
array(
'email' => $attributes['EMAIL'],
'attributes' => (object) $attributes,
'listIds' => (array) $prop['contact_lists'],
'updateEnabled' => false,
)
);
}
if ( ! $prop['enable_transactional_email'] or ! $prop['email_template'] ) {
return;
if ( $prop['enable_transactional_email'] and $prop['email_template'] ) {
$first_name = isset( $attributes['FIRSTNAME'] )
? trim( $attributes['FIRSTNAME'] )
: '';
$last_name = isset( $attributes['LASTNAME'] )
? trim( $attributes['LASTNAME'] )
: '';
if ( $first_name or $last_name ) {
$email_to_name = sprintf(
/* translators: 1: first name, 2: last name */
_x( '%1$s %2$s', 'personal name', 'contact-form-7' ),
$first_name,
$last_name
);
} else {
$email_to_name = '';
}
$params['email'] = apply_filters(
'wpcf7_sendinblue_email_parameters',
array(
'templateId' => absint( $prop['email_template'] ),
'to' => array(
array(
'name' => $email_to_name,
'email' => $attributes['EMAIL'],
),
),
'params' => (object) $attributes,
'tags' => array( 'Contact Form 7' ),
)
);
}
$first_name = isset( $attributes['FIRSTNAME'] )
? trim( $attributes['FIRSTNAME'] )
: '';
if ( is_email( $attributes['EMAIL'] ) ) {
$token = null;
$last_name = isset( $attributes['LASTNAME'] )
? trim( $attributes['LASTNAME'] )
: '';
do_action_ref_array( 'wpcf7_doi', array(
'wpcf7_sendinblue',
array(
'email_to' => $attributes['EMAIL'],
'properties' => $params,
),
&$token,
) );
if ( $first_name or $last_name ) {
$email_to_name = sprintf(
/* translators: 1: first name, 2: last name */
_x( '%1$s %2$s', 'personal name', 'contact-form-7' ),
$first_name,
$last_name
);
} else {
$email_to_name = '';
if ( isset( $token ) ) {
return;
}
}
$email_params = apply_filters(
'wpcf7_sendinblue_email_parameters',
array(
'templateId' => absint( $prop['email_template'] ),
'to' => array(
array(
'name' => $email_to_name,
'email' => $attributes['EMAIL'],
),
),
'params' => (object) $attributes,
'tags' => array( 'Contact Form 7' ),
)
);
if ( ! empty( $params['contact'] ) ) {
$contact_id = $service->create_contact( $params['contact'] );
$service->send_email( $email_params );
if ( $contact_id and ! empty( $params['email'] ) ) {
$service->send_email( $params['email'] );
}
}
}
......
......@@ -3,8 +3,8 @@ Contributors: takayukister
Donate link: https://contactform7.com/donate/
Tags: contact, form, contact form, feedback, email, ajax, captcha, akismet, multilingual
Requires at least: 5.7
Tested up to: 5.8
Stable tag: 5.5.3
Tested up to: 5.9
Stable tag: 5.5.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
......@@ -77,6 +77,10 @@ Do you have questions or issues with Contact Form 7? Use these support channels
For more information, see [Releases](https://contactform7.com/category/releases/).
= 5.5.4 =
[https://contactform7.com/contact-form-7-554/](https://contactform7.com/contact-form-7-554/)
= 5.5.3 =
[https://contactform7.com/contact-form-7-553/](https://contactform7.com/contact-form-7-553/)
......
......@@ -7,10 +7,10 @@ Author: Takayuki Miyoshi
Author URI: https://ideasilo.wordpress.com/
Text Domain: contact-form-7
Domain Path: /languages/
Version: 5.5.3
Version: 5.5.4
*/
define( 'WPCF7_VERSION', '5.5.3' );
define( 'WPCF7_VERSION', '5.5.4' );
define( 'WPCF7_REQUIRED_WP_VERSION', '5.7' );
......
......@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
Tags: contact form 7, contact form 7 module, post, custom post, form to post, contact form 7 to post, contact form 7 extension
Requires at least: 4.7
Requires PHP: 5.6
Tested up to: 5.8.2
Tested up to: 5.8.3
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -543,6 +543,10 @@ The following have contributed to bug fixes, documentation, and/or translations
As of now there is no special upgrade notes, simply follow the normal plugin update process.
== Change Log ==
= 5.4.6 =
* fix json-error on existing post meta-fields.
* fix submitted post checkbox in post editor.
* fix loading of default posts for loggedout users.
= 5.4.5 =
* fix quick edit form table css/warning msg/filter.
* fix factory source setup on initial admin page.
......
......@@ -535,18 +535,18 @@ class Cf7_2_Post_Admin {
}
?>
<span>Form:&nbsp;</span>
<input id="cf72post_submitted" type="checkbox" value="submitted" <?=$checked?>/>
<input class="cf72post-submitted" type="checkbox" value="submitted" <?=$checked?>/>
<label for="cf7_2_post_submitted">submitted.</label>
<p><em>Uncheck to flag this submission as un-submitted.</em> This will reload this post into the form when the its author logs in again.</p>
<input type="hidden" id="cf72post_submitted_hidden" name="cf7_2_post_submitted" value="<?= $submitted?>" <?= $hidden?>/>
<input type="hidden" id="cf72post-submitted-hidden" name="cf7_2_post_submitted" value="<?= $submitted?>" <?= $hidden?>/>
<script type="text/javascript">
(function( $ ) {
$(document).ready(function(){
$('#cf72post_submitted').on('change', function(){
$('input.cf72post-submitted').on('change', function(){
if( $(this).is(':checked') ){
$('#cf72post_submitted_hidden').val('yes');
$('#cf72post-submitted-hidden').val('yes');
}else{
$('#cf72post_submitted_hidden').val('no');
$('#cf72post-submitted-hidden').val('no');
}
});
});
......
......@@ -16,7 +16,7 @@
* Plugin Name: Post My CF7 Form
* Plugin URI: http://wordpress.syllogic.in
* Description: This plugin enables the mapping of your CF7 forms to custom posts.
* Version: 5.4.5
* Version: 5.4.6
* Author: Aurovrata V.
* Author URI: http://syllogic.in
* License: GPL-2.0+
......@@ -29,7 +29,7 @@
if ( ! defined( 'WPINC' ) ) {
die;
}
define( 'CF7_2_POST_VERSION', '5.4.5' );
define( 'CF7_2_POST_VERSION', '5.4.6' );
/**
* The code that runs during plugin activation.
......
......@@ -547,16 +547,19 @@ class CF72Post_Mapping_Factory {
if(is_user_logged_in()){ //let's see if this form is already mapped for this user
$user = wp_get_current_user();
$args['author'] = $user->ID;
}
}else $args = array();
$args = apply_filters('cf7_2_post_filter_user_draft_form_query', $args, $mapper->post_properties['type'], $mapper->cf7_key);
$posts_array = get_posts( $args );
// debug_msg($args, "looking for posts.... found, ".sizeof($posts_array));
if(!empty($posts_array)){
$post = $posts_array[0];
$load_saved_values = true;
$field_and_values['map_post_id']= $post->ID;
wp_reset_postdata();
if(!empty($args)){
$posts_array = get_posts( $args );
// debug_msg($args, "looking for posts.... found, ".sizeof($posts_array));
if(!empty($posts_array)){
$post = $posts_array[0];
$load_saved_values = true;
$field_and_values['map_post_id']= $post->ID;
wp_reset_postdata();
}
}
//we now need to load the save meta field values
......@@ -1036,6 +1039,7 @@ class CF72Post_Mapping_Factory {
$html = '';
$select = '<option value="">'.__('Select a field','post-my-contact-form-7').'</option>'.PHP_EOL;
foreach($metas as $row){
if(empty(trim($row->meta_key))) continue; /** @since 5.4.6 */
if( 0=== strpos( $row->meta_key, '_') &&
/**
* filter plugin specific (internal) meta fields starting with '_'. By defaults these are skiupped by this plugin.
......
......@@ -798,10 +798,16 @@ abstract class Form_2_Post_Mapper {
'post_status'=> $post_status,
'post_title' => $post_title
);
$post_id = '';
/** @since 5.5 integrate Stripe payment */
$post_id = false;
if ( empty( $_POST['_wpcf7_stripe_payment_intent'] )) {
$post_id = get_transient( $_POST['_cf72post_nonce'] );
}
$is_update = false;
if(isset($_POST['_map_post_id']) && !empty($_POST['_map_post_id'])){
$post_id = $_POST['_map_post_id']; //this is an existing post being updated
}
if(!empty($post_id)){
$wp_post = get_post($post_id);
$post['post_status'] = $post_status;
$post['post_author'] = $wp_post->post_author;
......
......@@ -403,7 +403,7 @@ class Cf7_2_Post_Public {
}
/**
* Map author to hidden field on form load.
*
* Hooked to 'wpcf7_form_hidden_fields'
*@since 3.9.0
*@param array $param array of hidden fields
*@return array array of hidden fields
......
......@@ -18,11 +18,17 @@ use Nextend\Framework\Plugin;
/*
jQuery.getJSON('https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha&key=AIzaSyBIzBtder0-ef5a6kX-Ri9IfzVwFu21PGw').done(function(data){
var f = [];
for(var i = 0; i < data.items.length; i++){
f.push(data.items[i].family);
}
console.log(JSON.stringify(f));
var f = [];
for(var i = 0; i < data.items.length; i++){
f.push(data.items[i].family);
}
var fontString='';
f.forEach(function(font){
fontString+= font+'\n';
});
console.log(fontString);
});
*/
......
......@@ -97,6 +97,9 @@ class ImageEdit {
}
$extension = 'png';
break;
case IMAGETYPE_WEBP:
$extension = 'webp';
break;
}
if (!$extension) {
return $originalImageUrl;
......@@ -142,6 +145,9 @@ class ImageEdit {
$image = $rotated;
}
}
} else if ($extension == 'webp') {
//@TODO: should we need to care about rotation?
$image = @imagecreatefromwebp($imagePath);
}
if (isset($image) && $image) {
......@@ -159,6 +165,10 @@ class ImageEdit {
imagepng($image, $targetFile);
} else if ($extension == 'jpg') {
imagejpeg($image, $targetFile, $quality);
} else if ($extension == 'webp') {
imagesavealpha($image, true);
imagealphablending($image, false);
imagewebp($image, $targetFile, $quality);
}
imagedestroy($image);
......@@ -173,7 +183,7 @@ class ImageEdit {
}
if ($rotated || $originalWidth != $targetWidth || $originalHeight != $targetHeight) {
$newImage = imagecreatetruecolor($targetWidth, $targetHeight);
if ($extension == 'png') {
if ($extension == 'png' || $extension == 'webp') {
imagesavealpha($newImage, true);
imagealphablending($newImage, false);
$transparent = imagecolorallocatealpha($newImage, 255, 255, 255, 127);
......@@ -199,6 +209,8 @@ class ImageEdit {
imagepng($newImage, $targetFile);
} else if ($extension == 'jpg') {
imagejpeg($newImage, $targetFile, $quality);
} else if ($extension == 'webp') {
imagewebp($newImage, $targetFile, $quality);
}
imagedestroy($newImage);
......@@ -272,6 +284,9 @@ class ImageEdit {
}
$extension = 'png';
break;
case IMAGETYPE_WEBP:
$extension = 'webp';
break;
}
if (!$extension) {
return $originalImageUrl;
......@@ -311,6 +326,9 @@ class ImageEdit {
$image = $rotated;
}
}
} else if ($extension == 'webp') {
//@TODO: should we need to care about rotation?
$image = @imagecreatefromwebp($imagePath);
}
if ($image) {
......@@ -320,7 +338,7 @@ class ImageEdit {
$targetHeight = $originalHeight * $scale;
if ((isset($rotated) && $rotated) || $originalWidth != $targetWidth || $originalHeight != $targetHeight) {
$newImage = imagecreatetruecolor($targetWidth, $targetHeight);
if ($extension == 'png') {
if ($extension == 'png' || $extension == 'webp') {
imagesavealpha($newImage, true);
imagealphablending($newImage, false);
$transparent = imagecolorallocatealpha($newImage, 255, 255, 255, 127);
......@@ -342,6 +360,8 @@ class ImageEdit {
imagepng($newImage, $targetFile);
} else if ($extension == 'jpg') {
imagejpeg($newImage, $targetFile, $quality);
} else if ($extension == 'webp') {
imagewebp($newImage, $targetFile, $quality);
}
imagedestroy($newImage);
......@@ -414,6 +434,7 @@ class ImageEdit {
'jpg' => 'jpg',
'jpeg' => 'jpg',
'gif' => 'gif',
'webp' => 'webp',
'svg' => 'svg'
);
$extension = strtolower($extension);
......@@ -546,6 +567,9 @@ class ImageEdit {
case IMAGETYPE_PNG:
$extension = 'png';
break;
case IMAGETYPE_WEBP:
$extension = 'webp';
break;
}
if (!$extension) {
return $originalImageUrl;
......@@ -595,6 +619,14 @@ class ImageEdit {
$image = $rotated;
}
}
} else if ($extension == 'webp') {
//@TODO: should we need to care about rotation?
$image = @imagecreatefromwebp($imagePath);
if (!imageistruecolor($image)) {
imagepalettetotruecolor($image);
imagealphablending($image, true);
imagesavealpha($image, true);
}
}
if ($image) {
......
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2021-10-16 08:50+0200\n"
"PO-Revision-Date: 2021-11-02 14:26+0100\n"
"POT-Creation-Date: 2021-11-16 15:36+0100\n"
"PO-Revision-Date: 2021-11-16 18:37+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
......@@ -1456,6 +1456,9 @@ msgstr ""
msgid "JavaScript callbacks"
msgstr "Callbacks JavaScript"
msgid "Loading animation waiting time"
msgstr "Tiempo de espera de animación de pre-carga"
msgid "Post IDs"
msgstr "ID del artículo"
......@@ -1804,7 +1807,7 @@ msgid "Cache variations"
msgstr "Variaciones del cache"
msgid "Reverse"
msgstr "Reverso"
msgstr "Orden inverso"
msgid "You can make your slides appear in the slider in a reversed order."
msgstr "Puedes hacer que tu slides aparezcan en un orden inverso."
......@@ -3861,13 +3864,6 @@ msgstr "Cuando no esté visible"
msgid "You can pause the video when the visitor scrolls away from the slider"
msgstr "Puedes pausar el video cuando el usuario se desplaza fuera del slider"
msgid "Private video"
msgstr "Video privado"
msgid ""
"Turn it on to remove the admin warning that your video is not accessible."
msgstr "Actívalo para ocultar la advertencia si el video no se puede acceder."
msgid "Display"
msgstr "Pantalla"
......@@ -5695,6 +5691,12 @@ msgstr "Limite de submenu"
msgid "No limit"
msgstr "Sin límite"
msgid "Hide empty categories"
msgstr "Ocultar categorías vacías"
msgid "Yes"
msgstr "Si"
msgid "Downloadable"
msgstr "Descargable"
......@@ -6102,6 +6104,77 @@ msgstr "Antes de"
msgid "Animation duration"
msgstr "Duración de la animación"
msgid "Countdown"
msgstr "Contador"
msgid "Days"
msgstr "Días"
msgid "Hours"
msgstr "Horas"
msgid "Minutes"
msgstr "Minutos"
msgid "Seconds"
msgstr "Segundos"
msgid "Use slide schedule"
msgstr "Usar fecha del slide"
msgid "You can use the \"Unpublished on\" date of the slide itself."
msgstr "Puedes usar la opción \"Despublicar en\" del propio slide."
msgid "Use Slide Schedule"
msgstr "Usar fecha del slide"
msgid "Go to Slide → Content tab and set the Unpublish on date for the slide."
msgstr ""
"Para establecer una fecha para despublicar el slide deber ir a Slide > "
"Contenido."
msgid ""
"Displays the days, hours, minutes and seconds texts under the counter "
"numbers. To display the labels in your own language, translate the texts in "
"the language files."
msgstr ""
"Muestra el texto \"Días\", \"Horas\", \"Minutos\" y \"Segundos\" debajo de "
"los números del contador."
msgid "Gap"
msgstr "Espaciado"
msgid "Creates vertical and horizontal distance between the counter elements."
msgstr ""
"Crea un espacio vertical u horizontal entre los elementos del contador."
msgid "Tablet style"
msgstr "Estilo para tableta"
msgid "Set custom Gap and Column for tablet."
msgstr "Fija el espaciado y la columna para tabletas."
msgid "Mobile style"
msgstr "Estilo para móvil"
msgid "Set custom Gap and Column for mobile."
msgstr "Fija el espaciado y la columna para dispositivos móviles."
msgid "Action when ends"
msgstr "Acción cuando finaliza"
msgid "No action"
msgstr "No hacer nada"
msgid "Hide layer"
msgstr "Ocultar capa"
msgid "Redirect to URL"
msgstr "Redirigir a la URL"
msgid "Choose what happens after the counter reached zero."
msgstr "Selecciona lo que ocurre cuando el contador alcanza el cero."
msgid "Circle 1"
msgstr "Círculo 1"
......@@ -6321,9 +6394,6 @@ msgstr ""
msgid "iframe url"
msgstr "url iframe"
msgid "Yes"
msgstr "Si"
msgid "You can disable the scroll on the iframe content."
msgstr "Puedes desactivar el desplazamiento para el contenido del iframe."
......@@ -6691,6 +6761,14 @@ msgstr "Color de la pista"
msgid "Bar color"
msgstr "Color de la barra"
#~ msgid "Private video"
#~ msgstr "Video privado"
#~ msgid ""
#~ "Turn it on to remove the admin warning that your video is not accessible."
#~ msgstr ""
#~ "Actívalo para ocultar la advertencia si el video no se puede acceder."
#~ msgctxt "Default Google font charset for admin"
#~ msgid "latin"
#~ msgstr "latín"
......@@ -6891,9 +6969,6 @@ msgstr "Color de la barra"
#~ "visible cuando el navegador cargar el slider. En la mayoría de los casos "
#~ "esto no sugerimos desactivar <b>Desvanecer al cargar</b>."
#~ msgid "Loading animation"
#~ msgstr "Animación de pre-carga"
#~ msgid "Spinner"
#~ msgstr "Spinner"
......@@ -6935,12 +7010,6 @@ msgstr "Color de la barra"
#~ msgid "Optimize layer images"
#~ msgstr "Optimizar imágenes de capa"
#~ msgid "Tablet scale"
#~ msgstr "Escala en tableta"
#~ msgid "Mobile scale"
#~ msgstr "Escala móvil"
#~ msgid "Adaptive"
#~ msgstr "Adaptativo"
......
......@@ -2,19 +2,19 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: 2021-11-11 15:39+0100\n"
"POT-Creation-Date: 2022-01-13 13:55+0100\n"
"PO-Revision-Date: 2020-03-10 19:30+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.0.1\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-KeywordsList: ;n2_;n2_e;n2_n:1,2;n2_en:1,2;n2_x:1,2c;n2_ex:1,2c\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: en\n"
"X-Poedit-Flags-xgettext: --no-location\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: Framework/Asset/Builder/cache\n"
......@@ -1076,13 +1076,19 @@ msgstr ""
msgid "Set"
msgstr ""
msgid "Up"
msgid "Edit"
msgstr ""
msgid "Insert group"
msgid "Group"
msgstr ""
msgid "Group"
msgid "Edit slider"
msgstr ""
msgid "Up"
msgstr ""
msgid "Insert group"
msgstr ""
msgid "Move to trash"
......@@ -1127,6 +1133,24 @@ msgstr ""
msgid "delete this slide"
msgstr ""
msgid "Max width"
msgstr ""
msgid "Margin"
msgstr ""
msgid "top"
msgstr ""
msgid "right"
msgstr ""
msgid "bottom"
msgstr ""
msgid "left"
msgstr ""
msgid "Animations"
msgstr ""
......@@ -1446,9 +1470,6 @@ msgstr ""
msgid "Align"
msgstr ""
msgid "Margin"
msgstr ""
msgid "Puts a fix margin around your slider."
msgstr ""
......@@ -1956,9 +1977,6 @@ msgstr ""
msgid "Color end"
msgstr ""
msgid "Max width"
msgstr ""
msgid "Position"
msgstr ""
......@@ -2262,9 +2280,6 @@ msgstr ""
msgid "Scale down"
msgstr ""
msgid "Edit"
msgstr ""
msgid "Static overlay"
msgstr ""
......@@ -2316,7 +2331,7 @@ msgstr ""
msgid "Drop images here"
msgstr ""
msgid "Edit slider"
msgid "Search Project"
msgstr ""
msgid "View trash"
......@@ -2343,9 +2358,29 @@ msgstr ""
msgid "Export"
msgstr ""
msgid "Show"
msgstr ""
#, php-format
msgid "Showing %s to %s of %s projects"
msgstr ""
msgid "No projects to show"
msgstr ""
msgid "New project"
msgstr ""
msgid "Sorry we couldn’t find any matches"
msgstr ""
msgid "Please try searching with another term."
msgstr ""
#, php-format
msgid "Showing %s results for %s."
msgstr ""
msgid "Module"
msgstr ""
......@@ -4338,6 +4373,9 @@ msgstr ""
msgid "Fan 3"
msgstr ""
msgid "Fan 4"
msgstr ""
msgid "Hills"
msgstr ""
......@@ -4380,6 +4418,24 @@ msgstr ""
msgid "Waves"
msgstr ""
msgid "Columns 1"
msgstr ""
msgid "Columns 2"
msgstr ""
msgid "Paper 1"
msgstr ""
msgid "Paper 2"
msgstr ""
msgid "Paper 3"
msgstr ""
msgid "Paper 4"
msgstr ""
msgid "2 Colors"
msgstr ""
......@@ -5067,6 +5123,12 @@ msgstr ""
msgid "No limit"
msgstr ""
msgid "Hide empty categories"
msgstr ""
msgid "Yes"
msgstr ""
msgid "Downloadable"
msgstr ""
......@@ -5463,6 +5525,69 @@ msgstr ""
msgid "Animation duration"
msgstr ""
msgid "Countdown"
msgstr ""
msgid "Days"
msgstr ""
msgid "Hours"
msgstr ""
msgid "Minutes"
msgstr ""
msgid "Seconds"
msgstr ""
msgid "Use slide schedule"
msgstr ""
msgid "You can use the \"Unpublished on\" date of the slide itself."
msgstr ""
msgid "Use Slide Schedule"
msgstr ""
msgid "Go to Slide → Content tab and set the Unpublish on date for the slide."
msgstr ""
msgid "Displays the days, hours, minutes and seconds texts under the counter numbers. To display the labels in your own language, translate the texts in the language files."
msgstr ""
msgid "Gap"
msgstr ""
msgid "Creates vertical and horizontal distance between the counter elements."
msgstr ""
msgid "Tablet style"
msgstr ""
msgid "Set custom Gap and Column for tablet."
msgstr ""
msgid "Mobile style"
msgstr ""
msgid "Set custom Gap and Column for mobile."
msgstr ""
msgid "Action when ends"
msgstr ""
msgid "No action"
msgstr ""
msgid "Hide layer"
msgstr ""
msgid "Redirect to URL"
msgstr ""
msgid "Choose what happens after the counter reached zero."
msgstr ""
msgid "Circle 1"
msgstr ""
......@@ -5662,9 +5787,6 @@ msgstr ""
msgid "iframe url"
msgstr ""
msgid "Yes"
msgstr ""
msgid "You can disable the scroll on the iframe content."
msgstr ""
......
......@@ -36,7 +36,8 @@ abstract class AbstractControllerAdmin extends AbstractAdminController {
'exportAllUrl' => $this->getUrlDashboardExportAll($groupID),
'ajaxUrl' => $this->getAjaxUrlSlidesCreate(),
'previewUrl' => $this->getUrlPreviewIndex(0),
'importUrl' => $this->getUrlImport($groupID)
'importUrl' => $this->getUrlImport($groupID),
'paginationUrl' => $this->getUrlPaginator()
);
Js::addInline("new _N2.ManageSliders('" . $groupID . "', " . json_encode($options) . ", " . json_encode(SmartSlider3Info::shouldSkipLicenseModal()) . ");");
......
......@@ -53,6 +53,10 @@ class SliderAnimations extends AbstractSliderTab {
}
protected function layerAnimations() {
/**
* Used for field removal: /animations/layer-animations
*/
}
protected function layerParallax() {
......
......@@ -10,9 +10,18 @@ class AbstractButtonLabel extends AbstractButton {
protected $icon = '';
protected $iconBefore = "";
protected $iconBeforeClass = "";
protected function getContent() {
$content = '';
$content = '<span class="' . $this->baseClass . '__label">' . $this->getLabel() . '</span>';
if (!empty($this->iconBefore)) {
$content .= '<i class="' . $this->iconBefore . ' ' . $this->itemBeforeClass . '"></i>';
}
$content .= '<span class="' . $this->baseClass . '__label">' . $this->getLabel() . '</span>';
if (!empty($this->icon)) {
$content .= '<i class="' . $this->icon . '"></i>';
......@@ -41,4 +50,14 @@ class AbstractButtonLabel extends AbstractButton {
public function setIcon($icon) {
$this->icon = $icon;
}
/**
* @param string $icon
* @param string $extraClass
*/
public function setIconBefore($icon, $extraClass = "") {
$this->iconBefore = $icon;
$this->itemBeforeClass = $extraClass;
}
}
\ No newline at end of file
......
......@@ -222,7 +222,6 @@ class LayerWindowSettingsSlide extends AbstractLayerWindowSettings {
'layerslide-backgroundImageBlur',
'layerslide-backgroundMode',
'layerslide-background-notice-image',
'layerslide-backgroundBlurFit'
)
);
$fieldImage = new FieldImageResponsive($rowImage, 'slide-backgroundImage', n2_('Slide background'), '', $slideBackgroundAttr);
......@@ -259,10 +258,10 @@ class LayerWindowSettingsSlide extends AbstractLayerWindowSettings {
)
));
new NumberSlider($rowImage, 'slide-backgroundBlurFit', n2_('Background blur'), 7, array(
'unit' => 'px',
'min'=> 7,
'max' => 50,
'wide'=>3
'unit' => 'px',
'min' => 7,
'max' => 50,
'wide' => 3
));
new NumberSlider($rowImage, 'slide-backgroundImageOpacity', n2_('Opacity'), 100, array(
......
......@@ -92,6 +92,14 @@ class BlockSliderBox extends AbstractBlock {
/**
* @return int
*/
public function getOrdering() {
return $this->slider['ordering'];
}
/**
* @return int
*/
public function getGroupID() {
return $this->groupID;
}
......
......@@ -12,7 +12,8 @@ use Nextend\Framework\Sanitize;
<div class="n2_slider_manager__box n2_slider_box<?php echo $this->isGroup() ? ' n2_slider_box--group' : ' n2_slider_box--slider'; ?>"
data-group="<?php echo $this->isGroup() ? '1' : '0'; ?>"
data-title="<?php echo Sanitize::esc_attr($this->getSliderTitle()); ?>"
data-sliderid="<?php echo $this->getSliderID(); ?>">
data-sliderid="<?php echo $this->getSliderID(); ?>"
data-ordering="<?php echo $this->getOrdering(); ?>">
<?php
$thumbnailUrl = Sanitize::esc_attr($this->getThumbnail());
......
......@@ -12,15 +12,28 @@ namespace Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderManag
$this->displayOrderBy();
$this->displayBulkActions();
$this->displayCreateGroup();
$this->displayTrash();
$this->displayBulkActions();
?>
</div>
<div class="n2_slider_manager__action_bar_right">
<?php
$this->displayTrash();
?>
<?php if ($this->sliderManager->getGroupID() == 0) { ?>
<div class="n2_slider_manager__search">
<div class="n2_slider_manager__search_icon n2_slider_manager__search_icon--magnifier">
<i class="ssi_16 ssi_16--magnifier"></i>
</div>
<div class="n2_slider_manager__search_icon n2_slider_manager__search_icon--abort">
<i class="ssi_16 ssi_16--circularremove"></i>
</div>
<form class="n2_slider_manager__search_form" autocomplete="off">
<input type="text" name="kw" class="n2_slider_manager__search_input" value="" placeholder="<?php echo n2_('Search Project'); ?>" tabindex="-1">
</form>
</div>
<?php } ?>
</div>
</div>
......
......@@ -41,7 +41,9 @@ class BlockActionBar extends AbstractBlock {
$blockButton = new BlockButtonPlain($this);
$blockButton->setUrl($this->getUrlTrash());
$blockButton->setLabel(n2_('View trash'));
$blockButton->addClass('n2_slider_trash');
$blockButton->setSmall();
$blockButton->setIconBefore('ssi_16 ssi_16--delete', 'n2_slider_icon--blue');
$blockButton->setTabIndex(-1);
$blockButton->display();
}
......@@ -58,37 +60,54 @@ class BlockActionBar extends AbstractBlock {
$blockButton = new BlockButtonPlain($this);
$blockButton->setLabel(n2_('Order by'));
$blockButton->setIcon('ssi_16 ssi_16--selectarrow');
$blockButton->setIconBefore('ssi_16 ssi_16--order', 'n2_slider_icon--blue');
$blockButton->addClass('n2_slider_order');
$blockButton->setSmall();
$blockOrderBy->setButton($blockButton);
$manualOrder = new BlockFloatingMenuItem($this);
$manualOrder->setLabel(n2_('Manual order'));
$manualOrder->setIsActive($orderBy == 'ordering' && $orderByDirection == 'ASC');
$manualOrder->setUrl($this->getUrlDashboardOrderBy('ordering', 'ASC'));
$manualOrder->addAttribute('data-ordering', 'ordering');
$manualOrder->addAttribute('data-orderdirection', 'ASC');
$manualOrder->addClass('n2_floating_menu__item-order');
$manualOrder->setUrl('#');
$blockOrderBy->addMenuItem($manualOrder);
$orderAZ = new BlockFloatingMenuItem($this);
$orderAZ->setLabel(n2_('A-Z'));
$orderAZ->setIsActive($orderBy == 'title' && $orderByDirection == 'ASC');
$orderAZ->setUrl($this->getUrlDashboardOrderBy('title', 'ASC'));
$orderAZ->addAttribute('data-ordering', 'title');
$orderAZ->addAttribute('data-orderdirection', 'ASC');
$orderAZ->addClass('n2_floating_menu__item-order');
$orderAZ->setUrl('#');
$blockOrderBy->addMenuItem($orderAZ);
$orderZA = new BlockFloatingMenuItem($this);
$orderZA->setLabel(n2_('Z-A'));
$orderZA->setIsActive($orderBy == 'title' && $orderByDirection == 'DESC');
$orderZA->setUrl($this->getUrlDashboardOrderBy('title', 'DESC'));
$orderZA->addAttribute('data-ordering', 'title');
$orderZA->addAttribute('data-orderdirection', 'DESC');
$orderZA->addClass('n2_floating_menu__item-order');
$orderZA->setUrl('#');
$blockOrderBy->addMenuItem($orderZA);
$orderNewest = new BlockFloatingMenuItem($this);
$orderNewest->setLabel(n2_('Newest first'));
$orderNewest->setIsActive($orderBy == 'time' && $orderByDirection == 'DESC');
$orderNewest->setUrl($this->getUrlDashboardOrderBy('time', 'DESC'));
$orderNewest->addAttribute('data-ordering', 'time');
$orderNewest->addAttribute('data-orderdirection', 'DESC');
$orderNewest->addClass('n2_floating_menu__item-order');
$orderNewest->setUrl('#');
$blockOrderBy->addMenuItem($orderNewest);
$orderOldest = new BlockFloatingMenuItem($this);
$orderOldest->setLabel(n2_('Oldest first'));
$orderOldest->setIsActive($orderBy == 'time' && $orderByDirection == 'ASC');
$orderOldest->setUrl($this->getUrlDashboardOrderBy('time', 'ASC'));
$orderOldest->addAttribute('data-ordering', 'time');
$orderOldest->addAttribute('data-orderdirection', 'ASC');
$orderOldest->addClass('n2_floating_menu__item-order');
$orderOldest->setUrl('#');
$blockOrderBy->addMenuItem($orderOldest);
$blockOrderBy->display();
......@@ -104,8 +123,10 @@ class BlockActionBar extends AbstractBlock {
$blockButton = new BlockButtonPlain($this);
$blockButton->setLabel(n2_('Bulk actions'));
$blockButton->setIcon('ssi_16 ssi_16--selectarrow');
$blockButton->setSmall();
$blockButton->setIcon('ssi_16 ssi_16--selectarrow');
$blockButton->setIconBefore('ssi_16 ssi_16--slides', 'n2_slider_icon--blue');
$blockBulkActions->setButton($blockButton);
$duplicate = new BlockFloatingMenuItem($this);
......
......@@ -16,15 +16,18 @@ class BlockSliderManager extends AbstractBlock {
protected $orderByDirection = 'ASC';
protected $paginationIndex = 0;
protected $paginationLimit = 'all';
public function display() {
if ($this->groupID > 0) {
$this->orderBy = 'ordering';
$this->orderByDirection = 'ASC';
} else {
if ($this->groupID <= 0) {
$this->orderBy = Settings::get('slidersOrder2', 'ordering');
$this->orderByDirection = Settings::get('slidersOrder2Direction', 'ASC');
$this->paginationLimit = Settings::get('limit', 'all');
}
$this->renderTemplatePart('SliderManager');
}
......@@ -42,11 +45,57 @@ class BlockSliderManager extends AbstractBlock {
$this->groupID = $groupID;
}
/**
* @return int
*/
public function getPaginationIndex() {
return $this->paginationIndex;
}
/**
* @param int $index
*/
public function setPaginationIndex($index) {
$this->paginationIndex = $index;
}
/**
* @return int
*/
public function getPaginationLimit() {
return $this->paginationLimit;
}
/**
* @param string $status
*
*/
public function getSliders($status = '*') {
$slidersModel = new ModelSliders($this);
$sliders = $slidersModel->getAll($this->groupID, $status, $this->orderBy, $this->orderByDirection, $this->paginationIndex, $this->paginationLimit);
if ($this->groupID <= 0 && empty($sliders) && $sliderCount = $this->getSliderCount('published', true)) {
$lastPageIndex = intval(ceil(($sliderCount - $this->paginationLimit) / $this->paginationLimit));
$sliders = $slidersModel->getAll($this->groupID, $status, $this->orderBy, $this->orderByDirection, $lastPageIndex, $this->paginationLimit);
$this->paginationIndex = $lastPageIndex;
}
return $sliders;
}
/**
* @param string $status
* @param false $withGroup
*
* @return int
*/
public function getSliderCount($status = '*', $withGroup = false) {
$slidersModel = new ModelSliders($this);
return $slidersModel->getAll($this->groupID, $status, $this->orderBy, $this->orderByDirection);
return $slidersModel->getSlidersCount($status, $withGroup);
}
/**
......
<?php
namespace Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderManager\Paginator;
use Nextend\Framework\View\AbstractBlock;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Forms\Button\BlockButtonIconCode;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Forms\Button\BlockButtonPlain;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Forms\Button\BlockButtonPlainIcon;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Forms\FloatingMenu\BlockFloatingMenu;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Forms\FloatingMenu\BlockFloatingMenuItem;
class BlockPaginator extends AbstractBlock {
protected $sliderCount;
protected $paginationLimit;
/**
* @var BlockSliderManager
*/
protected $sliderManager;
public function display() {
$this->renderTemplatePart('Paginator');
}
/**
* @param BlockSliderManager $sliderManager
*/
public function setSliderManager($sliderManager) {
$this->sliderManager = $sliderManager;
}
public function setSliderCount($sliderCount) {
$this->sliderCount = $sliderCount;
}
public function setPaginationLimit($limit) {
$this->paginationLimit = $limit;
}
private function transformedPaginationLimit() {
if ($this->paginationLimit === 'all') {
/*used in calculations*/
return $this->sliderCount;
} else {
return $this->paginationLimit;
}
}
public function displayPaginationButtons() {
$totalPages = $this->sliderCount ? ceil(($this->sliderCount / $this->transformedPaginationLimit())) : 0;
$delta = 2;
$left = intval($this->sliderManager->getPaginationIndex()) - $delta;
$right = intval($this->sliderManager->getPaginationIndex()) + $delta;
/*PageList*/
if ($totalPages > 1) {
for ($i = 0; $i < $totalPages; $i++) {
if ($i == 0 || $i == $totalPages - 1 || $i >= $left && $i <= $right) {
$blockButton = new BlockButtonPlain($this);
$blockButton->setUrl('#');
$blockButton->setLabel($i + 1);
$blockButton->addAttribute('data-page', $i);
$blockButton->setSmall();
$blockButton->setTabIndex(-1);
$class = 'n2_slider_manager__paginator_item ' . (($i === intval($this->sliderManager->getPaginationIndex())) ? 'n2_slider_manager__paginator_item--active' : '');
$blockButton->addAttribute('class', $class);
$blockButton->display();
} else if ($i === $left - 1 || $i === $right + 1) {
echo "<div class='n2_slider_manager__paginator_item n2_slider_manager__paginator_item_spacer'>...</div>";
}
}
}
}
public function displayPaginationPrevious() {
$blockButtonPrev = new BlockButtonPlainIcon($this);
$blockButtonPrev->setUrl('#');
$blockButtonPrev->setIcon('ssi_16 ssi_16--paginatiorarrow');
$blockButtonPrev->setSmall();
$blockButtonPrev->setTabIndex(-1);
$blockButtonPrev->addAttribute('data-page', 'prev');
$blockButtonPrev->addAttribute('class', 'n2_slider_manager__paginator_item n2_slider_manager__paginator_item_arrow n2_slider_manager__paginator_item_arrow--prev n2_slider_manager__paginator_item_arrow--disabled');
$blockButtonPrev->display();
}
public function displayPaginationNext() {
$blockButtonNext = new BlockButtonPlainIcon($this);
$blockButtonNext->setUrl('#');
$blockButtonNext->setIcon('ssi_16 ssi_16--paginatiorarrow');
$blockButtonNext->setSmall();
$blockButtonNext->setTabIndex(-1);
$blockButtonNext->addAttribute('data-page', 'next');
$blockButtonNext->addAttribute('class', 'n2_slider_manager__paginator_item n2_slider_manager__paginator_item_arrow n2_slider_manager__paginator_item_arrow--next n2_slider_manager__paginator_item_arrow--disabled');
$blockButtonNext->display();
}
public function displayPaginationLimiters() {
$blockLimiter = new BlockFloatingMenu($this);
$blockButton = new BlockButtonPlain($this);
$blockButton->setLabel(n2_('Show') . " <span class='limitNumber'>" . $this->paginationLimit . "</span>");
$blockButton->setIcon('ssi_16 ssi_16--selectarrow');
$blockButton->setSmall();
$blockLimiter->setButton($blockButton);
$limits = array(
10,
25,
50,
100
);
foreach ($limits as $limit) {
$limitItem = new BlockFloatingMenuItem($this);
$limitItem->setLabel($limit);
$limitItem->setUrl('#');
$limitItem->addAttribute('data-limit', $limit);
$limitItem->addClass('n2_floating_menu__item-limiter');
$limitItem->setIsActive($this->paginationLimit == $limit);
$blockLimiter->addMenuItem($limitItem);
}
$limitAll = new BlockFloatingMenuItem($this);
$limitAll->setLabel(n2_('All'));
$limitAll->setUrl('#');
$limitAll->addAttribute('data-limit', 'all');
$limitAll->addClass('n2_floating_menu__item-limiter');
$limitAll->setIsActive($this->paginationLimit == 'all');
$blockLimiter->addMenuItem($limitAll);
$blockLimiter->display();
}
public function displayPaginationLabel() {
$actualSliderStart = $this->transformedPaginationLimit() * $this->sliderManager->getPaginationIndex();
$actualSlidersEnd = $actualSliderStart + $this->transformedPaginationLimit();
$allSliders = $this->sliderCount;
echo sprintf(n2_("Showing %s to %s of %s projects"), "<span class='n2_slider_manager__paginator_label_item__from'>" . (($actualSliderStart === 0) ? 1 : $actualSliderStart) . "</span>", "<span class='n2_slider_manager__paginator_label_item__to' > " . (($actualSlidersEnd < $this->sliderCount) ? $actualSlidersEnd : $this->sliderCount) . "</span > ", "<span class='n2_slider_manager__paginator_label_item__max' > " . $allSliders . "</span > ");
}
public function displayNoSlidersLabel() {
echo n2_('No projects to show');
}
}
\ No newline at end of file
<?php
namespace Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderManager\Paginator;
/**
* @var BlockPaginator $this
*/
?>
<div class="n2_slider_manager__paginator_label <?php echo $this->sliderCount === 0 ? "n2_slider_manager__paginator_label--nosliders" : "" ?>">
<p class="n2_slider_manager__paginator_label_item n2_slider_manager__paginator_label_item--active"><?php $this->displayPaginationLabel(); ?></p>
<p class="n2_slider_manager__paginator_label_item n2_slider_manager__paginator_label_item--empty"><?php $this->displayNoSlidersLabel(); ?></p>
</div>
<div class=" n2_slider_manager__paginator_buttons">
<?php
$this->displayPaginationPrevious();
?>
<div class="n2_slider_manager__paginator_buttons--numbers">
<?php
$this->displayPaginationButtons();
?>
</div>
<?php
$this->displayPaginationNext();
?>
</div>
<div class="n2_slider_manager__paginator_limiter">
<?php $this->displayPaginationLimiters() ?>
</div>
......@@ -3,17 +3,20 @@ namespace Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderManag
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderBox\BlockSliderBox;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderManager\ActionBar\BlockActionBar;
use Nextend\SmartSlider3\Application\Admin\Layout\Block\Slider\SliderManager\Paginator\BlockPaginator;
/**
* @var BlockSliderManager $this
*/
$groupID = $this->getGroupID();
$groupID = $this->getGroupID();
$orderBy = $this->getOrderBy();
$orderByDirection = $this->getOrderByDirection();
$sliders = $this->getSliders('published');
$sliders = $this->getSliders('published');
$sliderCount = $this->getSliderCount('published', true);
$limit = $this->getPaginationLimit();
$paginationIndex = $this->getPaginationIndex();
?>
<div class="n2_slider_manager" data-groupid="<?php echo $groupID; ?>" data-orderby="<?php echo $orderBy; ?>" data-orderbydirection="<?php echo $orderByDirection; ?>">
......@@ -42,5 +45,33 @@ $sliders = $this->getSliders('published');
$blockSliderBox->display();
}
?>
<?php if ($groupID <= 0) { ?>
<div class="n2_slider_manager__content--empty">
<div class="n2_slider_manager__content--empty__logo">
<i class="ssi_48 ssi_48--bug"></i>
</div>
<div class="n2_slider_manager__content--empty__heading">
<?php n2_e('Sorry we couldn’t find any matches'); ?>
</div>
<div class="n2_slider_manager__content--empty__paragraph">
<?php n2_e('Please try searching with another term.'); ?>
</div>
</div>
<?php } ?>
</div>
</div>
\ No newline at end of file
<?php if ($groupID <= 0) { ?>
<div class="n2_slider_manager__paginator" data-countstart="<?php echo $sliderCount ?>" data-currentstart="<?php echo $paginationIndex ?>" data-limitstart="<?php echo $limit ?>">
<?php
$blockPaginator = new BlockPaginator($this);
$blockPaginator->setSliderManager($this);
$blockPaginator->setSliderCount($sliderCount);
$blockPaginator->setPaginationLimit($limit);
$blockPaginator->display();
?>
</div>
<div class="n2_slider_manager__search_label">
<p class="n2_slider_manager__search_label_item n2_slider_manager__search_label_item"><?php echo sprintf(n2_("Showing %s results for %s."), "<span class='n2_slider_manager__search_label_item__counter'>0</span>", "<span class='n2_slider_manager__search_label_item__keyword'></span>") ?></p>
</div>
<?php } ?>
</div>
......
......@@ -241,7 +241,10 @@ class ControllerAjaxSlider extends AdminAjaxController {
$view = new ViewAjaxSliderBox($this);
$view->setSlider($slider);
$this->response->respond($view->display());
$this->response->respond(array(
'html' => $view->display(),
'sliderCount' => $slidersModel->getSlidersCount('published', true)
));
}
public function actionChangeSliderType() {
......
......@@ -7,6 +7,7 @@ namespace Nextend\SmartSlider3\Application\Admin\Sliders;
use Nextend\Framework\Controller\Admin\AdminAjaxController;
use Nextend\Framework\Data\Data;
use Nextend\Framework\Filesystem\Filesystem;
use Nextend\Framework\Misc\HttpClient;
use Nextend\Framework\Model\StorageSectionManager;
use Nextend\Framework\Notification\Notification;
use Nextend\Framework\Platform\Platform;
......@@ -70,7 +71,7 @@ class ControllerAjaxSliders extends AdminAjaxController {
$this->validatePermission('smartslider_edit');
$slidersModel = new ModelSliders($this);
$result = $slidersModel->order(Request::$REQUEST->getVar('groupID', 0), Request::$REQUEST->getVar('sliderorder'), Request::$REQUEST->getInt('isReversed', 1));
$result = $slidersModel->order(Request::$REQUEST->getVar('groupID', 0), Request::$REQUEST->getVar('sliderorder'), Request::$REQUEST->getInt('isReversed', 1), Request::$REQUEST->getVar('orders', array()));
$this->validateDatabase($result);
Notification::success(n2_('Slider order saved.'));
......@@ -145,6 +146,100 @@ class ControllerAjaxSliders extends AdminAjaxController {
$this->response->respond();
}
public function actionSearch() {
$this->validateToken();
$slidersModel = new ModelSliders($this);
$keyword = Request::$REQUEST->getVar('keyword', '');
$sliders = array();
$url = parse_url($keyword);
$baseUrl =parse_url(Platform::getSiteUrl()) ;
if (isset($url['host']) && $url['host'] === $baseUrl['host']) {
$options = array(
'error' => true,
);
$content = HttpClient::get($keyword, $options);
preg_match_all('/data-ssid="(?<id>[0-9]+)/', $content, $matches);
foreach ($matches['id'] as $sliderID) {
if ($_slider = $slidersModel->getWithThumbnail($sliderID)) {
array_push($sliders, $_slider);
}
}
}
$sliders = array_merge($sliders, $slidersModel->getSearchResults($keyword));
$result = array();
if (!empty($sliders)) {
foreach ($sliders as $slider) {
$result[] = array(
'id' => $slider['id'],
'alias' => $slider['alias'],
'title' => $slider['title'],
'thumbnail' => $this->getSliderThumbnail($slider),
'isGroup' => $slider['type'] == 'group',
'childrenCount' => $slider['slides'] > 0 ? $slider['slides'] : 0,
'editUrl' => $this->getUrlSliderEdit($slider['id'], $slider['group_id']),
'order' => $slider['ordering']
);
}
}
$this->response->respond($result);
}
public function actionPagination() {
$this->validateToken();
$slidersModel = new ModelSliders($this);
$pageIndex = Request::$REQUEST->getInt('pageIndex', 0);
$limit = Request::$REQUEST->getVar('limit', 20);
$orderBy = Request::$REQUEST->getCmd('orderBy', 'ordering');
$orderDirection = Request::$REQUEST->getCmd('orderDirection', 'ASC');
Settings::set('limit', $limit);
Settings::set('slidersOrder2', $orderBy);
Settings::set('slidersOrder2Direction', $orderDirection);
if ($pageIndex < 0) {
$pageIndex = 0;
}
$sliderCount = $slidersModel->getSlidersCount('published', true);
$result = array();
$sliders = $slidersModel->getAll(0, 'published', $orderBy, $orderDirection, $pageIndex, $limit);
//if last page is empty
if (empty($sliders) && $sliderCount) {
$lastPageIndex = intval(ceil(($sliderCount - $limit) / $limit));
$sliders = $slidersModel->getAll(0, 'published', $orderBy, $orderDirection, $lastPageIndex, $limit);
$result['pageIndex'] = $lastPageIndex;
}
if (!empty($sliders)) {
foreach ($sliders as $slider) {
$result['sliders'][] = array(
'id' => $slider['id'],
'alias' => $slider['alias'],
'title' => $slider['title'],
'thumbnail' => $this->getSliderThumbnail($slider),
'isGroup' => $slider['type'] == 'group',
'childrenCount' => $slider['slides'] > 0 ? $slider['slides'] : 0,
'editUrl' => $this->getUrlSliderEdit($slider['id'], 0),
'order' => $slider['ordering']
);
}
$result['slidersPerPage'] = count($sliders);
}
$result['sliderCount'] = $sliderCount;
$this->response->respond($result);
}
protected function actionImport() {
$this->validateToken();
......
......@@ -39,10 +39,10 @@ class ControllerSliders extends AbstractControllerAdmin {
}
protected function actionIndex() {
$this->loadSliderManager();
$view = new ViewSlidersIndex($this);
$view->setPaginationIndex(max(0, intval(Request::$REQUEST->getInt('pageIndex', 0)) - 1)); /*-1 needs because beautified query string*/
$view->display();
}
......@@ -54,31 +54,10 @@ class ControllerSliders extends AbstractControllerAdmin {
$view->display();
}
protected function actionOrderBy() {
$ordering = Request::$REQUEST->getCmd('ordering', null);
if ($ordering == 'DESC' || $ordering == 'ASC') {
Settings::set('slidersOrder2', 'ordering');
Settings::set('slidersOrder2Direction', 'ASC');
}
$time = Request::$REQUEST->getCmd('time', null);
if ($time == 'DESC' || $time == 'ASC') {
Settings::set('slidersOrder2', 'time');
Settings::set('slidersOrder2Direction', $time);
}
$title = Request::$REQUEST->getCmd('title', null);
if ($title == 'DESC' || $title == 'ASC') {
Settings::set('slidersOrder2', 'title');
Settings::set('slidersOrder2Direction', $title);
}
$this->redirectToSliders();
}
protected function actionExportAll() {
$slidersModel = new ModelSliders($this);
$sliders = $slidersModel->getAll(Request::$REQUEST->getInt('currentGroupID', 0), 'published');
$groupID = (Request::$REQUEST->getVar('inSearch', false))?'*':Request::$REQUEST->getInt('currentGroupID', 0);
$sliders = $slidersModel->getAll($groupID, 'published');
$ids = Request::$REQUEST->getVar('sliders');
$files = array();
......
......@@ -16,6 +16,7 @@ class ViewSlidersIndex extends AbstractView {
* @var LayoutDefault
*/
protected $layout;
protected $paginationIndex = 0;
public function display() {
......@@ -35,12 +36,17 @@ class ViewSlidersIndex extends AbstractView {
$this->layout->render();
}
public function setPaginationIndex($index) {
$this->paginationIndex = $index;
}
protected function displayHeader() {
}
protected function displaySliderManager() {
$sliderManager = new BlockSliderManager($this);
$sliderManager->setPaginationIndex($this->paginationIndex);
$this->layout->addContentBlock($sliderManager);
}
}
\ No newline at end of file
......
......@@ -30,12 +30,20 @@ trait TraitAdminUrl {
));
}
public function getUrlDashboardOrderBy($orderBy, $direction) {
$args = array();
public function getUrlPaginator() {
$args[$orderBy] = $direction;
return $this->createAjaxUrl(array(
'sliders/pagination',
));
}
return $this->createUrl(array(
public function getUrlDashboardOrderBy($orderBy, $direction, $page = null, $limit = null) {
$args = array();
$args[$orderBy] = $direction;
$args['pageIndex'] = $page;
$args['limit'] = $limit;
return $this->createAjaxUrl(array(
'sliders/orderby',
$args
), true);
......
......@@ -48,12 +48,13 @@ class ModelSliders extends AbstractModelTable {
public function getWithThumbnail($id) {
$slidesModel = new ModelSlides($this);
return Database::queryRow("SELECT sliders.*, IF(sliders.thumbnail != '',sliders.thumbnail,(SELECT slides.thumbnail from " . $slidesModel->getTableName() . " AS slides WHERE slides.slider = sliders.id AND slides.published = 1 AND slides.generator_id = 0 AND slides.thumbnail NOT LIKE '' ORDER BY slides.first DESC, slides.ordering ASC LIMIT 1)) AS thumbnail,
return Database::queryRow("SELECT sliders.*,xref.group_id, IF(sliders.thumbnail != '',sliders.thumbnail,(SELECT slides.thumbnail from " . $slidesModel->getTableName() . " AS slides WHERE slides.slider = sliders.id AND slides.published = 1 AND slides.generator_id = 0 AND slides.thumbnail NOT LIKE '' ORDER BY slides.first DESC, slides.ordering ASC LIMIT 1)) AS thumbnail,
IF(sliders.type != 'group',
(SELECT count(*) FROM " . $slidesModel->getTableName() . " AS slides2 WHERE slides2.slider = sliders.id GROUP BY slides2.slider),
(SELECT count(*) FROM " . $this->xref->getTableName() . " AS xref2 WHERE xref2.group_id = sliders.id GROUP BY xref2.group_id)
) AS slides
FROM " . $this->getTableName() . " AS sliders
LEFT JOIN " . $this->xref->getTableName() . " AS xref ON xref.slider_id = sliders.id
WHERE sliders.id = :id", array(
":id" => $id
));
......@@ -71,8 +72,22 @@ class ModelSliders extends AbstractModelTable {
$this->markChanged($sliderid);
}
public function getSlidersCount() {
$data = Database::queryRow("SELECT COUNT(*) AS sliders FROM " . $this->getTableName());
public function getSlidersCount($status = '*', $witGroup = false) {
$wheres = array();
$join = "";
if ($status !== '*') {
$wheres[] = " WHERE _sliders.status LIKE " . Database::quote($status);
}
if ($witGroup) {
$join = "LEFT JOIN " . $this->xref->getTableName() . " AS xref ON xref.slider_id = _sliders.id ";
$wheres[] = "(xref.group_id IS NULL OR xref.group_id = 0)";
}
$data = Database::queryRow("SELECT COUNT(*) AS sliders FROM " . $this->getTableName() . " as _sliders " . $join . " " . implode(' AND ', $wheres));
if (!empty($data)) {
return intval($data['sliders']);
}
......@@ -83,7 +98,7 @@ class ModelSliders extends AbstractModelTable {
/**
* @return mixed
*/
public function getAll($groupID = '*', $status = '*', $orderBy = 'ordering', $orderByDirection = 'ASC') {
public function getAll($groupID = '*', $status = '*', $orderBy = 'ordering', $orderByDirection = 'ASC', $page = null, $limit = 'all') {
$slidesModel = new ModelSlides($this);
if (empty($orderBy)) {
......@@ -93,12 +108,17 @@ class ModelSliders extends AbstractModelTable {
$orderByDirection = 'ASC';
}
$_orderby = $orderBy . ' ' . $orderByDirection;
$_orderby = $orderBy . ' ' . $orderByDirection;
$limitQuery = "";
$wheres = array();
if ($groupID !== '*') {
if ($groupID == 0) {
$wheres[] = "(xref.group_id IS NULL OR xref.group_id = 0)";
if ($page !== null && $limit != 'all') {
$first = intval($page) * intval($limit);
$limitQuery = "LIMIT " . $first . "," . intval($limit);
}
} else {
if ($orderBy == 'ordering') {
$_orderby = 'xref.' . $orderBy . ' ' . $orderByDirection;
......@@ -112,6 +132,7 @@ class ModelSliders extends AbstractModelTable {
$wheres[] = "sliders.status LIKE " . Database::quote($status);
}
$sliders = Database::queryAll("
SELECT sliders.*,
IF(sliders.thumbnail != '',
......@@ -129,7 +150,8 @@ class ModelSliders extends AbstractModelTable {
FROM " . $this->getTableName() . " AS sliders
LEFT JOIN " . $this->xref->getTableName() . " AS xref ON xref.slider_id = sliders.id
WHERE " . implode(' AND ', $wheres) . "
ORDER BY " . $_orderby);
ORDER BY " . $_orderby . " " . $limitQuery);
return $sliders;
}
......@@ -138,6 +160,46 @@ class ModelSliders extends AbstractModelTable {
return Database::queryAll("SELECT sliders.* FROM " . $this->getTableName() . " AS sliders");
}
public function getSearchResults($keyword = "") {
$slidesModel = new ModelSlides($this);
$wheres = array();
$orderByExtra = "";
$id = intval($keyword);
if ($id > 0) {
$wheres[] = "sliders.id LIKE '%" . $id . "%'";
$orderByExtra = "(sliders.id = '" . $id . "') DESC, ";
}
$wheres[] = "sliders.alias LIKE " . Database::quote('%' . $keyword . '%') . " OR sliders.title LIKE " . Database::quote('%' . $keyword . '%');
return Database::queryAll("SELECT sliders.*,
xref.group_id,
IF(sliders.thumbnail != '',
sliders.thumbnail,
IF(sliders.type != 'group',
(SELECT slides.thumbnail FROM " . $slidesModel->getTableName() . " AS slides WHERE slides.slider = sliders.id AND slides.published = 1 AND slides.generator_id = 0 AND slides.thumbnail NOT LIKE '' ORDER BY slides.first DESC, slides.ordering ASC LIMIT 1),
''
)
) AS thumbnail,
IF(sliders.type != 'group',
(SELECT count(*) FROM " . $slidesModel->getTableName() . " AS slides2 WHERE slides2.slider = sliders.id GROUP BY slides2.slider),
(SELECT count(*) FROM " . $this->xref->getTableName() . " AS xref2 LEFT JOIN " . $this->getTableName() . " AS sliders2 ON sliders2.id = xref2.slider_id WHERE xref2.group_id = sliders.id AND sliders2.status LIKE 'published' GROUP BY xref2.group_id)
) AS slides
FROM " . $this->getTableName() . " AS sliders
LEFT JOIN " . $this->xref->getTableName() . " AS xref ON xref.slider_id = sliders.id
WHERE
(
xref.group_id IS NULL
OR xref.group_id = 0
OR (SELECT _sliders.status FROM " . $this->getTableName() . " AS _sliders WHERE _sliders.id = xref.group_id ) LIKE 'published'
)
AND sliders.status LIKE 'published'
AND (" . implode(' OR ', $wheres) . ")
GROUP BY sliders.id
ORDER BY " . $orderByExtra . "sliders.title ASC");
}
public function getGroups($status = '*') {
$wheres = array(
......@@ -167,7 +229,8 @@ class ModelSliders extends AbstractModelTable {
'type' => $slider['type'],
'thumbnail' => empty($slider['thumbnail']) ? '' : $slider['thumbnail'],
'params' => $slider['params']->toJSON(),
'time' => date('Y-m-d H:i:s', Platform::getTimestamp())
'time' => date('Y-m-d H:i:s', Platform::getTimestamp()),
'ordering' => -1
));
$sliderID = $this->table->insertId();
......@@ -177,6 +240,7 @@ class ModelSliders extends AbstractModelTable {
}
$this->xref->add($groupID, $sliderID);
$this->reindexOrdering();
SmartSlider3Info::sliderChanged();
......@@ -276,12 +340,13 @@ class ModelSliders extends AbstractModelTable {
'params' => json_encode($slider),
'thumbnail' => $thumbnail,
'time' => date('Y-m-d H:i:s', Platform::getTimestamp()),
'ordering' => $this->getMaximalOrderValue()
'ordering' => -1
));
$sliderID = $this->table->insertId();
$this->xref->add($groupID, $sliderID);
$this->reindexOrdering();
SmartSlider3Info::sliderChanged();
......@@ -575,6 +640,7 @@ class ModelSliders extends AbstractModelTable {
AbstractCache::clearGroup(AdminSlider::getCacheId($id));
$this->markChanged($id);
$this->reindexOrdering();
SmartSlider3Info::sliderChanged();
......@@ -660,6 +726,8 @@ class ModelSliders extends AbstractModelTable {
}
}
$this->reindexOrdering();
SmartSlider3Info::sliderChanged();
return $newSliderId;
......@@ -671,7 +739,8 @@ class ModelSliders extends AbstractModelTable {
$helper->setSliderChanged($sliderid, 1);
}
public function order($groupID, $ids, $isReverse = false) {
public function order($groupID, $ids, $isReverse = false, $orders = array()) {
if (is_array($ids) && count($ids) > 0) {
if ($isReverse) {
$ids = array_reverse($ids);
......@@ -680,13 +749,23 @@ class ModelSliders extends AbstractModelTable {
if ($groupID <= 0) {
$groupID = false;
}
if (!empty($orders)) {
asort($orders);
$orders = array_values($orders);
}
$i = 0;
foreach ($ids as $id) {
$id = intval($id);
if ($id > 0) {
if (!$groupID) {
if (!empty($orders)) {
$order = intval($orders[$i]);
} else {
$order = $i;
}
$this->table->update(array(
'ordering' => $i,
'ordering' => $order,
), array(
"id" => $id
));
......@@ -709,6 +788,18 @@ class ModelSliders extends AbstractModelTable {
return false;
}
public function reindexOrdering() {
$sliders = $this->getAll(0);
foreach ($sliders as $idx => $slider) {
$this->table->update(array(
'ordering' => $idx
), array(
"id" => $slider['id']
));
}
}
protected function getMaximalOrderValue() {
$query = "SELECT MAX(ordering) AS ordering FROM " . $this->getTableName() . "";
......
......@@ -128,6 +128,69 @@ class PostsPostsByIDs extends AbstractGenerator {
}
}
}
$post_meta = get_post_meta($post->ID);
$excluded_metas = array(
'hc-editor-mode',
'techline-sidebar'
);
foreach ($excluded_metas as $excluded_meta) {
if (isset($post_meta[$excluded_meta])) {
unset($post_meta[$excluded_meta]);
}
}
if (count($post_meta) && is_array($post_meta) && !empty($post_meta)) {
foreach ($post_meta as $key => $value) {
if (count($value) && is_array($value) && !empty($value)) {
foreach ($value as $v) {
if (!empty($v) && !is_array($v) && !is_object($v)) {
$key = str_replace(array(
'_',
'-'
), array(
'',
''
), $key);
if (array_key_exists($key, $record)) {
$key = 'meta' . $key;
}
if (is_serialized($v)) {
$unserialize_values = unserialize($v);
$unserialize_count = 1;
if (!empty($unserialize_values) && is_array($unserialize_values)) {
foreach ($unserialize_values as $unserialize_value) {
if (!empty($unserialize_value) && is_string($unserialize_value)) {
$record['us_' . $key . $unserialize_count] = $unserialize_value;
$unserialize_count++;
} else if (is_array($unserialize_value)) {
foreach ($unserialize_value as $u_v) {
if (is_string($u_v)) {
$record['us_' . $key . $unserialize_count] = $u_v;
$unserialize_count++;
}
}
}
}
}
} else {
$record[$key] = $v;
}
}
}
}
}
if (!empty($record['elementordata'])) {
$elementordatas = json_decode($record['elementordata']);
foreach ($elementordatas as $elementordata) {
foreach ($this->getElementorTextEditors($elementordata) as $elementorKey => $elementorVal) {
$record[$elementorKey] = $elementorVal;
}
}
}
}
if (isset($record['primarytermcategory'])) {
$primary = get_category($record['primarytermcategory']);
$record['primary_category_name'] = $primary->name;
......
......@@ -18,6 +18,11 @@ class Install {
$tables->install();
InstallWordPress::install();
preg_match('/[\d\.]+[\d]/', Settings::get('n2_ss3_version'), $oldversion);
if ($oldversion && version_compare($oldversion[0], "3.5.1.2", '<=')) {
$tables->reindexOrders();
}
Settings::set('n2_ss3_version', SmartSlider3Info::$completeVersion);
/**
......
......@@ -204,6 +204,28 @@ class Tables {
));
}
public function reindexOrders() {
$query = "SELECT
sliders.*
FROM
`#__nextend2_smartslider3_sliders` AS sliders
LEFT JOIN `#__nextend2_smartslider3_sliders_xref` AS xref
ON
xref.slider_id = sliders.id
WHERE
(
xref.group_id IS NULL OR xref.group_id = 0
)
ORDER BY ordering";
$sliders = Database::queryAll(Database::parsePrefix($query));
foreach ($sliders as $idx => $slider) {
$this->query("UPDATE `#__nextend2_smartslider3_sliders` SET `ordering` = '" . $idx . "' WHERE `id` = " . $slider['id'] . " ");
}
}
/**
* @param string $tableName
* @param array|string $colNames
......
......@@ -14,12 +14,19 @@ class WidgetHelper {
$this,
'widgets_init'
), 11);
add_action('widgets_admin_page', array(
$this,
'widgets_admin_page'
));
/**
* As fallback for the Classic Widgets
*/
if ($this->isOldEditor()) {
add_action('widgets_admin_page', array(
$this,
'widgets_admin_page'
));
}
}
public function widgets_init() {
/**
......@@ -32,10 +39,10 @@ class WidgetHelper {
$widgetAreas = intval(Settings::get('wordpress-widget-areas', 1));
if ($widgetAreas > 0) {
for ($i = 1; $i <= $widgetAreas; $i++) {
$description = (!$this->isOldEditor()) ? 'Display this widget area in your theme: <strong>&lt;?php dynamic_sidebar( \'smartslider_area_' . $i . '\' ); ?&gt; </strong>' : '';
register_sidebar(array(
'name' => 'Custom Widget Area - #' . $i,
'description' => '',
'description' => $description,
'id' => 'smartslider_area_' . $i,
'before_widget' => '',
'after_widget' => '',
......@@ -59,4 +66,10 @@ class WidgetHelper {
}
}
private function isOldEditor() {
$blockEditor = function_exists('wp_use_widgets_block_editor');
return !$blockEditor || ($blockEditor && !wp_use_widgets_block_editor());
}
}
\ No newline at end of file
......
......@@ -602,9 +602,9 @@ abstract class AbstractComponent {
$this->addLocalStyle('normal', 'background', $this->getBackgroundCSS($color, $gradient, $colorEnd, $backgroundStyle) . $backgroundStyle);
$colorHover = $this->data->get('bgcolor-hover');
$colorHover = $this->owner->fill($this->data->get('bgcolor-hover'));
$gradientHover = $this->data->get('bgcolorgradient-hover');
$colorEndHover = $this->data->get('bgcolorgradientend-hover');
$colorEndHover = $this->owner->fill($this->data->get('bgcolorgradientend-hover'));
$isHoverDifferent = false;
if (!empty($colorHover) && $colorHover != $color) {
$isHoverDifferent = true;
......
......@@ -175,10 +175,10 @@ class ItemYouTubeFrontend extends AbstractItemFrontend {
}
private function parseYoutubeUrl($youTubeUrl) {
preg_match('/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/', $youTubeUrl, $matches);
preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/\s]{11})%i', $youTubeUrl, $matches);
if ($matches && isset($matches[7]) && strlen($matches[7]) == 11) {
return $matches[7];
if ($matches && isset($matches[1]) && strlen($matches[1]) == 11) {
return $matches[1];
}
return $youTubeUrl;
......
......@@ -56,26 +56,36 @@ class SVGFlip {
$pathCommand = substr($values[$i], 0, 1);
$pathPart = substr($values[$i], 1);
$points = explode(',', $pathPart);
for ($j = 0; $j < count($points); $j = $j + 2) {
switch ($pathCommand) {
case 'l':
case 'm':
case 'h':
case 'c':
case 's':
case 'q':
case 't':
$points[$j] = -$points[$j];
break;
case 'L':
case 'M':
case 'H':
case 'C':
case 'S':
case 'Q':
case 'T':
$points[$j] = self::$viewBoxX - $points[$j];
break;
if ($pathCommand === 'A') {
$points[2] = -$points[2];
$points[4] = ($points[4]) ? 1 : 0;
$points[5] = self::$viewBoxX - $points[5];
} else if ($pathCommand == 'a') {
$points[2] = -$points[2];
$points[4] = ($points[4]) ? 1 : 0;
$points[5] = -$points[5];
} else {
for ($j = 0; $j < count($points); $j = $j + 2) {
switch ($pathCommand) {
case 'l':
case 'm':
case 'h':
case 'c':
case 's':
case 'q':
case 't':
$points[$j] = -$points[$j];
break;
case 'L':
case 'M':
case 'H':
case 'C':
case 'S':
case 'Q':
case 'T':
$points[$j] = self::$viewBoxX - $points[$j];
break;
}
}
}
$newPath .= $pathCommand . implode(',', $points);
......@@ -94,30 +104,40 @@ class SVGFlip {
$pathCommand = substr($values[$i], 0, 1);
$pathPart = substr($values[$i], 1);
$points = explode(',', $pathPart);
for ($j = 0; $j < count($points); $j = $j + 2) {
switch ($pathCommand) {
case 'v':
$points[$j] = -$points[$j];
break;
case 'V':
$points[$j] = self::$viewBoxY - $points[$j];
break;
case 'l':
case 'm':
case 'c':
case 's':
case 'q':
case 't':
$points[$j + 1] = -$points[$j + 1];
break;
case 'L':
case 'M':
case 'C':
case 'S':
case 'Q':
case 'T':
$points[$j + 1] = self::$viewBoxY - $points[$j + 1];
break;
if ($pathCommand === 'A') {
$points[2] = -$points[2];
$points[4] = ($points[4]) ? 1 : 0;
$points[6] = self::$viewBoxY - $points[6];
} else if ($pathCommand === 'a') {
$points[2] = -$points[2];
$points[4] = ($points[4]) ? 1 : 0;
$points[6] = -$points[6];
} else {
for ($j = 0; $j < count($points); $j = $j + 2) {
switch ($pathCommand) {
case 'v':
$points[$j] = -$points[$j];
break;
case 'V':
$points[$j] = self::$viewBoxY - $points[$j];
break;
case 'l':
case 'm':
case 'c':
case 's':
case 'q':
case 't':
$points[$j + 1] = -$points[$j + 1];
break;
case 'L':
case 'M':
case 'C':
case 'S':
case 'Q':
case 'T':
$points[$j + 1] = self::$viewBoxY - $points[$j + 1];
break;
}
}
}
$newPath .= $pathCommand . implode(',', $points);
......@@ -136,36 +156,44 @@ class SVGFlip {
$pathCommand = substr($values[$i], 0, 1);
$pathPart = substr($values[$i], 1);
$points = explode(',', $pathPart);
for ($j = 0; $j < count($points); $j = $j + 2) {
switch ($pathCommand) {
case 'h':
case 'v':
$points[$j] = -$points[$j];
break;
case 'H':
$points[$j] = self::$viewBoxX - $points[$j];
break;
case 'V':
$points[$j] = self::$viewBoxY - $points[$j];
break;
case 'l':
case 'm':
case 'c':
case 's':
case 'q':
case 't':
$points[$j] = -$points[$j];
$points[$j + 1] = -$points[$j + 1];
break;
case 'L':
case 'M':
case 'C':
case 'S':
case 'Q':
case 'T':
$points[$j] = self::$viewBoxX - $points[$j];
$points[$j + 1] = self::$viewBoxY - $points[$j + 1];
break;
if ($pathCommand === 'A') {
$points[5] = self::$viewBoxX - $points[5];
$points[6] = self::$viewBoxY - $points[6];
} else if ($pathCommand == 'a') {
$points[5] = -$points[5];
$points[6] = -$points[6];
} else {
for ($j = 0; $j < count($points); $j = $j + 2) {
switch ($pathCommand) {
case 'h':
case 'v':
$points[$j] = -$points[$j];
break;
case 'H':
$points[$j] = self::$viewBoxX - $points[$j];
break;
case 'V':
$points[$j] = self::$viewBoxY - $points[$j];
break;
case 'l':
case 'm':
case 'c':
case 's':
case 'q':
case 't':
$points[$j] = -$points[$j];
$points[$j + 1] = -$points[$j + 1];
break;
case 'L':
case 'M':
case 'C':
case 'S':
case 'Q':
case 'T':
$points[$j] = self::$viewBoxX - $points[$j];
$points[$j + 1] = self::$viewBoxY - $points[$j + 1];
break;
}
}
}
$newPath .= $pathCommand . implode(',', $points);
......
......@@ -14,15 +14,15 @@ use Nextend\SmartSlider3\Application\Model\ModelLicense;
class SmartSlider3Info {
public static $version = '3.5.1.2';
public static $version = '3.5.1.3';
public static $channel = 'stable';
public static $revision = 'f4759c2e729fca8cf3071d0c6356eadecf6f7308';
public static $revision = '5023544a4fcfe8dfb1226d4b8c667713df879709';
public static $revisionShort = 'f4759c2e';
public static $revisionShort = '5023544a';
public static $branch = 'release-3.5.1.2';
public static $branch = 'release-3.5.1.3';
public static $completeVersion;
......
......@@ -94,7 +94,7 @@ class OutputBuffer {
$this,
"outputCallback"
));
});
}, 11);
}
}
......
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var s,n=t.document,h=(n.documentElement,t.setTimeout),o=t.clearTimeout,r=i._N2;t.requestAnimationFrame,n.createElement.bind(n),Object.assign,navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;s=function(){n.body},"complete"===n.readyState||"interactive"===n.readyState?s():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==n.addEventListener?Document.prototype.addEventListener.call(n,"DOMContentLoaded",s):n.addEventListener("DOMContentLoaded",s),r.d("SmartSliderBlock",["SmartSliderAbstract"],(function(){function t(t,i){this.type="block",this.responsiveClass=r.SmartSliderResponsiveBlock,r.SmartSliderAbstract.prototype.constructor.call(this,t,i)}return t.prototype=Object.create(r.SmartSliderAbstract.prototype),t.prototype.constructor=t,t.prototype.initResponsiveMode=function(){this.responsive=new r.SmartSliderResponsiveBlock(this,this.parameters.responsive),this.responsive.start(),r.SmartSliderAbstract.prototype.initResponsiveMode.call(this)},t.prototype.initMainAnimation=function(){this.mainAnimation=!1,this.isAdmin||this.disabled.postBackgroundAnimations||0==this.parameters.postBackgroundAnimations||(this.postBackgroundAnimation=new r.SmartSliderPostBackgroundAnimation(this,!1))},t.prototype.afterRawSlidesReady=function(){if(this.parameters.postBackgroundAnimations&&this.parameters.postBackgroundAnimations.slides){for(var t=0;t<this.slides.length;t++)this.slides[t].postBackgroundAnimation=this.parameters.postBackgroundAnimations.slides[t];delete this.parameters.postBackgroundAnimations.slides}},t.prototype.getSlideBackgroundContainer=function(){return this.sliderElement.querySelector(".n2-ss-slide").parentNode},t})),r.d("SmartSliderResponsiveBlock",["SmartSliderResponsive"],(function(){function t(){r.SmartSliderResponsive.prototype.constructor.apply(this,arguments),this.xt=this.sliderElement.classList.contains("n2-ss-full-page--constrain-ratio")}return t.prototype=Object.create(r.SmartSliderResponsive.prototype),t.prototype.constructor=t,t.prototype.init=function(){r.SmartSliderResponsive.prototype.init.call(this),this._cacheEl={slider:this.sliderElement.querySelector(".n2-ss-slider-wrapper-inside")||this.sliderElement}},t.prototype.calculateResponsiveValues=function(){var t=this.slider.visibleRealSlides[0].element,i=t.getBoundingClientRect();this.resizeContext.slideSelfWidth=i.width,this.resizeContext.slideSelfHeight=i.height;var s=t.querySelector(".n2-ss-layers-container").getBoundingClientRect();this.resizeContext.slideWidth=s.width,this.resizeContext.slideHeight=s.height;var n=this._cacheEl.slider.getBoundingClientRect();if(this.resizeContext.sliderWidth=n.width,this.resizeContext.sliderHeight=n.height,r.SmartSliderResponsive.prototype.calculateResponsiveValues.call(this),this.xt){var h=(this.resizeContext.sliderWidth-this.resizeContext.slideWidth)/-2+"px",o=(this.resizeContext.sliderHeight-this.resizeContext.slideHeight)/-2+"px";r.MW.k(this._cacheEl.slider)["--ss-clip-path"]="inset("+o+" "+h+" "+o+" "+h+")"}},t})),r.d("ss-block",["SmartSliderBlock","SmartSliderResponsiveBlock"])}(window);
\ No newline at end of file
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var s,n=t.document,h=(n.documentElement,t.setTimeout),o=t.clearTimeout,r=i._N2;t.requestAnimationFrame,Object.assign,navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;s=function(){n.body},"complete"===n.readyState||"interactive"===n.readyState?s():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==n.addEventListener?Document.prototype.addEventListener.call(n,"DOMContentLoaded",s):n.addEventListener("DOMContentLoaded",s),r.d("SmartSliderBlock",["SmartSliderAbstract"],(function(){function t(t,i){this.type="block",this.responsiveClass=r.SmartSliderResponsiveBlock,r.SmartSliderAbstract.prototype.constructor.call(this,t,i)}return t.prototype=Object.create(r.SmartSliderAbstract.prototype),t.prototype.constructor=t,t.prototype.initResponsiveMode=function(){this.responsive=new r.SmartSliderResponsiveBlock(this,this.parameters.responsive),this.responsive.start(),r.SmartSliderAbstract.prototype.initResponsiveMode.call(this)},t.prototype.initMainAnimation=function(){this.mainAnimation=!1,this.isAdmin||this.disabled.postBackgroundAnimations||0==this.parameters.postBackgroundAnimations||(this.postBackgroundAnimation=new r.SmartSliderPostBackgroundAnimation(this,!1))},t.prototype.afterRawSlidesReady=function(){if(this.parameters.postBackgroundAnimations&&this.parameters.postBackgroundAnimations.slides){for(var t=0;t<this.slides.length;t++)this.slides[t].postBackgroundAnimation=this.parameters.postBackgroundAnimations.slides[t];delete this.parameters.postBackgroundAnimations.slides}},t.prototype.getSlideBackgroundContainer=function(){return this.sliderElement.querySelector(".n2-ss-slide").parentNode},t})),r.d("SmartSliderResponsiveBlock",["SmartSliderResponsive"],(function(){function t(){r.SmartSliderResponsive.prototype.constructor.apply(this,arguments),this.Dt=this.sliderElement.classList.contains("n2-ss-full-page--constrain-ratio")}return t.prototype=Object.create(r.SmartSliderResponsive.prototype),t.prototype.constructor=t,t.prototype.init=function(){r.SmartSliderResponsive.prototype.init.call(this),this._cacheEl={slider:this.sliderElement.querySelector(".n2-ss-slider-wrapper-inside")||this.sliderElement}},t.prototype.calculateResponsiveValues=function(){var t=this.slider.visibleRealSlides[0].element,i=t.getBoundingClientRect();this.resizeContext.slideSelfWidth=i.width,this.resizeContext.slideSelfHeight=i.height;var s=t.querySelector(".n2-ss-layers-container").getBoundingClientRect();this.resizeContext.slideWidth=s.width,this.resizeContext.slideHeight=s.height;var n=this._cacheEl.slider.getBoundingClientRect();if(this.resizeContext.sliderWidth=n.width,this.resizeContext.sliderHeight=n.height,r.SmartSliderResponsive.prototype.calculateResponsiveValues.call(this),this.Dt){var h=(this.resizeContext.sliderWidth-this.resizeContext.slideWidth)/-2+"px",o=(this.resizeContext.sliderHeight-this.resizeContext.slideHeight)/-2+"px";r.MW.k(this._cacheEl.slider)["--ss-clip-path"]="inset("+o+" "+h+" "+o+" "+h+")"}},t})),r.d("ss-block",["SmartSliderBlock","SmartSliderResponsiveBlock"])}(window);
\ No newline at end of file
......
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,o=t.document,c=(o.documentElement,t.setTimeout),r=t.clearTimeout,u=i._N2;t.requestAnimationFrame,o.createElement.bind(o),Object.assign,navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){o.body},"complete"===o.readyState||"interactive"===o.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==o.addEventListener?Document.prototype.addEventListener.call(o,"DOMContentLoaded",n):o.addEventListener("DOMContentLoaded",n),u.d("SmartSliderWidgetArrowImage","SmartSliderWidget",(function(){function t(t,i,n){this.Dt=n,u.SmartSliderWidget.prototype.constructor.call(this,i,t,"#"+i.elementID+"-arrow-"+t)}return t.prototype=Object.create(u.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){var t,i,n,o;t=this.widget,i="click",n=function(e){e.stopPropagation(),this.slider[this.Dt]()}.bind(this),o=o||{},t.addEventListener(i,n,o)},function(i){this.key="arrow",this.previous=new t("previous",i,"previousWithDirection"),this.next=new t("next",i,"nextWithDirection")}}))}(window);
\ No newline at end of file
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,o=t.document,c=(o.documentElement,t.setTimeout),r=t.clearTimeout,u=i._N2;t.requestAnimationFrame,Object.assign,navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){o.body},"complete"===o.readyState||"interactive"===o.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==o.addEventListener?Document.prototype.addEventListener.call(o,"DOMContentLoaded",n):o.addEventListener("DOMContentLoaded",n),u.d("SmartSliderWidgetArrowImage","SmartSliderWidget",(function(){function t(t,i,n){this.Ot=n,u.SmartSliderWidget.prototype.constructor.call(this,i,t,"#"+i.elementID+"-arrow-"+t)}return t.prototype=Object.create(u.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){var t,i,n,o;t=this.widget,i="click",n=function(e){e.stopPropagation(),this.slider[this.Ot]()}.bind(this),o=o||{},t.addEventListener(i,n,o)},function(i){this.key="arrow",this.previous=new t("previous",i,"previousWithDirection"),this.next=new t("next",i,"nextWithDirection")}}))}(window);
\ No newline at end of file
......
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,o=t.document,a=(o.documentElement,t.setTimeout),s=t.clearTimeout,u=i._N2,h=(t.requestAnimationFrame,o.createElement.bind(o),Object.assign,function(t,i,n){t.setAttribute(i,n)}),c=function(t,i){return t.dataset[i]},r=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},l=function(t,i){t.classList.add(i)},d=function(t,i){t.classList.remove(i)},f=function(t,i,n,o){return o=o||{},t.addEventListener(i,n,o),t.removeEventListener.bind(t,i,n,o)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){o.body},"complete"===o.readyState||"interactive"===o.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==o.addEventListener?Document.prototype.addEventListener.call(o,"DOMContentLoaded",n):o.addEventListener("DOMContentLoaded",n),u.d("SmartSliderWidgetAutoplayImage","SmartSliderWidget",(function(){"use strict";function t(t){u.SmartSliderWidget.prototype.constructor.call(this,t,"autoplay",".nextend-autoplay")}return t.prototype=Object.create(u.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){this.paused=!1,this._listeners=[f(this.slider.sliderElement,"autoplayStarted",this.setPlaying.bind(this)),f(this.slider.sliderElement,"autoplayPaused",this.setPaused.bind(this))];var t,i,n,o,a=NextendDeBounce(this.switchState.bind(this),300,!0);t=this.widget,i="n2Activate",n=a,o=o||{},t.addEventListener(i,n,o),new u.UniversalClick(this.widget,a),this.slider.stages.done("AutoplayDestroyed",this.destroy.bind(this))},t.prototype.switchState=function(e){this.slider.controls.autoplay.preventClickHandle(),this.paused?(this.setPlaying(),this.slider.K("autoplayResume",{progress:1})):(this.setPaused(),this.slider.K("autoplayPause"))},t.prototype.setPaused=function(){this.paused=!0,l(this.widget,"n2-autoplay-paused"),h(this.widget,"aria-label",c(this.widget,"playLabel"))},t.prototype.setPlaying=function(){this.paused=!1,d(this.widget,"n2-autoplay-paused"),h(this.widget,"aria-label",c(this.widget,"pauseLabel"))},t.prototype.destroy=function(){var t;r(this.widget),(t=this._listeners).forEach((function(t){t()})),t.splice(0,t.length)},t}))}(window);
\ No newline at end of file
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,o=t.document,a=(o.documentElement,t.setTimeout),s=t.clearTimeout,u=i._N2,h=(t.requestAnimationFrame,Object.assign,function(t,i,n){t.setAttribute(i,n)}),c=function(t,i){return t.dataset[i]},r=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},l=function(t,i){t.classList.add(i)},d=function(t,i){t.classList.remove(i)},f=function(t,i,n,o){return o=o||{},t.addEventListener(i,n,o),t.removeEventListener.bind(t,i,n,o)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){o.body},"complete"===o.readyState||"interactive"===o.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==o.addEventListener?Document.prototype.addEventListener.call(o,"DOMContentLoaded",n):o.addEventListener("DOMContentLoaded",n),u.d("SmartSliderWidgetAutoplayImage","SmartSliderWidget",(function(){"use strict";function t(t){u.SmartSliderWidget.prototype.constructor.call(this,t,"autoplay",".nextend-autoplay")}return t.prototype=Object.create(u.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){this.paused=!1,this._listeners=[f(this.slider.sliderElement,"autoplayStarted",this.setPlaying.bind(this)),f(this.slider.sliderElement,"autoplayPaused",this.setPaused.bind(this))];var t,i,n,o,a=NextendDeBounce(this.switchState.bind(this),300,!0);t=this.widget,i="n2Activate",n=a,o=o||{},t.addEventListener(i,n,o),new u.UniversalClick(this.widget,a),this.slider.stages.done("AutoplayDestroyed",this.destroy.bind(this))},t.prototype.switchState=function(e){this.slider.controls.autoplay.preventClickHandle(),this.paused?(this.setPlaying(),this.slider.K("autoplayResume",{progress:1})):(this.setPaused(),this.slider.K("autoplayPause"))},t.prototype.setPaused=function(){this.paused=!0,l(this.widget,"n2-autoplay-paused"),h(this.widget,"aria-label",c(this.widget,"playLabel"))},t.prototype.setPlaying=function(){this.paused=!1,d(this.widget,"n2-autoplay-paused"),h(this.widget,"aria-label",c(this.widget,"pauseLabel"))},t.prototype.destroy=function(){var t;r(this.widget),(t=this._listeners).forEach((function(t){t()})),t.splice(0,t.length)},t}))}(window);
\ No newline at end of file
......
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var s,n,h=t.document,o=(h.documentElement,t.setTimeout),a=t.clearTimeout,c=i._N2,r=(t.requestAnimationFrame,h.createElement.bind(h),Object.assign),u=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},l=function(t,i){return t.dispatchEvent(i)},f=function(t,i,s,n){n=n||{},t.addEventListener(i,s,n)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){h.body},"complete"===h.readyState||"interactive"===h.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==h.addEventListener?Document.prototype.addEventListener.call(h,"DOMContentLoaded",n):h.addEventListener("DOMContentLoaded",n),c.d("SmartSliderWidgetBarHorizontal","SmartSliderWidget",(function(){"use strict";function t(t,i){this.parameters=i,c.SmartSliderWidget.prototype.constructor.call(this,t,"bar",".nextend-bar")}return t.prototype=Object.create(c.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(t){this.tween=null,this.innerBar=this.widget.querySelector("div"),this.Ct=c.MW.k(this.innerBar);var i="click";this.slider.hasTouch()&&(i="n2click"),f(this.widget,"click",function(){var t,s,n,h=this.slider.sliderElement.querySelector(".n2-ss-slide-active .n2-ss-layers-container");h&&(t=h,s=i,n=r({bubbles:!0,cancelable:!0},n),l(t,new Event(s,n)))}.bind(this)),this.slider.stages.done("BeforeShow",this.onBeforeShow.bind(this))},t.prototype.hasContent=function(t){return!(!this.parameters.showTitle||""===t.getTitle()&&!this.parameters.slideCount)||!(!this.parameters.showDescription||""===t.getDescription()&&!this.parameters.slideCount)},t.prototype.onBeforeShow=function(){this.onSliderSwitchTo({detail:{targetSlide:this.slider.currentSlide}}),this.parameters.animate?f(this.slider.sliderElement,"mainAnimationStart",this.onSliderSwitchToAnimateStart.bind(this)):f(this.slider.sliderElement,"SlideWillChange",this.onSliderSwitchTo.bind(this))},t.prototype.renderBarContent=function(t){var i,s,n="";this.parameters.showTitle&&(""!==t.getTitle()||this.parameters.slideCount)&&(i=this.parameters.slideCount?t.index+1:t.getTitle(),n+='<span class="'+this.parameters.fontTitle+'">'+i+"</span>");this.parameters.showDescription&&(""!==t.getDescription()||this.parameters.slideCount)&&(s=this.parameters.slideCount?t.slider.slides.length:t.getDescription(),n+='<span class="'+this.parameters.fontDescription+'">'+(""===n?"":this.parameters.separator)+s+"</span>");return""===n?'<span class="'+this.parameters.fontDescription+'">&nbsp;</span>':n},t.prototype.onSliderSwitchTo=function(e){var t=e.detail.targetSlide.slides[0],i=this.hasContent(t);i&&(this.innerBar.innerHTML=this.renderBarContent(t),this.setCursor(t.hasLink())),this.slider.widgets.setState("hide.bar",!i)},t.prototype.onSliderSwitchToAnimateStart=function(){var t,n;this.Ot===s&&(this.Ot=(t=this.innerBar,n="opacity",i.getComputedStyle(t).getPropertyValue(n)),this.Ct.opacity=this.Ot);var h,o,a,r=new Promise(function(t){this.tween&&this.tween.pause(),c.W.to(this.Ct,.3,{opacity:0,onComplete:function(){t()}})}.bind(this));h=this.slider.sliderElement,o="mainAnimationComplete",a=this.onSliderSwitchToAnimateEnd.bind(this,r),h.addEventListener(o,a,{once:!0})},t.prototype.onSliderSwitchToAnimateEnd=function(t,e){var i=this.slider.slides[e.detail.currentSlideIndex];t.then(function(){var t=this.hasContent(i);if(t){var s=this.innerBar.cloneNode(!0);u(this.innerBar),this.setCursor(i.hasLink()),s.innerHTML=this.renderBarContent(i),this.widget.appendChild(s),this.innerBar=s,this.Ct=c.MW.k(this.innerBar),this.Ct.opacity=0,this.tween=c.W.to(this.Ct,.3,{opacity:this.Ot})}this.slider.widgets.setState("hide.bar",!t)}.bind(this))},t.prototype.setCursor=function(t){this.Ct.cursor=t?"pointer":"inherit"},t}))}(window);
\ No newline at end of file
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var s,n,h=t.document,o=(h.documentElement,t.setTimeout),a=t.clearTimeout,c=i._N2,r=(t.requestAnimationFrame,Object.assign),u=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},l=function(t,i){return t.dispatchEvent(i)},f=function(t,i,s,n){n=n||{},t.addEventListener(i,s,n)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){h.body},"complete"===h.readyState||"interactive"===h.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==h.addEventListener?Document.prototype.addEventListener.call(h,"DOMContentLoaded",n):h.addEventListener("DOMContentLoaded",n),c.d("SmartSliderWidgetBarHorizontal","SmartSliderWidget",(function(){"use strict";function t(t,i){this.parameters=i,c.SmartSliderWidget.prototype.constructor.call(this,t,"bar",".nextend-bar")}return t.prototype=Object.create(c.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(t){this.tween=null,this.innerBar=this.widget.querySelector("div"),this.Ct=c.MW.k(this.innerBar);var i="click";this.slider.hasTouch()&&(i="n2click"),f(this.widget,"click",function(){var t,s,n,h=this.slider.sliderElement.querySelector(".n2-ss-slide-active .n2-ss-layers-container");h&&(t=h,s=i,n=r({bubbles:!0,cancelable:!0},n),l(t,new Event(s,n)))}.bind(this)),this.slider.stages.done("BeforeShow",this.onBeforeShow.bind(this))},t.prototype.hasContent=function(t){return!(!this.parameters.showTitle||""===t.getTitle()&&!this.parameters.slideCount)||!(!this.parameters.showDescription||""===t.getDescription()&&!this.parameters.slideCount)},t.prototype.onBeforeShow=function(){this.onSliderSwitchTo({detail:{targetSlide:this.slider.currentSlide}}),this.parameters.animate?f(this.slider.sliderElement,"mainAnimationStart",this.onSliderSwitchToAnimateStart.bind(this)):f(this.slider.sliderElement,"SlideWillChange",this.onSliderSwitchTo.bind(this))},t.prototype.renderBarContent=function(t){var i,s,n="";this.parameters.showTitle&&(""!==t.getTitle()||this.parameters.slideCount)&&(i=this.parameters.slideCount?t.index+1:t.getTitle(),n+='<span class="'+this.parameters.fontTitle+'">'+i+"</span>");this.parameters.showDescription&&(""!==t.getDescription()||this.parameters.slideCount)&&(s=this.parameters.slideCount?t.slider.slides.length:t.getDescription(),n+='<span class="'+this.parameters.fontDescription+'">'+(""===n?"":this.parameters.separator)+s+"</span>");return""===n?'<span class="'+this.parameters.fontDescription+'">&nbsp;</span>':n},t.prototype.onSliderSwitchTo=function(e){var t=e.detail.targetSlide.slides[0],i=this.hasContent(t);i&&(this.innerBar.innerHTML=this.renderBarContent(t),this.setCursor(t.hasLink())),this.slider.widgets.setState("hide.bar",!i)},t.prototype.onSliderSwitchToAnimateStart=function(){var t,n;this.Wt===s&&(this.Wt=(t=this.innerBar,n="opacity",i.getComputedStyle(t).getPropertyValue(n)),this.Ct.opacity=this.Wt);var h,o,a,r=new Promise(function(t){this.tween&&this.tween.pause(),c.W.to(this.Ct,.3,{opacity:0,onComplete:function(){t()}})}.bind(this));h=this.slider.sliderElement,o="mainAnimationComplete",a=this.onSliderSwitchToAnimateEnd.bind(this,r),h.addEventListener(o,a,{once:!0})},t.prototype.onSliderSwitchToAnimateEnd=function(t,e){var i=this.slider.slides[e.detail.currentSlideIndex];t.then(function(){var t=this.hasContent(i);if(t){var s=this.innerBar.cloneNode(!0);u(this.innerBar),this.setCursor(i.hasLink()),s.innerHTML=this.renderBarContent(i),this.widget.appendChild(s),this.innerBar=s,this.Ct=c.MW.k(this.innerBar),this.Ct.opacity=0,this.tween=c.W.to(this.Ct,.3,{opacity:this.Wt})}this.slider.widgets.setState("hide.bar",!t)}.bind(this))},t.prototype.setCursor=function(t){this.Ct.cursor=t?"pointer":"inherit"},t}))}(window);
\ No newline at end of file
......
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,s=t.document,h=(s.documentElement,t.setTimeout),o=t.clearTimeout,a=i._N2,u=(t.requestAnimationFrame,s.createElement.bind(s),Object.assign),r=function(t,i,n){t.dataset[i]=n},c=function(t,i){t.classList.add(i)},l=function(t,i){t.classList.remove(i)},d=function(t,i,n,s){s=s||{},t.addEventListener(i,n,s)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){s.body},"complete"===s.readyState||"interactive"===s.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==s.addEventListener?Document.prototype.addEventListener.call(s,"DOMContentLoaded",n):s.addEventListener("DOMContentLoaded",n),a.d("SmartSliderWidgetThumbnailDefaultHorizontal","SmartSliderWidget",(function(){"use strict";function t(t,i){this.parameters=u({minimumThumbnailCount:1.5},i),a.SmartSliderWidget.prototype.constructor.call(this,t,"thumbnail",".nextend-thumbnail-default")}t.prototype=Object.create(a.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){this.bar=this.widget.querySelector(".nextend-thumbnail-inner"),d(this.bar,"scroll",this.onScroll.bind(this));var t=this.widget.querySelector(".nextend-thumbnail-previous"),i=this.widget.querySelector(".nextend-thumbnail-next");t&&d(t,"click",this.previousPane.bind(this)),i&&d(i,"click",this.nextPane.bind(this)),this.slider.stages.done("BeforeShow",this.onBeforeShow.bind(this)),this.slider.stages.done("WidgetsReady",this.onWidgetsReady.bind(this))},t.prototype.onBeforeShow=function(){var t=this.bar.querySelector(".nextend-thumbnail-scroller");this.dots=t.querySelectorAll(".n2-thumbnail-dot");for(var i,n,s=this.slider.realSlides,h=0;h<s.length;h++){var o=t.querySelector('.n2-thumbnail-dot[data-slide-public-id="'+(i=s[h].element,n="slidePublicId",i.dataset[n]+'"]'));"mouseenter"===this.parameters.action?new a.UniversalEnter(o,this.onDotHover.bind(this,s[h])):new a.UniversalClick(o,this.onDotClick.bind(this,s[h])),s[h].thumbnailDot=o}requestAnimationFrame(this.onScroll.bind(this)),d(this.slider.sliderElement,"SliderResize",this.onScroll.bind(this)),d(this.slider.sliderElement,"SlideWillChange",this.onSlideSwitch.bind(this))},t.prototype.onWidgetsReady=function(){this.onSlideSwitch({detail:{targetSlide:this.slider.currentRealSlide}})},t.prototype.onScroll=function(){var t=this.bar.scrollLeft,i=this.bar.clientWidth,n=this.bar.scrollWidth;n2const.isRTL()?(r(this.widget,"hasNext",0===t?0:1),r(this.widget,"hasPrevious",-1*t+i<n?1:0)):(r(this.widget,"hasPrevious",0===t?0:1),r(this.widget,"hasNext",t+i<n?1:0))};var n=!1;return t.prototype.onDotClick=function(t){a._shouldPreventClick||(n||(this.slider.directionalChangeToReal(t.index),n=!0),h(function(){n=!1}.bind(this),400))},t.prototype.onDotHover=function(t){this.slider.directionalChangeToReal(t.index)},t.prototype.onSlideSwitch=function(e){var t=e.detail.targetSlide.slides[0];this.activateDots(t);var n=i.getComputedStyle(t.thumbnailDot),s=t.thumbnailDot.offsetLeft-parseInt(n.getPropertyValue("margin-left")),h=t.thumbnailDot.getBoundingClientRect().width+parseInt(n.getPropertyValue("margin-left"))+parseInt(n.getPropertyValue("margin-right")),o=this.bar.scrollLeft,a=i.getComputedStyle(this.bar),u=parseInt(a.paddingLeft),r=this.bar.clientWidth,c=this.bar.scrollWidth;(s<o||s+h>o+r)&&(this.bar.scrollLeft=Math.min(c-r,-u+s))},t.prototype.activateDots=function(t){var i,n;i=this.dots,n="n2-active",i.forEach((function(t){l(t,n)}));for(var s=t.slides,h=0;s.length>h;h++)c(s[h].thumbnailDot,"n2-active")},t.prototype.previousPane=function(){this.bar.scrollLeft-=.75*this.bar.clientWidth},t.prototype.nextPane=function(){this.bar.scrollLeft+=.75*this.bar.clientWidth},t}))}(window);
\ No newline at end of file
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,s=t.document,h=(s.documentElement,t.setTimeout),o=t.clearTimeout,a=i._N2,u=(t.requestAnimationFrame,Object.assign),r=function(t,i,n){t.dataset[i]=n},c=function(t,i){t.classList.add(i)},l=function(t,i){t.classList.remove(i)},d=function(t,i,n,s){s=s||{},t.addEventListener(i,n,s)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){s.body},"complete"===s.readyState||"interactive"===s.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==s.addEventListener?Document.prototype.addEventListener.call(s,"DOMContentLoaded",n):s.addEventListener("DOMContentLoaded",n),a.d("SmartSliderWidgetThumbnailDefaultHorizontal","SmartSliderWidget",(function(){"use strict";function t(t,i){this.parameters=u({minimumThumbnailCount:1.5},i),a.SmartSliderWidget.prototype.constructor.call(this,t,"thumbnail",".nextend-thumbnail-default")}t.prototype=Object.create(a.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){this.bar=this.widget.querySelector(".nextend-thumbnail-inner"),d(this.bar,"scroll",this.onScroll.bind(this));var t=this.widget.querySelector(".nextend-thumbnail-previous"),i=this.widget.querySelector(".nextend-thumbnail-next");t&&d(t,"click",this.previousPane.bind(this)),i&&d(i,"click",this.nextPane.bind(this)),this.slider.stages.done("BeforeShow",this.onBeforeShow.bind(this)),this.slider.stages.done("WidgetsReady",this.onWidgetsReady.bind(this))},t.prototype.onBeforeShow=function(){var t=this.bar.querySelector(".nextend-thumbnail-scroller");this.dots=t.querySelectorAll(".n2-thumbnail-dot");for(var i,n,s=this.slider.realSlides,h=0;h<s.length;h++){var o=t.querySelector('.n2-thumbnail-dot[data-slide-public-id="'+(i=s[h].element,n="slidePublicId",i.dataset[n]+'"]'));"mouseenter"===this.parameters.action?new a.UniversalEnter(o,this.onDotHover.bind(this,s[h])):new a.UniversalClick(o,this.onDotClick.bind(this,s[h])),s[h].thumbnailDot=o}requestAnimationFrame(this.onScroll.bind(this)),d(this.slider.sliderElement,"SliderResize",this.onScroll.bind(this)),d(this.slider.sliderElement,"SlideWillChange",this.onSlideSwitch.bind(this))},t.prototype.onWidgetsReady=function(){this.onSlideSwitch({detail:{targetSlide:this.slider.currentRealSlide}})},t.prototype.onScroll=function(){var t=this.bar.scrollLeft,i=this.bar.clientWidth,n=this.bar.scrollWidth;n2const.isRTL()?(r(this.widget,"hasNext",0===t?0:1),r(this.widget,"hasPrevious",-1*t+i<n?1:0)):(r(this.widget,"hasPrevious",0===t?0:1),r(this.widget,"hasNext",t+i<n?1:0))};var n=!1;return t.prototype.onDotClick=function(t){a._shouldPreventClick||(n||(this.slider.directionalChangeToReal(t.index),n=!0),h(function(){n=!1}.bind(this),400))},t.prototype.onDotHover=function(t){this.slider.directionalChangeToReal(t.index)},t.prototype.onSlideSwitch=function(e){var t=e.detail.targetSlide.slides[0];this.activateDots(t);var n=i.getComputedStyle(t.thumbnailDot),s=t.thumbnailDot.offsetLeft-parseInt(n.getPropertyValue("margin-left")),h=t.thumbnailDot.getBoundingClientRect().width+parseInt(n.getPropertyValue("margin-left"))+parseInt(n.getPropertyValue("margin-right")),o=this.bar.scrollLeft,a=i.getComputedStyle(this.bar),u=parseInt(a.paddingLeft),r=this.bar.clientWidth,c=this.bar.scrollWidth;(s<o||s+h>o+r)&&(this.bar.scrollLeft=Math.min(c-r,-u+s))},t.prototype.activateDots=function(t){var i,n;i=this.dots,n="n2-active",i.forEach((function(t){l(t,n)}));for(var s=t.slides,h=0;s.length>h;h++)c(s[h].thumbnailDot,"n2-active")},t.prototype.previousPane=function(){this.bar.scrollLeft-=.75*this.bar.clientWidth},t.prototype.nextPane=function(){this.bar.scrollLeft+=.75*this.bar.clientWidth},t}))}(window);
\ No newline at end of file
......
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,s=t.document,h=(s.documentElement,t.setTimeout),o=t.clearTimeout,a=i._N2,u=(t.requestAnimationFrame,s.createElement.bind(s),Object.assign),r=function(t,i,n){t.dataset[i]=n},c=function(t,i){t.classList.add(i)},l=function(t,i){t.classList.remove(i)},d=function(t,i,n,s){s=s||{},t.addEventListener(i,n,s)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){s.body},"complete"===s.readyState||"interactive"===s.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==s.addEventListener?Document.prototype.addEventListener.call(s,"DOMContentLoaded",n):s.addEventListener("DOMContentLoaded",n),a.d("SmartSliderWidgetThumbnailDefaultVertical","SmartSliderWidget",(function(){"use strict";function t(t,i){this.parameters=u({minimumThumbnailCount:1.5},i),a.SmartSliderWidget.prototype.constructor.call(this,t,"thumbnail",".nextend-thumbnail-default")}t.prototype=Object.create(a.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){this.bar=this.widget.querySelector(".nextend-thumbnail-inner"),d(this.bar,"scroll",this.onScroll.bind(this));var t=this.widget.querySelector(".nextend-thumbnail-previous"),i=this.widget.querySelector(".nextend-thumbnail-next");t&&d(t,"click",this.previousPane.bind(this)),i&&d(i,"click",this.nextPane.bind(this)),this.slider.stages.done("BeforeShow",this.onBeforeShow.bind(this)),this.slider.stages.done("WidgetsReady",this.onWidgetsReady.bind(this))},t.prototype.onBeforeShow=function(){var t=this.bar.querySelector(".nextend-thumbnail-scroller");this.dots=t.querySelectorAll(".n2-thumbnail-dot");for(var i,n,s=this.slider.realSlides,h=0;h<s.length;h++){var o=t.querySelector('[data-slide-public-id="'+(i=s[h].element,n="slidePublicId",i.dataset[n]+'"]'));"mouseenter"===this.parameters.action?new a.UniversalEnter(o,this.onDotHover.bind(this,s[h])):new a.UniversalClick(o,this.onDotClick.bind(this,s[h])),s[h].thumbnailDot=o}requestAnimationFrame(this.onScroll.bind(this)),d(this.slider.sliderElement,"SliderResize",this.onScroll.bind(this)),d(this.slider.sliderElement,"SlideWillChange",this.onSlideSwitch.bind(this))},t.prototype.onWidgetsReady=function(){this.onSlideSwitch({detail:{targetSlide:this.slider.currentRealSlide}})},t.prototype.onScroll=function(){var t=this.bar.scrollTop,i=this.bar.clientHeight,n=this.bar.scrollHeight;r(this.widget,"hasPrevious",0===t?0:1),r(this.widget,"hasNext",t+i<n?1:0)};var n=!1;return t.prototype.onDotClick=function(t){a._shouldPreventClick||(n||(this.slider.directionalChangeToReal(t.index),n=!0),h(function(){n=!1}.bind(this),400))},t.prototype.onDotHover=function(t){this.slider.directionalChangeToReal(t.index)},t.prototype.onSlideSwitch=function(e){var t=e.detail.targetSlide.slides[0];this.activateDots(t);var n=i.getComputedStyle(t.thumbnailDot),s=t.thumbnailDot.offsetTop-parseInt(n.getPropertyValue("margin-top")),h=t.thumbnailDot.getBoundingClientRect().height+parseInt(n.getPropertyValue("margin-top"))+parseInt(n.getPropertyValue("margin-bottom")),o=this.bar.scrollTop,a=i.getComputedStyle(this.bar),u=parseInt(a.paddingTop),r=this.bar.clientHeight,c=this.bar.scrollHeight;(s<o||s+h>o+r)&&(this.bar.scrollTop=Math.min(c-r,-u+s))},t.prototype.activateDots=function(t){var i,n;i=this.dots,n="n2-active",i.forEach((function(t){l(t,n)}));for(var s=t.slides,h=0;s.length>h;h++)c(s[h].thumbnailDot,"n2-active")},t.prototype.previousPane=function(){this.bar.scrollTop-=.75*this.bar.clientHeight},t.prototype.nextPane=function(){this.bar.scrollTop+=.75*this.bar.clientHeight},t.prototype.getSize=function(){return this.getWidth()},t}))}(window);
\ No newline at end of file
!function(t){var i=t;i._N2=i._N2||{_r:[],_d:[],r:function(){this._r.push(arguments)},d:function(){this._d.push(arguments)}};var n,s=t.document,h=(s.documentElement,t.setTimeout),o=t.clearTimeout,a=i._N2,u=(t.requestAnimationFrame,Object.assign),r=function(t,i,n){t.dataset[i]=n},c=function(t,i){t.classList.add(i)},l=function(t,i){t.classList.remove(i)},d=function(t,i,n,s){s=s||{},t.addEventListener(i,n,s)};navigator.userAgent.indexOf("+http://www.google.com/bot.html")>-1||i.requestIdleCallback,i.cancelIdleCallback;n=function(){s.body},"complete"===s.readyState||"interactive"===s.readyState?n():Document&&Document.prototype&&Document.prototype.addEventListener&&Document.prototype.addEventListener!==s.addEventListener?Document.prototype.addEventListener.call(s,"DOMContentLoaded",n):s.addEventListener("DOMContentLoaded",n),a.d("SmartSliderWidgetThumbnailDefaultVertical","SmartSliderWidget",(function(){"use strict";function t(t,i){this.parameters=u({minimumThumbnailCount:1.5},i),a.SmartSliderWidget.prototype.constructor.call(this,t,"thumbnail",".nextend-thumbnail-default")}t.prototype=Object.create(a.SmartSliderWidget.prototype),t.prototype.constructor=t,t.prototype.onStart=function(){this.bar=this.widget.querySelector(".nextend-thumbnail-inner"),d(this.bar,"scroll",this.onScroll.bind(this));var t=this.widget.querySelector(".nextend-thumbnail-previous"),i=this.widget.querySelector(".nextend-thumbnail-next");t&&d(t,"click",this.previousPane.bind(this)),i&&d(i,"click",this.nextPane.bind(this)),this.slider.stages.done("BeforeShow",this.onBeforeShow.bind(this)),this.slider.stages.done("WidgetsReady",this.onWidgetsReady.bind(this))},t.prototype.onBeforeShow=function(){var t=this.bar.querySelector(".nextend-thumbnail-scroller");this.dots=t.querySelectorAll(".n2-thumbnail-dot");for(var i,n,s=this.slider.realSlides,h=0;h<s.length;h++){var o=t.querySelector('[data-slide-public-id="'+(i=s[h].element,n="slidePublicId",i.dataset[n]+'"]'));"mouseenter"===this.parameters.action?new a.UniversalEnter(o,this.onDotHover.bind(this,s[h])):new a.UniversalClick(o,this.onDotClick.bind(this,s[h])),s[h].thumbnailDot=o}requestAnimationFrame(this.onScroll.bind(this)),d(this.slider.sliderElement,"SliderResize",this.onScroll.bind(this)),d(this.slider.sliderElement,"SlideWillChange",this.onSlideSwitch.bind(this))},t.prototype.onWidgetsReady=function(){this.onSlideSwitch({detail:{targetSlide:this.slider.currentRealSlide}})},t.prototype.onScroll=function(){var t=this.bar.scrollTop,i=this.bar.clientHeight,n=this.bar.scrollHeight;r(this.widget,"hasPrevious",0===t?0:1),r(this.widget,"hasNext",t+i<n?1:0)};var n=!1;return t.prototype.onDotClick=function(t){a._shouldPreventClick||(n||(this.slider.directionalChangeToReal(t.index),n=!0),h(function(){n=!1}.bind(this),400))},t.prototype.onDotHover=function(t){this.slider.directionalChangeToReal(t.index)},t.prototype.onSlideSwitch=function(e){var t=e.detail.targetSlide.slides[0];this.activateDots(t);var n=i.getComputedStyle(t.thumbnailDot),s=t.thumbnailDot.offsetTop-parseInt(n.getPropertyValue("margin-top")),h=t.thumbnailDot.getBoundingClientRect().height+parseInt(n.getPropertyValue("margin-top"))+parseInt(n.getPropertyValue("margin-bottom")),o=this.bar.scrollTop,a=i.getComputedStyle(this.bar),u=parseInt(a.paddingTop),r=this.bar.clientHeight,c=this.bar.scrollHeight;(s<o||s+h>o+r)&&(this.bar.scrollTop=Math.min(c-r,-u+s))},t.prototype.activateDots=function(t){var i,n;i=this.dots,n="n2-active",i.forEach((function(t){l(t,n)}));for(var s=t.slides,h=0;s.length>h;h++)c(s[h].thumbnailDot,"n2-active")},t.prototype.previousPane=function(){this.bar.scrollTop-=.75*this.bar.clientHeight},t.prototype.nextPane=function(){this.bar.scrollTop+=.75*this.bar.clientHeight},t.prototype.getSize=function(){return this.getWidth()},t}))}(window);
\ No newline at end of file
......
......@@ -49,6 +49,7 @@
.n2-thumbnail-dot {
position: relative;
cursor: pointer;
img {
object-fit: cover;
......@@ -111,6 +112,7 @@
.n2-thumbnail-dot {
display: grid;
grid-template-columns: auto 1fr;
overflow:hidden;
}
.nextend-thumbnail-button {
......
......@@ -4,7 +4,7 @@ Tags: slider, wordpress slider, image slider, layer slider, responsive slider, s
Donate link: https://sites.fastspring.com/nextend/product/smartslider3donate
Requires at least: 4.9
Tested up to: 5.8.1
Stable tag: 3.5.1.2
Stable tag: 3.5.1.3
Requires PHP: 7.0
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
......@@ -209,6 +209,24 @@ Of course! Smart Slider use protocol relative urls which works fine on http:// a
== Changelog ==
= 3.5.1.3 - 18. January 2022 =
* Feature: Pagination and Search options in the Dashboard.
* Feature: The variable selector is now available at the column and row background colors.
* Feature: We'll use pointer cursor at the thumbnails to indicate that they're clickable.
* Feature: Perfmatter compatibility improvements.
* Fix: Overflow hidden is added to vertical thumbnails to allow rounded borders.
* Fix: Firefox changed the default background color of the select tag, which creates less contrast between the text and background. We changed it back to white.
* Fix: The color picker allowed saving a 7 digit color code, which resulted a bad color.
* Fix: Margin and padding values are now translatable in the Slide editor UI.
* Fix: Optimize images option now works on full URLs.
* Fix: The YouTube layer didn't always recognize the youtu.be URLs properly.
* Fix: Static Overlay background options caused error when the only slide in the slider is a Static Overlay.
* Fix: Smart Slider's custom widget area will now properly display the publishing instructions.
* Fix: Background Blur could show up even if the fill mode was not set to Blur fit.
* Other: Spanish translation updated. Thanks, Rodrigo!
* Other: The es_ES.po and es_ES.mo renamed to es.po and es.mo respectively to support all Spanish languages.
= 3.5.1.2 - 18. November 2021 =
* Feature: The old background animations are allowed again when the fill mode is not fill, but anything else.
* Feature: You can now customize the Loading animation delay time.
......
......@@ -3,7 +3,7 @@
Plugin Name: Smart Slider 3
Plugin URI: https://smartslider3.com/
Description: The perfect all-in-one responsive slider solution for WordPress.
Version: 3.5.1.2
Version: 3.5.1.3
Requires PHP: 7.0
Requires at least: 4.9
Author: Nextend
......
......@@ -55,12 +55,12 @@ if ( !class_exists( 'WPSL_Frontend' ) ) {
add_action( 'init', array( $this, 'borlabs_cookie' ) );
}
add_action( 'wp_ajax_store_search', array( $this, 'store_search' ) );
add_action( 'wp_ajax_nopriv_store_search', array( $this, 'store_search' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'add_frontend_styles' ) );
add_action( 'wp_footer', array( $this, 'add_frontend_scripts' ) );
add_action( 'wp_ajax_store_search', array( $this, 'store_search' ) );
add_action( 'wp_ajax_nopriv_store_search', array( $this, 'store_search' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'add_frontend_styles' ) );
add_action( 'wp_footer', array( $this, 'add_frontend_scripts' ) );
add_filter( 'the_content', array( $this, 'cpt_template' ) );
add_filter( 'the_content', array( $this, 'cpt_template' ) );
add_shortcode( 'wpsl', array( $this, 'show_store_locator' ) );
add_shortcode( 'wpsl_address', array( $this, 'show_store_address' ) );
......
......@@ -134,7 +134,11 @@ if ( !class_exists( 'WPSL_Borlabs_Cookie' ) ) {
);
// Default thumbnail
$thumbnail = BORLABS_COOKIE_PLUGIN_URL.'images/bct-google-maps.png';
if ( defined( 'BORLABS_COOKIE_VERSION' ) && version_compare( BORLABS_COOKIE_VERSION, '2.2.36', '>=' )) {
$thumbnail = BORLABS_COOKIE_PLUGIN_URL . 'assets/images/cb-maps.png';
} else {
$thumbnail = BORLABS_COOKIE_PLUGIN_URL . 'images/bct-google-maps.png';
}
// Get the title which was maybe set via title-attribute in a shortcode
$title = BorlabsCookieHelper()->getCurrentTitleOfBlockedContentType();
......
......@@ -4,8 +4,8 @@ Contributors: tijmensmit
Donate link: https://www.paypal.me/tijmensmit
Tags: google maps, store locator, business locations, geocoding, stores, geo, zipcode locator, dealer locater, geocode, gmaps, google map, google map plugin, location finder, map tools, shop locator, wp google map
Requires at least: 3.7
Tested up to: 5.7
Stable tag: 2.2.234
Tested up to: 5.8.2
Stable tag: 2.2.235
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
......@@ -127,6 +127,9 @@ If you find a plugin or theme that causes a conflict, please report it on the [s
== Changelog ==
= 2.2.235, 10 January, 2022 =
* Fixed: Borlabs Cookie](https://borlabs.io/borlabs-cookie/) compatiblity problem with the Google Maps placeholder.
= 2.2.234, 23 January, 2021 =
* Fixed: PHP 8 Compatiblity
* Fixed: Polylang Compatiblity
......
......@@ -4,7 +4,7 @@ Plugin Name: WP Store Locator
Description: An easy to use location management system that enables users to search for nearby physical stores
Author: Tijmen Smit
Author URI: https://wpstorelocator.co/
Version: 2.2.234
Version: 2.2.235
Text Domain: wpsl
Domain Path: /languages/
License: GPL v3
......@@ -61,7 +61,7 @@ if ( !class_exists( 'WP_Store_locator' ) ) {
public function define_constants() {
if ( !defined( 'WPSL_VERSION_NUM' ) )
define( 'WPSL_VERSION_NUM', '2.2.234' );
define( 'WPSL_VERSION_NUM', '2.2.235' );
if ( !defined( 'WPSL_URL' ) )
define( 'WPSL_URL', plugin_dir_url( __FILE__ ) );
......
......@@ -126,3 +126,18 @@ add_filter("wpcf7_ajax_json_echo", function ($response, $result) {
return $response;
},10,2);
// UnderStrap's includes directory.
$understrap_inc_dir = 'inc';
// Array of files to include.
$understrap_includes = array(
'/emails.php'
);
// Include files.
foreach ( $understrap_includes as $file ) {
require_once get_theme_file_path( $understrap_inc_dir . $file );
}
......
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
<title></title>
<!--[if mso]>
<noscript>
<xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml>
</noscript>
<![endif]-->
<style>
@font-face { font-family: Calibri;
src: url('https://fp-canada.gotenzing.com/wp-content/themes/understrap-child/Calibri.woff') format('woff'); }
@font-face { font-family: Calibri-bold;
src: url('https://fp-canada.gotenzing.com/wp-content/themes/understrap-child/Calibri-Bold.woff') format('woff'); }
table, td, div, h1, p {font-family: Calibri;}
strong{font-family: Calibri;}
</style>
</head>
<body style="margin:0;padding:0;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;background:#ffffff;">
<tr>
<td align="center" style="padding:0;">
<table role="presentation" style="width:602px;border-collapse:collapse;border-spacing:0;text-align:left;">
<tr style="background:#582C83;">
<td align="center">
&nbsp;
</td>
<td align="center">
&nbsp;
</td>
<td align="center" width="135">
<img width="135" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fp_logo.png" class="img-fluid" alt="FP Canada">
</td>
<td align="center" width="40">
&nbsp;&nbsp;
</td>
</tr>
<tr style="background:#582C83;">
<td colspan="4" style="padding:36px 30px 42px 30px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td style="padding:0 0 36px 0;color:#153643;">
<h1 style="font-size:50px;line-height:55px;color:#fff;margin:0 0 20px 0; font-family: Calibri-bold;">
Important<br>Registration<br>Information</h1>
</td>
</tr>
<tr>
</td>
</tr>
</table>
</td>
</tr>
<tr style="background:#ffffff;">
<td colspan="4" style="padding:36px 30px 42px 30px;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td colspan="3" style="padding:0 0 36px 0;color:#153643;">
<p style="margin:0 0 12px 0;font-size:24px;line-height:28px;font-family: Calibri;color:#012169;">We’ve received your registration information and we’ll confirm program acceptance within two business days from now. If we have questions, we’ll let you know or we will simply confirm acceptance.</p>
<p style="margin:0;font-weight:bold;font-size:20px;line-height:22px;font-family: Calibri-bold;color:#5B6770;">If you have questions, contact us at <a style="color:#012169;text-decoration: none;" href="mailto:wyncampaign@fpcanada.ca">wyncampaign@fpcanada.ca</a></p>
</td>
</tr>
<tr style="background:#ffffff;">
<td colspan="4" style="padding-bottom:10px">
</td>
</tr>
<tr>
<td align="center">
&nbsp;
</td>
<td align="center">
<img width="147" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/logo.png" class="img-fluid" alt="FP Canada">
</td>
<td align="center">
&nbsp;
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4" style="padding:30px;background:#fff;">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;font-size:9px;font-family:Arial,sans-serif;">
<tr>
<td style="padding-bottom:50px;width:5%;" align="left">
&nbsp;&nbsp;
</td>
<td style="padding:0;width:90%;border-top: 1px solid #000;" align="left">
<table role="presentation" style="width:100%;border-collapse:collapse;border:0;border-spacing:0;">
<tr>
<td colspan="7" style="padding:0;width:5%;" align="left">
&nbsp;&nbsp;
</td>
</tr>
<tr>
<td style="padding:0;width:5%;" align="left">
</td>
<td style="padding:0;width:5%;" align="left">
<img width="16" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/t.png" class="img-fluid" alt="FP Canada">
</td>
<td style="padding:0;width:5%;" align="left">
<img width="8" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/fb.png" class="img-fluid" alt="FP Canada">
</td>
<td style="padding:0;width:5%;" align="left">
<img width="17" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/insta.png" class="img-fluid" alt="FP Canada">
</td>
<td style="padding:0;width:5%;" align="left">
<img width="16" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/you.png" class="img-fluid" alt="FP Canada">
</td>
<td style="padding:0;width:5%;" align="left">
<img width="16" src="https://fp-canada.gotenzing.com/wp-content/uploads/2022/01/link.png" class="img-fluid" alt="FP Canada">
</td>
<td style="padding:0;width:5%;" align="left">
&nbsp;&nbsp;
</td>
</tr>
</table>
</td>
<td style="padding:0;width:5%;" align="left">
</td>
</tr>
<tr>
<td style="padding-bottom:0px;width:5%;" align="left">
&nbsp;&nbsp;
</td>
</tr>
<tr>
<td colspan="4" style="padding-bottom:10px;width:5%; font-size:14px;" align="center">
<p><strong>FP Canada</strong><br>
902-375 University Ave.<br>
Toronto, ON M5G 2J5 <br>
<a style="color:#5B6770;text-decoration: none;" href="tel:1 800 305 9886">1 800 305 9886</a> | <a style="color:#5B6770;text-decoration: none;" href="mailto:wyncampaign@fpcanada.ca">wyncampaign@fpcanada.ca</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<?php
/**
* Understrap emails
*
* @package Understrap
*/
// Exit if accessed directly.
add_filter( 'cf7_2_post_status_wpsl_stores', 'publish_new_wpsl_stores',10,3);
/**
* Function to change the post status of saved/submitted posts.
* @param string $status the post status, default is 'draft'.
* @param string $ckf7_key unique key to identify your form.
* @param array $submitted_data complete set of data submitted in the form as an array of field-name=>value pairs.
* @return string a valid post status ('publish'|'draft'|'pending'|'trash')
*/
function publish_new_wpsl_stores($status, $ckf7_key, $submitted_data){
$email = $submitted_data['your-email'];
$subject = 'Important Registration Information';
$message = file_get_contents('registration-confirmation.html');
$headers_customer = array('Content-Type: text/html; charset=UTF-8');
wp_mail( $email , $subject, $message, $headers_customer);
return 'draft';
}
\ No newline at end of file