Changeset 2364244
- Timestamp:
- 08/18/2020 07:06:45 PM (5 years ago)
- Location:
- courier-notices
- Files:
-
- 12 edited
- 1 copied
-
tags/1.2.7 (copied) (copied from courier-notices/trunk)
-
tags/1.2.7/CHANGELOG.md (modified) (1 diff)
-
tags/1.2.7/composer.json (modified) (1 diff)
-
tags/1.2.7/courier-notices.php (modified) (2 diffs)
-
tags/1.2.7/js/courier-notices.js (modified) (1 diff)
-
tags/1.2.7/package.json (modified) (1 diff)
-
tags/1.2.7/readme.txt (modified) (2 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/composer.json (modified) (1 diff)
-
trunk/courier-notices.php (modified) (2 diffs)
-
trunk/js/courier-notices.js (modified) (1 diff)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
courier-notices/tags/1.2.7/CHANGELOG.md
r2363434 r2364244 1 1 # Changelog # 2 3 ## 1.2.7 ## 4 * Updated - Window load for modal placement 2 5 3 6 ## 1.2.6 ## -
courier-notices/tags/1.2.7/composer.json
r2363434 r2364244 3 3 "description": "Courier Notification for WordPress", 4 4 "homepage": "https://github.com/linchpin/courier", 5 "version": "1.2. 6",5 "version": "1.2.7", 6 6 "authors": [ 7 7 { -
courier-notices/tags/1.2.7/courier-notices.php
r2363434 r2364244 4 4 * Plugin URI: https://wordpress.org/plugins/courier-notices 5 5 * Description: A way to display, manage, and control front end notifications for your WordPress install. 6 * Version: 1.2. 66 * Version: 1.2.7 7 7 * Author: Linchpin 8 8 * Author URI: https://linchpin.com … … 23 23 24 24 if ( ! defined( 'COURIER_NOTICES_VERSION' ) ) { 25 define( 'COURIER_NOTICES_VERSION', '1.2. 6' );25 define( 'COURIER_NOTICES_VERSION', '1.2.7' ); 26 26 } 27 27 28 28 if ( ! defined( 'COURIER_NOTICES_RELEASE_DATE' ) ) { 29 define( 'COURIER_NOTICES_RELEASE_DATE', '08/1 7/2020' );29 define( 'COURIER_NOTICES_RELEASE_DATE', '08/18/2020' ); 30 30 } 31 31 -
courier-notices/tags/1.2.7/js/courier-notices.js
r2363434 r2364244 1 !function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=jQuery},,function(e,t,o){e.exports=o(6)},,,,function(e,t,o){"use strict";o.r(t);var n=o(0),r=o.n(n),i=function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},a=r.a;var c=r.a;function s(){function e(e){var o=c(this),n=o.attr("href");if(!0!==o.data("dismiss")){e.preventDefault(),e.stopPropagation(),o.data("dismiss",!0);var r=o.parents(".courier-notice"),i=parseInt(r.data("courier-notice-id"),10);if(0===r.length||isNaN(i))return;courier_notices_data.user_id&&courier_notices_data.user_id>0?c.post({url:courier_notices_data.notice_endpoint+i+"/dismiss",data:{dismiss_nonce:courier_notices_data.dismiss_nonce,user_id:courier_notices_data.user_id},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)}}).done((function(){r.find(".courier-close").trigger("click"),t(i)})):(r.find(".courier-close").trigger("click"),t(i)),n&&"#"!==n&&c(document).ajaxComplete((function(e,t,o){window.location=n}))}}function t(e){c(".courier_notice[data-courier-notice-id='"+e+"']").fadeOut(),c(".courier-modal-overlay").hide(),o(e)}function o(e){var t=i("dismissed_notices");-1===(t=(t=JSON.parse(t))||[]).indexOf(e)&&t.push(e),function(e,t,o,n,r,i){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;n||(n="/");var a="";if(o)switch(o.constructor){case Number:a=o===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+o;break;case String:a="; expires="+o;break;case Date:a="; expires="+o.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(r?"; domain="+r:"")+(n?"; path="+n:"")+(i?"; secure":"")}("dismissed_notices",JSON.stringify(t))}c("body").on("click",".courier-close, .trigger-close",e)}var u=r.a;r()((function(){var e;e=function(){var e=a('.courier-notices[data-courier-ajax="true"]');if(e.attr("data-loaded",!1),0!==e.length){var t=document.querySelectorAll('.courier-notices:not(.courier-location-popup-modal)[data-courier-ajax="true"]'),o=new IntersectionObserver((function(e,t){e.forEach((function(e){if(1===e.intersectionRatio&&"false"===e.target.getAttribute("data-loaded")){var t={contentType:"application/json",placement:e.target.getAttribute("data-courier-placement"),format:"html",post_info:{}};void 0!==courier_notices_data.post_info&&(t.post_info=courier_notices_data.post_info);var o=i("dismissed_notices");o=(o=JSON.parse(o))||[],a.ajax({method:"GET",beforeSend:function(e){"0"!==courier_notices_data.user_id&&e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:t}).success((function(e){e.notices&&a.each(e.notices,(function(n){if(-1===o.indexOf(parseInt(n))){var r=a(e.notices[n]).hide();a('.courier-notices[data-courier-placement="'+t.placement+'"]').append(r),r.slideDown("fast")}}))})),e.target.setAttribute("data-loaded",!0)}}))}),{threshold:1});Array.prototype.forEach.call(t,(function(e){o.observe(e)}))}},"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e),s(),function(){u(document),u("body") ,u(window);var e=function(){var e={contentType:"application/json",placement:"popup-modal",format:"html",post_info:{}};if(document.querySelector('.courier-notices.courier-location-popup-modal[data-courier-ajax="true"]')){void 0!==courier_notices_data.post_info&&(e.post_info=courier_notices_data.post_info);var t=i("dismissed_notices");t=(t=JSON.parse(t))||[],u.ajax({method:"GET",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:e}).success((function(o){o.notices&&u.each(o.notices,(function(n){if(-1===t.indexOf(parseInt(n))){var r=u(o.notices[n]).hide();u('.courier-notices[data-courier-placement="'+e.placement+'"]').append(r),r.slideDown("fast")}}))})),u(".modal_overlay").show()}};window.onload=e}()}))}]);1 !function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=jQuery},,function(e,t,o){e.exports=o(6)},,,,function(e,t,o){"use strict";o.r(t);var n=o(0),r=o.n(n),i=function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},a=r.a;var c=r.a;function s(){function e(e){var o=c(this),n=o.attr("href");if(!0!==o.data("dismiss")){e.preventDefault(),e.stopPropagation(),o.data("dismiss",!0);var r=o.parents(".courier-notice"),i=parseInt(r.data("courier-notice-id"),10);if(0===r.length||isNaN(i))return;courier_notices_data.user_id&&courier_notices_data.user_id>0?c.post({url:courier_notices_data.notice_endpoint+i+"/dismiss",data:{dismiss_nonce:courier_notices_data.dismiss_nonce,user_id:courier_notices_data.user_id},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)}}).done((function(){r.find(".courier-close").trigger("click"),t(i)})):(r.find(".courier-close").trigger("click"),t(i)),n&&"#"!==n&&c(document).ajaxComplete((function(e,t,o){window.location=n}))}}function t(e){c(".courier_notice[data-courier-notice-id='"+e+"']").fadeOut(),c(".courier-modal-overlay").hide(),o(e)}function o(e){var t=i("dismissed_notices");-1===(t=(t=JSON.parse(t))||[]).indexOf(e)&&t.push(e),function(e,t,o,n,r,i){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;n||(n="/");var a="";if(o)switch(o.constructor){case Number:a=o===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+o;break;case String:a="; expires="+o;break;case Date:a="; expires="+o.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(r?"; domain="+r:"")+(n?"; path="+n:"")+(i?"; secure":"")}("dismissed_notices",JSON.stringify(t))}c("body").on("click",".courier-close, .trigger-close",e)}var u=r.a;r()((function(){var e;e=function(){var e=a('.courier-notices[data-courier-ajax="true"]');if(e.attr("data-loaded",!1),0!==e.length){var t=document.querySelectorAll('.courier-notices:not(.courier-location-popup-modal)[data-courier-ajax="true"]'),o=new IntersectionObserver((function(e,t){e.forEach((function(e){if(1===e.intersectionRatio&&"false"===e.target.getAttribute("data-loaded")){var t={contentType:"application/json",placement:e.target.getAttribute("data-courier-placement"),format:"html",post_info:{}};void 0!==courier_notices_data.post_info&&(t.post_info=courier_notices_data.post_info);var o=i("dismissed_notices");o=(o=JSON.parse(o))||[],a.ajax({method:"GET",beforeSend:function(e){"0"!==courier_notices_data.user_id&&e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:t}).success((function(e){e.notices&&a.each(e.notices,(function(n){if(-1===o.indexOf(parseInt(n))){var r=a(e.notices[n]).hide();a('.courier-notices[data-courier-placement="'+t.placement+'"]').append(r),r.slideDown("fast")}}))})),e.target.setAttribute("data-loaded",!0)}}))}),{threshold:1});Array.prototype.forEach.call(t,(function(e){o.observe(e)}))}},"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e),s(),function(){u(document),u("body");var e=u(window),t=function(){var e={contentType:"application/json",placement:"popup-modal",format:"html",post_info:{}};if(document.querySelector('.courier-notices.courier-location-popup-modal[data-courier-ajax="true"]')){void 0!==courier_notices_data.post_info&&(e.post_info=courier_notices_data.post_info);var t=i("dismissed_notices");t=(t=JSON.parse(t))||[],u.ajax({method:"GET",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:e}).success((function(o){o.notices&&u.each(o.notices,(function(n){if(-1===t.indexOf(parseInt(n))){var r=u(o.notices[n]).hide();u('.courier-notices[data-courier-placement="'+e.placement+'"]').append(r),r.slideDown("fast")}}))})),u(".modal_overlay").show()}};e.on("load",t)}()}))}]); -
courier-notices/tags/1.2.7/package.json
r2363434 r2364244 1 1 { 2 2 "name": "courier-notices", 3 "version": "1.2. 6",3 "version": "1.2.7", 4 4 "description": "A way to display, manage, and control front end notifications for users, globally or individually, in the header,footer, by shortcode or by page.", 5 5 "main": "gulpfile.babel.js", -
courier-notices/tags/1.2.7/readme.txt
r2363434 r2364244 4 4 Requires at least: 5.0 5 5 Tested up to: 5.4.2 6 Stable tag: 1.2. 66 Stable tag: 1.2.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 36 36 == Changelog == 37 38 = 1.2.7 = 39 * Updated - Window load for modal placement 37 40 38 41 = 1.2.6 = -
courier-notices/trunk/CHANGELOG.md
r2363434 r2364244 1 1 # Changelog # 2 3 ## 1.2.7 ## 4 * Updated - Window load for modal placement 2 5 3 6 ## 1.2.6 ## -
courier-notices/trunk/composer.json
r2363434 r2364244 3 3 "description": "Courier Notification for WordPress", 4 4 "homepage": "https://github.com/linchpin/courier", 5 "version": "1.2. 6",5 "version": "1.2.7", 6 6 "authors": [ 7 7 { -
courier-notices/trunk/courier-notices.php
r2363434 r2364244 4 4 * Plugin URI: https://wordpress.org/plugins/courier-notices 5 5 * Description: A way to display, manage, and control front end notifications for your WordPress install. 6 * Version: 1.2. 66 * Version: 1.2.7 7 7 * Author: Linchpin 8 8 * Author URI: https://linchpin.com … … 23 23 24 24 if ( ! defined( 'COURIER_NOTICES_VERSION' ) ) { 25 define( 'COURIER_NOTICES_VERSION', '1.2. 6' );25 define( 'COURIER_NOTICES_VERSION', '1.2.7' ); 26 26 } 27 27 28 28 if ( ! defined( 'COURIER_NOTICES_RELEASE_DATE' ) ) { 29 define( 'COURIER_NOTICES_RELEASE_DATE', '08/1 7/2020' );29 define( 'COURIER_NOTICES_RELEASE_DATE', '08/18/2020' ); 30 30 } 31 31 -
courier-notices/trunk/js/courier-notices.js
r2363434 r2364244 1 !function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=jQuery},,function(e,t,o){e.exports=o(6)},,,,function(e,t,o){"use strict";o.r(t);var n=o(0),r=o.n(n),i=function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},a=r.a;var c=r.a;function s(){function e(e){var o=c(this),n=o.attr("href");if(!0!==o.data("dismiss")){e.preventDefault(),e.stopPropagation(),o.data("dismiss",!0);var r=o.parents(".courier-notice"),i=parseInt(r.data("courier-notice-id"),10);if(0===r.length||isNaN(i))return;courier_notices_data.user_id&&courier_notices_data.user_id>0?c.post({url:courier_notices_data.notice_endpoint+i+"/dismiss",data:{dismiss_nonce:courier_notices_data.dismiss_nonce,user_id:courier_notices_data.user_id},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)}}).done((function(){r.find(".courier-close").trigger("click"),t(i)})):(r.find(".courier-close").trigger("click"),t(i)),n&&"#"!==n&&c(document).ajaxComplete((function(e,t,o){window.location=n}))}}function t(e){c(".courier_notice[data-courier-notice-id='"+e+"']").fadeOut(),c(".courier-modal-overlay").hide(),o(e)}function o(e){var t=i("dismissed_notices");-1===(t=(t=JSON.parse(t))||[]).indexOf(e)&&t.push(e),function(e,t,o,n,r,i){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;n||(n="/");var a="";if(o)switch(o.constructor){case Number:a=o===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+o;break;case String:a="; expires="+o;break;case Date:a="; expires="+o.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(r?"; domain="+r:"")+(n?"; path="+n:"")+(i?"; secure":"")}("dismissed_notices",JSON.stringify(t))}c("body").on("click",".courier-close, .trigger-close",e)}var u=r.a;r()((function(){var e;e=function(){var e=a('.courier-notices[data-courier-ajax="true"]');if(e.attr("data-loaded",!1),0!==e.length){var t=document.querySelectorAll('.courier-notices:not(.courier-location-popup-modal)[data-courier-ajax="true"]'),o=new IntersectionObserver((function(e,t){e.forEach((function(e){if(1===e.intersectionRatio&&"false"===e.target.getAttribute("data-loaded")){var t={contentType:"application/json",placement:e.target.getAttribute("data-courier-placement"),format:"html",post_info:{}};void 0!==courier_notices_data.post_info&&(t.post_info=courier_notices_data.post_info);var o=i("dismissed_notices");o=(o=JSON.parse(o))||[],a.ajax({method:"GET",beforeSend:function(e){"0"!==courier_notices_data.user_id&&e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:t}).success((function(e){e.notices&&a.each(e.notices,(function(n){if(-1===o.indexOf(parseInt(n))){var r=a(e.notices[n]).hide();a('.courier-notices[data-courier-placement="'+t.placement+'"]').append(r),r.slideDown("fast")}}))})),e.target.setAttribute("data-loaded",!0)}}))}),{threshold:1});Array.prototype.forEach.call(t,(function(e){o.observe(e)}))}},"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e),s(),function(){u(document),u("body") ,u(window);var e=function(){var e={contentType:"application/json",placement:"popup-modal",format:"html",post_info:{}};if(document.querySelector('.courier-notices.courier-location-popup-modal[data-courier-ajax="true"]')){void 0!==courier_notices_data.post_info&&(e.post_info=courier_notices_data.post_info);var t=i("dismissed_notices");t=(t=JSON.parse(t))||[],u.ajax({method:"GET",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:e}).success((function(o){o.notices&&u.each(o.notices,(function(n){if(-1===t.indexOf(parseInt(n))){var r=u(o.notices[n]).hide();u('.courier-notices[data-courier-placement="'+e.placement+'"]').append(r),r.slideDown("fast")}}))})),u(".modal_overlay").show()}};window.onload=e}()}))}]);1 !function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=jQuery},,function(e,t,o){e.exports=o(6)},,,,function(e,t,o){"use strict";o.r(t);var n=o(0),r=o.n(n),i=function(e){return e&&decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},a=r.a;var c=r.a;function s(){function e(e){var o=c(this),n=o.attr("href");if(!0!==o.data("dismiss")){e.preventDefault(),e.stopPropagation(),o.data("dismiss",!0);var r=o.parents(".courier-notice"),i=parseInt(r.data("courier-notice-id"),10);if(0===r.length||isNaN(i))return;courier_notices_data.user_id&&courier_notices_data.user_id>0?c.post({url:courier_notices_data.notice_endpoint+i+"/dismiss",data:{dismiss_nonce:courier_notices_data.dismiss_nonce,user_id:courier_notices_data.user_id},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)}}).done((function(){r.find(".courier-close").trigger("click"),t(i)})):(r.find(".courier-close").trigger("click"),t(i)),n&&"#"!==n&&c(document).ajaxComplete((function(e,t,o){window.location=n}))}}function t(e){c(".courier_notice[data-courier-notice-id='"+e+"']").fadeOut(),c(".courier-modal-overlay").hide(),o(e)}function o(e){var t=i("dismissed_notices");-1===(t=(t=JSON.parse(t))||[]).indexOf(e)&&t.push(e),function(e,t,o,n,r,i){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e))return!1;n||(n="/");var a="";if(o)switch(o.constructor){case Number:a=o===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+o;break;case String:a="; expires="+o;break;case Date:a="; expires="+o.toUTCString()}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+a+(r?"; domain="+r:"")+(n?"; path="+n:"")+(i?"; secure":"")}("dismissed_notices",JSON.stringify(t))}c("body").on("click",".courier-close, .trigger-close",e)}var u=r.a;r()((function(){var e;e=function(){var e=a('.courier-notices[data-courier-ajax="true"]');if(e.attr("data-loaded",!1),0!==e.length){var t=document.querySelectorAll('.courier-notices:not(.courier-location-popup-modal)[data-courier-ajax="true"]'),o=new IntersectionObserver((function(e,t){e.forEach((function(e){if(1===e.intersectionRatio&&"false"===e.target.getAttribute("data-loaded")){var t={contentType:"application/json",placement:e.target.getAttribute("data-courier-placement"),format:"html",post_info:{}};void 0!==courier_notices_data.post_info&&(t.post_info=courier_notices_data.post_info);var o=i("dismissed_notices");o=(o=JSON.parse(o))||[],a.ajax({method:"GET",beforeSend:function(e){"0"!==courier_notices_data.user_id&&e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:t}).success((function(e){e.notices&&a.each(e.notices,(function(n){if(-1===o.indexOf(parseInt(n))){var r=a(e.notices[n]).hide();a('.courier-notices[data-courier-placement="'+t.placement+'"]').append(r),r.slideDown("fast")}}))})),e.target.setAttribute("data-loaded",!0)}}))}),{threshold:1});Array.prototype.forEach.call(t,(function(e){o.observe(e)}))}},"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e),s(),function(){u(document),u("body");var e=u(window),t=function(){var e={contentType:"application/json",placement:"popup-modal",format:"html",post_info:{}};if(document.querySelector('.courier-notices.courier-location-popup-modal[data-courier-ajax="true"]')){void 0!==courier_notices_data.post_info&&(e.post_info=courier_notices_data.post_info);var t=i("dismissed_notices");t=(t=JSON.parse(t))||[],u.ajax({method:"GET",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",courier_notices_data.wp_rest_nonce)},url:courier_notices_data.notices_endpoint,data:e}).success((function(o){o.notices&&u.each(o.notices,(function(n){if(-1===t.indexOf(parseInt(n))){var r=u(o.notices[n]).hide();u('.courier-notices[data-courier-placement="'+e.placement+'"]').append(r),r.slideDown("fast")}}))})),u(".modal_overlay").show()}};e.on("load",t)}()}))}]); -
courier-notices/trunk/package.json
r2363434 r2364244 1 1 { 2 2 "name": "courier-notices", 3 "version": "1.2. 6",3 "version": "1.2.7", 4 4 "description": "A way to display, manage, and control front end notifications for users, globally or individually, in the header,footer, by shortcode or by page.", 5 5 "main": "gulpfile.babel.js", -
courier-notices/trunk/readme.txt
r2363434 r2364244 4 4 Requires at least: 5.0 5 5 Tested up to: 5.4.2 6 Stable tag: 1.2. 66 Stable tag: 1.2.7 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 36 36 == Changelog == 37 38 = 1.2.7 = 39 * Updated - Window load for modal placement 37 40 38 41 = 1.2.6 =
Note: See TracChangeset
for help on using the changeset viewer.