Blocksy Companion - Version 1.8.7.2

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.8.7.2
Comparing to
See all releases

Code changes from version 1.8.7.1 to 1.8.7.2

blocksy-companion.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
- Version: 1.8.7.1
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
+ Version: 1.8.7.2
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/extensions/cookies-consent/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/newsletter-subscribe/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main-admin.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/trending/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/widgets/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/features/header.php CHANGED
@@ -537,9 +537,20 @@ class HeaderAdditions {
537
  public function blc_retrieve_account_modal() {
538
  remove_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
539
 
 
 
 
 
 
 
 
 
540
  $html = blc_call_fn(
541
  ['fn' => 'blocksy_render_view'],
542
- dirname(__FILE__) . '/header/account-modal.php'
 
 
 
543
  );
544
 
545
  add_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
537
  public function blc_retrieve_account_modal() {
538
  remove_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
539
 
540
+ $url = home_url();
541
+
542
+ $body = json_decode(file_get_contents('php://input'), true);
543
+
544
+ if ($body && isset($body['current_url'])) {
545
+ $url = $body['current_url'];
546
+ }
547
+
548
  $html = blc_call_fn(
549
  ['fn' => 'blocksy_render_view'],
550
+ dirname(__FILE__) . '/header/account-modal.php',
551
+ [
552
+ 'current_url' => $url
553
+ ]
554
  );
555
 
556
  add_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
framework/features/header/account-modal.php CHANGED
@@ -1,5 +1,9 @@
1
  <?php
2
 
 
 
 
 
3
  $users_can_register = get_option('users_can_register');
4
 
5
  if (get_option('woocommerce_enable_myaccount_registration') === 'yes') {
@@ -17,7 +21,9 @@ foreach ($form_views as $form_key => $value) {
17
  'blocksy:header:account-modal:views:' . $form_key . '-form',
18
  blocksy_render_view(
19
  dirname(__FILE__) . '/modal/' . $form_key . '.php',
20
- []
 
 
21
  )
22
  );
23
  }
1
  <?php
2
 
3
+ if (! isset($current_url)) {
4
+ $current_url = home_url();
5
+ }
6
+
7
  $users_can_register = get_option('users_can_register');
8
 
9
  if (get_option('woocommerce_enable_myaccount_registration') === 'yes') {
21
  'blocksy:header:account-modal:views:' . $form_key . '-form',
22
  blocksy_render_view(
23
  dirname(__FILE__) . '/modal/' . $form_key . '.php',
24
+ [
25
+ 'current_url' => $current_url
26
+ ]
27
  )
28
  );
29
  }
framework/features/header/modal/login.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  $redirect_to_url = apply_filters(
6
  'blocksy:account:modal:login:redirect_to',
7
- blocksy_current_url()
8
  );
9
 
10
  ?>
4
 
5
  $redirect_to_url = apply_filters(
6
  'blocksy:account:modal:login:redirect_to',
7
+ $current_url
8
  );
9
 
10
  ?>
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
5
  Tested up to: 5.8
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Stable tag: 1.8.7.1
9
 
10
  == Description ==
11
 
@@ -23,6 +23,9 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
 
 
 
26
  1.8.7.1: 2021-07-23
27
  - Improvement: General fixes and improvements
28
 
5
  Tested up to: 5.8
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Stable tag: 1.8.7.2
9
 
10
  == Description ==
11
 
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
26
+ 1.8.7.2: 2021-07-26
27
+ - Improvement: Properly compute current url for lazy loaded account html
28
+
29
  1.8.7.1: 2021-07-23
30
  - Improvement: General fixes and improvements
31
 
static/bundle/account.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function r(o){if(t[o])return t[o].exports;var c=t[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(o,c,function(t){return e[t]}.bind(null,c));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),c=r.n(o),n=r(1),a=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");c&&c.remove();var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");n&&n.remove()},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var c=r.querySelector("#login_error");return c&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(c.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!c,doc:r}},s=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var c=e.querySelector(".ct-errors");c&&c.remove();var n=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),n&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(n.innerHTML,"</div>")),{doc:r}};Object(n.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var r=t.event;r.preventDefault(),function(e){var t="#account-modal";try{document.querySelector(t)}catch(e){return}document.querySelector(t)?e(document.querySelector(t)):fetch("".concat(ct_localizations.ajax_url,"?action=blc_retrieve_account_modal"),{method:"POST"}).then((function(e){return e.json()})).then((function(r){var o=r.data.html;document.querySelector(".ct-drawer-canvas").insertAdjacentHTML("beforeend",o),setTimeout((function(){e(document.querySelector(t))}))}))}((function(t){!function(e){if(e&&!e.hasListeners){e.hasListeners=!0,e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(a(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(a(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=i(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=i(r.closest(".ct-register-form"),e);t.doc;t.hasError||s(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=i(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||s(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(e,{screen:t})}))}))}))}}(t),a(t,{screen:e.dataset.view||"login"}),c.a.trigger("ct:overlay:handle-click",{e:r,href:"#account-modal",options:{isModal:!0}})}))}})}]);
1
+ !function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o),c=r(1),a=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");n&&n.remove();var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");c&&c.remove()},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var n=r.querySelector("#login_error");return n&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(n.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!n,doc:r}},s=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var n=e.querySelector(".ct-errors");n&&n.remove();var c=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),c&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(c.innerHTML,"</div>")),{doc:r}};Object(c.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var r=t.event;r.preventDefault(),function(e){var t="#account-modal";try{document.querySelector(t)}catch(e){return}document.querySelector(t)?e(document.querySelector(t)):fetch("".concat(ct_localizations.ajax_url,"?action=blc_retrieve_account_modal"),{method:"POST",body:JSON.stringify({current_url:location.href})}).then((function(e){return e.json()})).then((function(r){var o=r.data.html;document.querySelector(".ct-drawer-canvas").insertAdjacentHTML("beforeend",o),setTimeout((function(){e(document.querySelector(t))}))}))}((function(t){!function(e){if(e&&!e.hasListeners){e.hasListeners=!0,e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(a(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(a(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=i(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=i(r.closest(".ct-register-form"),e);t.doc;t.hasError||s(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=i(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||s(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(e,{screen:t})}))}))}))}}(t),a(t,{screen:e.dataset.view||"login"}),n.a.trigger("ct:overlay:handle-click",{e:r,href:"#account-modal",options:{isModal:!0}})}))}})}]);
static/bundle/dashboard.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
static/bundle/options.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.7.1
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.7.2
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
static/js/account.js CHANGED
@@ -20,6 +20,9 @@ const ensureAccountModalPresent = (cb) => {
20
 
21
  {
22
  method: 'POST',
 
 
 
23
  }
24
  )
25
  .then((response) => response.json())
20
 
21
  {
22
  method: 'POST',
23
+ body: JSON.stringify({
24
+ current_url: location.href,
25
+ }),
26
  }
27
  )
28
  .then((response) => response.json())