diff --git a/wp-content/plugins/nextgen-gallery/changelog.txt b/wp-content/plugins/nextgen-gallery/changelog.txt index d56571234063a6bcd79a89acf77ad789167c8ff7..a195179850c2090528df211d62b81f6be7e36965 100644 --- a/wp-content/plugins/nextgen-gallery/changelog.txt +++ b/wp-content/plugins/nextgen-gallery/changelog.txt @@ -1,8 +1,28 @@ NextGEN Gallery by Imagely += V2.2.3 - 04.05.2017 = +* Fixed: E_WARNING on Gallery Settings page due to improper use of array_combine() on PHP <= 5.3 + += V2.2.2 - 04.04.2017 = +* Fixed: Hyperlinks in image descriptions +* Fixed: WordPress SEO sitemap image count +* Fixed: Removed id parameter in shortcodes +* Fixed: Fatal error in Freemius code + += V2.2.1 - 03.13.2017 = +* NEW: Template mechanism for all display types +* NEW: Review notices +* Changed: Updated branding to Imagely +* Changed: Added the ability to click on a gallery title and have it open direct to Pro Lightbox +* Fixed: Problems with activation after initial installation +* Fixed: Don't display legacy shortcodes after creating new galleries +* Fixed: false positive malware detection notices against 'eval' +* Fixed: Various PHP notices and warnings +* Fixed: Issue with dynamic container height for Imagebrowser display types + = V2.1.79 - 02.23.2017 = -* Changed: Tag display adjustment +* Secured: Resolved vulnerability with tag cloud displays = V2.1.77 - 01.31.2017 = * Changed: Corrected Facebook link diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.css b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.css index 76bdf40b8c9d644e3c2a75eecc86ead8fdbb77bf..5b8bc549d3741011ae6ba226cce2b463be0fc7a2 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.css +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.css @@ -1 +1 @@ -#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold} +#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%} diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.min.css b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.min.css index c618ad154d1ed29db075efdcef03b873984762a7..4861a02f9b8ed7a01173c896adf749b463a8af2a 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.min.css +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/account.min.css @@ -1 +1 @@ -#fs_account .fs-header-actions li form,.fs-key-value-table form{display:inline-block}#fs_addons td:last-child,#fs_addons th:last-child,.fs-key-value-table tr td.fs-right,.fs-key-value-table tr td:first-child{text-align:right}#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table tr td:first-child nobr{font-weight:700}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table code,.fs-key-value-table input[type=text],.fs-key-value-table var{color:#0073AA;font-size:16px;background:0 0}label.fs-tag,label.fs-tag.fs-warn{background:#ffba00}.fs-key-value-table input[type=text]{width:100%;font-weight:700}label.fs-tag{color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:700}#fs_addons th{font-weight:700} \ No newline at end of file +#fs_account .fs-header-actions li form,.fs-key-value-table form{display:inline-block}#fs_addons td:last-child,#fs_addons th:last-child,.fs-key-value-table tr td.fs-right,.fs-key-value-table tr td:first-child{text-align:right}#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table tr td:first-child nobr{font-weight:700}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table code,.fs-key-value-table input[type=text],.fs-key-value-table var{color:#0073AA;font-size:16px;background:0 0}label.fs-tag,label.fs-tag.fs-warn{background:#ffba00}.fs-key-value-table input[type=text]{width:100%;font-weight:700}label.fs-tag{color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:700}#fs_addons th,#fs_billing_address span{font-weight:700}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:0 0}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:0 0}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%} \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.css b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.css index f58e647a241f9a2162463eddab8aa66e107f2fdb..3df4e67540857c56e88a91ff1457907655e82165 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.css +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.css @@ -1 +1 @@ -.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;box-shadow:0px 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'} +.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;box-shadow:0px 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb} diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.min.css b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.min.css index 1bae2a296148b8c59e46aa361d7084fefc3e6b48..b8cccdb6fc6a66e11523a1ec3b660ef7348d28a7 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.min.css +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/common.min.css @@ -1 +1 @@ -.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px!important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2!important;background-color:#f2fcff!important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:700;cursor:auto}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;box-shadow:0 2px 2px rgba(6,113,6,.3);opacity:.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}@media screen and (max-width:960px){.fs-secure-notice{left:36px}}@media screen and (max-width:500px){#fs_promo_tab{display:none}}@media screen and (max-width:782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'} \ No newline at end of file +.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px!important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2!important;background-color:#f2fcff!important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:700;cursor:auto}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;box-shadow:0 2px 2px rgba(6,113,6,.3);opacity:.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}@media screen and (max-width:960px){.fs-secure-notice{left:36px}}@media screen and (max-width:500px){#fs_promo_tab{display:none}}@media screen and (max-width:782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:#adff2f}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb} \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.css b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.css index f71af932290aa4c409dbfbcd030cf0f6c88a0790..44b3dbb9e97eb47666c80806c6fbe9e595d467bb 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.css +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.css @@ -1,2 +1,2 @@ -.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend .fs-modal-body input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{margin-top:2px}} +.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend .fs-modal-body input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{margin-top:2px}} .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block} diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.min.css b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.min.css index 38cec20af80612a29078b150255f19eb0ac1e480..e0aa16f5ce285119a7ed46ac4c4333b0c802800b 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.min.css +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/css/admin/dialog-boxes.min.css @@ -1 +1 @@ -.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,.6)}.fs-modal .fs-modal-dialog{background:0 0;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea,.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key,.fs-modal.fs-modal-license-key-resend .fs-modal-body input.email-address{width:100%}@media (max-width:650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active,.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:700;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:700;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .internal-message,.fs-modal.fs-modal-deactivation-feedback .reason-input{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width:650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0!important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:right;margin-left:7px}@media (max-width:650px){.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{margin-top:2px}}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block} \ No newline at end of file +.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,.6)}.fs-modal .fs-modal-dialog{background:0 0;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea,.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key,.fs-modal.fs-modal-license-key-resend .fs-modal-body input.email-address{width:100%}@media (max-width:650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active,.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:700;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:700;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .internal-message,.fs-modal.fs-modal-deactivation-feedback .reason-input{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width:650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0!important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:right;margin-left:7px}@media (max-width:650px){.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{margin-top:2px}}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block} \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/_mixins.scss b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/_mixins.scss index 5a6a192b0df246f2f1d4aac2a6686bd7a42c11fd..7048b1692b4d01047bcf36e3535791acab9630ee 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/_mixins.scss +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/_mixins.scss @@ -213,4 +213,15 @@ $useIEFilters: 0; display: table; clear: both; } +} + +// Placeholder text +@mixin placeholder($color: $input-color-placeholder) { + // Firefox + &::-moz-placeholder { + color: $color; + opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526 + } + &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+ + &::-webkit-input-placeholder { color: $color; } // Safari and Chrome } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/_modal-common.scss b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/_modal-common.scss index 329390c087e225137e4fa46c5899e0cbda167ce9..e4260ce9df243b177ae806a8662c95cba77b45bc 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/_modal-common.scss +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/_modal-common.scss @@ -58,6 +58,7 @@ background: #fbfbfb; padding: 15px 20px; position: relative; + margin-bottom: -10px; // z-index: 2; h4 { @@ -98,6 +99,7 @@ h2 { font-size: 20px; + line-height: 1.5em; } > div { diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/account.scss b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/account.scss index f828c5ccb78bbe04277fdfc0e08d0c32408036b6..423cead5ee62af8e0cae7dba0448b702a8d2a032 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/account.scss +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/account.scss @@ -1,3 +1,5 @@ +@import "../start"; + #fs_account { .postbox, @@ -166,6 +168,10 @@ label.fs-tag vertical-align: middle; } + thead { + white-space: nowrap; + } + td:first-child, th:first-child { @@ -181,4 +187,64 @@ label.fs-tag { font-weight: bold; } +} + +#fs_billing_address { + width: 100%; + + tr { + td { + width: 50%; + padding: 5px; + } + + &:first-of-type { + td { + padding-top: 0; + } + } + } + + @mixin read-mode { + border-color: transparent; + color: #777; + border-bottom: 1px dashed #ccc; + padding-left: 0; + background: none; + } + + span { + font-weight: bold; + } + + input, select { + @include placeholder(transparent); + + display: block; + width: 100%; + margin-top: 5px; + + &.fs-read-mode { + @include read-mode(); + } + } + + + &.fs-read-mode { + td span { + display: none; + } + + input, select + { + @include read-mode(); + @include placeholder(#ccc); + } + } + + + button { + display: block; + width: 100%; + } } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/common.scss b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/common.scss index bc42de1d3360d0fdfc9a42385cdd3657c68a62d5..2f2d3cc207b9df16f2bf2bf0f0a30258e7053e66 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/common.scss +++ b/wp-content/plugins/nextgen-gallery/freemius/assets/scss/admin/common.scss @@ -137,4 +137,24 @@ span.fs-submenu-item.fs-sub:before // Add small RTL arrow. content: '\21B2'; } +} + +.fs-submenu-item +{ + &.pricing + { + &.upgrade-mode + { + color: greenyellow; + } + + &.trial-mode + { + color: #83e2ff; + } + } +} + +#adminmenu .update-plugins.fs-trial { + background-color: #00b9eb; } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/config.php b/wp-content/plugins/nextgen-gallery/freemius/config.php index 4c4504f9689d2c9dbae8bb43144cb6a4908aaf61..fb81b1b0f2273613bae9f06ac4fd4fa21d2bff93 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/config.php +++ b/wp-content/plugins/nextgen-gallery/freemius/config.php @@ -10,14 +10,17 @@ exit; } - define( 'WP_FS__SLUG', 'freemius' ); + if ( ! defined( 'WP_FS__SLUG' ) ) { + define( 'WP_FS__SLUG', 'freemius' ); + } if ( ! defined( 'WP_FS__DEV_MODE' ) ) { define( 'WP_FS__DEV_MODE', false ); } - /** - * API Connectivity Simulation - */ + #-------------------------------------------------------------------------------- + #region API Connectivity Issues Simulation + #-------------------------------------------------------------------------------- + if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) { define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false ); } @@ -40,6 +43,8 @@ define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true ); } + #endregion + if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) { define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false ); } @@ -87,18 +92,36 @@ } - /** - * Directories - */ - define( 'WP_FS__DIR', dirname( __FILE__ ) ); - define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' ); - define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' ); - define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' ); - define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' ); - define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' ); - define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' ); - define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' ); + #-------------------------------------------------------------------------------- + #region Directories + #-------------------------------------------------------------------------------- + if ( ! defined( 'WP_FS__DIR' ) ) { + define( 'WP_FS__DIR', dirname( __FILE__ ) ); + } + if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) { + define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' ); + } + if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) { + define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' ); + } + if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) { + define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' ); + } + if ( ! defined( 'WP_FS__DIR_CSS' ) ) { + define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' ); + } + if ( ! defined( 'WP_FS__DIR_JS' ) ) { + define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' ); + } + if ( ! defined( 'WP_FS__DIR_IMG' ) ) { + define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' ); + } + if ( ! defined( 'WP_FS__DIR_SDK' ) ) { + define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' ); + } + + #endregion /** * Domain / URL / Address @@ -117,42 +140,87 @@ define( 'WP_FS__TESTING_DOMAIN', 'fswp' ); } - if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) { - define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' ); + #-------------------------------------------------------------------------------- + #region HTTP + #-------------------------------------------------------------------------------- + + if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) { + define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) ); } - if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) { - define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' ); + + if ( ! defined( 'WP_FS__IS_HTTPS' ) ) { + define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST && + // Checks if CloudFlare's HTTPS (Flexible SSL support). + isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && + 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) + ) || + // Check if HTTPS request. + ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) || + ( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] ) + ); + } + + if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) { + define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST && + strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) ); + } + + if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) { + define( 'WP_FS__REMOTE_ADDR', fs_get_ip() ); + } + + if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) { + if ( defined( 'WP_FS__LOCALHOST_IP' ) ) { + define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) ); + } else { + define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST && + is_string( WP_FS__REMOTE_ADDR ) && + ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' || + WP_FS__REMOTE_ADDR === '::1' ) + ); + } + } + + if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) { + define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST || + false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) ); } - define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) ); - define( 'WP_FS__REMOTE_ADDR', fs_get_ip() ); + #endregion if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) { // By default, run with Freemius production servers. define( 'WP_FS__IS_PRODUCTION_MODE', true ); } - define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) ); - - if ( defined( 'WP_FS__LOCALHOST_IP' ) ) { - define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) ); - } else { - define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST && - is_string( WP_FS__REMOTE_ADDR ) && - ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' || - WP_FS__REMOTE_ADDR === '::1' ) - ); + if ( ! defined( 'WP_FS__ADDRESS' ) ) { + define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) ); } - define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST || - false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) ); + + #-------------------------------------------------------------------------------- + #region API + #-------------------------------------------------------------------------------- + + if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) { + define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' ); + } + if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) { + define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' ); + } // Set API address for local testing. if ( ! WP_FS__IS_PRODUCTION_MODE ) { - define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST ); - define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST ); + if ( ! defined( 'FS_API__ADDRESS' ) ) { + define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST ); + } + if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) { + define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST ); + } } + #endregion + define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' ); if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) { @@ -163,17 +231,6 @@ } define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' ); - define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST && - // Checks if CloudFlare's HTTPS (Flexible SSL support). - isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) || - // Check if HTTPS request. - ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) || - ( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] ) - ); - - define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST && - strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) ); - /** * Billing Frequencies */ @@ -191,14 +248,21 @@ /** * Times in seconds */ - define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 ); - define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 ); + if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) { + define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 ); + } + if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) { + define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 ); + } // define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 ); - define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 ); + if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) { + define( 'WP_FS__TIME_24_HOURS_IN_SEC', 86400 ); + } + + #-------------------------------------------------------------------------------- + #region Debugging + #-------------------------------------------------------------------------------- - /** - * Debugging - */ if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) { $debug_mode = get_option( 'fs_debug_mode', null ); @@ -210,20 +274,28 @@ define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE ); } - define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) ); - define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-n-d H:i:s' ); + if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) { + define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) ); + } + if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) { + define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' ); + } if ( ! defined( 'FS_API__LOGGER_ON' ) ) { define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK ); } if ( WP_FS__ECHO_DEBUG_SDK ) { error_reporting( E_ALL ); - ini_set( 'error_reporting', E_ALL ); - ini_set( 'display_errors', true ); - ini_set( 'html_errors', true ); } + #endregion - define( 'WP_FS__SCRIPT_START_TIME', time() ); - define( 'WP_FS__DEFAULT_PRIORITY', 10 ); - define( 'WP_FS__LOWEST_PRIORITY', 999999999 ); + if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) { + define( 'WP_FS__SCRIPT_START_TIME', time() ); + } + if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) { + define( 'WP_FS__DEFAULT_PRIORITY', 10 ); + } + if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) { + define( 'WP_FS__LOWEST_PRIORITY', 999999999 ); + } diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius-abstract.php b/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius-abstract.php index d8a89c928e5778e16361f9c2b71930184ba5e068..bca00c16868e94d128895f0988bf33b41e9ac8cc 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius-abstract.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius-abstract.php @@ -22,7 +22,9 @@ */ abstract class Freemius_Abstract { - #region Identity ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Identity + #---------------------------------------------------------------------------------- /** * Check if user registered with Freemius by connecting his account. @@ -50,9 +52,73 @@ */ abstract function is_activation_mode(); - #endregion Identity ------------------------------------------------------------------ + #endregion - #region Permissions ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Usage Tracking + #---------------------------------------------------------------------------------- + + /** + * Returns TRUE if the user opted-in and didn't disconnect (opt-out). + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + * + * @return bool + */ + abstract function is_tracking_allowed(); + + /** + * Returns TRUE if the user never opted-in or manually opted-out. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @return bool + */ + function is_tracking_prohibited() { + return ! $this->is_registered() || ! $this->is_tracking_allowed(); + } + + /** + * Opt-out from usage tracking. + * + * Note: This will not delete the account information but will stop all tracking. + * + * Returns: + * 1. FALSE - If the user never opted-in. + * 2. TRUE - If successfully opted-out. + * 3. object - API Result on failure. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + * + * @return bool|object + */ + abstract function stop_tracking(); + + /** + * Opt-in back into usage tracking. + * + * Note: This will only work if the user opted-in previously. + * + * Returns: + * 1. FALSE - If the user never opted-in. + * 2. TRUE - If successfully opted-in back to usage tracking. + * 3. object - API result on failure. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + * + * @return bool|object + */ + abstract function allow_tracking(); + + #endregion + + #---------------------------------------------------------------------------------- + #region Permissions + #---------------------------------------------------------------------------------- /** * Check if plugin must be WordPress.org compliant. @@ -75,7 +141,7 @@ return ( $this->is_premium() || ! $this->is_org_repo_compliant() ); } - #endregion Permissions ------------------------------------------------------------------ + #endregion /** * Check if user in trial or in free plan (not paying). @@ -119,7 +185,9 @@ */ abstract function can_use_premium_code(); - #region Premium Only ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Premium Only + #---------------------------------------------------------------------------------- /** * All logic wrapped in methods with "__premium_only()" suffix will be only @@ -225,9 +293,11 @@ return $this->is_premium() && $this->can_use_premium_code(); } - #endregion Premium Only ------------------------------------------------------------------ + #endregion - #region Trial ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Trial + #---------------------------------------------------------------------------------- /** * Check if the user in a trial. @@ -247,9 +317,11 @@ */ abstract function is_trial_utilized(); - #endregion Trial ------------------------------------------------------------------ + #endregion - #region Plans ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Plans + #---------------------------------------------------------------------------------- /** * Check if plugin using the free plan. @@ -344,7 +416,7 @@ $this->has_free_plan(); } - #endregion Plans ------------------------------------------------------------------ + #endregion /** * Check if running payments in sandbox mode. @@ -407,7 +479,9 @@ */ abstract function is_plugin_new_install(); - #region Marketing ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Marketing + #---------------------------------------------------------------------------------- /** * Check if current user purchased any other plugins before. @@ -449,5 +523,5 @@ */ abstract function is_business(); - #endregion ------------------------------------------------------------------ + #endregion } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius.php b/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius.php index 034f2dac5961d687b76f8b803a5801e9bc9dd3f2..44aff2115debd87138157c2b88a444d5f6afb831 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/class-freemius.php @@ -114,6 +114,19 @@ */ private $_has_paid_plans; + /** + * @since 1.2.1.5 + * @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but + * without a specified period, if positive - the number of trial days. + */ + private $_trial_days = - 1; + + /** + * @since 1.2.1.5 + * @var bool Hints the SDK if the trial requires a payment method or not. + */ + private $_is_trial_require_payment = false; + /** * @since 1.0.7 * @var bool Hints the SDK if the plugin is WordPress.org compliant. @@ -227,7 +240,8 @@ */ private static $_instances = array(); - // Reason IDs + #region Uninstall Reasons IDs + const REASON_NO_LONGER_NEEDED = 1; const REASON_FOUND_A_BETTER_PLUGIN = 2; const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3; @@ -244,6 +258,8 @@ const REASON_DIDNT_WORK_AS_EXPECTED = 14; const REASON_TEMPORARY_DEACTIVATION = 15; + #endregion + /* Ctor ------------------------------------------------------------------------------------------------------------------*/ @@ -447,12 +463,25 @@ * @since 1.0.9 */ private function _register_hooks() { + $this->_logger->entrance(); + if ( is_admin() ) { - // Hook to plugin activation - register_activation_hook( $this->_plugin_main_file_path, array( - &$this, - '_activate_plugin_event_hook' - ) ); + $plugin_dir = dirname( $this->_plugin_dir_path ) . '/'; + + /** + * @since 1.2.2 + * + * Hook to both free and premium version activations to support + * auto deactivation on the other version activation. + */ + register_activation_hook( + $plugin_dir . $this->_free_plugin_basename, + array( &$this, '_activate_plugin_event_hook' ) + ); + register_activation_hook( + $plugin_dir . $this->premium_plugin_basename(), + array( &$this, '_activate_plugin_event_hook' ) + ); /** * Part of the mechanism to identify new plugin install vs. plugin update. @@ -481,9 +510,29 @@ add_action( 'init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY ); + add_action( 'admin_init', array( &$this, '_add_tracking_links' ) ); + add_action( 'admin_init', array( &$this, '_add_license_activation' ) ); + $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) ); + $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) ); + $this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) ); $this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 ); + + add_action( 'admin_init', array( &$this, '_add_trial_notice' ) ); + add_action( 'admin_init', array( &$this, '_enqueue_common_css' ) ); + + /** + * Handle request to reset anonymous mode for `get_reconnect_url()`. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + */ + if ( fs_request_is_action( 'reset_anonymous_mode' ) && + $this->_slug === fs_request_get( 'fs_slug' ) + ) { + add_action( 'admin_init', array( &$this, 'connect_again' ) ); + } } /** @@ -514,11 +563,15 @@ return; } + $plugin_main_file = clone $this->_storage->plugin_main_file; + // Store cached path (2nd layer cache). - $this->_storage->plugin_main_file->prev_path = $this->_storage->plugin_main_file->path; + $plugin_main_file->prev_path = $plugin_main_file->path; // Clear cached path. - unset( $this->_storage->plugin_main_file->path ); + unset( $plugin_main_file->path ); + + $this->_storage->plugin_main_file = $plugin_main_file; } /** @@ -527,21 +580,6 @@ */ private function _register_account_hooks() { if ( is_admin() ) { - if ( ! $this->is_ajax() ) { - if ( $this->apply_filters( 'show_trial', true ) && $this->has_trial_plan() ) { - $last_time_trial_promotion_shown = $this->_storage->get( 'trial_promotion_shown', false ); - if ( ! $this->_site->is_trial_utilized() && - ( - // Show promotion if never shown it yet and 24 hours after initial activation. - ( false === $last_time_trial_promotion_shown && $this->_storage->activation_timestamp < ( time() - WP_FS__TIME_24_HOURS_IN_SEC ) ) || - // Show promotion in every 30 days. - ( is_numeric( $last_time_trial_promotion_shown ) && 30 * WP_FS__TIME_24_HOURS_IN_SEC < time() - $last_time_trial_promotion_shown ) ) - ) { - $this->add_action( 'after_init_plugin_registered', array( &$this, '_add_trial_notice' ) ); - } - } - } - // If user is paying or in trial and have the free version installed, // assume that the deactivation is for the upgrade process. if ( ! $this->is_paying_or_trial() || $this->is_premium() ) { @@ -550,8 +588,7 @@ array( &$this, '_submit_uninstall_reason_action' ) ); - global $pagenow; - if ( 'plugins.php' === $pagenow ) { + if ( $this->is_plugins_page() ) { add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) ); } } @@ -579,7 +616,8 @@ private function _find_caller_plugin_file( $is_init = false ) { // Try to load the cached value of the file path. if ( isset( $this->_storage->plugin_main_file ) ) { - if ( file_exists( $this->_storage->plugin_main_file->path ) ) { + $plugin_main_file = $this->_storage->plugin_main_file; + if ( isset( $plugin_main_file->path ) && file_exists( $plugin_main_file->path ) ) { return $this->_storage->plugin_main_file->path; } } @@ -627,7 +665,9 @@ } - #region Deactivation Feedback Form ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Deactivation Feedback Form + #---------------------------------------------------------------------------------- /** * Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins @@ -873,9 +913,11 @@ exit; } - #endregion Deactivation Feedback Form ------------------------------------------------------------------ + #endregion - #region Instance ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Instance + #---------------------------------------------------------------------------------- /** * Main singleton instance. @@ -1164,6 +1206,10 @@ self::$_statics_loaded = true; } + #---------------------------------------------------------------------------------- + #region Localization + #---------------------------------------------------------------------------------- + /** * Load framework's text domain. * @@ -1186,7 +1232,11 @@ // @todo Load for themes. } - #region Debugging ------------------------------------------------------------------ + #endregion + + #---------------------------------------------------------------------------------- + #region Debugging + #---------------------------------------------------------------------------------- /** * @author Vova Feldman (@svovaf) @@ -1247,10 +1297,22 @@ if ( fs_request_is_action( 'restart_freemius' ) ) { check_admin_referer( 'restart_freemius' ); + // Clear accounts data. self::$_accounts->clear( true ); + // Clear SDK reference cache. + delete_option( 'fs_active_plugins' ); + } else if ( fs_request_is_action( 'simulate_trial' ) ) { + check_admin_referer( 'simulate_trial' ); - return; + $slug = fs_request_get( 'slug' ); + + $fs = freemius( $slug ); + + // Update SDK install to at least 24 hours before. + $fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC ); + // Unset the trial shown timestamp. + unset( $fs->_storage->trial_promotion_shown ); } } @@ -1282,9 +1344,11 @@ fs_require_once_template( 'debug.php', $vars ); } - #endregion ------------------------------------------------------------------ + #endregion - #region Connectivity Issues ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Connectivity Issues + #---------------------------------------------------------------------------------- /** * Check if Freemius should be turned on for the current plugin install. @@ -1427,8 +1491,11 @@ $this->_has_api_connection = $this->_storage->connectivity_test['is_connected']; /** * @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration. + * + * @since 1.2.1.5 If the user running the premium version then ignore the 'is_active' flag and turn Freemius on to enable license key activation. */ $this->_is_on = $this->_storage->connectivity_test['is_active'] || + $this->is_premium() || ( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF ); return $this->_has_api_connection; @@ -1565,8 +1632,8 @@ * @param bool $is_first_failure */ function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) { - if ( $this->_enable_anonymous ) { - // Don't add message if can run anonymously. + if ( ! $this->is_premium() && $this->_enable_anonymous ) { + // Don't add message if it's the free version and can run anonymously. return; } @@ -1879,9 +1946,11 @@ fs_require_once_template( 'firewall-issues-js.php', $params ); } - #endregion Connectivity Issues ------------------------------------------------------------------ + #endregion - #region Email ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Email + #---------------------------------------------------------------------------------- /** * Generates and sends an HTML email with customizable sections. @@ -2030,9 +2099,11 @@ return $sections; } - #endregion Email ------------------------------------------------------------------ + #endregion - #region Initialization ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Initialization + #---------------------------------------------------------------------------------- /** * Init plugin's Freemius instance. @@ -2086,7 +2157,7 @@ if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) || $this->_admin_notices->has_sticky( 'failed_connect_api' ) ) { - if ( ! $this->_enable_anonymous ) { + if ( ! $this->_enable_anonymous || $this->is_premium() ) { // If anonymous mode is disabled, add firewall admin-notice message. add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) ); @@ -2138,7 +2209,7 @@ * */ if ( $this->is_registered() ) { - if ( ! $this->is_sync_cron_on() ) { + if ( ! $this->is_sync_cron_on() && $this->is_tracking_allowed() ) { $this->schedule_sync_cron(); } } @@ -2167,8 +2238,7 @@ } if ( $this->is_user_in_admin() ) { - global $pagenow; - if ( 'plugins.php' === $pagenow ) { + if ( $this->is_plugins_page() ) { $this->hook_plugin_action_links(); } @@ -2269,26 +2339,168 @@ $this->do_action( 'after_init_addon_pending_activations' ); } } + } + + /** + * @author Leo Fajardo (@leorw) + * + * @since 1.2.1.5 + */ + function _stop_tracking_callback() { + $result = $this->stop_tracking(); + + if ( true === $result ) { + $this->shoot_ajax_success(); + } - // Add license activation link and AJAX request handler. - if ( $this->has_paid_plan() ) { - global $pagenow; - if ( 'plugins.php' === $pagenow ) { - /** - * @since 1.2.0 Add license action link only on plugins page. - */ - $this->_add_license_action_link(); - $this->_require_license_activation_dialog(); - } + $this->_logger->api_error( $result ); - if ( $this->is_ajax_action( array( - 'activate_license', - 'resend_license_key' - ) ) - ) { - // Hook license activation and resend AJAX callbacks. - $this->_require_license_activation_dialog(); - } + $this->shoot_ajax_failure( + __fs( 'unexpected-api-error', $this->_slug ) . + ( $this->is_api_error( $result ) && isset( $result->error ) ? + $result->error->message : + var_export( $result, true ) ) + ); + } + + /** + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + */ + function _allow_tracking_callback() { + $result = $this->allow_tracking(); + + if ( true === $result ) { + $this->shoot_ajax_success(); + } + + $this->_logger->api_error( $result ); + + $this->shoot_ajax_failure( + __fs( 'unexpected-api-error', $this->_slug ) . + ( $this->is_api_error( $result ) && isset( $result->error ) ? + $result->error->message : + var_export( $result, true ) ) + ); + } + + /** + * Opt-out from usage tracking. + * + * Note: This will not delete the account information but will stop all tracking. + * + * Returns: + * 1. FALSE - If the user never opted-in. + * 2. TRUE - If successfully opted-out. + * 3. object - API result on failure. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + * + * @return bool|object + */ + function stop_tracking() { + $this->_logger->entrance(); + + if ( ! $this->is_registered() ) { + // User never opted-in. + return false; + } + + if ( $this->is_tracking_prohibited() ) { + // Already disconnected. + return true; + } + + // Send update to FS. + $result = $this->get_api_site_scope()->call( '/?fields=is_disconnected', 'put', array( + 'is_disconnected' => true + ) ); + + if ( ! $this->is_api_result_entity( $result ) || + ! isset( $result->is_disconnected ) || + ! $result->is_disconnected + ) { + $this->_logger->api_error( $result ); + + return $result; + } + + $this->_site->is_disconnected = $result->is_disconnected; + $this->_store_site(); + + $this->clear_sync_cron(); + + // Successfully disconnected. + return true; + } + + /** + * Opt-in back into usage tracking. + * + * Note: This will only work if the user opted-in previously. + * + * Returns: + * 1. FALSE - If the user never opted-in. + * 2. TRUE - If successfully opted-in back to usage tracking. + * 3. object - API result on failure. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + * + * @return bool|object + */ + function allow_tracking() { + $this->_logger->entrance(); + + if ( ! $this->is_registered() ) { + // User never opted-in. + return false; + } + + if ( $this->is_tracking_allowed() ) { + // Tracking already allowed. + return true; + } + + $result = $this->get_api_site_scope()->call( '/?is_disconnected', 'put', array( + 'is_disconnected' => false + ) ); + + if ( ! $this->is_api_result_entity( $result ) || + ! isset( $result->is_disconnected ) || + $result->is_disconnected + ) { + $this->_logger->api_error( $result ); + + return $result; + } + + $this->_site->is_disconnected = $result->is_disconnected; + $this->_store_site(); + + $this->schedule_sync_cron(); + + // Successfully reconnected. + return true; + } + + /** + * If user opted-in and later disabled usage-tracking, + * re-allow tracking for licensing and updates. + * + * @author Leo Fajardo (@leorw) + * + * @since 1.2.1.5 + */ + private function reconnect_locally() { + $this->_logger->entrance(); + + if ( $this->is_tracking_prohibited() && + $this->is_registered() + ) { + $this->_site->is_disconnected = false; + $this->_store_site(); } } @@ -2323,7 +2535,7 @@ $parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null ); // $parent_slug = $this->get_option( $plugin_info['parent'], 'slug', null ); // $parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null ); - $parent_name = $this->get_option( $plugin_info['parent'], 'name', null ); +// $parent_name = $this->get_option( $plugin_info['parent'], 'name', null ); } if ( false === $id ) { @@ -2382,6 +2594,17 @@ $this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false ); } $this->_permissions = $this->get_option( $plugin_info, 'permissions', array() ); + + if ( ! empty( $plugin_info['trial'] ) ) { + $this->_trial_days = $this->get_numeric_option( + $plugin_info['trial'], + 'days', + // Default to 0 - trial without days specification. + 0 + ); + + $this->_is_trial_require_payment = $this->get_bool_option( $plugin_info['trial'], 'is_require_payment', false ); + } } /** @@ -2503,11 +2726,9 @@ function _plugin_code_type_changed() { $this->_logger->entrance(); - // Schedule code type changes event. -// $this->sync_install(); - $this->schedule_install_sync(); - if ( $this->is_premium() ) { + $this->reconnect_locally(); + // Activated premium code. $this->do_action( 'after_premium_version_activation' ); @@ -2516,6 +2737,7 @@ 'trial_started', 'plan_upgraded', 'plan_changed', + 'license_activated', ) ); $this->_admin_notices->add_sticky( @@ -2542,6 +2764,9 @@ } } + // Schedule code type changes event. + $this->schedule_install_sync(); + /** * Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid * triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version @@ -2559,9 +2784,11 @@ $this->_storage->prev_is_premium = $this->_plugin->is_premium; } - #endregion Initialization ------------------------------------------------------------------ + #endregion - #region Add-ons ------------------------------------------------------------------------- + #---------------------------------------------------------------------------------- + #region Add-ons + #---------------------------------------------------------------------------------- /** * Check if add-on installed and activated on site. @@ -2758,8 +2985,8 @@ $this->_parent->_admin_notices->add_sticky( sprintf( __fs( ( $is_after_trial_cancel ? - 'addon-trial-cancelled-message' : - 'addon-no-license-message' ), + 'addon-trial-cancelled-message' : + 'addon-no-license-message' ), $this->_parent->_slug ), '<b>' . $this->_plugin->title . '</b>' @@ -2781,9 +3008,11 @@ return false; } - #endregion ------------------------------------------------------------------ + #endregion - #region Sandbox ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Sandbox + #---------------------------------------------------------------------------------- /** * Set Freemius into sandbox mode for debugging. @@ -2812,7 +3041,7 @@ return ( ! $this->is_live() ) || isset( $this->_plugin->secret_key ); } - #endregion Sandbox ------------------------------------------------------------------ + #endregion /** * Check if running test vs. live plugin. @@ -2877,7 +3106,9 @@ return $this->_is_org_compliant; } - #region Daily Sync Cron ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Daily Sync Cron + #---------------------------------------------------------------------------------- /** * @author Vova Feldman (@svovaf) @@ -3061,7 +3292,9 @@ #endregion Daily Sync Cron ------------------------------------------------------------------ - #region Async Install Sync ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Async Install Sync + #---------------------------------------------------------------------------------- /** * @author Vova Feldman (@svovaf) @@ -3186,8 +3419,9 @@ * @since 1.0.7 * * @param bool|string $email + * @param bool $is_pending_trial Since 1.2.1.5 */ - function _add_pending_activation_notice( $email = false ) { + function _add_pending_activation_notice( $email = false, $is_pending_trial = false ) { if ( ! is_string( $email ) ) { $current_user = self::_get_current_wp_user(); $email = $current_user->user_email; @@ -3197,7 +3431,8 @@ sprintf( __fs( 'pending-activation-message', $this->_slug ), '<b>' . $this->get_plugin_name() . '</b>', - '<b>' . $email . '</b>' + '<b>' . $email . '</b>', + __fs( $is_pending_trial ? 'start-the-trial' : 'complete-the-install', $this->_slug ) ), 'activation_pending', 'Thanks!' @@ -3244,9 +3479,7 @@ $this->skip_connection(); - if ( fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) ) ) { - exit(); - } + fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) ); } if ( ! $this->is_addon() && ! $this->is_registered() && ! $this->is_anonymous() ) { @@ -3335,11 +3568,11 @@ jQuery(document).ready(function ($) { if ('undefined' !== typeof(jQuery().pointer)) { - var element = <?php echo $this->apply_filters('optin_pointer_element', '$("#non_existing_element");') ?>; + var element = <?php echo $this->apply_filters( 'optin_pointer_element', '$("#non_existing_element");' ) ?>; if (element.length > 0) { var optin = $(element).pointer($.extend(true, {}, { - content : <?php echo json_encode($pointer_content) ?>, + content : <?php echo json_encode( $pointer_content ) ?>, position : { edge : 'left', align: 'center' @@ -3349,10 +3582,10 @@ return ''; }, pointerWidth: 482 - }, <?php echo $this->apply_filters('optin_pointer_options_json', '{}') ?>)); + }, <?php echo $this->apply_filters( 'optin_pointer_options_json', '{}' ) ?>)); <?php - echo $this->apply_filters('optin_pointer_execute', " + echo $this->apply_filters( 'optin_pointer_execute', " optin.pointer('open'); @@ -3361,12 +3594,12 @@ .parents('.wp-pointer.wp-pointer-top') .addClass('fs-opt-in-pointer'); - ", 'element', 'optin') ?> + ", 'element', 'optin' ) ?> } } }); // ]]></script> - <?php + <?php } /** @@ -3482,6 +3715,18 @@ $this->_storage->is_plugin_new_install; } + /** + * Check if it's the first plugin release that is running Freemius. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @return bool + */ + function is_first_freemius_powered_version() { + return empty( $this->_storage->plugin_last_version ); + } + /** * Plugin activated hook. * @@ -3503,17 +3748,32 @@ FS_Api::clear_cache(); if ( $this->is_registered() ) { + $this->reconnect_locally(); + // Schedule re-activation event and sync. // $this->sync_install( array(), true ); $this->schedule_install_sync(); + $is_premium_version_activation = ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ); + + // 1. If running in the activation of the FREE module, get the basename of the PREMIUM. + // 2. If running in the activation of the PREMIUM module, get the basename of the FREE. + $other_version_basename = $is_premium_version_activation ? + $this->_free_plugin_basename : + $this->premium_plugin_basename(); + /** - * @todo Work on automatic deactivation of the Free plugin version. It doesn't work since the slug of the free & premium versions is identical. Therefore, only one instance of Freemius is created and the activation hook of the premium version is not being added. + * If the other module version is activate, deactivate it. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.2 */ - if ( $this->_plugin_basename !== $this->_free_plugin_basename ) { - // Deactivate Free plugin version on premium plugin activation. - deactivate_plugins( $this->_free_plugin_basename ); + if ( is_plugin_active( $other_version_basename ) ) { + deactivate_plugins( $other_version_basename ); + } + // If activating the premium module version, add an admin noitce to congratulate for an upgrade completion. + if ( $is_premium_version_activation ) { $this->_admin_notices->add( sprintf( __fs( 'successful-version-upgrade-message', $this->_slug ), sprintf( '<b>%s</b>', $this->_plugin->title ) ), __fs( 'woot', $this->_slug ) . '!' @@ -3724,9 +3984,7 @@ $this->reset_anonymous_mode(); - if ( fs_redirect( $this->get_activation_url() ) ) { - exit(); - } + fs_redirect( $this->get_activation_url() ); } /** @@ -4052,11 +4310,13 @@ 'language' => get_bloginfo( 'language' ), 'charset' => get_bloginfo( 'charset' ), 'platform_version' => get_bloginfo( 'version' ), + 'sdk_version' => $this->version, 'programming_language_version' => phpversion(), 'title' => get_bloginfo( 'name' ), 'url' => get_site_url(), // Special params. 'is_active' => true, + 'is_disconnected' => $this->is_tracking_prohibited(), 'is_uninstalled' => false, ), $override ); } @@ -4086,7 +4346,7 @@ foreach ( $check_properties as $p => $v ) { if ( property_exists( $this->_site, $p ) ) { - if ( ! empty( $this->_site->{$p} ) && + if ( ( is_bool( $this->_site->{$p} ) || ! empty( $this->_site->{$p} ) ) && $this->_site->{$p} != $v ) { $this->_site->{$p} = $v; @@ -4122,7 +4382,7 @@ // Send updated values to FS. $site = $this->get_api_site_scope()->call( '/', 'put', $params ); - if ( ! $this->is_api_error( $site ) ) { + if ( $this->is_api_result_entity( $site ) ) { // I successfully sent install update, clear scheduled sync if exist. $this->clear_install_sync_cron(); } @@ -4141,8 +4401,6 @@ * * @param string[] string $override * @param bool $flush - * - * @return false|object|string */ private function sync_install( $override = array(), $flush = false ) { $this->_logger->entrance(); @@ -4154,7 +4412,7 @@ return; } - if ( $this->is_api_error( $site ) ) { + if ( ! $this->is_api_result_entity( $site ) ) { // Failed to sync, don't update locally. return; } @@ -4345,7 +4603,9 @@ } } - #region Plugin Information ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Plugin Information + #---------------------------------------------------------------------------------- /** * Load WordPress core plugin.php essential module. @@ -4355,6 +4615,8 @@ */ private static function require_plugin_essentials() { if ( ! function_exists( 'get_plugins' ) ) { + self::$_static_logger->log( 'Including wp-admin/includes/plugin.php...' ); + require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); } } @@ -4419,6 +4681,28 @@ return $this->_plugin->id; } + /** + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @return string Freemius SDK version + */ + function get_sdk_version() { + return $this->version; + } + + /** + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @return number Parent plugin ID (if parent exist). + */ + function get_parent_id() { + return $this->is_addon() ? + $this->get_parent_instance()->get_id() : + $this->_plugin->id; + } + /** * @author Vova Feldman (@svovaf) * @since 1.0.1 @@ -4643,7 +4927,7 @@ * @author Vova Feldman (@svovaf) * @since 1.0.6 * - * @return FS_Plugin[]|false + * @return array<number,FS_Plugin[]>|false */ private static function get_all_addons() { $addons = self::$_accounts->get_option( 'addons', array() ); @@ -4682,6 +4966,18 @@ return is_object( $this->_user ); } + /** + * Returns TRUE if the user opted-in and didn't disconnect (opt-out). + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + * + * @return bool + */ + function is_tracking_allowed() { + return ( is_object( $this->_site ) && true !== $this->_site->is_disconnected ); + } + /** * @author Vova Feldman (@svovaf) * @since 1.0.4 @@ -4720,16 +5016,18 @@ * * @since 1.1.7.3 If not yet loaded, fetch data from the API. * + * @param bool $flush + * * @return FS_Plugin[]|false */ - function get_addons() { + function get_addons( $flush = false ) { $this->_logger->entrance(); if ( ! $this->_has_addons ) { return false; } - $addons = $this->_sync_addons(); + $addons = $this->_sync_addons( $flush ); return ( ! is_array( $addons ) || empty( $addons ) ) ? false : @@ -4807,12 +5105,14 @@ * * @param string $slug * + * @param bool $flush + * * @return FS_Plugin|false */ - function get_addon_by_slug( $slug ) { + function get_addon_by_slug( $slug, $flush = false ) { $this->_logger->entrance(); - $addons = $this->get_addons(); + $addons = $this->get_addons( $flush ); if ( is_array( $addons ) ) { foreach ( $addons as $addon ) { @@ -4825,7 +5125,9 @@ return false; } - #region Plans & Licensing ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Plans & Licensing + #---------------------------------------------------------------------------------- /** * Check if running premium plugin code. @@ -4867,10 +5169,12 @@ * @author Vova Feldman (@svovaf) * @since 1.0.9 * - * @return FS_Plugin_Plan + * @return FS_Plugin_Plan|false */ function get_plan() { - return is_object( $this->_site->plan ) ? $this->_site->plan : false; + return is_object( $this->_site->plan ) ? + $this->_site->plan : + false; } /** @@ -5018,7 +5322,7 @@ * @author Vova Feldman (@svovaf) * @since 1.0.5 * - * @return FS_Plugin_License + * @return FS_Plugin_License|false */ function _get_available_premium_license() { $this->_logger->entrance(); @@ -5048,7 +5352,8 @@ */ function _sync_plans() { $plans = $this->_fetch_plugin_plans(); - if ( ! $this->is_api_error( $plans ) ) { + + if ( $this->is_array_instanceof( $plans, 'FS_Plugin_Plan' ) ) { $this->_plans = $plans; $this->_store_plans(); } @@ -5064,7 +5369,7 @@ * * @param number $id * - * @return FS_Plugin_Plan + * @return FS_Plugin_Plan|false */ function _get_plan_by_id( $id ) { $this->_logger->entrance(); @@ -5118,7 +5423,8 @@ */ function _sync_licenses( $site_license_id = false ) { $licenses = $this->_fetch_licenses( false, $site_license_id ); - if ( ! $this->is_api_error( $licenses ) ) { + + if ( $this->is_array_instanceof( $licenses, 'FS_Plugin_License' ) ) { $this->_licenses = $licenses; $this->_store_licenses(); } @@ -5137,7 +5443,7 @@ * * @param number $id * - * @return FS_Plugin_License + * @return FS_Plugin_License|false */ function _get_license_by_id( $id ) { $this->_logger->entrance(); @@ -5362,6 +5668,17 @@ */ function has_trial_plan() { if ( ! $this->is_registered() ) { + /** + * @author Vova Feldman(@svovaf) + * @since 1.2.1.5 + * + * Allow setting a trial from the SDK without calling the API. + * But, if the user did opt-in, continue using the real data from the API. + */ + if ( $this->_trial_days >= 0 ) { + return true; + } + return false; } @@ -5379,9 +5696,7 @@ * @return bool */ function has_free_plan() { - return ! $this->is_premium() || - ! $this->is_only_premium() || - FS_Plan_Manager::instance()->has_free_plan( $this->_plans ); + return ! $this->is_only_premium(); } /** @@ -5401,30 +5716,56 @@ fs_require_template( 'forms/resend-key.php', $vars ); } + /** + * Displays the opt-out dialog box when the user clicks on the "Opt Out" link on the "Plugins" + * page. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + */ + function _add_optout_dialog() { + $vars = array( + 'slug' => $this->_slug, + ); + + fs_require_template( 'forms/optout.php', $vars ); + } + /** * Prepare page to include all required UI and logic for the license activation dialog. * * @author Vova Feldman (@svovaf) * @since 1.2.0 */ - function _require_license_activation_dialog() { - if ( $this->is_ajax() ) { - if ( $this->is_ajax_action( 'activate_license' ) ) { - // Add license activation AJAX callback. - $this->add_ajax_action( 'activate_license', array( &$this, '_activate_license_ajax_action' ) ); - } + function _add_license_activation() { + if ( ! current_user_can( 'activate_plugins' ) ) { + // Only admins can activate a license. + return; + } - if ( $this->is_ajax_action( 'resend_license_key' ) ) { - // Add resend license AJAX callback. - $this->add_ajax_action( 'resend_license_key', array( - &$this, - '_resend_license_key_ajax_action' - ) ); - } - } else { - // Inject license activation dialog UI and client side code. - add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) ); + if ( ! $this->has_paid_plan() ) { + // Module doesn't have any paid plans. + return; + } + + if ( ! $this->is_premium() ) { + // Only add license activation logic to the premium version. + return; + } + + // Add license activation link and AJAX request handler. + if ( $this->is_plugins_page() ) { + /** + * @since 1.2.0 Add license action link only on plugins page. + */ + $this->_add_license_action_link(); } + + // Add license activation AJAX callback. + $this->add_ajax_action( 'activate_license', array( &$this, '_activate_license_ajax_action' ) ); + + // Add resend license AJAX callback. + $this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) ); } /** @@ -5438,26 +5779,33 @@ exit; } - $slug = $_POST['slug']; - $fs = ( ( $slug === $this->_slug ) ? $this : self::instance( $slug ) ); - $error = false; + $slug = $_POST['slug']; + $fs = ( ( $slug === $this->_slug ) ? $this : self::instance( $slug ) ); + $error = false; + $next_page = false; if ( $this->is_registered() ) { $api = $fs->get_api_site_scope(); - $install = $api->call( '/', 'put', - array( - 'license_key' => $license_key - ) - ); + $install = $api->call( '/', 'put', array( + 'license_key' => $this->apply_filters( 'license_key', $license_key ) + ) ); if ( isset( $install->error ) ) { $error = $install->error->message; + } else { + $fs = $this->is_addon() ? + $this->get_parent_instance() : + $this; + + $next_page = $fs->_get_sync_license_url( $this->get_id(), true ); + + $this->reconnect_locally(); } } else { - $install = $this->opt_in( false, false, false, $license_key ); + $next_page = $this->opt_in( false, false, false, $license_key ); - if ( isset( $install->error ) ) { - $error = $install->error; + if ( isset( $next_page->error ) ) { + $error = $next_page->error; } } @@ -5467,6 +5815,8 @@ if ( false !== $error ) { $result['error'] = $error; + } else { + $result['next_page'] = $next_page; } echo json_encode( $result ); @@ -5475,11 +5825,80 @@ } /** - * @author Leo Fajardo (@leorw) - * @since 1.2.0 + * Billing update AJAX callback. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 */ - function _resend_license_key_ajax_action() { - if ( ! isset( $_POST['email'] ) ) { + function _update_billing_ajax_action() { + check_ajax_referer( $this->get_action_tag( 'update_billing' ), 'security' ); + + if ( ! current_user_can( 'activate_plugins' ) ) { + // Only for admins. + $this->shoot_ajax_failure(); + } + + $billing = fs_request_get( 'billing' ); + + $api = $this->get_api_user_scope(); + $result = $api->call( '/billing.json', 'put', array_merge( $billing, array( + 'plugin_id' => $this->get_parent_id(), + ) ) ); + + if ( ! $this->is_api_result_entity( $result ) ) { + $this->shoot_ajax_failure(); + } + + // Purge cached billing. + $this->get_api_user_scope()->purge_cache( 'billing.json' ); + + $this->shoot_ajax_success(); + } + + /** + * Trial start for anonymous users (AJAX callback). + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + */ + function _start_trial_ajax_action() { + check_ajax_referer( $this->get_action_tag( 'start_trial' ), 'security' ); + + if ( ! current_user_can( 'activate_plugins' ) ) { + // Only for admins. + $this->shoot_ajax_failure(); + } + + $trial_data = fs_request_get( 'trial' ); + + $next_page = $this->opt_in( + false, + false, + false, + false, + false, + $trial_data['plan_id'] + ); + + if ( is_object( $next_page ) && $this->is_api_error( $next_page ) ) { + $this->shoot_ajax_failure( + isset( $next_page->error ) ? + $next_page->error->message : + var_export( $next_page, true ) + ); + } + + $this->shoot_ajax_success( array( + 'next_page' => $next_page, + ) ); + } + + /** + * @author Leo Fajardo (@leorw) + * @since 1.2.0 + */ + function _resend_license_key_ajax_action() { + if ( ! isset( $_POST['email'] ) ) { exit; } @@ -5523,7 +5942,23 @@ exit; } + /** + * Helper method to check if user in the plugins page. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @return bool + */ + private function is_plugins_page() { + global $pagenow; + + return ( 'plugins.php' === $pagenow ); + } + + #---------------------------------------------------------------------------------- #region URL Generators + #---------------------------------------------------------------------------------- /** * Alias to pricing_url(). @@ -5904,7 +6339,7 @@ self::require_pluggable_essentials(); return ( $add_action_nonce && is_string( $action ) ) ? - wp_nonce_url( $this->_get_admin_page_url( 'account', $params ), $action ) : + fs_nonce_url( $this->_get_admin_page_url( 'account', $params ), $action ) : $this->_get_admin_page_url( 'account', $params ); } @@ -6099,9 +6534,7 @@ $this->_set_account( $user, $site, $plans ); // Reload the page with the keys. - if ( fs_redirect( $this->_get_admin_page_url() ) ) { - exit(); - } + fs_redirect( $this->_get_admin_page_url() ); } } @@ -6129,7 +6562,9 @@ return false; } - #region Account (Loading, Updates & Activation) ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Account (Loading, Updates & Activation) + #---------------------------------------------------------------------------------- /*** * Load account information (user + site). @@ -6171,7 +6606,7 @@ // Load plans. $this->_plans = $plans[ $this->_slug ]; if ( ! is_array( $this->_plans ) || empty( $this->_plans ) ) { - $this->_sync_plans( true ); + $this->_sync_plans(); } else { for ( $i = 0, $len = count( $this->_plans ); $i < $len; $i ++ ) { if ( $this->_plans[ $i ] instanceof FS_Plugin_Plan ) { @@ -6240,33 +6675,50 @@ $current_user = self::_get_current_wp_user(); - $params = array( - 'user_firstname' => $current_user->user_firstname, - 'user_lastname' => $current_user->user_lastname, - 'user_nickname' => $current_user->user_nicename, - 'user_email' => $current_user->user_email, - 'user_ip' => WP_FS__REMOTE_ADDR, - 'plugin_slug' => $this->_slug, - 'plugin_id' => $this->get_id(), - 'plugin_public_key' => $this->get_public_key(), - 'plugin_version' => $this->get_plugin_version(), - 'return_url' => wp_nonce_url( $this->_get_admin_page_url( + $activation_action = $this->_slug . '_activate_new'; + $return_url = $this->is_anonymous() ? + // If skipped already, then return to the account page. + $this->get_account_url( $activation_action, array(), false ) : + // Return to the module's main page. + $this->_get_admin_page_url( '', - array( 'fs_action' => $this->_slug . '_activate_new' ) - ), $this->_slug . '_activate_new' ), - 'account_url' => wp_nonce_url( $this->_get_admin_page_url( + array( 'fs_action' => $activation_action ) + ); + + $params = array( + 'user_firstname' => $current_user->user_firstname, + 'user_lastname' => $current_user->user_lastname, + 'user_nickname' => $current_user->user_nicename, + 'user_email' => $current_user->user_email, + 'user_ip' => WP_FS__REMOTE_ADDR, + 'plugin_slug' => $this->_slug, + 'plugin_id' => $this->get_id(), + 'plugin_public_key' => $this->get_public_key(), + 'plugin_version' => $this->get_plugin_version(), + 'return_url' => fs_nonce_url( $return_url, $activation_action ), + 'account_url' => fs_nonce_url( $this->_get_admin_page_url( 'account', array( 'fs_action' => 'sync_user' ) ), 'sync_user' ), - 'site_uid' => $this->get_anonymous_id(), - 'site_url' => get_site_url(), - 'site_name' => get_bloginfo( 'name' ), - 'platform_version' => get_bloginfo( 'version' ), - 'php_version' => phpversion(), - 'language' => get_bloginfo( 'language' ), - 'charset' => get_bloginfo( 'charset' ), + 'site_uid' => $this->get_anonymous_id(), + 'site_url' => get_site_url(), + 'site_name' => get_bloginfo( 'name' ), + 'platform_version' => get_bloginfo( 'version' ), + 'sdk_version' => $this->version, + 'programming_language_version' => phpversion(), + 'language' => get_bloginfo( 'language' ), + 'charset' => get_bloginfo( 'charset' ), + 'is_premium' => $this->is_premium(), + 'is_active' => true, + 'is_uninstalled' => false, ); + if ( $this->is_pending_activation() && + ! empty( $this->_storage->pending_license_key ) + ) { + $params['license_key'] = $this->_storage->pending_license_key; + } + if ( WP_FS__SKIP_EMAIL_ACTIVATION && $this->has_secret_key() ) { // Even though rand() is known for its security issues, // the timestamp adds another layer of protection. @@ -6286,6 +6738,9 @@ } /** + * 1. If successful opt-in or pending activation returns the next page that the user should be redirected to. + * 2. If there was an API error, return the API result. + * * @author Vova Feldman (@svovaf) * @since 1.1.7.4 * @@ -6296,9 +6751,9 @@ * @param bool $is_uninstall If "true", this means that the module is currently being uninstalled. * In this case, the user and site info will be sent to the server but no * data will be saved to the WP installation's database. + * @param number|bool $trial_plan_id * - * @return bool Is successful opt-in (or set to pending). - * + * @return string|object * @use WP_Error */ function opt_in( @@ -6306,7 +6761,8 @@ $first = false, $last = false, $license_key = false, - $is_uninstall = false + $is_uninstall = false, + $trial_plan_id = false ) { $this->_logger->entrance(); @@ -6319,11 +6775,14 @@ * @since 1.2.1 If activating with license key, ignore the context-user * since the user will be automatically loaded from the license. */ - if (empty($license_key)) { + if ( empty( $license_key ) ) { + // Clean up pending license if opt-ing in again. + $this->_storage->remove( 'pending_license_key' ); + if ( ! $is_uninstall ) { $fs_user = Freemius::_get_user_by_email( $email ); if ( is_object( $fs_user ) && ! $this->is_pending_activation() ) { - return $this->install_with_current_user( false ); + return $this->install_with_current_user( false, $trial_plan_id ); } } } @@ -6341,8 +6800,12 @@ $params = $this->get_opt_in_params( $user_info ); + $filtered_license_key = false; if ( is_string( $license_key ) ) { - $params['license_secret_key'] = $license_key; + $filtered_license_key = $this->apply_filters( 'license_key', $license_key ); + $params['license_key'] = $filtered_license_key; + } else if ( FS_Plugin_Plan::is_valid_id( $trial_plan_id ) ) { + $params['trial_plan_id'] = $trial_plan_id; } if ( $is_uninstall ) { @@ -6368,26 +6831,40 @@ if ( $response instanceof WP_Error ) { if ( 'https://' === substr( $url, 0, 8 ) && isset( $response->errors ) && - isset( $response->errors['http_request_failed'] ) && - false !== strpos( $response->errors['http_request_failed'][0], 'sslv3 alert handshake' ) + isset( $response->errors['http_request_failed'] ) ) { - // Failed due to old version of cURL or Open SSL (SSLv3 is not supported by CloudFlare). - $url = 'http://' . substr( $url, 8 ); + $http_error = strtolower( $response->errors['http_request_failed'][0] ); - $response = wp_remote_post( $url, array( - 'method' => 'POST', - 'body' => $params, - 'timeout' => 15, - ) ); - } + if ( false !== strpos( $http_error, 'ssl' ) ) { + // Failed due to old version of cURL or Open SSL (SSLv3 is not supported by CloudFlare). + $url = 'http://' . substr( $url, 8 ); - if ( $response instanceof WP_Error ) { - return false; + $response = wp_remote_post( $url, array( + 'method' => 'POST', + 'body' => $params, + 'timeout' => 15, + ) ); + } } } if ( is_wp_error( $response ) ) { - return false; + /** + * @var WP_Error $response + */ + $result = new stdClass(); + + $error_code = $response->get_error_code(); + $error_type = str_replace( ' ', '', ucwords( str_replace( '_', ' ', $error_code ) ) ); + + $result->error = (object) array( + 'type' => $error_type, + 'message' => $response->get_error_message(), + 'code' => $error_code, + 'http' => 402 + ); + + return $result; } // Module is being uninstalled, don't handle the returned data. @@ -6401,15 +6878,25 @@ return false; } - if ( isset( $decoded->error ) ) { - return $decoded; + if ( ! $this->is_api_result_object( $decoded ) ) { + if ( ! empty( $params['license_key'] ) ) { + // Pass the fully entered license key to the failure handler. + $params['license_key'] = $license_key; + } + + return $is_uninstall ? + $decoded : + $this->apply_filters( 'after_install_failure', $decoded, $params ); } else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) { // Pending activation, add message. - $this->set_pending_confirmation( false, false ); - - return true; + return $this->set_pending_confirmation( + true, + false, + $filtered_license_key, + ! empty( $params['trial_plan_id'] ) + ); } else if ( isset( $decoded->install_secret_key ) ) { - $this->install_with_new_user( + return $this->install_with_new_user( $decoded->user_id, $decoded->user_public_key, $decoded->user_secret_key, @@ -6418,8 +6905,6 @@ $decoded->install_secret_key, false ); - - return true; } return $decoded; @@ -6435,7 +6920,7 @@ * @param FS_Site $site * @param bool $redirect * - * @return bool False if account already set. + * @return string If redirect is `false`, returns the next page the user should be redirected to. */ function setup_account( FS_User $user, FS_Site $site, $redirect = true ) { $this->_user = $user; @@ -6470,7 +6955,7 @@ // Remove plugin from pending activation mode. unset( $this->_storage->is_pending_activation ); - if ( ! $this->is_paying() ) { + if ( ! $this->is_paying_or_trial() ) { $this->_admin_notices->add_sticky( sprintf( __fs( 'plugin-x-activation-message', $this->_slug ), '<b>' . $this->get_plugin_name() . '</b>' ), 'activation_complete' @@ -6478,15 +6963,30 @@ } } - if ( $this->is_paying() && ! $this->is_premium() ) { - $this->_admin_notices->add_sticky( - sprintf( - __fs( 'activation-with-plan-x-message', $this->_slug ), - $this->_site->plan->title - ) . $this->get_complete_upgrade_instructions(), - 'plan_upgraded', - __fs( 'yee-haw', $this->_slug ) . '!' - ); + if ( $this->is_paying_or_trial() && ! $this->is_premium() ) { + if ( $this->is_paying() ) { + $this->_admin_notices->add_sticky( + sprintf( + __fs( 'activation-with-plan-x-message', $this->_slug ), + $this->_site->plan->title + ) . $this->get_complete_upgrade_instructions(), + 'plan_upgraded', + __fs( 'yee-haw', $this->_slug ) . '!' + ); + } else { + $this->_admin_notices->add_sticky( + sprintf( + __fs( 'trial-started-message', $this->_slug ), + '<i>' . $this->get_plugin_name() . '</i>' + ) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ), + 'trial_started', + __fs( 'yee-haw', $this->_slug ) . '!' + ); + } + + $this->_admin_notices->remove_sticky( array( + 'trial_promotion', + ) ); } $plugin_id = fs_request_get( 'plugin_id', false ); @@ -6496,14 +6996,12 @@ $this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME; } + $next_page = ''; + if ( is_numeric( $plugin_id ) ) { if ( $plugin_id != $this->_plugin->id ) { // Add-on was installed - sync license right after install. - if ( $redirect && fs_redirect( $this->_get_sync_license_url( $plugin_id ) ) - ) { - exit(); - } - + $next_page = $this->_get_sync_license_url( $plugin_id ); } } else { /** @@ -6515,10 +7013,17 @@ } // Reload the page with the keys. - if ( $redirect && fs_redirect( $this->get_after_activation_url( 'after_connect_url' ) ) ) { - exit(); - } + $next_page = $this->is_anonymous() ? + // If user previously skipped, redirect to account page. + $this->get_account_url() : + $this->get_after_activation_url( 'after_connect_url' ); + } + + if ( ! empty( $next_page ) && $redirect ) { + fs_redirect( $next_page ); } + + return $next_page; } /** @@ -6565,6 +7070,8 @@ * @param string $install_public_key * @param string $install_secret_key * @param bool $redirect + * + * @return string If redirect is `false`, returns the next page the user should be redirected to. */ private function install_with_new_user( $user_id, @@ -6595,26 +7102,49 @@ $site = new FS_Site( $site_result ); $this->_site = $site; - $this->setup_account( $this->_user, $this->_site, $redirect ); + return $this->setup_account( $this->_user, $this->_site, $redirect ); } /** * @author Vova Feldman (@svovaf) * @since 1.1.7.4 * - * @param bool $email - * @param bool $redirect + * @param string|bool $email + * @param bool $redirect + * @param string|bool $license_key Since 1.2.1.5 + * @param bool $is_pending_trial Since 1.2.1.5 + * + * @return string Since 1.2.1.5 if $redirect is `false`, return the pending activation page. */ - private function set_pending_confirmation( $email = false, $redirect = true ) { + private function set_pending_confirmation( + $email = false, + $redirect = true, + $license_key = false, + $is_pending_trial = false + ) { // Install must be activated via email since // user with the same email already exist. $this->_storage->is_pending_activation = true; - $this->_add_pending_activation_notice( $email ); + $this->_add_pending_activation_notice( $email, $is_pending_trial ); + + if ( ! empty( $license_key ) ) { + $this->_storage->pending_license_key = $license_key; + } + + // Remove the opt-in sticky notice. + $this->_admin_notices->remove_sticky( array( + 'connect_account', + 'trial_promotion', + ) ); + + $next_page = $this->get_after_activation_url( 'after_pending_connect_url' ); // Reload the page with with pending activation message. - if ( $redirect && fs_redirect( $this->get_after_activation_url( 'after_pending_connect_url' ) ) ) { - exit(); + if ( $redirect ) { + fs_redirect( $next_page ); } + + return $next_page; } /** @@ -6633,7 +7163,13 @@ if ( fs_request_is_action( $this->_slug . '_activate_existing' ) && fs_request_is_post() ) { // check_admin_referer( 'activate_existing_' . $this->_plugin->public_key ); - $this->install_with_current_user(); + /** + * @author Vova Feldman (@svovaf) + * @since 1.1.9 Add license key if given. + */ + $license_key = fs_request_get( 'license_secret_key' ); + + $this->install_with_current_user( $license_key ); } } @@ -6642,11 +7178,18 @@ * @author Vova Feldman (@svovaf) * @since 1.1.7.4 * - * @param bool $redirect + * @param string|bool $license_key + * @param number|bool $trial_plan_id + * @param bool $redirect * - * @return object|string + * @return string|object If redirect is `false`, returns the next page the user should be redirected to, or the + * API error object if failed to install. */ - private function install_with_current_user( $redirect = true ) { + private function install_with_current_user( + $license_key = false, + $trial_plan_id = false, + $redirect = true + ) { // Get current logged WP user. $current_user = self::_get_current_wp_user(); @@ -6660,24 +7203,30 @@ 'uid' => $this->get_anonymous_id(), ); - /** - * @author Vova Feldman (@svovaf) - * @since 1.1.9 Add license key if given. - */ - $license_key = fs_request_get( 'license_secret_key' ); - if ( ! empty( $license_key ) ) { - $extra_install_params['license_key'] = $license_key; + $filtered_license_key = $this->apply_filters( 'license_key', $license_key ); + $extra_install_params['license_key'] = $filtered_license_key; + } else if ( FS_Plugin_Plan::is_valid_id( $trial_plan_id ) ) { + $extra_install_params['trial_plan_id'] = $trial_plan_id; } + $args = $this->get_install_data_for_api( $extra_install_params, false, false ); + // Install the plugin. $install = $this->get_api_user_scope()->call( "/plugins/{$this->get_id()}/installs.json", 'post', - $this->get_install_data_for_api( $extra_install_params, false, false ) + $args ); - if ( $this->is_api_error($install) ) { + if ( ! $this->is_api_result_entity( $install ) ) { + if ( ! empty( $args['license_key'] ) ) { + // Pass full the fully entered license key to the failure handler. + $args['license_key'] = $license_key; + } + + $install = $this->apply_filters( 'after_install_failure', $install, $args ); + $this->_admin_notices->add( sprintf( __fs( 'could-not-activate-x', $this->_slug ), $this->get_plugin_name() ) . ' ' . __fs( 'contact-us-with-error-message', $this->_slug ) . ' ' . '<b>' . $install->error->message . '</b>', @@ -6685,9 +7234,8 @@ 'error' ); - if ( $redirect && fs_redirect( $this->get_activation_url( array('error' => $install->error->message) ) ) - ) { - exit(); + if ( $redirect ) { + fs_redirect( $this->get_activation_url( array( 'error' => $install->error->message ) ) ); } return $install; @@ -6695,14 +7243,8 @@ $site = new FS_Site( $install ); $this->_site = $site; -// $this->_enrich_site_plan( false ); - -// $this->_set_account( $user, $site ); -// $this->_sync_plans(); - - $this->setup_account( $this->_user, $this->_site, $redirect ); - return $install; + return $this->setup_account( $this->_user, $this->_site, $redirect ); } /** @@ -6761,9 +7303,11 @@ $this->_activate_license( true ); } - #endregion ------------------------------------------------------------------ + #endregion - #region Admin Menu Items ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Admin Menu Items + #---------------------------------------------------------------------------------- private $_menu_items = array(); @@ -6821,8 +7365,6 @@ /** * @author Vova Feldman (@svovaf) * @since 1.0.1 - * - * @return string */ function _redirect_on_clicked_menu_link() { $this->_logger->entrance(); @@ -6834,7 +7376,7 @@ foreach ( $this->_menu_items as $priority => $items ) { foreach ( $items as $item ) { if ( isset( $item['url'] ) ) { - if ( $page === strtolower( $item['menu_slug'] ) ) { + if ( $page === $this->_menu->get_slug( strtolower( $item['menu_slug'] ) ) ) { $this->_logger->log( 'Redirecting to ' . $item['url'] ); fs_redirect( $item['url'] ); @@ -7015,16 +7557,32 @@ // to support add-ons checkout but don't add the submenu item. // || (isset( $_GET['page'] ) && $this->_menu->get_slug( 'pricing' ) == $_GET['page']); + $pricing_cta_slug = 'upgrade'; + $pricing_class = 'upgrade-mode'; + if ( $show_pricing ) { + if ( $this->_admin_notices->has_sticky( 'trial_promotion' ) && + ! $this->is_paying_or_trial() + ) { + // If running a trial promotion, modify the pricing to load the trial. + $pricing_cta_slug = 'start-trial'; + $pricing_class = 'trial-mode'; + } else if ( $this->is_paying() ) { + $pricing_cta_slug = 'pricing'; + $pricing_class = ''; + } + } + // Add upgrade/pricing page. $this->add_submenu_item( - ( $this->is_paying() ? __fs( 'pricing', $this->_slug ) : __fs( 'upgrade', $this->_slug ) . ' ➤' ), + __fs( $pricing_cta_slug, $this->_slug ) . ' ➤', array( &$this, '_pricing_page_render' ), $this->get_plugin_name() . ' – ' . __fs( 'pricing', $this->_slug ), 'manage_options', 'pricing', 'Freemius::_clean_admin_content_section', WP_FS__LOWEST_PRIORITY, - $show_pricing + $show_pricing, + $pricing_class ); } } @@ -7053,8 +7611,8 @@ */ private function embed_submenu_items() { $item_template = $this->_menu->is_top_level() ? - '<span class="fs-submenu-item">%s</span>' : - '<span class="fs-submenu-item fs-sub">%s</span>'; + '<span class="fs-submenu-item %s %s %s">%s</span>' : + '<span class="fs-submenu-item fs-sub %s %s %s">%s</span>'; $top_level_menu_capability = $this->get_top_level_menu_capability(); @@ -7064,15 +7622,25 @@ foreach ( $items as $item ) { $capability = ( ! empty( $item['capability'] ) ? $item['capability'] : $top_level_menu_capability ); + $menu_item = sprintf( + $item_template, + $this->_slug, + $item['menu_slug'], + ! empty( $item['class'] ) ? $item['class'] : '', + $item['menu_title'] + ); + + $menu_slug = $this->_menu->get_slug( $item['menu_slug'] ); + if ( ! isset( $item['url'] ) ) { $hook = add_submenu_page( $item['show_submenu'] ? $this->get_top_level_menu_slug() : null, $item['page_title'], - sprintf( $item_template, $item['menu_title'] ), + $menu_item, $capability, - $item['menu_slug'], + $menu_slug, $item['render_function'] ); @@ -7083,9 +7651,9 @@ add_submenu_page( $this->get_top_level_menu_slug(), $item['page_title'], - sprintf( $item_template, $item['menu_title'] ), + $menu_item, $capability, - $item['menu_slug'], + $menu_slug, array( $this, '' ) ); } @@ -7197,6 +7765,7 @@ * @param bool|callable $before_render_function * @param int $priority * @param bool $show_submenu + * @param string $class Since 1.2.1.5 can add custom classes to menu items. */ function add_submenu_item( $menu_title, @@ -7206,7 +7775,8 @@ $menu_slug = false, $before_render_function = false, $priority = WP_FS__DEFAULT_PRIORITY, - $show_submenu = true + $show_submenu = true, + $class = '' ) { $this->_logger->entrance( 'Title = ' . $menu_title ); @@ -7222,7 +7792,8 @@ $menu_slug, $before_render_function, $priority, - $show_submenu + $show_submenu, + $class ); return; @@ -7237,10 +7808,11 @@ 'page_title' => is_string( $page_title ) ? $page_title : $menu_title, 'menu_title' => $menu_title, 'capability' => $capability, - 'menu_slug' => $this->_menu->get_slug( is_string( $menu_slug ) ? $menu_slug : strtolower( $menu_title ) ), + 'menu_slug' => is_string( $menu_slug ) ? $menu_slug : strtolower( $menu_title ), 'render_function' => $render_function, 'before_render_function' => $before_render_function, 'show_submenu' => $show_submenu, + 'class' => $class, ); } @@ -7287,7 +7859,7 @@ $this->_menu_items[ $priority ][] = array( 'menu_title' => $menu_title, 'capability' => $capability, - 'menu_slug' => $this->_menu->get_slug( is_string( $menu_slug ) ? $menu_slug : strtolower( $menu_title ) ), + 'menu_slug' => is_string( $menu_slug ) ? $menu_slug : strtolower( $menu_title ), 'url' => $url, 'page_title' => $menu_title, 'render_function' => 'fs_dummy', @@ -7377,11 +7949,62 @@ * @param int $accepted_args * * @uses add_action() + * + * @return bool True if action added, false if no need to add the action since the AJAX call isn't matching. */ function add_ajax_action( $tag, $function_to_add, $priority = WP_FS__DEFAULT_PRIORITY, $accepted_args = 1 ) { $this->_logger->entrance( $tag ); + if ( ! $this->is_ajax_action( $tag ) ) { + return false; + } + add_action( $this->get_ajax_action_tag( $tag ), $function_to_add, $priority, $accepted_args ); + + $this->_logger->info( "$tag AJAX callback action added." ); + + return true; + } + + /** + * Send a JSON response back to an Ajax request. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $response + */ + function shoot_ajax_response( $response ) { + wp_send_json( $response ); + } + + /** + * Send a JSON response back to an Ajax request, indicating success. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $data Data to encode as JSON, then print and exit. + */ + function shoot_ajax_success( $data = null ) { + wp_send_json_success( $data ); + } + + /** + * Send a JSON response back to an Ajax request, indicating failure. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $error Optional error message. + */ + function shoot_ajax_failure( $error = '' ) { + $result = array( 'success' => false ); + if ( ! empty( $error ) ) { + $result['error'] = $error; + } + + wp_send_json( $result ); } /** @@ -7471,6 +8094,12 @@ private function _store_site( $store = true ) { $this->_logger->entrance(); + if ( empty( $this->_site->id ) ) { + $this->_logger->error( "Empty install ID, can't store site." ); + + return; + } + $encrypted_site = clone $this->_site; $encrypted_site->plan = $this->_encrypt_entity( $this->_site->plan ); @@ -7542,6 +8171,12 @@ private function _store_user( $store = true ) { $this->_logger->entrance(); + if ( empty( $this->_user->id ) ) { + $this->_logger->error( "Empty user ID, can't store user." ); + + return; + } + $users = self::get_all_users(); $users[ $this->_user->id ] = $this->_user; self::$_accounts->set_option( 'users', $users, $store ); @@ -7705,9 +8340,7 @@ * @link https://github.com/Freemius/wordpress-sdk/issues/6 */ if ( ! $is_menu_item_account_visible ) { - if ( fs_redirect( $this->_get_admin_page_url() ) ) { - exit(); - } + fs_redirect( $this->_get_admin_page_url() ); } } } @@ -7818,7 +8451,7 @@ $result = $api->get( '/plans.json', true ); - if ( ! $this->is_api_error( $result ) ) { + if ( $this->is_api_result_object( $result, 'plans' ) && is_array( $result->plans ) ) { for ( $i = 0, $len = count( $result->plans ); $i < $len; $i ++ ) { $result->plans[ $i ] = new FS_Plugin_Plan( $result->plans[ $i ] ); } @@ -7852,7 +8485,11 @@ $is_site_license_synced = false; - if ( ! isset( $result->error ) ) { + $api_errors = array(); + + if ( $this->is_api_result_object( $result, 'licenses' ) && + is_array( $result->licenses ) + ) { for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) { $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] ); @@ -7862,6 +8499,9 @@ } $result = $result->licenses; + } else { + $api_errors[] = $result; + $result = array(); } if ( ! $is_site_license_synced ) { @@ -7871,24 +8511,41 @@ // Try to retrieve a foreign license that is linked to the install. $api_result = $api->call( '/licenses.json' ); - if ( ! isset( $api_result->error ) ) { + if ( $this->is_api_result_object( $api_result, 'licenses' ) && + is_array( $api_result->licenses ) + ) { $licenses = $api_result->licenses; if ( ! empty( $licenses ) ) { $result[] = new FS_Plugin_License( $licenses[0] ); } + } else { + $api_errors[] = $api_result; } } else if ( is_object( $this->_license ) ) { // Fetch foreign license by ID and license key. $license = $api->get( "/licenses/{$this->_license->id}.json?license_key=" . urlencode( $this->_license->secret_key ) ); - if ( ! isset( $license->error ) ) { + if ( $this->is_api_result_entity( $license ) ) { $result[] = new FS_Plugin_License( $license ); + } else { + $api_errors[] = $license; } } } + if ( is_array( $result ) && 0 < count( $result ) ) { + // If found at least one license, return license collection even if there are errors. + return $result; + } + + if ( ! empty( $api_errors ) ) { + // If found any errors and no licenses, return first error. + return $api_errors[0]; + } + + // Fallback to empty licenses list. return $result; } @@ -7922,6 +8579,25 @@ return $result; } + /** + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * @uses FS_Api + * + * @return \FS_Billing|mixed + */ + function _fetch_billing() { + require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-billing.php'; + + $billing = $this->get_api_user_scope()->call( 'billing.json' ); + + if ( $this->is_api_result_entity( $billing ) ) { + $billing = new FS_Billing( $billing ); + } + + return $billing; + } + /** * @author Vova Feldman (@svovaf) * @since 1.0.4 @@ -8136,7 +8812,7 @@ $licenses = $this->_fetch_licenses( $addon->id ); // Sync add-on licenses. - if ( ! isset( $licenses->error ) ) { + if ( $this->is_array_instanceof( $licenses, 'FS_Plugin_License' ) ) { $this->_update_licenses( $licenses, $addon->slug ); if ( ! $this->is_addon_installed( $addon->slug ) && FS_License_Manager::has_premium_license( $licenses ) ) { @@ -8195,7 +8871,7 @@ $plan_change = 'none'; - if ( $this->is_api_error( $site ) ) { + if ( ! $this->is_api_result_entity( $site ) ) { // Show API messages only if not background sync or if paying customer. if ( ! $background || $this->is_paying() ) { // Try to ping API to see if not blocked. @@ -8512,19 +9188,19 @@ $api = $this->get_api_site_scope(); $license = $api->call( "/licenses/{$premium_license->id}.json", 'put', $api_request_params ); - if ( $this->is_api_error( $license ) ) { + if ( ! $this->is_api_result_entity( $license ) ) { if ( ! $background ) { $this->_admin_notices->add( sprintf( - '%s %s', - __fs( 'license-activation-failed-message', $this->_slug ), - ( is_object( $license ) && isset( $license->error ) ? - $license->error->message : - sprintf( '%s<br><code>%s</code>', - __fs( 'server-error-message', $this->_slug ), - var_export( $license, true ) - ) + '%s %s', + __fs( 'license-activation-failed-message', $this->_slug ), + ( is_object( $license ) && isset( $license->error ) ? + $license->error->message : + sprintf( '%s<br><code>%s</code>', + __fs( 'server-error-message', $this->_slug ), + var_export( $license, true ) ) - ), + ) + ), __fs( 'hmm', $this->_slug ) . '...', 'error' ); @@ -8537,7 +9213,7 @@ // Updated site plan. $site = $this->get_api_site_scope()->get( '/', true ); - if ( ! $this->is_api_error( $site ) ) { + if ( $this->is_api_result_entity( $site ) ) { $this->_site = new FS_Site( $site ); } $this->_update_site_license( $premium_license ); @@ -8637,7 +9313,7 @@ $plan_downgraded = false; $plan = false; - if ( ! isset( $site->error ) ) { + if ( $this->is_api_result_entity( $site ) ) { $prev_plan_id = $this->_site->plan->id; // Update new site plan id. @@ -8753,7 +9429,7 @@ $api = $this->get_api_site_scope(); $plan = $api->call( "plans/{$plan->id}/trials.json", 'post' ); - if ( $this->is_api_error( $plan ) ) { + if ( ! $this->is_api_result_entity( $plan ) ) { // Some API error while trying to start the trial. $this->_admin_notices->add( __fs( 'unexpected-api-error', $this->_slug ) . ' ' . var_export( $plan, true ), @@ -8796,7 +9472,7 @@ $trial_cancelled = false; - if ( ! $this->is_api_error( $site ) ) { + if ( $this->is_api_result_entity( $site ) ) { $prev_trial_ends = $this->_site->trial_ends; if ( $this->is_paid_trial() ) { @@ -8830,9 +9506,6 @@ // Store site updates. $this->_store_site(); - // Clear trial plan information. - unset( $this->_storage->trial_plan ); - if ( ! $this->is_addon() || ! $this->deactivate_premium_only_addon_without_license( true ) ) { @@ -8840,6 +9513,9 @@ sprintf( __fs( 'trial-cancel-message', $this->_slug ), $this->_storage->trial_plan->title ) ); } + + // Clear trial plan information. + unset( $this->_storage->trial_plan ); } else { $this->_admin_notices->add( __fs( 'trial-cancel-failure-message', $this->_slug ), @@ -8936,7 +9612,9 @@ return ( is_object( $tag ) && isset( $tag->version ) ) ? $tag : false; } - #region Download Plugin ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Download Plugin + #---------------------------------------------------------------------------------- /** * Download latest plugin version, based on plan. @@ -9112,7 +9790,9 @@ $result = $api->get( '/addons.json?enriched=true', $flush ); $addons = array(); - if ( ! $this->is_api_error( $result ) ) { + if ( $this->is_api_result_object( $result, 'plugins' ) && + is_array( $result->plugins ) + ) { for ( $i = 0, $len = count( $result->plugins ); $i < $len; $i ++ ) { $addons[ $i ] = new FS_Plugin( $result->plugins[ $i ] ); } @@ -9159,6 +9839,10 @@ return $user; } + #---------------------------------------------------------------------------------- + #region API Error Handling + #---------------------------------------------------------------------------------- + /** * @author Vova Feldman (@svovaf) * @since 1.1.1 @@ -9168,8 +9852,53 @@ * @return bool Is API result contains an error. */ private function is_api_error( $result ) { - return ( is_object( $result ) && isset( $result->error ) ) || - is_string( $result ); + return FS_Api::is_api_error( $result ); + } + + /** + * Checks if given API result is a non-empty and not an error object. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $result + * @param string|null $required_property Optional property we want to verify that is set. + * + * @return bool + */ + function is_api_result_object( $result, $required_property = null ) { + return FS_Api::is_api_result_object( $result, $required_property ); + } + + /** + * Checks if given API result is a non-empty entity object with non-empty ID. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $result + * + * @return bool + */ + private function is_api_result_entity( $result ) { + return FS_Api::is_api_result_entity( $result ); + } + + #endregion + + /** + * Make sure a given argument is an array of a specific type. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $array + * @param string $class + * + * @return bool + */ + private function is_array_instanceof( $array, $class ) { + return ( is_array( $array ) && ( empty( $array ) || $array[0] instanceof $class ) ); } /** @@ -9311,6 +10040,21 @@ return $this->apply_filters( 'connect_url', $this->_get_admin_page_url( '', $params ) ); } + /** + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param array $params + * + * @return string + */ + function get_reconnect_url( $params = array() ) { + $params['fs_action'] = 'reset_anonymous_mode'; + $params['fs_slug'] = $this->_slug; + + return $this->apply_filters( 'connect_url', $this->_get_admin_page_url( '', $params ) ); + } + /** * Get the URL of the page that should be loaded after the user connect or skip in the opt-in screen. * @@ -9321,7 +10065,7 @@ * * @return string */ - private function get_after_activation_url( $filter ) { + function get_after_activation_url( $filter ) { $first_time_path = $this->_menu->get_first_time_path(); return $this->apply_filters( @@ -9358,17 +10102,13 @@ $this->_site = null; $this->_user = null; - if ( fs_redirect( $this->get_activation_url() ) ) { - exit(); - } + fs_redirect( $this->get_activation_url() ); } else { if ( $this->is_addon_activated( $plugin_id ) ) { $fs_addon = self::get_instance_by_id( $plugin_id ); $fs_addon->delete_account_event(); - if ( fs_redirect( $this->_get_admin_page_url( 'account' ) ) ) { - exit(); - } + fs_redirect( $this->_get_admin_page_url( 'account' ) ); } } @@ -9376,7 +10116,13 @@ case 'downgrade_account': check_admin_referer( $action ); - $this->_downgrade_site(); + + if ( $plugin_id == $this->get_id() ) { + $this->_downgrade_site(); + } else if ( $this->is_addon_activated( $plugin_id ) ) { + $fs_addon = self::get_instance_by_id( $plugin_id ); + $fs_addon->_downgrade_site(); + } return; @@ -9584,7 +10330,8 @@ if ( $this->has_paid_plan() && ! $this->has_any_license() && - ! $this->is_sync_executed() + ! $this->is_sync_executed() && + $this->is_tracking_allowed() ) { /** * If no licenses found and no sync job was executed during the last 24 hours, @@ -9694,7 +10441,9 @@ } } - #region Contact Us ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Contact Us + #---------------------------------------------------------------------------------- /** * Render contact-us page. @@ -9709,7 +10458,7 @@ fs_require_once_template( 'contact.php', $vars ); } - #endregion ------------------------------------------------------------------ + #endregion ------------------------------------------------------------------------ /** * Hide all admin notices to prevent distractions. @@ -9857,95 +10606,180 @@ $this->_storage->has_trial_plan = FS_Plan_Manager::instance()->has_trial_plan( $plans ); } + /** + * During trial promotion the "upgrade" submenu item turns to + * "start trial" to encourage the trial. Since we want to keep + * the same menu item handler and there's no robust way to + * add new arguments to the menu item link's querystring, + * use JavaScript to find the menu item and update the href of + * the link. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + */ + function _fix_start_trial_menu_item_url() { + $template_args = array( 'slug' => $this->_slug ); + fs_require_template( 'add-trial-to-pricing.php', $template_args ); + } + /** * Show trial promotional notice (if any trial exist). * * @author Vova Feldman (@svovaf) * @since 1.0.9 + * + * @return bool If trial notice added. */ function _add_trial_notice() { - // Check if trial already utilized. - if ( $this->_site->is_trial_utilized() ) { - return; + if ( ! current_user_can( 'activate_plugins' ) ) { + return false; } - // Check if already paying. - if ( $this->is_paying() ) { - return; + if ( ! $this->is_user_in_admin() ) { + return false; } // Check if trial message is already shown. if ( $this->_admin_notices->has_sticky( 'trial_promotion' ) ) { - return; + add_action( 'admin_footer', array( &$this, '_fix_start_trial_menu_item_url' ) ); + + $this->_menu->add_counter_to_menu_item( 1, 'fs-trial' ); + + return false; } - $trial_plans = FS_Plan_Manager::instance()->get_trial_plans( $this->_plans ); - $trial_plans_count = count( $trial_plans ); + if ( $this->is_premium() && ! WP_FS__DEV_MODE ) { + // Don't show trial if running the premium code, unless running in DEV mode. + return false; + } - // Check if any of the plans contains trial. - if ( 0 === $trial_plans_count ) { - return; + if ( ! $this->has_trial_plan() ) { + // No plans with trial. + return false; } - /** - * @var FS_Plugin_Plan $paid_plan - */ - $paid_plan = $trial_plans[0]; - $require_subscription = $paid_plan->is_require_subscription; - $upgrade_url = $this->get_trial_url(); - $cc_string = $require_subscription ? - sprintf( __fs( 'no-commitment-for-x-days', $this->_slug ), $paid_plan->trial_period ) : - __fs( 'no-cc-required', $this->_slug ) . '!'; + if ( ! $this->apply_filters( 'show_trial', true ) ) { + // Developer explicitly asked not to show the trial promo. + return false; + } + + if ( $this->is_registered() ) { + // Check if trial already utilized. + if ( $this->_site->is_trial_utilized() ) { + return false; + } + if ( $this->is_paying_or_trial() ) { + // Don't show trial if paying or already in trial. + return false; + } + } - $total_paid_plans = count( $this->_plans ) - ( FS_Plan_Manager::instance()->has_free_plan( $this->_plans ) ? 1 : 0 ); + if ( $this->is_activation_mode() || $this->is_pending_activation() ) { + // If not yet opted-in/skipped, or pending activation, don't show trial. + return false; + } - if ( $total_paid_plans === $trial_plans_count ) { - // All paid plans have trials. - $message = sprintf( - __fs( 'hey', $this->_slug ) . '! ' . __fs( 'trial-x-promotion-message', $this->_slug ), - sprintf( '<b>%s</b>', $this->get_plugin_name() ), - strtolower( __fs( 'awesome', $this->_slug ) ), - $paid_plan->trial_period - ); - } else { - $plans_string = ''; - for ( $i = 0; $i < $trial_plans_count; $i ++ ) { - $plans_string .= sprintf( '<a href="%s">%s</a>', $upgrade_url, $trial_plans[ $i ]->title ); - - if ( $i < $trial_plans_count - 2 ) { - $plans_string .= ', '; - } else if ( $i == $trial_plans_count - 2 ) { - $plans_string .= ' and '; - } + $last_time_trial_promotion_shown = $this->_storage->get( 'trial_promotion_shown', false ); + $was_promotion_shown_before = ( false !== $last_time_trial_promotion_shown ); + + // Show promotion if never shown before and 24 hours after initial activation with FS. + if ( ! $was_promotion_shown_before && + $this->_storage->install_timestamp > ( time() - WP_FS__TIME_24_HOURS_IN_SEC ) + ) { + return false; + } + + // OR if promotion was shown before, try showing it every 30 days. + if ( $was_promotion_shown_before && + 30 * WP_FS__TIME_24_HOURS_IN_SEC > time() - $last_time_trial_promotion_shown + ) { + return false; + } + + $trial_period = $this->_trial_days; + $require_payment = $this->_is_trial_require_payment; + $trial_url = $this->get_trial_url(); + $plans_string = strtolower( __fs( 'awesome', $this->_slug ) ); + + if ( $this->is_registered() ) { + // If opted-in, override trial with up to date data from API. + $trial_plans = FS_Plan_Manager::instance()->get_trial_plans( $this->_plans ); + $trial_plans_count = count( $trial_plans ); + + if ( 0 === $trial_plans_count ) { + // If there's no plans with a trial just exit. + return false; } - // Not all paid plans have trials. - $message = sprintf( - __fs( 'hey', $this->_slug ) . '! ' . __fs( 'trial-x-promotion-message', $this->_slug ), - sprintf( '<b>%s</b>', $this->get_plugin_name() ), - $plans_string, - $paid_plan->trial_period - ); + /** + * @var FS_Plugin_Plan $paid_plan + */ + $paid_plan = $trial_plans[0]; + $require_payment = $paid_plan->is_require_subscription; + $trial_period = $paid_plan->trial_period; + + $total_paid_plans = count( $this->_plans ) - ( FS_Plan_Manager::instance()->has_free_plan( $this->_plans ) ? 1 : 0 ); + + if ( $total_paid_plans !== $trial_plans_count ) { + // Not all paid plans have a trial - generate a string of those that have it. + for ( $i = 0; $i < $trial_plans_count; $i ++ ) { + $plans_string .= sprintf( + '<a href="%s">%s</a>', + $trial_url, + $trial_plans[ $i ]->title + ); + + if ( $i < $trial_plans_count - 2 ) { + $plans_string .= ', '; + } else if ( $i == $trial_plans_count - 2 ) { + $plans_string .= ' and '; + } + } + } } - $message .= ' ' . $cc_string; + $message = sprintf( + __fs( 'hey', $this->_slug ) . '! ' . __fs( 'trial-x-promotion-message', $this->_slug ), + sprintf( '<b>%s</b>', $this->get_plugin_name() ), + $plans_string, + $trial_period + ); + + // "No Credit-Card Required" or "No Commitment for N Days". + $cc_string = $require_payment ? + sprintf( __fs( 'no-commitment-for-x-days', $this->_slug ), $trial_period ) : + __fs( 'no-cc-required', $this->_slug ) . '!'; - // Add start trial button. - $message .= ' ' . sprintf( + + // Start trial button. + $button = ' ' . sprintf( '<a style="margin-left: 10px; vertical-align: super;" href="%s"><button class="button button-primary">%s ➜</button></a>', - $upgrade_url, + $trial_url, __fs( 'start-free-trial', $this->_slug ) ); $this->_admin_notices->add_sticky( - $this->apply_filters( 'trial_promotion_message', $message ), + $this->apply_filters( 'trial_promotion_message', "{$message} {$cc_string} {$button}" ), 'trial_promotion', '', 'promotion' ); $this->_storage->trial_promotion_shown = WP_FS__SCRIPT_START_TIME; + + return true; + } + + /** + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + */ + function _enqueue_common_css() { + if ( $this->has_paid_plan() && ! $this->is_paying() ) { + // Add basic CSS for admin-notices and menu-item colors. + fs_enqueue_local_style( 'fs_common', '/admin/common.css' ); + } } /* Action Links @@ -10053,6 +10887,11 @@ return; } + if ( ! $this->is_ajax() ) { + // Inject license activation dialog UI and client side code. + add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) ); + } + $link_text = __fs( $this->is_free_plan() ? 'activate-license' : 'change-license', $this->_slug @@ -10067,6 +10906,77 @@ ); } + /** + * Adds "Opt in" or "Opt out" link to the main "Plugins" page link actions collection. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.1.5 + */ + function _add_tracking_links() { + if ( ! current_user_can( 'activate_plugins' ) ) { + return; + } + + $this->_logger->entrance(); + + if ( ! $this->is_enable_anonymous() ) { + // Don't allow to opt-out if anonymous mode is disabled. + return; + } + + if ( ! $this->is_free_plan() ) { + // Don't allow to opt-out if running in paid plan. + return; + } + + if ( $this->add_ajax_action( 'stop_tracking', array( &$this, '_stop_tracking_callback' ) ) ) { + return; + } + + if ( $this->add_ajax_action( 'allow_tracking', array( &$this, '_allow_tracking_callback' ) ) ) { + return; + } + + if ( fs_request_is_action_secure( $this->_slug . '_reconnect' ) ) { + if ( ! $this->is_registered() && $this->is_anonymous() ) { + $this->connect_again(); + + return; + } + } + + $url = '#'; + + if ( $this->is_registered() ) { + if ( $this->is_tracking_allowed() ) { + $link_text_id = 'opt-out'; + } else { + $link_text_id = 'opt-in'; + } + + add_action( 'admin_footer', array( &$this, '_add_optout_dialog' ) ); + } else { + $link_text_id = 'opt-in'; + + $params = ! $this->is_anonymous() ? + array() : + array( + 'nonce' => wp_create_nonce( $this->_slug . '_reconnect' ), + 'fs_action' => ( $this->_slug . '_reconnect' ), + ); + + $url = $this->get_activation_url( $params ); + } + + $this->add_plugin_action_link( + __fs( $link_text_id, $this->_slug ), + $url, + false, + 13, + "opt-in-or-opt-out {$this->_slug}" + ); + } + /** * Get the URL of the page that should be loaded right after the plugin activation. * @@ -10117,7 +11027,6 @@ if ( is_string( $url ) ) { fs_redirect( $url ); - exit(); } } @@ -10229,14 +11138,19 @@ $plan_title = $this->_site->plan->title; } + // @since 1.2.1.5 The free version is auto deactivated. + $deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ? + ( '<li>' . __fs( 'deactivate-free-version', $this->_slug ) . '.</li>' ) : + ''; + return sprintf( - ' %s: <ol><li>%s.</li><li>%s.</li><li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>', + ' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>', __fs( 'follow-steps-to-complete-upgrade', $this->_slug ), $this->_get_latest_download_link( sprintf( __fs( 'download-latest-x-version', $this->_slug ), $plan_title ) ), - __fs( 'deactivate-free-version', $this->_slug ), + $deactivation_step, __fs( 'upload-and-activate', $this->_slug ), '//bit.ly/upload-wp-plugin', __fs( 'howto-upload-activate', $this->_slug ) @@ -10294,7 +11208,9 @@ return $update; } - #region Versioning ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Versioning + #---------------------------------------------------------------------------------- /** * Check if Freemius in SDK upgrade mode. @@ -10315,8 +11231,6 @@ * * @author Vova Feldman (@svovaf) * @since 1.0.9 - * - * @return bool */ function set_sdk_upgrade_complete() { $this->_storage->sdk_upgrade_mode = false; @@ -10348,9 +11262,11 @@ $this->_storage->plugin_upgrade_mode = false; } - #endregion ------------------------------------------------------------------ + #endregion - #region Permissions ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Permissions + #---------------------------------------------------------------------------------- /** * Check if specific permission requested. @@ -10366,9 +11282,11 @@ return isset( $this->_permissions[ $permission ] ) && ( true === $this->_permissions[ $permission ] ); } - #endregion Permissions ------------------------------------------------------------------ + #endregion - #region Marketing ------------------------------------------------------------------ + #---------------------------------------------------------------------------------- + #region Marketing + #---------------------------------------------------------------------------------- /** * Check if current user purchased any other plugins before. @@ -10380,6 +11298,7 @@ */ function has_purchased_before() { // TODO: Implement has_purchased_before() method. + throw new Exception( 'not implemented' ); } /** @@ -10392,6 +11311,7 @@ */ function is_agency() { // TODO: Implement is_agency() method. + throw new Exception( 'not implemented' ); } /** @@ -10404,6 +11324,7 @@ */ function is_developer() { // TODO: Implement is_developer() method. + throw new Exception( 'not implemented' ); } /** @@ -10416,7 +11337,8 @@ */ function is_business() { // TODO: Implement is_business() method. + throw new Exception( 'not implemented' ); } - #endregion ------------------------------------------------------------------ - } \ No newline at end of file + #endregion + } diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-api.php b/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-api.php index 1b66331ff17d0bc9aeb780b4308010827a59140a..48d060ea2d333577433867a09267c52fc32bb45a 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-api.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-api.php @@ -180,9 +180,9 @@ } } - if ( null !== $result && isset( $result->error ) && isset( $result->error->message ) ) { + if ( $this->_logger->is_on() && self::is_api_error( $result ) ) { // Log API errors. - $this->_logger->error( $result->error->message ); + $this->_logger->api_error( $result ); } return $result; @@ -243,6 +243,10 @@ // If there was an error during a newer data fetch, // fallback to older data version. $result = $cached_result; + + if ( $this->_logger->is_on() ) { + $this->_logger->warn( 'Fallback to cached API result: ' . var_export( $cached_result, true ) ); + } } else { // If no older data version, return result without // caching the error. @@ -253,6 +257,8 @@ self::$_cache->set( $cache_key, $result, $expiration ); $cached_result = $result; + } else { + $this->_logger->log( 'Using cached API result.' ); } return $cached_result; @@ -270,13 +276,30 @@ * * @return bool */ - function is_cached( $path, $method = 'GET', $params = array() ) - { + function is_cached( $path, $method = 'GET', $params = array() ) { $cache_key = $this->get_cache_key( $path, $method, $params ); return self::$_cache->has_valid( $cache_key ); } + /** + * Invalidate a cached version of the API request. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param string $path + * @param string $method + * @param array $params + */ + function purge_cache( $path, $method = 'GET', $params = array() ) { + $this->_logger->entrance( "{$method}:{$path}" ); + + $cache_key = $this->get_cache_key( $path, $method, $params ); + + self::$_cache->purge( $cache_key ); + } + /** * @param string $path * @param string $method @@ -289,7 +312,7 @@ $canonized = $this->_api->CanonizePath( $path ); // $exploded = explode('/', $canonized); // return $method . '_' . array_pop($exploded) . '_' . md5($canonized . json_encode($params)); - return strtolower($method . ':' . $canonized) . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' ); + return strtolower( $method . ':' . $canonized ) . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' ); } /** @@ -361,7 +384,7 @@ */ private function get_temporary_unavailable_error() { return (object) array( - 'error' => array( + 'error' => (object) array( 'type' => 'TemporaryUnavailable', 'message' => 'API is temporary unavailable, please retry in ' . ( self::$_cache->get_record_expiration( 'ping_test' ) - WP_FS__SCRIPT_START_TIME ) . ' sec.', 'code' => 'temporary_unavailable', @@ -477,6 +500,59 @@ self::_init(); self::$_cache = FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME ); - self::$_cache->clear( true ); + self::$_cache->clear(); + } + + #---------------------------------------------------------------------------------- + #region Error Handling + #---------------------------------------------------------------------------------- + + /** + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $result + * + * @return bool Is API result contains an error. + */ + static function is_api_error( $result ) { + return ( is_object( $result ) && isset( $result->error ) ) || + is_string( $result ); + } + + /** + * Checks if given API result is a non-empty and not an error object. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $result + * @param string|null $required_property Optional property we want to verify that is set. + * + * @return bool + */ + static function is_api_result_object( $result, $required_property = null ) { + return ( + is_object( $result ) && + ! isset( $result->error ) && + ( empty( $required_property ) || isset( $result->{$required_property} ) ) + ); } + + /** + * Checks if given API result is a non-empty entity object with non-empty ID. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $result + * + * @return bool + */ + static function is_api_result_entity( $result ) { + return self::is_api_result_object( $result, 'id' ) && + FS_Entity::is_valid_id( $result->id ); + } + + #endregion } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-logger.php b/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-logger.php index 6f5fc76ac11a7af8c10669027c13878f25216ae0..0cd69de809f72a185707f203c4d7ed2f2fd3df98 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-logger.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/class-fs-logger.php @@ -138,6 +138,32 @@ $this->_log( $message, 'error', $wrapper ); } + /** + * Log API error. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param mixed $api_result + * @param bool $wrapper + */ + function api_error( $api_result, $wrapper = false ) { + $message = ''; + if ( is_object( $api_result ) && isset( $api_result->error ) ) { + $message = $api_result->error->message; + } else if ( is_object( $api_result ) ) { + $message = var_export( $api_result, true ); + } else if ( is_string( $api_result ) ) { + $message = $api_result; + } else if ( empty( $api_result ) ) { + $message = 'Empty API result.'; + } + + $message = 'API Error: ' . $message; + + $this->_log( $message, 'error', $wrapper ); + } + function entrance( $message = '', $wrapper = false ) { $msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message; @@ -155,7 +181,7 @@ } private static function format_html( $log ) { - return '<div style="font-size: 11px; padding: 3px; background: #ccc; margin-bottom: 3px;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['type'] . '] <b><code style="color: blue;">' . $log['function'] . '</code> >> <b style="color: darkorange;">' . $log['msg'] . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>'; + return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['type'] . '] <b><code style="color: #c4b1e0;">' . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html($log['msg']) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>'; } static function dump() { diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-billing.php b/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-billing.php new file mode 100644 index 0000000000000000000000000000000000000000..2cef5369dbe73fee9ff23b5512135e5e5f306162 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-billing.php @@ -0,0 +1,95 @@ +<?php + /** + * @package Freemius for EDD Add-On + * @copyright Copyright (c) 2016, Freemius, Inc. + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License + * @since 1.0.0 + */ + + if ( ! defined( 'ABSPATH' ) ) { + exit; + } + + class FS_Billing extends FS_Entity { + + #region Properties + + /** + * @var int + */ + public $entity_id; + /** + * @var string (Enum) Linked entity type. One of: developer, plugin, user, install + */ + public $entity_type; + /** + * @var string + */ + public $business_name; + /** + * @var string + */ + public $first; + /** + * @var string + */ + public $last; + /** + * @var string + */ + public $email; + /** + * @var string + */ + public $phone; + /** + * @var string + */ + public $website; + /** + * @var string Tax or VAT ID. + */ + public $tax_id; + /** + * @var string + */ + public $address_street; + /** + * @var string + */ + public $address_apt; + /** + * @var string + */ + public $address_city; + /** + * @var string + */ + public $address_country; + /** + * @var string Two chars country code. + */ + public $address_country_code; + /** + * @var string + */ + public $address_state; + /** + * @var number Numeric ZIP code (cab be with leading zeros). + */ + public $address_zip; + + #endregion Properties + + + /** + * @param object|bool $event + */ + function __construct( $event = false ) { + parent::__construct( $event ); + } + + static function get_type() { + return 'billing'; + } + } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-plugin.php b/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-plugin.php index e166d58385c3c2bc99409ded5ebf6ca1adb07137..0f60b2d7e452dc5f3f8b10a00c187808fabd6e23 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-plugin.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-plugin.php @@ -24,6 +24,10 @@ * @var string */ public $slug; + /** + * @var string 'plugin' or 'theme' + */ + public $type; #region Install Specific Properties diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-site.php b/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-site.php index 1c9393bdf325c139078ae34642079a4b39b429eb..ff35b0b99dfd4b85e824c0ad5f59caf0896c0053 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-site.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/entities/class-fs-site.php @@ -51,6 +51,15 @@ * @var string Platform version (e.g WordPress version). */ public $platform_version; + /** + * Freemius SDK version + * + * @author Leo Fajardo (@leorw) + * @since 1.2.2 + * + * @var string SDK version (e.g.: 1.2.2) + */ + public $sdk_version; /** * @var string Programming language version (e.g PHP version). */ @@ -77,6 +86,14 @@ * @var bool */ public $is_premium = false; + /** + * @author Leo Fajardo (@leorw) + * + * @since 1.2.1.5 + * + * @var bool + */ + public $is_disconnected = false; /** * @param stdClass|bool $site @@ -89,6 +106,10 @@ if ( is_object( $site ) ) { $this->plan->id = $site->plan_id; } + + if ( ! is_bool( $this->is_disconnected ) ) { + $this->is_disconnected = false; + } } static function get_type() { diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/fs-core-functions.php b/wp-content/plugins/nextgen-gallery/freemius/includes/fs-core-functions.php index d00f04b82e94502c56eb34594447c2407a4ab6ca..0ec5db1954bc7d25068d1522fc61410efaa5e860 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/fs-core-functions.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/fs-core-functions.php @@ -19,14 +19,6 @@ } } - if ( ! function_exists( 'starts_with' ) ) { - function starts_with( $haystack, $needle ) { - $length = strlen( $needle ); - - return ( substr( $haystack, 0, $length ) === $needle ); - } - } - /* Url. --------------------------------------------------------------------------------------------*/ function fs_get_url_daily_cache_killer() { @@ -64,7 +56,7 @@ ob_start(); $VARS = &$params; - require_once( fs_get_template_path( $path ) ); + require( fs_get_template_path( $path ) ); return ob_get_clean(); } @@ -158,6 +150,40 @@ return ( strtolower( $action ) === fs_get_action( $action_key ) ); } + /** + * @author Vova Feldman (@svovaf) + * @since 1.0.0 + * + * @since 1.2.1.5 Allow nonce verification. + * + * @param string $action + * @param string $action_key + * @param string $nonce_key + * + * @return bool + */ + function fs_request_is_action_secure( + $action, + $action_key = 'action', + $nonce_key = 'nonce' + ) { + if ( strtolower( $action ) !== fs_get_action( $action_key ) ) { + return false; + } + + $nonce = ! empty( $_REQUEST[ $nonce_key ] ) ? + $_REQUEST[ $nonce_key ] : + ''; + + if ( empty( $nonce ) || + ( false === wp_verify_nonce( $nonce, $action ) ) + ) { + return false; + } + + return true; + } + function fs_is_plugin_page( $menu_slug ) { return ( is_admin() && $_REQUEST['page'] === $menu_slug ); } @@ -287,9 +313,26 @@ set_error_handler('fs_error_handler');*/ - function fs_nonce_url( $actionurl, $action = - 1, $name = '_wpnonce' ) { -// $actionurl = str_replace( '&', '&', $actionurl ); - return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); + if ( ! function_exists( 'fs_nonce_url' ) ) { + /** + * Retrieve URL with nonce added to URL query. + * + * Originally was using `wp_nonce_url()` but the new version + * changed the return value to escaped URL, that's not the expected + * behaviour. + * + * @author Vova Feldman (@svovaf) + * @since ~1.1.3 + * + * @param string $actionurl URL to add nonce action. + * @param int|string $action Optional. Nonce action name. Default -1. + * @param string $name Optional. Nonce name. Default '_wpnonce'. + * + * @return string Escaped URL with nonce action added. + */ + function fs_nonce_url( $actionurl, $action = - 1, $name = '_wpnonce' ) { + return add_query_arg( $name, wp_create_nonce( $action ), $actionurl ); + } } if ( ! function_exists( 'fs_starts_with' ) ) { @@ -373,7 +416,7 @@ // Skip ignore params. if ( in_array( $lower_param, $ignore_params ) || - ( false !== $params_prefix && starts_with( $lower_param, $params_prefix ) ) + ( false !== $params_prefix && fs_starts_with( $lower_param, $params_prefix ) ) ) { continue; } @@ -460,4 +503,3 @@ // If both have priority return the winner. return ( $a['priority'] < $b['priority'] ) ? - 1 : 1; } - diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/fs-essential-functions.php b/wp-content/plugins/nextgen-gallery/freemius/includes/fs-essential-functions.php index 4ea92a70807590d23379e1ca6a09de07f6841582..b0d9d79f33bd6a77981cf79c459b552e5e87ccaa 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/fs-essential-functions.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/fs-essential-functions.php @@ -41,15 +41,29 @@ * @since 1.5.1 * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status. * - * @param string $location The path to redirect to - * @param int $status Status code to use + * @param string $location The path to redirect to. + * @param bool $exit If true, exit after redirect (Since 1.2.1.5). + * @param int $status Status code to use. * * @return bool False if $location is not set */ - function fs_redirect( $location, $status = 302 ) { + function fs_redirect( $location, $exit = true, $status = 302 ) { global $is_IIS; - if ( headers_sent() ) { + $file = ''; + $line = ''; + if ( headers_sent($file, $line) ) { + if ( WP_FS__DEBUG_SDK && class_exists( 'FS_Admin_Notice_Manager' ) ) { + $notices = FS_Admin_Notice_Manager::instance( 'global' ); + + $notices->add( "Freemius failed to redirect the page because the headers have been already sent from line <b><code>{$line}</code></b> in file <b><code>{$file}</code></b>. If it's unexpected, it usually happens due to invalid space and/or EOL character(s).", 'Oops...', 'error' ); + } + + return false; + } + + if ( defined( 'DOING_AJAX' ) ) { + // Don't redirect on AJAX calls. return false; } @@ -69,6 +83,10 @@ header( "Location: $location" ); } + if ( $exit ) { + exit(); + } + return true; } @@ -407,7 +425,7 @@ $args = func_get_args(); return call_user_func_array( 'apply_filters', array_merge( - array( 'fs_' . $tag . '_' . $slug ), + array( "fs_{$tag}_{$slug}" ), array_slice( $args, 2 ) ) ); } diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/fs-plugin-info-dialog.php b/wp-content/plugins/nextgen-gallery/freemius/includes/fs-plugin-info-dialog.php index f111bde9d4215dd1c14e6519dce42bb13b93394a..dc81b7c35627deee82276f8ca6718213d63513ce 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/fs-plugin-info-dialog.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/fs-plugin-info-dialog.php @@ -74,7 +74,7 @@ } // Find add-on by slug. - $selected_addon = $this->_fs->get_addon_by_slug($args->slug); + $selected_addon = $this->_fs->get_addon_by_slug($args->slug, WP_FS__DEV_MODE); if ( false === $selected_addon ) { return $data; @@ -99,7 +99,7 @@ $has_pricing = false; $has_features = false; $plans = false; - $plans_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans.json" ); + $plans_result = $this->_fs->get_api_site_or_plugin_scope()->get( "/addons/{$selected_addon->id}/plans.json?type=visible" ); if ( ! isset( $plans_result->error ) ) { $plans = $plans_result->plans; if ( is_array( $plans ) ) { @@ -597,7 +597,7 @@ } ?> <a class="nav-tab" data-billing-cycle="<?php echo $cycle ?>" - data-pricing="<?php esc_attr_e( json_encode( $prices ) ) ?>"> + data-pricing="<?php echo esc_attr( json_encode( $prices ) ) ?>"> <?php if ( $is_featured ) : ?> <label>★ <?php _efs( 'best', $api->slug ) ?> ★</label> <?php endif ?> diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/i18n.php b/wp-content/plugins/nextgen-gallery/freemius/includes/i18n.php index 14b6af120cc14a5c77f6405e26b5a5f9c84556e4..7a6377f906602a9983017fd05c4515f8a7a766d1 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/i18n.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/i18n.php @@ -32,191 +32,223 @@ global $fs_text; $fs_text = array( - 'account' => __( 'Account', 'freemius' ), - 'addon' => __( 'Add On', 'freemius' ), - 'contact-us' => __( 'Contact Us', 'freemius' ), - 'contact-support' => __( 'Contact Support', 'freemius' ), - 'change-ownership' => __( 'Change Ownership', 'freemius' ), - 'support' => __( 'Support', 'freemius' ), - 'support-forum' => __( 'Support Forum', 'freemius' ), - 'add-ons' => __( 'Add Ons', 'freemius' ), - 'upgrade' => _x( 'Upgrade', 'verb', 'freemius' ), - 'awesome' => __( 'Awesome', 'freemius' ), - 'pricing' => _x( 'Pricing', 'noun', 'freemius' ), - 'price' => _x( 'Price', 'noun', 'freemius' ), - 'unlimited-updates' => __( 'Unlimited Updates', 'freemius' ), - 'downgrade' => _x( 'Downgrade', 'verb', 'freemius' ), - 'cancel-trial' => __( 'Cancel Trial', 'freemius' ), - 'free-trial' => __( 'Free Trial', 'freemius' ), - 'start-free-x' => __( 'Start my free %s', 'freemius' ), - 'no-commitment-x' => __( 'No commitment for %s - cancel anytime', 'freemius' ), - 'after-x-pay-as-little-y' => __( 'After your free %s, pay as little as %s', 'freemius' ), - 'details' => __( 'Details', 'freemius' ), - 'account-details' => __( 'Account Details', 'freemius' ), - 'delete' => _x( 'Delete', 'verb', 'freemius' ), - 'show' => _x( 'Show', 'verb', 'freemius' ), - 'hide' => _x( 'Hide', 'verb', 'freemius' ), - 'edit' => _x( 'Edit', 'verb', 'freemius' ), - 'date' => __( 'Date', 'freemius' ), - 'amount' => __( 'Amount', 'freemius' ), - 'invoice' => __( 'Invoice', 'freemius' ), - 'billing' => __( 'Billing', 'freemius' ), - 'payments' => __( 'Payments', 'freemius' ), - 'delete-account' => __( 'Delete Account', 'freemius' ), - 'dismiss' => _x( 'Dismiss', 'as close a window', 'freemius' ), - 'plan' => _x( 'Plan', 'as product pricing plan', 'freemius' ), - 'change-plan' => __( 'Change Plan', 'freemius' ), - 'download-x-version' => _x( 'Download %s Version', 'as download professional version', 'freemius' ), - 'download-x-version-now' => _x( 'Download %s version now', 'as download professional version now', 'freemius' ), - 'download-latest' => _x( 'Download Latest', 'as download latest version', 'freemius' ), - 'you-have-x-license' => _x( 'You have a %s license.', 'E.g. you have a professional license.', 'freemius' ), - 'new' => __( 'New', 'freemius' ), - 'free' => __( 'Free', 'freemius' ), - 'trial' => _x( 'Trial', 'as trial plan', 'freemius' ), - 'purchase' => _x( 'Purchase', 'verb', 'freemius' ), - 'purchase-license' => __( 'Purchase License', 'freemius' ), - 'buy' => _x( 'Buy', 'verb', 'freemius' ), - 'buy-license' => __( 'Buy License', 'freemius' ), - 'license-single-site' => __( 'Single Site License', 'freemius' ), - 'license-unlimited' => __( 'Unlimited Licenses', 'freemius' ), - 'license-x-sites' => __( 'Up to %s Sites', 'freemius' ), - 'renew-license-now' => __( '%sRenew your license now%s to access version %s features and support.', 'freemius' ), - 'ask-for-upgrade-email-address' => __( "Enter the email address you've used for the upgrade below and we will resend you the license key.", 'freemius' ), - 'x-plan' => _x( '%s Plan', 'e.g. Professional Plan', 'freemius' ), - 'you-are-step-away' => __( 'You are just one step away - %s', 'freemius' ), - 'activate-x-now' => _x( 'Complete "%s" Activation Now', '%s - plugin name. As complete "Jetpack" activation now', 'freemius' ), - 'few-plugin-tweaks' => __( 'We made a few tweaks to the plugin, %s', 'freemius' ), - 'optin-x-now' => __( 'Opt-in to make "%s" Better!', 'freemius' ), - 'error' => __( 'Error', 'freemius' ), - 'failed-finding-main-path' => __( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'freemius' ), + 'account' => __( 'Account', 'freemius' ), + 'addon' => __( 'Add On', 'freemius' ), + 'contact-us' => __( 'Contact Us', 'freemius' ), + 'contact-support' => __( 'Contact Support', 'freemius' ), + 'change-ownership' => __( 'Change Ownership', 'freemius' ), + 'support' => __( 'Support', 'freemius' ), + 'support-forum' => __( 'Support Forum', 'freemius' ), + 'add-ons' => __( 'Add Ons', 'freemius' ), + 'upgrade' => _x( 'Upgrade', 'verb', 'freemius' ), + 'awesome' => __( 'Awesome', 'freemius' ), + 'pricing' => _x( 'Pricing', 'noun', 'freemius' ), + 'price' => _x( 'Price', 'noun', 'freemius' ), + 'unlimited-updates' => __( 'Unlimited Updates', 'freemius' ), + 'downgrade' => _x( 'Downgrade', 'verb', 'freemius' ), + 'cancel-trial' => __( 'Cancel Trial', 'freemius' ), + 'free-trial' => __( 'Free Trial', 'freemius' ), + 'start-free-x' => __( 'Start my free %s', 'freemius' ), + 'no-commitment-x' => __( 'No commitment for %s - cancel anytime', 'freemius' ), + 'after-x-pay-as-little-y' => __( 'After your free %s, pay as little as %s', 'freemius' ), + 'details' => __( 'Details', 'freemius' ), + 'account-details' => __( 'Account Details', 'freemius' ), + 'delete' => _x( 'Delete', 'verb', 'freemius' ), + 'show' => _x( 'Show', 'verb', 'freemius' ), + 'hide' => _x( 'Hide', 'verb', 'freemius' ), + 'edit' => _x( 'Edit', 'verb', 'freemius' ), + 'update' => _x( 'Update', 'verb', 'freemius' ), + 'date' => __( 'Date', 'freemius' ), + 'amount' => __( 'Amount', 'freemius' ), + 'invoice' => __( 'Invoice', 'freemius' ), + 'billing' => __( 'Billing', 'freemius' ), + 'payments' => __( 'Payments', 'freemius' ), + 'delete-account' => __( 'Delete Account', 'freemius' ), + 'dismiss' => _x( 'Dismiss', 'as close a window', 'freemius' ), + 'plan' => _x( 'Plan', 'as product pricing plan', 'freemius' ), + 'change-plan' => __( 'Change Plan', 'freemius' ), + 'download-x-version' => _x( 'Download %s Version', 'as download professional version', 'freemius' ), + 'download-x-version-now' => _x( 'Download %s version now', 'as download professional version now', + 'freemius' ), + 'download-latest' => _x( 'Download Latest', 'as download latest version', 'freemius' ), + 'you-have-x-license' => _x( 'You have a %s license.', 'E.g. you have a professional license.', + 'freemius' ), + 'new' => __( 'New', 'freemius' ), + 'free' => __( 'Free', 'freemius' ), + 'trial' => _x( 'Trial', 'as trial plan', 'freemius' ), + 'start-trial' => _x( 'Start Trial', 'as starting a trial plan', 'freemius' ), + 'purchase' => _x( 'Purchase', 'verb', 'freemius' ), + 'purchase-license' => __( 'Purchase License', 'freemius' ), + 'buy' => _x( 'Buy', 'verb', 'freemius' ), + 'buy-license' => __( 'Buy License', 'freemius' ), + 'license-single-site' => __( 'Single Site License', 'freemius' ), + 'license-unlimited' => __( 'Unlimited Licenses', 'freemius' ), + 'license-x-sites' => __( 'Up to %s Sites', 'freemius' ), + 'renew-license-now' => __( '%sRenew your license now%s to access version %s features and support.', + 'freemius' ), + 'ask-for-upgrade-email-address' => __( "Enter the email address you've used for the upgrade below and we will resend you the license key.", + 'freemius' ), + 'x-plan' => _x( '%s Plan', 'e.g. Professional Plan', 'freemius' ), + 'you-are-step-away' => __( 'You are just one step away - %s', 'freemius' ), + 'activate-x-now' => _x( 'Complete "%s" Activation Now', + '%s - plugin name. As complete "Jetpack" activation now', 'freemius' ), + 'few-plugin-tweaks' => __( 'We made a few tweaks to the plugin, %s', 'freemius' ), + 'optin-x-now' => __( 'Opt-in to make "%s" Better!', 'freemius' ), + 'error' => __( 'Error', 'freemius' ), + 'failed-finding-main-path' => __( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', + 'freemius' ), #region Account - 'expiration' => _x( 'Expiration', 'as expiration date', 'freemius' ), - 'license' => _x( 'License', 'as software license', 'freemius' ), - 'not-verified' => __( 'not verified', 'freemius' ), - 'verify-email' => __( 'Verify Email', 'freemius' ), - 'expires-in' => _x( 'Expires in %s', 'e.g. expires in 2 months', 'freemius' ), - 'renews-in' => _x( 'Auto renews in %s', 'e.g. auto renews in 2 months', 'freemius' ), - 'no-expiration' => __( 'No expiration', 'freemius' ), - 'expired' => __( 'Expired', 'freemius' ), - 'cancelled' => __( 'Cancelled', 'freemius' ), - 'in-x' => _x( 'In %s', 'e.g. In 2 hours', 'freemius' ), - 'x-ago' => _x( '%s ago', 'e.g. 2 min ago', 'freemius' ), - 'version' => _x( 'Version', 'as plugin version', 'freemius' ), - 'name' => __( 'Name', 'freemius' ), - 'email' => __( 'Email', 'freemius' ), - 'email-address' => __( 'Email address', 'freemius' ), - 'verified' => __( 'Verified', 'freemius' ), - 'plugin' => __( 'Plugin', 'freemius' ), - 'plugins' => __( 'Plugins', 'freemius' ), - 'themes' => __( 'Themes', 'freemius' ), - 'path' => _x( 'Path', 'as file/folder path', 'freemius' ), - 'title' => __( 'Title', 'freemius' ), - 'free-version' => __( 'Free version', 'freemius' ), - 'premium-version' => __( 'Premium version', 'freemius' ), - 'slug' => _x( 'Slug', 'as WP plugin slug', 'freemius' ), - 'id' => __( 'ID', 'freemius' ), - 'users' => __( 'Users', 'freemius' ), - 'plugin-installs' => __( 'Plugin Installs', 'freemius' ), - 'sites' => _x( 'Sites', 'like websites', 'freemius' ), - 'user-id' => __( 'User ID', 'freemius' ), - 'site-id' => __( 'Site ID', 'freemius' ), - 'public-key' => __( 'Public Key', 'freemius' ), - 'secret-key' => __( 'Secret Key', 'freemius' ), - 'no-secret' => _x( 'No Secret', 'as secret encryption key missing', 'freemius' ), - 'no-id' => __( 'No ID', 'freemius' ), - 'sync-license' => _x( 'Sync License', 'as synchronize license', 'freemius' ), - 'sync' => _x( 'Sync', 'as synchronize', 'freemius' ), - 'activate-license' => __( 'Activate License', 'freemius' ), - 'activate-free-version' => __( 'Activate Free Version', 'freemius' ), - 'activate-license-message' => __( 'Please enter the license key that you received in the email right after the purchase:', 'freemius' ), - 'activating-license' => __( 'Activating license...', 'freemius' ), - 'change-license' => __( 'Change License', 'freemius' ), - 'update-license' => __( 'Update License', 'freemius' ), - 'deactivate-license' => __( 'Deactivate License', 'freemius' ), - 'activate' => __( 'Activate', 'freemius' ), - 'deactivate' => __( 'Deactivate', 'freemius' ), - 'skip-deactivate' => __( 'Skip & Deactivate', 'freemius' ), - 'no-deactivate' => __( 'No - just deactivate', 'freemius' ), - 'yes-do-your-thing' => __( 'Yes - do your thing', 'freemius' ), - 'active' => _x( 'Active', 'active mode', 'freemius' ), - 'is-active' => _x( 'Is Active', 'is active mode?', 'freemius' ), - 'install-now' => __( 'Install Now', 'freemius' ), - 'install-update-now' => __( 'Install Update Now', 'freemius' ), - 'more-information-about-x' => __( 'More information about %s', 'freemius' ), - 'localhost' => __( 'Localhost', 'freemius' ), - 'activate-x-plan' => _x( 'Activate %s Plan', 'as activate Professional plan', 'freemius' ), - 'x-left' => _x( '%s left', 'as 5 licenses left', 'freemius' ), - 'last-license' => __( 'Last license', 'freemius' ), - 'what-is-your-x' => __( 'What is your %s?', 'freemius' ), - 'activate-this-addon' => __( 'Activate this add-on', 'freemius' ), - 'deactivate-license-confirm' => __( 'Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?', 'freemius' ), - 'delete-account-x-confirm' => __( 'Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the "Cancel" button, and first "Downgrade" your account. Are you sure you would like to continue with the deletion?', 'freemius' ), - 'delete-account-confirm' => __( 'Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?', 'freemius' ), - 'downgrade-x-confirm' => __( 'Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'freemius' ), - 'cancel-trial-confirm' => __( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'freemius' ), - 'after-downgrade-non-blocking' => __( 'You can still enjoy all %s features but you will not have access to plugin updates and support.', 'freemius' ), - 'after-downgrade-blocking' => __( 'Once your license expire you can still use the Free version but you will NOT have access to the %s features.', 'freemius' ), - 'proceed-confirmation' => __( 'Are you sure you want to proceed?', 'freemius' ), + 'expiration' => _x( 'Expiration', 'as expiration date', 'freemius' ), + 'license' => _x( 'License', 'as software license', 'freemius' ), + 'not-verified' => __( 'not verified', 'freemius' ), + 'verify-email' => __( 'Verify Email', 'freemius' ), + 'expires-in' => _x( 'Expires in %s', 'e.g. expires in 2 months', 'freemius' ), + 'renews-in' => _x( 'Auto renews in %s', 'e.g. auto renews in 2 months', 'freemius' ), + 'no-expiration' => __( 'No expiration', 'freemius' ), + 'expired' => __( 'Expired', 'freemius' ), + 'cancelled' => __( 'Cancelled', 'freemius' ), + 'in-x' => _x( 'In %s', 'e.g. In 2 hours', 'freemius' ), + 'x-ago' => _x( '%s ago', 'e.g. 2 min ago', 'freemius' ), + 'version' => _x( 'Version', 'as plugin version', 'freemius' ), + 'name' => __( 'Name', 'freemius' ), + 'email' => __( 'Email', 'freemius' ), + 'email-address' => __( 'Email address', 'freemius' ), + 'verified' => __( 'Verified', 'freemius' ), + 'plugin' => __( 'Plugin', 'freemius' ), + 'plugins' => __( 'Plugins', 'freemius' ), + 'themes' => __( 'Themes', 'freemius' ), + 'path' => _x( 'Path', 'as file/folder path', 'freemius' ), + 'title' => __( 'Title', 'freemius' ), + 'free-version' => __( 'Free version', 'freemius' ), + 'premium-version' => __( 'Premium version', 'freemius' ), + 'slug' => _x( 'Slug', 'as WP plugin slug', 'freemius' ), + 'id' => __( 'ID', 'freemius' ), + 'users' => __( 'Users', 'freemius' ), + 'plugin-installs' => __( 'Plugin Installs', 'freemius' ), + 'sites' => _x( 'Sites', 'like websites', 'freemius' ), + 'user-id' => __( 'User ID', 'freemius' ), + 'site-id' => __( 'Site ID', 'freemius' ), + 'public-key' => __( 'Public Key', 'freemius' ), + 'secret-key' => __( 'Secret Key', 'freemius' ), + 'no-secret' => _x( 'No Secret', 'as secret encryption key missing', 'freemius' ), + 'no-id' => __( 'No ID', 'freemius' ), + 'sync-license' => _x( 'Sync License', 'as synchronize license', 'freemius' ), + 'sync' => _x( 'Sync', 'as synchronize', 'freemius' ), + 'activate-license' => __( 'Activate License', 'freemius' ), + 'activate-free-version' => __( 'Activate Free Version', 'freemius' ), + 'activate-license-message' => __( 'Please enter the license key that you received in the email right after the purchase:', + 'freemius' ), + 'activating-license' => __( 'Activating license...', 'freemius' ), + 'change-license' => __( 'Change License', 'freemius' ), + 'update-license' => __( 'Update License', 'freemius' ), + 'deactivate-license' => __( 'Deactivate License', 'freemius' ), + 'activate' => __( 'Activate', 'freemius' ), + 'deactivate' => __( 'Deactivate', 'freemius' ), + 'skip-deactivate' => __( 'Skip & Deactivate', 'freemius' ), + 'no-deactivate' => __( 'No - just deactivate', 'freemius' ), + 'yes-do-your-thing' => __( 'Yes - do your thing', 'freemius' ), + 'active' => _x( 'Active', 'active mode', 'freemius' ), + 'is-active' => _x( 'Is Active', 'is active mode?', 'freemius' ), + 'install-now' => __( 'Install Now', 'freemius' ), + 'install-update-now' => __( 'Install Update Now', 'freemius' ), + 'more-information-about-x' => __( 'More information about %s', 'freemius' ), + 'localhost' => __( 'Localhost', 'freemius' ), + 'activate-x-plan' => _x( 'Activate %s Plan', 'as activate Professional plan', 'freemius' ), + 'x-left' => _x( '%s left', 'as 5 licenses left', 'freemius' ), + 'last-license' => __( 'Last license', 'freemius' ), + 'what-is-your-x' => __( 'What is your %s?', 'freemius' ), + 'activate-this-addon' => __( 'Activate this add-on', 'freemius' ), + 'deactivate-license-confirm' => __( 'Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?', + 'freemius' ), + 'delete-account-x-confirm' => __( 'Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the "Cancel" button, and first "Downgrade" your account. Are you sure you would like to continue with the deletion?', + 'freemius' ), + 'delete-account-confirm' => __( 'Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?', + 'freemius' ), + 'downgrade-x-confirm' => __( 'Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s.', + 'freemius' ), + 'cancel-trial-confirm' => __( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', + 'freemius' ), + 'after-downgrade-non-blocking' => __( 'You can still enjoy all %s features but you will not have access to plugin updates and support.', + 'freemius' ), + 'after-downgrade-blocking' => __( 'Once your license expire you can still use the Free version but you will NOT have access to the %s features.', + 'freemius' ), + 'proceed-confirmation' => __( 'Are you sure you want to proceed?', 'freemius' ), #endregion Account 'add-ons-for-x' => __( 'Add Ons for %s', 'freemius' ), - 'add-ons-missing' => __( 'We could\'nt load the add-ons list. It\'s probably an issue on our side, please try to come back in few minutes.', 'freemius' ), + 'add-ons-missing' => __( 'We could\'nt load the add-ons list. It\'s probably an issue on our side, please try to come back in few minutes.', + 'freemius' ), #region Plugin Deactivation 'anonymous-feedback' => __( 'Anonymous feedback', 'freemius' ), 'quick-feedback' => __( 'Quick feedback', 'freemius' ), - 'deactivation-share-reason' => __( 'If you have a moment, please let us know why you are deactivating', 'freemius' ), + 'deactivation-share-reason' => __( 'If you have a moment, please let us know why you are deactivating', + 'freemius' ), 'deactivation-modal-button-confirm' => __( 'Yes - Deactivate', 'freemius' ), 'deactivation-modal-button-submit' => __( 'Submit & Deactivate', 'freemius' ), - 'deactivation-modal-button-cancel' => _x( 'Cancel', 'the text of the cancel button of the plugin deactivation dialog box.', 'freemius' ), + 'cancel' => __( 'Cancel', 'freemius' ), 'reason-no-longer-needed' => __( 'I no longer need the plugin', 'freemius' ), 'reason-found-a-better-plugin' => __( 'I found a better plugin', 'freemius' ), 'reason-needed-for-a-short-period' => __( 'I only needed the plugin for a short period', 'freemius' ), 'reason-broke-my-site' => __( 'The plugin broke my site', 'freemius' ), 'reason-suddenly-stopped-working' => __( 'The plugin suddenly stopped working', 'freemius' ), 'reason-cant-pay-anymore' => __( "I can't pay for it anymore", 'freemius' ), - 'reason-temporary-deactivation' => __( "It's a temporary deactivation. I'm just debugging an issue.", 'freemius' ), - 'reason-other' => _x( 'Other', 'the text of the "other" reason for deactivating the plugin that is shown in the modal box.', 'freemius' ), + 'reason-temporary-deactivation' => __( "It's a temporary deactivation. I'm just debugging an issue.", + 'freemius' ), + 'reason-other' => _x( 'Other', + 'the text of the "other" reason for deactivating the plugin that is shown in the modal box.', 'freemius' ), 'ask-for-reason-message' => __( 'Kindly tell us the reason so we can improve.', 'freemius' ), 'placeholder-plugin-name' => __( "What's the plugin's name?", 'freemius' ), 'placeholder-comfortable-price' => __( 'What price would you feel comfortable paying?', 'freemius' ), 'reason-couldnt-make-it-work' => __( "I couldn't understand how to make it work", 'freemius' ), - 'reason-great-but-need-specific-feature' => __( "The plugin is great, but I need specific feature that you don't support", 'freemius' ), + 'reason-great-but-need-specific-feature' => __( "The plugin is great, but I need specific feature that you don't support", + 'freemius' ), 'reason-not-working' => __( 'The plugin is not working', 'freemius' ), 'reason-not-what-i-was-looking-for' => __( "It's not what I was looking for", 'freemius' ), 'reason-didnt-work-as-expected' => __( "The plugin didn't work as expected", 'freemius' ), 'placeholder-feature' => __( 'What feature?', 'freemius' ), - 'placeholder-share-what-didnt-work' => __( "Kindly share what didn't work so we can fix it for future users...", 'freemius' ), + 'placeholder-share-what-didnt-work' => __( "Kindly share what didn't work so we can fix it for future users...", + 'freemius' ), 'placeholder-what-youve-been-looking-for' => __( "What you've been looking for?", 'freemius' ), 'placeholder-what-did-you-expect' => __( "What did you expect?", 'freemius' ), 'reason-didnt-work' => __( "The plugin didn't work", 'freemius' ), 'reason-dont-like-to-share-my-information' => __( "I don't like to share my information with you", 'freemius' ), - 'dont-have-to-share-any-data' => __( "You might have missed it, but you don't have to share any data and can just %s the opt-in.", 'freemius' ), + 'dont-have-to-share-any-data' => __( "You might have missed it, but you don't have to share any data and can just %s the opt-in.", + 'freemius' ), #endregion Plugin Deactivation #region Connect 'hey-x' => _x( 'Hey %s,', 'greeting', 'freemius' ), 'thanks-x' => _x( 'Thanks %s!', 'a greeting. E.g. Thanks John!', 'freemius' ), - 'connect-message' => __( 'In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s', 'freemius' ), - 'connect-message_on-update' => __( 'Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that\'s okay! %2$s will still work just fine.', 'freemius' ), - 'pending-activation-message' => __( 'You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install.', 'freemius' ), - 'thanks-for-purchasing' => __( 'Thanks for purchasing %s! To get started, please enter your license key:', 'freemius' ), - 'license-sync-disclaimer' => __( 'The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license.', 'freemius' ), + 'connect-message' => __( 'Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s.', + 'freemius' ), + 'connect-message_on-update' => __( 'Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that\'s okay! %1$s will still work just fine.', + 'freemius' ), + 'pending-activation-message' => __( 'You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s.', 'freemius' ), + 'complete-the-install' => __( 'complete the install', 'freemius' ), + 'start-the-trial' => __( 'start the trial', 'freemius' ), + 'thanks-for-purchasing' => __( 'Thanks for purchasing %s! To get started, please enter your license key:', + 'freemius' ), + 'license-sync-disclaimer' => __( 'The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license.', + 'freemius' ), 'what-permissions' => __( 'What permissions are being granted?', 'freemius' ), 'permissions-profile' => __( 'Your Profile Overview', 'freemius' ), 'permissions-profile_desc' => __( 'Name and email address', 'freemius' ), 'permissions-site' => __( 'Your Site Overview', 'freemius' ), - 'permissions-site_desc' => __( 'Site URL, WP version, PHP info, plugins & themes', 'freemius' ), + 'permissions-site_desc' => __( 'Site URL, WP version, PHP info, plugins & themes', + 'freemius' ), 'permissions-events' => __( 'Current Plugin Events', 'freemius' ), 'permissions-events_desc' => __( 'Activation, deactivation and uninstall', 'freemius' ), 'permissions-plugins_themes' => __( 'Plugins & Themes', 'freemius' ), 'permissions-plugins_themes_desc' => __( 'Titles, versions and state.', 'freemius' ), + 'permissions-admin-notices' => __( 'Admin Notices', 'freemius' ), 'permissions-newsletter' => __( 'Newsletter', 'freemius' ), 'permissions-newsletter_desc' => __( 'Updates, announcements, marketing, no spam', 'freemius' ), 'privacy-policy' => __( 'Privacy Policy', 'freemius' ), 'tos' => __( 'Terms of Service', 'freemius' ), 'activating' => _x( 'Activating', 'as activating plugin', 'freemius' ), - 'sending-email' => _x( 'Sending email', 'as in the process of sending an email', 'freemius' ), + 'sending-email' => _x( 'Sending email', 'as in the process of sending an email', + 'freemius' ), 'opt-in-connect' => _x( 'Allow & Continue', 'button label', 'freemius' ), 'agree-activate-license' => _x( 'Agree & Activate License', 'button label', 'freemius' ), 'skip' => _x( 'Skip', 'verb', 'freemius' ), @@ -228,8 +260,22 @@ 'have-license-key' => __( 'Have a license key?', 'freemius' ), 'dont-have-license-key' => __( 'Don\'t have a license key?', 'freemius' ), 'cant-find-license-key' => __( "Can't find your license key?", 'freemius' ), - 'email-not-found' => __( "We couldn't find your email address in the system, are you sure it's the right address?" ), - 'no-active-licenses' => __( "We can't see any active licenses associated with that email address, are you sure it's the right address?" ), + 'email-not-found' => __( "We couldn't find your email address in the system, are you sure it's the right address?", + 'freemius' ), + 'no-active-licenses' => __( "We can't see any active licenses associated with that email address, are you sure it's the right address?", + 'freemius' ), + 'opt-in' => __( 'Opt In', 'freemius' ), + 'opt-out' => __( 'Opt Out', 'freemius' ), + 'opt-out-cancel' => __( 'On second thought - I want to continue helping', + 'freemius' ), + 'opting-out' => __( 'Opting out...', 'freemius' ), + 'opting-in' => __( 'Opting in...', 'freemius' ), + 'opt-out-message-appreciation' => __( 'We appreciate your help in making the %s better by letting us track some usage data.', + 'freemius' ), + 'opt-out-message-usage-tracking' => __( "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking.", + 'freemius' ), + 'opt-out-message-clicking-opt-out' => __( 'By clicking "Opt Out", we will no longer be sending any data from %s to %s.', + 'freemius' ), #endregion Connect #region Screenshots @@ -247,11 +293,13 @@ 'blocked' => _x( 'Blocked', 'as connection blocked', 'freemius' ), 'api' => _x( 'API', 'as application program interface', 'freemius' ), 'sdk' => _x( 'SDK', 'as software development kit versions', 'freemius' ), - 'sdk-versions' => _x( 'SDK Versions', 'as software development kit versions', 'freemius' ), + 'sdk-versions' => _x( 'SDK Versions', 'as software development kit versions', + 'freemius' ), 'plugin-path' => _x( 'Plugin Path', 'as plugin folder path', 'freemius' ), 'sdk-path' => _x( 'SDK Path', 'as sdk path', 'freemius' ), 'addons-of-x' => __( 'Add Ons of Plugin %s', 'freemius' ), - 'delete-all-confirm' => __( 'Are you sure you want to delete all Freemius data?', 'freemius' ), + 'delete-all-confirm' => __( 'Are you sure you want to delete all Freemius data?', + 'freemius' ), 'actions' => __( 'Actions', 'freemius' ), 'delete-all-accounts' => __( 'Delete All Accounts', 'freemius' ), 'start-fresh' => __( 'Start Fresh', 'freemius' ), @@ -264,117 +312,189 @@ #region Expressions 'congrats' => _x( 'Congrats', 'as congratulations', 'freemius' ), 'oops' => _x( 'Oops', 'exclamation', 'freemius' ), - 'yee-haw' => _x( 'Yee-haw', 'interjection expressing joy or exuberance', 'freemius' ), - 'woot' => _x( 'W00t', '(especially in electronic communication) used to express elation, enthusiasm, or triumph.', 'freemius' ), + 'yee-haw' => _x( 'Yee-haw', 'interjection expressing joy or exuberance', + 'freemius' ), + 'woot' => _x( 'W00t', + '(especially in electronic communication) used to express elation, enthusiasm, or triumph.', 'freemius' ), 'right-on' => _x( 'Right on', 'a positive response', 'freemius' ), - 'hmm' => _x( 'Hmm', 'something somebody says when they are thinking about what you have just said. ', 'freemius' ), + 'hmm' => _x( 'Hmm', + 'something somebody says when they are thinking about what you have just said. ', 'freemius' ), 'ok' => __( 'O.K', 'freemius' ), 'hey' => _x( 'Hey', 'exclamation', 'freemius' ), - 'heads-up' => _x( 'Heads up', 'advance notice of something that will need attention.', 'freemius' ), + 'heads-up' => _x( 'Heads up', + 'advance notice of something that will need attention.', 'freemius' ), #endregion Expressions #region Admin Notices 'you-have-latest' => __( 'Seems like you got the latest release.', 'freemius' ), 'you-are-good' => __( 'You are all good!', 'freemius' ), - 'user-exist-message' => __( 'Sorry, we could not complete the email update. Another user with the same email is already registered.', 'freemius' ), - 'user-exist-message_ownership' => __( 'If you would like to give up the ownership of the plugin\'s account to %s click the Change Ownership button.', 'freemius' ), - 'email-updated-message' => __( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.', 'freemius' ), + 'user-exist-message' => __( 'Sorry, we could not complete the email update. Another user with the same email is already registered.', + 'freemius' ), + 'user-exist-message_ownership' => __( 'If you would like to give up the ownership of the plugin\'s account to %s click the Change Ownership button.', + 'freemius' ), + 'email-updated-message' => __( 'Your email was successfully updated. You should receive an email with confirmation instructions in few moments.', + 'freemius' ), 'name-updated-message' => __( 'Your name was successfully updated.', 'freemius' ), 'x-updated' => __( 'You have successfully updated your %s.', 'freemius' ), 'name-update-failed-message' => __( 'Please provide your full name.', 'freemius' ), - 'verification-email-sent-message' => __( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.', 'freemius' ), - 'addons-info-external-message' => __( 'Just letting you know that the add-ons information of %s is being pulled from an external server.', 'freemius' ), + 'verification-email-sent-message' => __( 'Verification mail was just sent to %s. If you can\'t find it after 5 min, please check your spam box.', + 'freemius' ), + 'addons-info-external-message' => __( 'Just letting you know that the add-ons information of %s is being pulled from an external server.', + 'freemius' ), 'no-cc-required' => __( 'No credit card required', 'freemius' ), - 'premium-activated-message' => __( 'Premium plugin version was successfully activated.', 'freemius' ), + 'premium-activated-message' => __( 'Premium plugin version was successfully activated.', + 'freemius' ), 'successful-version-upgrade-message' => __( 'The upgrade of %s was successfully completed.', 'freemius' ), - 'activation-with-plan-x-message' => __( 'Your account was successfully activated with the %s plan.', 'freemius' ), + 'activation-with-plan-x-message' => __( 'Your account was successfully activated with the %s plan.', + 'freemius' ), 'download-latest-x-version-now' => __( 'Download the latest %s version now', 'freemius' ), - 'follow-steps-to-complete-upgrade' => __( 'Please follow these steps to complete the upgrade', 'freemius' ), + 'follow-steps-to-complete-upgrade' => __( 'Please follow these steps to complete the upgrade', + 'freemius' ), 'download-latest-x-version' => __( 'Download the latest %s version', 'freemius' ), + 'download-latest-version' => __( 'Download the latest version', 'freemius' ), 'deactivate-free-version' => __( 'Deactivate the free version', 'freemius' ), 'upload-and-activate' => __( 'Upload and activate the downloaded version', 'freemius' ), 'howto-upload-activate' => __( 'How to upload and activate?', 'freemius' ), - 'addon-successfully-purchased-message' => _x( '%s Add-on was successfully purchased.', '%s - product name, e.g. Facebook add-on was successfully...', 'freemius' ), - 'addon-successfully-upgraded-message' => __( 'Your %s Add-on plan was successfully upgraded.', 'freemius' ), - 'email-verified-message' => __( 'Your email has been successfully verified - you are AWESOME!', 'freemius' ), + 'addon-successfully-purchased-message' => _x( '%s Add-on was successfully purchased.', + '%s - product name, e.g. Facebook add-on was successfully...', 'freemius' ), + 'addon-successfully-upgraded-message' => __( 'Your %s Add-on plan was successfully upgraded.', + 'freemius' ), + 'email-verified-message' => __( 'Your email has been successfully verified - you are AWESOME!', + 'freemius' ), 'plan-upgraded-message' => __( 'Your plan was successfully upgraded.', 'freemius' ), 'plan-changed-to-x-message' => __( 'Your plan was successfully changed to %s.', 'freemius' ), - 'license-expired-blocking-message' => __( 'Your license has expired. You can still continue using the free plugin forever.', 'freemius' ), - 'license-cancelled' => __( 'Your license has been cancelled. If you think it\'s a mistake, please contact support.', 'freemius' ), + 'license-expired-blocking-message' => __( 'Your license has expired. You can still continue using the free plugin forever.', + 'freemius' ), + 'license-cancelled' => __( 'Your license has been cancelled. If you think it\'s a mistake, please contact support.', + 'freemius' ), 'trial-started-message' => __( 'Your trial has been successfully started.', 'freemius' ), 'license-activated-message' => __( 'Your license was successfully activated.', 'freemius' ), - 'no-active-license-message' => __( 'It looks like your site currently doesn\'t have an active license.', 'freemius' ), - 'license-deactivation-message' => __( 'Your license was successfully deactivated, you are back to the %s plan.', 'freemius' ), - 'license-deactivation-failed-message' => __( 'It looks like the license deactivation failed.', 'freemius' ), - 'license-activation-failed-message' => __( 'It looks like the license could not be activated.', 'freemius' ), + 'no-active-license-message' => __( 'It looks like your site currently doesn\'t have an active license.', + 'freemius' ), + 'license-deactivation-message' => __( 'Your license was successfully deactivated, you are back to the %s plan.', + 'freemius' ), + 'license-deactivation-failed-message' => __( 'It looks like the license deactivation failed.', + 'freemius' ), + 'license-activation-failed-message' => __( 'It looks like the license could not be activated.', + 'freemius' ), 'server-error-message' => __( 'Error received from the server:', 'freemius' ), - 'trial-expired-message' => __( 'Your trial has expired. You can still continue using all our free features.', 'freemius' ), - 'plan-x-downgraded-message' => __( 'Your plan was successfully downgraded. Your %s plan license will expire in %s.', 'freemius' ), - 'plan-downgraded-failure-message' => __( 'Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes.', 'freemius' ), - 'trial-cancel-no-trial-message' => __( 'It looks like you are not in trial mode anymore so there\'s nothing to cancel :)', 'freemius' ), - 'trial-cancel-message' => __( 'Your %s free trial was successfully cancelled.', 'freemius' ), - 'version-x-released' => _x( 'Version %s was released.', '%s - numeric version number', 'freemius' ), + 'trial-expired-message' => __( 'Your trial has expired. You can still continue using all our free features.', + 'freemius' ), + 'plan-x-downgraded-message' => __( 'Your plan was successfully downgraded. Your %s plan license will expire in %s.', + 'freemius' ), + 'plan-downgraded-failure-message' => __( 'Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes.', + 'freemius' ), + 'trial-cancel-no-trial-message' => __( 'It looks like you are not in trial mode anymore so there\'s nothing to cancel :)', + 'freemius' ), + 'trial-cancel-message' => __( 'Your %s free trial was successfully cancelled.', + 'freemius' ), + 'version-x-released' => _x( 'Version %s was released.', '%s - numeric version number', + 'freemius' ), 'please-download-x' => __( 'Please download %s.', 'freemius' ), - 'latest-x-version' => _x( 'the latest %s version here', '%s - plan name, as the latest professional version here', 'freemius' ), - 'trial-x-promotion-message' => __( 'How do you like %s so far? Test all our %s premium features with a %d-day free trial.', 'freemius' ), + 'latest-x-version' => _x( 'the latest %s version here', + '%s - plan name, as the latest professional version here', 'freemius' ), + 'trial-x-promotion-message' => __( 'How do you like %s so far? Test all our %s premium features with a %d-day free trial.', + 'freemius' ), 'start-free-trial' => _x( 'Start free trial', 'call to action', 'freemius' ), - 'trial-cancel-failure-message' => __( 'Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes.', 'freemius' ), + 'starting-trial' => __( 'Starting trial', 'freemius' ), + 'please-wait' => __( 'Please wait', 'freemius' ), + 'trial-cancel-failure-message' => __( 'Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes.', + 'freemius' ), 'trial-utilized' => __( 'You already utilized a trial before.', 'freemius' ), - 'in-trial-mode' => __( 'You are already running the plugin in a trial mode.', 'freemius' ), - 'trial-plan-x-not-exist' => __( 'Plan %s do not exist, therefore, can\'t start a trial.', 'freemius' ), + 'in-trial-mode' => __( 'You are already running the plugin in a trial mode.', + 'freemius' ), + 'trial-plan-x-not-exist' => __( 'Plan %s do not exist, therefore, can\'t start a trial.', + 'freemius' ), 'plan-x-no-trial' => __( 'Plan %s does not support a trial period.', 'freemius' ), - 'no-trials' => __( 'None of the plugin\'s plans supports a trial period.', 'freemius' ), - 'unexpected-api-error' => __( 'Unexpected API error. Please contact the plugin\'s author with the following error.', 'freemius' ), + 'no-trials' => __( 'None of the plugin\'s plans supports a trial period.', + 'freemius' ), + 'unexpected-api-error' => __( 'Unexpected API error. Please contact the plugin\'s author with the following error.', + 'freemius' ), 'no-commitment-for-x-days' => __( 'No commitment for %s days - cancel anytime!', 'freemius' ), - 'license-expired-non-blocking-message' => __( 'Your license has expired. You can still continue using all the %s features, but you\'ll need to renew your license to continue getting updates and support.', 'freemius' ), + 'license-expired-non-blocking-message' => __( 'Your license has expired. You can still continue using all the %s features, but you\'ll need to renew your license to continue getting updates and support.', + 'freemius' ), 'could-not-activate-x' => __( 'Couldn\'t activate %s.', 'freemius' ), 'contact-us-with-error-message' => __( 'Please contact us with the following message:', 'freemius' ), - 'plan-did-not-change-message' => __( 'It looks like you are still on the %s plan. If you did upgrade or change your plan, it\'s probably an issue on our side - sorry.', 'freemius' ), + 'plan-did-not-change-message' => __( 'It looks like you are still on the %s plan. If you did upgrade or change your plan, it\'s probably an issue on our side - sorry.', + 'freemius' ), 'contact-us-here' => __( 'Please contact us here', 'freemius' ), - 'plan-did-not-change-email-message' => __( 'I have upgraded my account but when I try to Sync the License, the plan remains %s.', 'freemius' ), + 'plan-did-not-change-email-message' => __( 'I have upgraded my account but when I try to Sync the License, the plan remains %s.', + 'freemius' ), #endregion Admin Notices #region Connectivity Issues - 'connectivity-test-fails-message' => __( 'From unknown reason, the API connectivity test failed.', 'freemius' ), - 'connectivity-test-maybe-temporary' => __( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', 'freemius' ), - 'curl-missing-message' => __( 'We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server.', 'freemius' ), - 'cloudflare-blocks-connection-message' => __( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', 'freemius' ), - 'x-requires-access-to-api' => _x( '%s requires an access to our API.', 'as pluginX requires an access to our API', 'freemius' ), - 'squid-blocks-connection-message' => __( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', 'freemius' ), + 'connectivity-test-fails-message' => __( 'From unknown reason, the API connectivity test failed.', + 'freemius' ), + 'connectivity-test-maybe-temporary' => __( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', + 'freemius' ), + 'curl-missing-message' => __( 'We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server.', + 'freemius' ), + 'cloudflare-blocks-connection-message' => __( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', + 'freemius' ), + 'x-requires-access-to-api' => _x( '%s requires an access to our API.', + 'as pluginX requires an access to our API', 'freemius' ), + 'squid-blocks-connection-message' => __( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', + 'freemius' ), 'squid-no-clue-title' => __( 'I don\'t know what is Squid or ACL, help me!', 'freemius' ), - 'squid-no-clue-desc' => __( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'freemius' ), + 'squid-no-clue-desc' => __( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', + 'freemius' ), 'sysadmin-title' => __( 'I\'m a system administrator', 'freemius' ), - 'squid-sysadmin-desc' => __( 'Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again.', 'freemius' ), - 'curl-missing-no-clue-title' => __( 'I don\'t know what is cURL or how to install it, help me!', 'freemius' ), - 'curl-missing-no-clue-desc' => __( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'freemius' ), - 'curl-missing-sysadmin-desc' => __( 'Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the plugin and reactivate it back again.', 'freemius' ), - 'happy-to-resolve-issue-asap' => __( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'freemius' ), - 'contact-support-before-deactivation' => __( 'Sorry for the inconvenience and we are here to help if you give us a chance.', 'freemius' ), + 'squid-sysadmin-desc' => __( 'Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again.', + 'freemius' ), + 'curl-missing-no-clue-title' => __( 'I don\'t know what is cURL or how to install it, help me!', + 'freemius' ), + 'curl-missing-no-clue-desc' => __( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', + 'freemius' ), + 'curl-missing-sysadmin-desc' => __( 'Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the plugin and reactivate it back again.', + 'freemius' ), + 'happy-to-resolve-issue-asap' => __( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', + 'freemius' ), + 'contact-support-before-deactivation' => __( 'Sorry for the inconvenience and we are here to help if you give us a chance.', + 'freemius' ), 'fix-issue-title' => __( 'Yes - I\'m giving you a chance to fix it', 'freemius' ), - 'fix-issue-desc' => __( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'freemius' ), + 'fix-issue-desc' => __( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', + 'freemius' ), 'install-previous-title' => __( 'Let\'s try your previous version', 'freemius' ), - 'install-previous-desc' => __( 'Uninstall this version and install the previous one.', 'freemius' ), + 'install-previous-desc' => __( 'Uninstall this version and install the previous one.', + 'freemius' ), 'deactivate-plugin-title' => __( 'That\'s exhausting, please deactivate', 'freemius' ), - 'deactivate-plugin-desc' => __( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', 'freemius' ), - 'fix-request-sent-message' => __( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.', 'freemius' ), - 'server-blocking-access' => _x( 'Your server is blocking the access to Freemius\' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s', '%1s - plugin title, %2s - API domain', 'freemius' ), - 'wrong-authentication-param-message' => __( 'It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again.', 'freemius' ), + 'deactivate-plugin-desc' => __( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', + 'freemius' ), + 'fix-request-sent-message' => __( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.', + 'freemius' ), + 'server-blocking-access' => _x( 'Your server is blocking the access to Freemius\' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s', + '%1s - plugin title, %2s - API domain', 'freemius' ), + 'wrong-authentication-param-message' => __( 'It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again.', + 'freemius' ), #endregion Connectivity Issues #region Change Owner - 'change-owner-request-sent-x' => __( 'Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder.', 'freemius' ), - 'change-owner-request_owner-confirmed' => __( 'Thanks for confirming the ownership change. An email was just sent to %s for final approval.', 'freemius' ), + 'change-owner-request-sent-x' => __( 'Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder.', + 'freemius' ), + 'change-owner-request_owner-confirmed' => __( 'Thanks for confirming the ownership change. An email was just sent to %s for final approval.', + 'freemius' ), 'change-owner-request_candidate-confirmed' => __( '%s is the new owner of the account.', 'freemius' ), #endregion Change Owner - 'addon-x-cannot-run-without-y' => _x( '%s cannot run without %s.', 'addonX cannot run without pluginY', 'freemius' ), - 'addon-x-cannot-run-without-parent' => _x( '%s cannot run without the plugin.', 'addonX cannot run...', 'freemius' ), - 'plugin-x-activation-message' => _x( '%s activation was successfully completed.', 'pluginX activation was successfully...', 'freemius' ), - 'features-and-pricing' => _x( 'Features & Pricing', 'Plugin installer section title', 'freemius' ), - 'free-addon-not-deployed' => __( 'Add-on must be deployed to WordPress.org or Freemius.', 'freemius' ), + 'addon-x-cannot-run-without-y' => _x( '%s cannot run without %s.', + 'addonX cannot run without pluginY', 'freemius' ), + 'addon-x-cannot-run-without-parent' => _x( '%s cannot run without the plugin.', 'addonX cannot run...', + 'freemius' ), + 'plugin-x-activation-message' => _x( '%s activation was successfully completed.', + 'pluginX activation was successfully...', 'freemius' ), + 'features-and-pricing' => _x( 'Features & Pricing', 'Plugin installer section title', + 'freemius' ), + 'free-addon-not-deployed' => __( 'Add-on must be deployed to WordPress.org or Freemius.', + 'freemius' ), 'paid-addon-not-deployed' => __( 'Paid add-on must be deployed to Freemius.', 'freemius' ), + #-------------------------------------------------------------------------------- #region Add-On Licensing - 'addon-no-license-message' => __( '%s is a premium only add-on. You have to purchase a license first before activating the plugin.', 'freemius' ), - 'addon-trial-cancelled-message' => __( '%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you\'ll have to purchase a license.', 'freemius' ), - #endregion Add-On Licensing + #-------------------------------------------------------------------------------- + 'addon-no-license-message' => __( '%s is a premium only add-on. You have to purchase a license first before activating the plugin.', + 'freemius' ), + 'addon-trial-cancelled-message' => __( '%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you\'ll have to purchase a license.', + 'freemius' ), + #endregion + #-------------------------------------------------------------------------------- #region Billing Cycles + #-------------------------------------------------------------------------------- 'monthly' => _x( 'Monthly', 'as every month', 'freemius' ), 'mo' => _x( 'mo', 'as monthly period', 'freemius' ), 'annual' => _x( 'Annual', 'as once a year', 'freemius' ), @@ -387,4 +507,28 @@ 'save-x' => _x( 'Save %s', 'as a discount of $5 or 10%', 'freemius' ), #endregion Billing Cycles 'view-details' => __( 'View details', 'freemius' ), + #-------------------------------------------------------------------------------- + #region Trial + #-------------------------------------------------------------------------------- + 'approve-start-trial' => _x( 'Approve & Start Trial', 'button label', 'freemius' ), + /* translators: %1$s: Number of trial days; %2$s: Plan name; */ + 'start-trial-prompt-header' => __( 'You are 1-click away from starting your %1$s-day free trial of the %2$s plan.', 'freemius' ), + /* translators: %s: Link to freemius.com */ + 'start-trial-prompt-message' => __( 'For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt-in with your user and non-sensitive site information, allowing the plugin to periodically send data to %s to check for version updates and to validate your trial.', 'freemius' ), + + #endregion + #-------------------------------------------------------------------------------- + #region Billing Details + #-------------------------------------------------------------------------------- + 'business-name' => __( 'Business name', 'freemius' ), + 'tax-vat-id' => __( 'Tax / VAT ID', 'freemius' ), + 'address-line-n' => __( 'Address Line %d', 'freemius' ), + 'country' => __( 'Country', 'freemius' ), + 'select-country' => __( 'Select Country', 'freemius' ), + 'city' => __( 'City', 'freemius' ), + 'town' => __( 'Town', 'freemius' ), + 'state' => __( 'State', 'freemius' ), + 'province' => __( 'Province', 'freemius' ), + 'zip-postal-code' => __( 'ZIP / Postal Code', 'freemius' ), + #endregion ); diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-menu-manager.php b/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-menu-manager.php index 4a894e0a29b0eb91c33cd84847a2a59e48629c74..467a104f0153a6c81e2a00677c53b421f58819f6 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-menu-manager.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-menu-manager.php @@ -502,7 +502,6 @@ } /** - * * @author Vova Feldman (@svovaf) * @since 1.1.4 * @@ -545,5 +544,28 @@ return $hookname; } + /** + * Adds a counter to the module's top level menu item. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + * + * @param int $counter + * @param string $class + */ + function add_counter_to_menu_item( $counter = 1, $class = '' ) { + global $menu; + + // Find main menu item. + $found_menu = $this->find_top_level_menu(); + + if ( false === $menu ) { + return; + } + + // Override menu label. + $menu[ $found_menu['position'] ][0] = $found_menu['menu'][0] . ' <span class="update-plugins ' . $class . ' count-' . $counter . '"><span>' . $counter . '</span></span>'; + } + #endregion Top level menu Override } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-notice-manager.php b/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-notice-manager.php index 343d5583571924e0d7aa3fa03af5a033a7eb002b..c1c6b4953edcf6e3fa7047d60965be7112424e9f 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-notice-manager.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/managers/class-fs-admin-notice-manager.php @@ -279,6 +279,9 @@ * @param bool $all_admin */ function add_sticky( $message, $id, $title = '', $type = 'success', $all_admin = false ) { + $message = fs_apply_filter( $this->_slug, "sticky_message_{$id}", $message ); + $title = fs_apply_filter( $this->_slug, "sticky_title_{$id}", $title ); + $this->add( $message, $title, $type, true, $all_admin, $id ); } diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php index b69c77014b1c598777ad6b9962e51d85dc3f15e6..846dc5990007192dbceb31c91e0291b56ef2cc0e 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php @@ -3,4 +3,7 @@ exit; } - class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException { } \ No newline at end of file + if ( ! class_exists( 'Freemius_ArgumentNotExistException' ) ) { + class Freemius_ArgumentNotExistException extends Freemius_InvalidArgumentException { + } + } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/EmptyArgumentException.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/EmptyArgumentException.php index dff1a4ed80897a52ea02a631b2d83673026feab4..1957b843beee6555c807a76b7530ce1a1cbbd219 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/EmptyArgumentException.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/EmptyArgumentException.php @@ -3,4 +3,7 @@ exit; } - class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException { } \ No newline at end of file + if ( ! class_exists( 'Freemius_EmptyArgumentException' ) ) { + class Freemius_EmptyArgumentException extends Freemius_InvalidArgumentException { + } + } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/Exception.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/Exception.php index cc64350f17c39a87f0a11c3b3c8cca268718726b..2fafce8cb8d3514137e2dacc00b96bafea7dc3c8 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/Exception.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/Exception.php @@ -1,75 +1,74 @@ <?php - /** - * Thrown when an API call returns an exception. - * - */ - class Freemius_Exception extends Exception - { - protected $_result; - protected $_type; - protected $_code; - - /** - * Make a new API Exception with the given result. - * - * @param array $result The result from the API server. - */ - public function __construct($result) - { - $this->_result = $result; + if ( ! class_exists( 'Freemius_Exception' ) ) { + /** + * Thrown when an API call returns an exception. + * + */ + class Freemius_Exception extends Exception { + protected $_result; + protected $_type; + protected $_code; - $code = 0; - $message = 'Unknown error, please check GetResult().'; - $type = ''; - - if (isset($result['error']) && is_array($result['error'])) - { - if (isset($result['error']['code'])) - $code = $result['error']['code']; - if (isset($result['error']['message'])) - $message = $result['error']['message']; - if (isset($result['error']['type'])) - $type = $result['error']['type']; - } + /** + * Make a new API Exception with the given result. + * + * @param array $result The result from the API server. + */ + public function __construct( $result ) { + $this->_result = $result; - $this->_type = $type; - $this->_code = $code; - - parent::__construct($message, is_numeric($code) ? $code : 0); - } + $code = 0; + $message = 'Unknown error, please check GetResult().'; + $type = ''; - /** - * Return the associated result object returned by the API server. - * - * @return array The result from the API server - */ - public function getResult() - { - return $this->_result; - } + if ( isset( $result['error'] ) && is_array( $result['error'] ) ) { + if ( isset( $result['error']['code'] ) ) { + $code = $result['error']['code']; + } + if ( isset( $result['error']['message'] ) ) { + $message = $result['error']['message']; + } + if ( isset( $result['error']['type'] ) ) { + $type = $result['error']['type']; + } + } - public function getStringCode() - { - return $this->_code; - } - - public function getType() - { - return $this->_type; - } + $this->_type = $type; + $this->_code = $code; - /** - * To make debugging easier. - * - * @return string The string representation of the error - */ - public function __toString() - { - $str = $this->getType() . ': '; + parent::__construct( $message, is_numeric( $code ) ? $code : 0 ); + } - if ($this->code != 0) - $str .= $this->getStringCode() . ': '; + /** + * Return the associated result object returned by the API server. + * + * @return array The result from the API server + */ + public function getResult() { + return $this->_result; + } - return $str . $this->getMessage(); - } - } \ No newline at end of file + public function getStringCode() { + return $this->_code; + } + + public function getType() { + return $this->_type; + } + + /** + * To make debugging easier. + * + * @return string The string representation of the error + */ + public function __toString() { + $str = $this->getType() . ': '; + + if ( $this->code != 0 ) { + $str .= $this->getStringCode() . ': '; + } + + return $str . $this->getMessage(); + } + } + } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/InvalidArgumentException.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/InvalidArgumentException.php index 63b3a45e34745c7331aa80a6e976047fcd280d07..eb15570b6960c30214e7bc48eeb0bf8cda549b4e 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/InvalidArgumentException.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/InvalidArgumentException.php @@ -3,4 +3,6 @@ exit; } - class Freemius_InvalidArgumentException extends Freemius_Exception { } \ No newline at end of file + if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) { + class Freemius_InvalidArgumentException extends Freemius_Exception { } + } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/OAuthException.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/OAuthException.php index a1434a20946398615c6ae7c143a4fcc599a81612..5f2f8a40adcc0ac2be7fc790c98fdfa5e900081d 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/OAuthException.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Exceptions/OAuthException.php @@ -3,10 +3,10 @@ exit; } - class Freemius_OAuthException extends Freemius_Exception - { - public function __construct($pResult) - { - parent::__construct($pResult); - } - } \ No newline at end of file + if ( ! class_exists( 'Freemius_OAuthException' ) ) { + class Freemius_OAuthException extends Freemius_Exception { + public function __construct( $pResult ) { + parent::__construct( $pResult ); + } + } + } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Freemius.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Freemius.php index 2fc58d6f56332e694cade55997ace40a3c86f226..2f942da4b1db99d6fa25e2689ae8c484bd08b11f 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Freemius.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/Freemius.php @@ -17,7 +17,9 @@ require_once( dirname( __FILE__ ) . '/FreemiusBase.php' ); - define( 'FS_SDK__USER_AGENT', 'fs-php-' . Freemius_Api_Base::VERSION ); + if ( ! defined( 'FS_SDK__USER_AGENT' ) ) { + define( 'FS_SDK__USER_AGENT', 'fs-php-' . Freemius_Api_Base::VERSION ); + } if ( ! defined( 'FS_SDK__SIMULATE_NO_CURL' ) ) { define( 'FS_SDK__SIMULATE_NO_CURL', false ); @@ -31,7 +33,9 @@ define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false ); } - define( 'FS_SDK__HAS_CURL', ! FS_SDK__SIMULATE_NO_CURL && function_exists( 'curl_version' ) ); + if ( ! defined( 'FS_SDK__HAS_CURL' ) ) { + define( 'FS_SDK__HAS_CURL', ! FS_SDK__SIMULATE_NO_CURL && function_exists( 'curl_version' ) ); + } if ( ! FS_SDK__HAS_CURL ) { $curl_version = array( 'version' => '7.0.0' ); @@ -39,7 +43,9 @@ $curl_version = curl_version(); } - define( 'FS_API__PROTOCOL', version_compare( $curl_version['version'], '7.37', '>=' ) ? 'https' : 'http' ); + if ( ! defined( 'FS_API__PROTOCOL' ) ) { + define( 'FS_API__PROTOCOL', version_compare( $curl_version['version'], '7.37', '>=' ) ? 'https' : 'http' ); + } if ( ! defined( 'FS_API__LOGGER_ON' ) ) { define( 'FS_API__LOGGER_ON', false ); @@ -52,6 +58,10 @@ define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' ); } + if ( class_exists( 'Freemius_Api' ) ) { + return; + } + class Freemius_Api extends Freemius_Api_Base { private static $_logger = array(); @@ -312,12 +322,9 @@ CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60, CURLOPT_USERAGENT => FS_SDK__USER_AGENT, + CURLOPT_HTTPHEADER => array(), ); - if ( ! isset( $opts[ CURLOPT_HTTPHEADER ] ) || ! is_array( $opts[ CURLOPT_HTTPHEADER ] ) ) { - $opts[ CURLOPT_HTTPHEADER ] = array(); - } - if ( 'POST' === $pMethod || 'PUT' === $pMethod ) { if ( is_array( $pParams ) && 0 < count( $pParams ) ) { $opts[ CURLOPT_HTTPHEADER ][] = 'Content-Type: application/json'; @@ -328,7 +335,7 @@ $opts[ CURLOPT_RETURNTRANSFER ] = true; } - $request_url = Freemius_Api::GetUrl( $pCanonizedPath, $pIsSandbox ); + $request_url = self::GetUrl( $pCanonizedPath, $pIsSandbox ); $opts[ CURLOPT_URL ] = $request_url; $opts[ CURLOPT_CUSTOMREQUEST ] = $pMethod; diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/FreemiusBase.php b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/FreemiusBase.php index e5b1da55320d612a93c5ab4cce5b0f149f4e516d..eccb632d81b6390c2b27cebba74833ae4010aed4 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/FreemiusBase.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/sdk/FreemiusBase.php @@ -15,9 +15,15 @@ * under the License. */ - define( 'FS_API__VERSION', '1' ); - define( 'FS_SDK__PATH', dirname( __FILE__ ) ); - define( 'FS_SDK__EXCEPTIONS_PATH', FS_SDK__PATH . '/Exceptions/' ); + if ( ! defined( 'FS_API__VERSION' ) ) { + define( 'FS_API__VERSION', '1' ); + } + if ( ! defined( 'FS_SDK__PATH' ) ) { + define( 'FS_SDK__PATH', dirname( __FILE__ ) ); + } + if ( ! defined( 'FS_SDK__EXCEPTIONS_PATH' ) ) { + define( 'FS_SDK__EXCEPTIONS_PATH', FS_SDK__PATH . '/Exceptions/' ); + } if ( ! function_exists( 'json_decode' ) ) { throw new Exception( 'Freemius needs the JSON PHP extension.' ); @@ -36,6 +42,10 @@ require_once FS_SDK__EXCEPTIONS_PATH . $e . '.php'; } + if ( class_exists( 'Freemius_Api_Base' ) ) { + return; + } + abstract class Freemius_Api_Base { const VERSION = '1.0.4'; const FORMAT = 'json'; @@ -47,7 +57,7 @@ protected $_isSandbox; /** - * @param string $pScope 'app', 'developer', 'user' or 'install'. + * @param string $pScope 'app', 'developer', 'plugin', 'user' or 'install'. * @param number $pID Element's id. * @param string $pPublic Public key. * @param string $pSecret Element's secret key. diff --git a/wp-content/plugins/nextgen-gallery/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php b/wp-content/plugins/nextgen-gallery/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php index 2f0a67aad8891c922c79fec25ffd46beca4d11bf..69b70be63788786cf390bd93f0bcc051068a6cd1 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php +++ b/wp-content/plugins/nextgen-gallery/freemius/includes/supplements/fs-essential-functions-1.1.7.1.php @@ -37,9 +37,11 @@ // Get active plugin's main files real full names (might be symlinks). foreach ( $all_plugins as $relative_path => &$data ) { if ( 0 === strpos( $file_real_path, fs_normalize_path( dirname( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) ) ) ) ) { - return $relative_path; + if ( '.' !== dirname( trailingslashit( $relative_path ) ) ) { + return $relative_path; + } } } return null; - } \ No newline at end of file + } diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-da_DK.mo b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-da_DK.mo new file mode 100644 index 0000000000000000000000000000000000000000..5c54b1a8a9ace1c47fb48557bd7d326f324c71af Binary files /dev/null and b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-da_DK.mo differ diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-da_DK.po b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-da_DK.po new file mode 100644 index 0000000000000000000000000000000000000000..ca32b8ca3058419ddd4754148d6633acffaa51ed --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-da_DK.po @@ -0,0 +1,1661 @@ +# Copyright (C) 2016 freemius +# This file is distributed under the same license as the freemius package. +# Translators: +# Joachim Jensen <jv@intox.dk>, 2016 +msgid "" +msgstr "" +"Project-Id-Version: WordPress SDK\n" +"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n" +"PO-Revision-Date: 2016-12-07 01:29+0000\n" +"Last-Translator: Vova Feldman <vova@freemius.com>\n" +"Language-Team: Danish (Denmark) (http://www.transifex.com/freemius/wordpress-sdk/language/da_DK/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: da_DK\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: includes/i18n.php41, includes/i18n.php:55 +msgid "Yes - I'm in!" +msgstr "Ja - jeg er med!" + +#: includes/i18n.php43, includes/i18n.php:57 +msgid "Not today" +msgstr "Ikke i dag" + +#: includes/i18n.php:69 +msgid "Account" +msgstr "Konto" + +#: includes/i18n.php:71 +msgid "Add On" +msgstr "Tilføjelse" + +#: includes/i18n.php:73 +msgid "Contact Us" +msgstr "Kontakt os" + +#: includes/i18n.php:75 +msgid "Contact Support" +msgstr "Kontakt support" + +#: includes/i18n.php:77 +msgid "Change Ownership" +msgstr "Skift ejerskab" + +#: includes/i18n.php:79 +msgid "Support" +msgstr "Support" + +#: includes/i18n.php:81 +msgid "Support Forum" +msgstr "Supportforum" + +#: includes/i18n.php:83 +msgid "Add Ons" +msgstr "Tilføjelser" + +#: includes/i18n.php:85 +msgctxt "verb" +msgid "Upgrade" +msgstr "Opgrader" + +#: includes/i18n.php:87 +msgid "Awesome" +msgstr "Sejt" + +#: includes/i18n.php:89 +msgctxt "noun" +msgid "Pricing" +msgstr "Priser" + +#: includes/i18n.php:91 +msgctxt "noun" +msgid "Price" +msgstr "Pris" + +#: includes/i18n.php:93 +msgid "Unlimited Updates" +msgstr "Ubegrænsede opdateringer" + +#: includes/i18n.php:95 +msgctxt "verb" +msgid "Downgrade" +msgstr "Nedgrader" + +#: includes/i18n.php:97 +msgid "Cancel Trial" +msgstr "Annuller prøveperiode" + +#: includes/i18n.php:99 +msgid "Free Trial" +msgstr "Gratis prøveperiode" + +#: includes/i18n.php:101 +msgid "Start my free %s" +msgstr "Start min gratis %s" + +#: includes/i18n.php:103 +msgid "No commitment for %s - cancel anytime" +msgstr "Ingen bindinger ved %s - annuller når som helst" + +#: includes/i18n.php:105 +msgid "After your free %s, pay as little as %s" +msgstr "Efter din gratis %s er prisen kun %s" + +#: includes/i18n.php:107 +msgid "Details" +msgstr "Detaljer" + +#: includes/i18n.php:109 +msgid "Account Details" +msgstr "Kontodetaljer" + +#: includes/i18n.php:111 +msgctxt "verb" +msgid "Delete" +msgstr "Slet" + +#: includes/i18n.php:113 +msgctxt "verb" +msgid "Show" +msgstr "Vis" + +#: includes/i18n.php:115 +msgctxt "verb" +msgid "Hide" +msgstr "Skjul" + +#: includes/i18n.php:117 +msgctxt "verb" +msgid "Edit" +msgstr "Rediger" + +#: includes/i18n.php:119 +msgctxt "verb" +msgid "Update" +msgstr "" + +#: includes/i18n.php:121 +msgid "Date" +msgstr "Dato" + +#: includes/i18n.php:123 +msgid "Amount" +msgstr "Beløb" + +#: includes/i18n.php:125 +msgid "Invoice" +msgstr "Faktura" + +#: includes/i18n.php:127 +msgid "Billing" +msgstr "Betaling" + +#: includes/i18n.php:129 +msgid "Payments" +msgstr "Betalinger" + +#: includes/i18n.php:131 +msgid "Delete Account" +msgstr "Slet konto" + +#: includes/i18n.php:133 +msgctxt "as close a window" +msgid "Dismiss" +msgstr "Fjern" + +#: includes/i18n.php:135 +msgctxt "as product pricing plan" +msgid "Plan" +msgstr "Plan" + +#: includes/i18n.php:137 +msgid "Change Plan" +msgstr "Skift plan" + +#: includes/i18n.php:139 +msgctxt "as download professional version" +msgid "Download %s Version" +msgstr "" + +#: includes/i18n.php:141 +msgctxt "as download professional version now" +msgid "Download %s version now" +msgstr "" + +#: includes/i18n.php:145 +msgctxt "as download latest version" +msgid "Download Latest" +msgstr "Download seneste" + +#: includes/i18n.php:147 +msgctxt "E.g. you have a professional license." +msgid "You have a %s license." +msgstr "Du har en %s licens." + +#: includes/i18n.php:151 +msgid "New" +msgstr "Ny" + +#: includes/i18n.php:153 +msgid "Free" +msgstr "Gratis" + +#: includes/i18n.php:155 +msgctxt "as trial plan" +msgid "Trial" +msgstr "Prøveperiode" + +#: includes/i18n.php:157 +msgctxt "as starting a trial plan" +msgid "Start Trial" +msgstr "" + +#: includes/i18n.php:159 +msgctxt "verb" +msgid "Purchase" +msgstr "Køb" + +#: includes/i18n.php:161 +msgid "Purchase License" +msgstr "Køb licens" + +#: includes/i18n.php:163 +msgctxt "verb" +msgid "Buy" +msgstr "Køb" + +#: includes/i18n.php:165 +msgid "Buy License" +msgstr "Køb licens" + +#: includes/i18n.php:167 +msgid "Single Site License" +msgstr "" + +#: includes/i18n.php:169 +msgid "Unlimited Licenses" +msgstr "Ubegrænsede licenser" + +#: includes/i18n.php:171 +msgid "Up to %s Sites" +msgstr "Op til %s websteder" + +#: includes/i18n.php:173 +msgid "%sRenew your license now%s to access version %s features and support." +msgstr "" + +#: includes/i18n.php:177 +msgid "" +"Enter the email address you've used for the upgrade below and we will resend" +" you the license key." +msgstr "" + +#: includes/i18n.php:181 +msgctxt "e.g. Professional Plan" +msgid "%s Plan" +msgstr "%s Plan" + +#: includes/i18n.php:183 +msgid "You are just one step away - %s" +msgstr "Du mangler kun ét skridt - %s" + +#: includes/i18n.php:185 +msgctxt "%s - plugin name. As complete \"Jetpack\" activation now" +msgid "Complete \"%s\" Activation Now" +msgstr "Færdiggør aktivering af \"%s\" nu" + +#: includes/i18n.php:189 +msgid "We made a few tweaks to the plugin, %s" +msgstr "" + +#: includes/i18n.php:191 +msgid "Opt-in to make \"%s\" Better!" +msgstr "" + +#: includes/i18n.php:193 +msgid "Error" +msgstr "Fejl" + +#: includes/i18n.php:195 +msgid "" +"Freemius SDK couldn't find the plugin's main file. Please contact " +"sdk@freemius.com with the current error." +msgstr "" + +#: includes/i18n.php:203 +msgctxt "as expiration date" +msgid "Expiration" +msgstr "" + +#: includes/i18n.php:205 +msgctxt "as software license" +msgid "License" +msgstr "Licens" + +#: includes/i18n.php:207 +msgid "not verified" +msgstr "ikke verificeret" + +#: includes/i18n.php:209 +msgid "Verify Email" +msgstr "Verificer e-mail" + +#: includes/i18n.php:211 +msgctxt "e.g. expires in 2 months" +msgid "Expires in %s" +msgstr "Udløber om %s" + +#: includes/i18n.php:213 +msgctxt "e.g. auto renews in 2 months" +msgid "Auto renews in %s" +msgstr "" + +#: includes/i18n.php:215 +msgid "No expiration" +msgstr "Udløber ikke" + +#: includes/i18n.php:217 +msgid "Expired" +msgstr "Udløbet" + +#: includes/i18n.php:219 +msgid "Cancelled" +msgstr "Annulleret" + +#: includes/i18n.php:221 +msgctxt "e.g. In 2 hours" +msgid "In %s" +msgstr "Om %s" + +#: includes/i18n.php:223 +msgctxt "e.g. 2 min ago" +msgid "%s ago" +msgstr "%s siden" + +#: includes/i18n.php:225 +msgctxt "as plugin version" +msgid "Version" +msgstr "Version" + +#: includes/i18n.php:227 +msgid "Name" +msgstr "Navn" + +#: includes/i18n.php:229 +msgid "Email" +msgstr "E-mail" + +#: includes/i18n.php:231 +msgid "Email address" +msgstr "E-mailadresse" + +#: includes/i18n.php:233 +msgid "Verified" +msgstr "Verificeret" + +#: includes/i18n.php:235 +msgid "Plugin" +msgstr "Plugin" + +#: includes/i18n.php:237 +msgid "Plugins" +msgstr "Plugins" + +#: includes/i18n.php:239 +msgid "Themes" +msgstr "Temaer" + +#: includes/i18n.php:241 +msgctxt "as file/folder path" +msgid "Path" +msgstr "Sti" + +#: includes/i18n.php:243 +msgid "Title" +msgstr "Titel" + +#: includes/i18n.php:245 +msgid "Free version" +msgstr "Gratis version" + +#: includes/i18n.php:247 +msgid "Premium version" +msgstr "" + +#: includes/i18n.php:249 +msgctxt "as WP plugin slug" +msgid "Slug" +msgstr "Kortnavn" + +#: includes/i18n.php:251 +msgid "ID" +msgstr "ID" + +#: includes/i18n.php:253 +msgid "Users" +msgstr "Brugere" + +#: includes/i18n.php:255 +msgid "Plugin Installs" +msgstr "Plugin-installationer" + +#: includes/i18n.php:257 +msgctxt "like websites" +msgid "Sites" +msgstr "Websteder" + +#: includes/i18n.php:259 +msgid "User ID" +msgstr "Bruger-ID" + +#: includes/i18n.php:261 +msgid "Site ID" +msgstr "Websteds-ID" + +#: includes/i18n.php:263 +msgid "Public Key" +msgstr "Offentlig nøgle" + +#: includes/i18n.php:265 +msgid "Secret Key" +msgstr "Privat nøgle" + +#: includes/i18n.php:267 +msgctxt "as secret encryption key missing" +msgid "No Secret" +msgstr "Ingen privat nøgle" + +#: includes/i18n.php:269 +msgid "No ID" +msgstr "Intet ID" + +#: includes/i18n.php:271 +msgctxt "as synchronize license" +msgid "Sync License" +msgstr "Synkroniser licens" + +#: includes/i18n.php:273 +msgctxt "as synchronize" +msgid "Sync" +msgstr "Synkroniser" + +#: includes/i18n.php:275 +msgid "Activate License" +msgstr "Aktiver licens" + +#: includes/i18n.php:277 +msgid "Activate Free Version" +msgstr "Aktiver gratis version" + +#: includes/i18n.php:279 +msgid "" +"Please enter the license key that you received in the email right after the " +"purchase:" +msgstr "" + +#: includes/i18n.php:283 +msgid "Activating license..." +msgstr "Aktiverer licens..." + +#: includes/i18n.php:285 +msgid "Change License" +msgstr "Skift licens" + +#: includes/i18n.php:287 +msgid "Update License" +msgstr "Opdater licens" + +#: includes/i18n.php:289 +msgid "Deactivate License" +msgstr "Deaktiver licens" + +#: includes/i18n.php:291 +msgid "Activate" +msgstr "Aktiver" + +#: includes/i18n.php:293 +msgid "Deactivate" +msgstr "Deaktiver" + +#: includes/i18n.php:295 +msgid "Skip & Deactivate" +msgstr "Spring over & deaktiver" + +#: includes/i18n.php:297 +msgid "No - just deactivate" +msgstr "Nej - bare deaktiver" + +#: includes/i18n.php:299 +msgid "Yes - do your thing" +msgstr "" + +#: includes/i18n.php:301 +msgctxt "active mode" +msgid "Active" +msgstr "Aktiv" + +#: includes/i18n.php:303 +msgctxt "is active mode?" +msgid "Is Active" +msgstr "Er aktiv" + +#: includes/i18n.php:305 +msgid "Install Now" +msgstr "Installer nu" + +#: includes/i18n.php:307 +msgid "Install Update Now" +msgstr "Installer opdatering nu" + +#: includes/i18n.php:309 +msgid "More information about %s" +msgstr "Mere information om %s" + +#: includes/i18n.php:311 +msgid "Localhost" +msgstr "Localhost" + +#: includes/i18n.php:313 +msgctxt "as activate Professional plan" +msgid "Activate %s Plan" +msgstr "Aktiver plan %s" + +#: includes/i18n.php:315 +msgctxt "as 5 licenses left" +msgid "%s left" +msgstr "%s tilbage" + +#: includes/i18n.php:317 +msgid "Last license" +msgstr "" + +#: includes/i18n.php:319 +msgid "What is your %s?" +msgstr "" + +#: includes/i18n.php:321 +msgid "Activate this add-on" +msgstr "Aktiver denne tilføjelse" + +#: includes/i18n.php:323 +msgid "" +"Deactivating your license will block all premium features, but will enable " +"you to activate the license on another site. Are you sure you want to " +"proceed?" +msgstr "" + +#: includes/i18n.php:327 +msgid "" +"Deleting the account will automatically deactivate your %s plan license so " +"you can use it on other sites. If you want to terminate the recurring " +"payments as well, click the \"Cancel\" button, and first \"Downgrade\" your " +"account. Are you sure you would like to continue with the deletion?" +msgstr "" + +#: includes/i18n.php:331 +msgid "" +"Deletion is not temporary. Only delete if you no longer want to use this " +"plugin anymore. Are you sure you would like to continue with the deletion?" +msgstr "" + +#: includes/i18n.php:335 +msgid "" +"Downgrading your plan will immediately stop all future recurring payments " +"and your %s plan license will expire in %s." +msgstr "" + +#: includes/i18n.php:339 +msgid "" +"Cancelling the trial will immediately block access to all premium features. " +"Are you sure?" +msgstr "" + +#: includes/i18n.php:343 +msgid "" +"You can still enjoy all %s features but you will not have access to plugin " +"updates and support." +msgstr "" + +#: includes/i18n.php:347 +msgid "" +"Once your license expire you can still use the Free version but you will NOT" +" have access to the %s features." +msgstr "" + +#: includes/i18n.php:351 +msgid "Are you sure you want to proceed?" +msgstr "" + +#: includes/i18n.php:357 +msgid "Add Ons for %s" +msgstr "Tilføjelser til %s" + +#: includes/i18n.php:359 +msgid "" +"We could'nt load the add-ons list. It's probably an issue on our side, " +"please try to come back in few minutes." +msgstr "" + +#: includes/i18n.php:365 +msgid "Anonymous feedback" +msgstr "Anonym feedback" + +#: includes/i18n.php:367 +msgid "Quick feedback" +msgstr "Hurtig feedback" + +#: includes/i18n.php:369 +msgid "If you have a moment, please let us know why you are deactivating" +msgstr "" + +#: includes/i18n.php:373 +msgid "Yes - Deactivate" +msgstr "Ja - deaktiver" + +#: includes/i18n.php:375 +msgid "Submit & Deactivate" +msgstr "Send & deaktiver" + +#: includes/i18n.php:377 +msgid "Cancel" +msgstr "Annuller" + +#: includes/i18n.php:379 +msgid "I no longer need the plugin" +msgstr "" + +#: includes/i18n.php:381 +msgid "I found a better plugin" +msgstr "Jeg har fundet et bedre plugin" + +#: includes/i18n.php:383 +msgid "I only needed the plugin for a short period" +msgstr "" + +#: includes/i18n.php:385 +msgid "The plugin broke my site" +msgstr "Pluginnet ødelagde mit websted" + +#: includes/i18n.php:387 +msgid "The plugin suddenly stopped working" +msgstr "Pluginnet virker ikke længere" + +#: includes/i18n.php:389 +msgid "I can't pay for it anymore" +msgstr "Jeg kan ikke længere betale for det" + +#: includes/i18n.php:391 +msgid "It's a temporary deactivation. I'm just debugging an issue." +msgstr "" + +#: includes/i18n.php:395 +msgctxt "" +"the text of the \"other\" reason for deactivating the plugin that is shown " +"in the modal box." +msgid "Other" +msgstr "Andet" + +#: includes/i18n.php:399 +msgid "Kindly tell us the reason so we can improve." +msgstr "" + +#: includes/i18n.php:401 +msgid "What's the plugin's name?" +msgstr "" + +#: includes/i18n.php:403 +msgid "What price would you feel comfortable paying?" +msgstr "" + +#: includes/i18n.php:405 +msgid "I couldn't understand how to make it work" +msgstr "" + +#: includes/i18n.php:407 +msgid "" +"The plugin is great, but I need specific feature that you don't support" +msgstr "" + +#: includes/i18n.php:411 +msgid "The plugin is not working" +msgstr "Pluginnet virker ikke" + +#: includes/i18n.php:413 +msgid "It's not what I was looking for" +msgstr "" + +#: includes/i18n.php:415 +msgid "The plugin didn't work as expected" +msgstr "" + +#: includes/i18n.php:417 +msgid "What feature?" +msgstr "" + +#: includes/i18n.php:419 +msgid "Kindly share what didn't work so we can fix it for future users..." +msgstr "" + +#: includes/i18n.php:423 +msgid "What you've been looking for?" +msgstr "" + +#: includes/i18n.php:425 +msgid "What did you expect?" +msgstr "Hvad forventede du?" + +#: includes/i18n.php:427 +msgid "The plugin didn't work" +msgstr "Pluginnet virkede ikke" + +#: includes/i18n.php:429 +msgid "I don't like to share my information with you" +msgstr "" + +#: includes/i18n.php:431 +msgid "" +"You might have missed it, but you don't have to share any data and can just " +"%s the opt-in." +msgstr "" + +#: includes/i18n.php:441 +msgctxt "greeting" +msgid "Hey %s," +msgstr "Hey %s," + +#: includes/i18n.php:443 +msgctxt "a greeting. E.g. Thanks John!" +msgid "Thanks %s!" +msgstr "Tak %s!" + +#: includes/i18n.php:445 +msgid "" +"Never miss an important update - opt-in to our security and feature updates " +"notifications, and non-sensitive diagnostic tracking with %4$s." +msgstr "" + +#: includes/i18n.php:449 +msgid "" +"Please help us improve %1$s! If you opt-in, some data about your usage of " +"%1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still " +"work just fine." +msgstr "" + +#: includes/i18n.php:453 +msgid "" +"You should receive an activation email for %s to your mailbox at %s. Please " +"make sure you click the activation button in that email to %s." +msgstr "" + +#: includes/i18n.php:455 +msgid "complete the install" +msgstr "" + +#: includes/i18n.php:457 +msgid "start the trial" +msgstr "" + +#: includes/i18n.php:459 +msgid "" +"Thanks for purchasing %s! To get started, please enter your license key:" +msgstr "" + +#: includes/i18n.php:463 +msgid "" +"The plugin will be periodically sending data to %s to check for plugin " +"updates and verify the validity of your license." +msgstr "" + +#: includes/i18n.php:467 +msgid "What permissions are being granted?" +msgstr "Hvilke tilladelser bliver givet?" + +#: includes/i18n.php:469 +msgid "Your Profile Overview" +msgstr "Overblik af din profil" + +#: includes/i18n.php:471 +msgid "Name and email address" +msgstr "Navn og e-mailadresse" + +#: includes/i18n.php:473 +msgid "Your Site Overview" +msgstr "Overblik af dit websted" + +#: includes/i18n.php:475 +msgid "Site URL, WP version, PHP info, plugins & themes" +msgstr "" + +#: includes/i18n.php:479 +msgid "Current Plugin Events" +msgstr "Nuværende plugin-begivenheder" + +#: includes/i18n.php:481 +msgid "Activation, deactivation and uninstall" +msgstr "Aktivering, deaktivering og afinstallering" + +#: includes/i18n.php:483 +msgid "Plugins & Themes" +msgstr "Plugins & Temaer" + +#: includes/i18n.php:485 +msgid "Titles, versions and state." +msgstr "Titler, versioner og tilstand." + +#: includes/i18n.php:487 +msgid "Admin Notices" +msgstr "" + +#: includes/i18n.php:489 +msgid "Newsletter" +msgstr "Nyhedsbrev" + +#: includes/i18n.php:491 +msgid "Updates, announcements, marketing, no spam" +msgstr "" + +#: includes/i18n.php:493 +msgid "Privacy Policy" +msgstr "Privatlivspolitik" + +#: includes/i18n.php:495 +msgid "Terms of Service" +msgstr "Servicevilkår" + +#: includes/i18n.php:497 +msgctxt "as activating plugin" +msgid "Activating" +msgstr "Aktiverer" + +#: includes/i18n.php:499 +msgctxt "as in the process of sending an email" +msgid "Sending email" +msgstr "Sender e-mail" + +#: includes/i18n.php:503 +msgctxt "button label" +msgid "Allow & Continue" +msgstr "Tillad & Fortsæt" + +#: includes/i18n.php:505 +msgctxt "button label" +msgid "Agree & Activate License" +msgstr "Accepter & aktiver licens" + +#: includes/i18n.php:507 +msgctxt "verb" +msgid "Skip" +msgstr "Spring over" + +#: includes/i18n.php:509 +msgid "Click here to use the plugin anonymously" +msgstr "Klik her for at benytte pluginnet anonymt" + +#: includes/i18n.php:511 +msgid "Re-send activation email" +msgstr "Gensend e-mail om aktivering" + +#: includes/i18n.php:513 +msgid "License key" +msgstr "Licensnøgle" + +#: includes/i18n.php:515 +msgid "Send License Key" +msgstr "Send licensnøgle" + +#: includes/i18n.php:517 +msgid "Sending license key" +msgstr "Sender licensnøgle" + +#: includes/i18n.php:519 +msgid "Have a license key?" +msgstr "Har du en licensnøgle?" + +#: includes/i18n.php:521 +msgid "Don't have a license key?" +msgstr "Har du ikke en licensnøgle?" + +#: includes/i18n.php:523 +msgid "Can't find your license key?" +msgstr "Kan du ikke finde din licensnøgle?" + +#: includes/i18n.php:525 +msgid "" +"We couldn't find your email address in the system, are you sure it's the " +"right address?" +msgstr "" + +#: includes/i18n.php:529 +msgid "" +"We can't see any active licenses associated with that email address, are you" +" sure it's the right address?" +msgstr "" + +#: includes/i18n.php:533 +msgid "Opt In" +msgstr "" + +#: includes/i18n.php:535 +msgid "Opt Out" +msgstr "" + +#: includes/i18n.php:537 +msgid "On second thought - I want to continue helping" +msgstr "" + +#: includes/i18n.php:541 +msgid "Opting out..." +msgstr "" + +#: includes/i18n.php:543 +msgid "Opting in..." +msgstr "" + +#: includes/i18n.php:545 +msgid "" +"We appreciate your help in making the %s better by letting us track some " +"usage data." +msgstr "" + +#: includes/i18n.php:549 +msgid "" +"Usage tracking is done in the name of making %s better. Making a better user" +" experience, prioritizing new features, and more good things. We'd really " +"appreciate if you'll reconsider letting us continue with the tracking." +msgstr "" + +#: includes/i18n.php:553 +msgid "" +"By clicking \"Opt Out\", we will no longer be sending any data from %s to " +"%s." +msgstr "" + +#: includes/i18n.php:563 +msgid "Screenshots" +msgstr "Skærmbilleder" + +#: includes/i18n.php:565 +msgid "Click to view full-size screenshot %d" +msgstr "" + +#: includes/i18n.php:573 +msgid "Freemius Debug" +msgstr "Freemius Debug" + +#: includes/i18n.php:575 +msgctxt "as turned on" +msgid "On" +msgstr "Til" + +#: includes/i18n.php:577 +msgctxt "as turned off" +msgid "Off" +msgstr "Fra" + +#: includes/i18n.php:579 +msgctxt "as code debugging" +msgid "Debugging" +msgstr "Fejlfinding" + +#: includes/i18n.php:581 +msgid "Freemius State" +msgstr "Freemius tilstand" + +#: includes/i18n.php:583 +msgctxt "as connection was successful" +msgid "Connected" +msgstr "Forbundet" + +#: includes/i18n.php:585 +msgctxt "as connection blocked" +msgid "Blocked" +msgstr "Blokeret" + +#: includes/i18n.php:587 +msgctxt "as application program interface" +msgid "API" +msgstr "API" + +#: includes/i18n.php:589 +msgctxt "as software development kit versions" +msgid "SDK" +msgstr "SDK" + +#: includes/i18n.php:591 +msgctxt "as software development kit versions" +msgid "SDK Versions" +msgstr "SDK-versioner" + +#: includes/i18n.php:595 +msgctxt "as plugin folder path" +msgid "Plugin Path" +msgstr "Plugin-sti" + +#: includes/i18n.php:597 +msgctxt "as sdk path" +msgid "SDK Path" +msgstr "SDK-sti" + +#: includes/i18n.php:599 +msgid "Add Ons of Plugin %s" +msgstr "Tilføjelser til plugin %s" + +#: includes/i18n.php:601 +msgid "Are you sure you want to delete all Freemius data?" +msgstr "" + +#: includes/i18n.php:605 +msgid "Actions" +msgstr "Handlinger" + +#: includes/i18n.php:607 +msgid "Delete All Accounts" +msgstr "Slet alle konti" + +#: includes/i18n.php:609 +msgid "Start Fresh" +msgstr "Start forfra" + +#: includes/i18n.php:611 +msgid "Clear API Cache" +msgstr "Ryd API-cache" + +#: includes/i18n.php:613 +msgid "Sync Data From Server" +msgstr "Synkroniser data fra server" + +#: includes/i18n.php:615 +msgid "Scheduled Crons" +msgstr "Planlagte cron jobs" + +#: includes/i18n.php:617 +msgid "Plugins & Themes Sync" +msgstr "Synkronisering af plugins og temaer" + +#: includes/i18n.php:625 +msgctxt "as congratulations" +msgid "Congrats" +msgstr "Tillykke" + +#: includes/i18n.php:627 +msgctxt "exclamation" +msgid "Oops" +msgstr "Ups" + +#: includes/i18n.php:629 +msgctxt "interjection expressing joy or exuberance" +msgid "Yee-haw" +msgstr "" + +#: includes/i18n.php:633 +msgctxt "" +"(especially in electronic communication) used to express elation, " +"enthusiasm, or triumph." +msgid "W00t" +msgstr "" + +#: includes/i18n.php:637 +msgctxt "a positive response" +msgid "Right on" +msgstr "Sådan" + +#: includes/i18n.php:639 +msgctxt "" +"something somebody says when they are thinking about what you have just " +"said. " +msgid "Hmm" +msgstr "Hmm" + +#: includes/i18n.php:643 +msgid "O.K" +msgstr "O.K" + +#: includes/i18n.php:645 +msgctxt "exclamation" +msgid "Hey" +msgstr "Hey" + +#: includes/i18n.php:647 +msgctxt "advance notice of something that will need attention." +msgid "Heads up" +msgstr "Se her" + +#: includes/i18n.php:657 +msgid "Seems like you got the latest release." +msgstr "" + +#: includes/i18n.php:659 +msgid "You are all good!" +msgstr "Det var det!" + +#: includes/i18n.php:661 +msgid "" +"Sorry, we could not complete the email update. Another user with the same " +"email is already registered." +msgstr "" + +#: includes/i18n.php:665 +msgid "" +"If you would like to give up the ownership of the plugin's account to %s " +"click the Change Ownership button." +msgstr "" + +#: includes/i18n.php:669 +msgid "" +"Your email was successfully updated. You should receive an email with " +"confirmation instructions in few moments." +msgstr "" + +#: includes/i18n.php:673 +msgid "Your name was successfully updated." +msgstr "Dit navn er blevet opdateret." + +#: includes/i18n.php:675 +msgid "You have successfully updated your %s." +msgstr "Opdatering af %s blev gennemført." + +#: includes/i18n.php:677 +msgid "Please provide your full name." +msgstr "Indtast venligst dit fulde navn." + +#: includes/i18n.php:679 +msgid "" +"Verification mail was just sent to %s. If you can't find it after 5 min, " +"please check your spam box." +msgstr "" + +#: includes/i18n.php:683 +msgid "" +"Just letting you know that the add-ons information of %s is being pulled " +"from an external server." +msgstr "" + +#: includes/i18n.php:687 +msgid "No credit card required" +msgstr "Betalingskort ikke påkrævet" + +#: includes/i18n.php:689 +msgid "Premium plugin version was successfully activated." +msgstr "" + +#: includes/i18n.php:693 +msgid "The upgrade of %s was successfully completed." +msgstr "" + +#: includes/i18n.php:695 +msgid "Your account was successfully activated with the %s plan." +msgstr "" + +#: includes/i18n.php:699 +msgid "Download the latest %s version now" +msgstr "Download den seneste version af %s nu" + +#: includes/i18n.php:701 +msgid "Please follow these steps to complete the upgrade" +msgstr "" + +#: includes/i18n.php:705 +msgid "Download the latest %s version" +msgstr "Download den seneste version af %s" + +#: includes/i18n.php:707 +msgid "Deactivate the free version" +msgstr "Deaktiver den gratis version" + +#: includes/i18n.php:709 +msgid "Upload and activate the downloaded version" +msgstr "Upload og aktiver den downloadede version" + +#: includes/i18n.php:711 +msgid "How to upload and activate?" +msgstr "Upload og aktivering, hvordan?" + +#: includes/i18n.php:713 +msgctxt "%s - product name, e.g. Facebook add-on was successfully..." +msgid "%s Add-on was successfully purchased." +msgstr "Betalingen for tilføjelsen %s blev gennemført." + +#: includes/i18n.php:717 +msgid "Your %s Add-on plan was successfully upgraded." +msgstr "" + +#: includes/i18n.php:721 +msgid "Your email has been successfully verified - you are AWESOME!" +msgstr "" + +#: includes/i18n.php:725 +msgid "Your plan was successfully upgraded." +msgstr "Din plan er blevet opgraderet." + +#: includes/i18n.php:727 +msgid "Your plan was successfully changed to %s." +msgstr "Din plan er blevet ændret til %s." + +#: includes/i18n.php:729 +msgid "" +"Your license has expired. You can still continue using the free plugin " +"forever." +msgstr "" + +#: includes/i18n.php:733 +msgid "" +"Your license has been cancelled. If you think it's a mistake, please contact" +" support." +msgstr "" + +#: includes/i18n.php:737 +msgid "Your trial has been successfully started." +msgstr "Din prøveperiode er begyndt." + +#: includes/i18n.php:739 +msgid "Your license was successfully activated." +msgstr "Din licens er blevet aktiveret." + +#: includes/i18n.php:741 +msgid "It looks like your site currently doesn't have an active license." +msgstr "Det ser ud til, at dit websted endnu ikke har en aktiv licens." + +#: includes/i18n.php:745 +msgid "" +"Your license was successfully deactivated, you are back to the %s plan." +msgstr "" + +#: includes/i18n.php:749 +msgid "It looks like the license deactivation failed." +msgstr "Det ser ud til, at licens-deaktiveringen mislykkedes." + +#: includes/i18n.php:753 +msgid "It looks like the license could not be activated." +msgstr "Det ser ud til, at licensen ikke kunne aktiveres." + +#: includes/i18n.php:757 +msgid "Error received from the server:" +msgstr "Fejl modtager fra serveren:" + +#: includes/i18n.php:759 +msgid "" +"Your trial has expired. You can still continue using all our free features." +msgstr "Din prøveperiode er udløbet. Du kan fortsat bruge alle vores gratis funktioner." + +#: includes/i18n.php:763 +msgid "" +"Your plan was successfully downgraded. Your %s plan license will expire in " +"%s." +msgstr "" + +#: includes/i18n.php:767 +msgid "" +"Seems like we are having some temporary issue with your plan downgrade. " +"Please try again in few minutes." +msgstr "" + +#: includes/i18n.php:771 +msgid "" +"It looks like you are not in trial mode anymore so there's nothing to cancel" +" :)" +msgstr "" + +#: includes/i18n.php:775 +msgid "Your %s free trial was successfully cancelled." +msgstr "" + +#: includes/i18n.php:779 +msgctxt "%s - numeric version number" +msgid "Version %s was released." +msgstr "Version %s er blevet udgivet." + +#: includes/i18n.php:783 +msgid "Please download %s." +msgstr "Download venligst %s." + +#: includes/i18n.php:785 +msgctxt "%s - plan name, as the latest professional version here" +msgid "the latest %s version here" +msgstr "den seneste version af %s her" + +#: includes/i18n.php:789 +msgid "" +"How do you like %s so far? Test all our %s premium features with a %d-day " +"free trial." +msgstr "" + +#: includes/i18n.php:793 +msgctxt "call to action" +msgid "Start free trial" +msgstr "Start gratis prøveperiode" + +#: includes/i18n.php:795 +msgid "Starting trial" +msgstr "" + +#: includes/i18n.php:797 +msgid "Please wait" +msgstr "" + +#: includes/i18n.php:799 +msgid "" +"Seems like we are having some temporary issue with your trial cancellation. " +"Please try again in few minutes." +msgstr "" + +#: includes/i18n.php:803 +msgid "You already utilized a trial before." +msgstr "Du har allerede brugt din prøveperiode." + +#: includes/i18n.php:805 +msgid "You are already running the plugin in a trial mode." +msgstr "" + +#: includes/i18n.php:809 +msgid "Plan %s do not exist, therefore, can't start a trial." +msgstr "" + +#: includes/i18n.php:813 +msgid "Plan %s does not support a trial period." +msgstr "Plan %s understøtter ikke en prøveperiode." + +#: includes/i18n.php:815 +msgid "None of the plugin's plans supports a trial period." +msgstr "" + +#: includes/i18n.php:819 +msgid "" +"Unexpected API error. Please contact the plugin's author with the following " +"error." +msgstr "" + +#: includes/i18n.php:823 +msgid "No commitment for %s days - cancel anytime!" +msgstr "Ingen bindinger i %s dage - annuller når som helst!" + +#: includes/i18n.php:825 +msgid "" +"Your license has expired. You can still continue using all the %s features, " +"but you'll need to renew your license to continue getting updates and " +"support." +msgstr "" + +#: includes/i18n.php:829 +msgid "Couldn't activate %s." +msgstr "Kunne ikke aktivere %s." + +#: includes/i18n.php:831 +msgid "Please contact us with the following message:" +msgstr "Kontakt os venligst med følgende besked:" + +#: includes/i18n.php:833 +msgid "" +"It looks like you are still on the %s plan. If you did upgrade or change " +"your plan, it's probably an issue on our side - sorry." +msgstr "" + +#: includes/i18n.php:837 +msgid "Please contact us here" +msgstr "Kontakt os her" + +#: includes/i18n.php:839 +msgid "" +"I have upgraded my account but when I try to Sync the License, the plan " +"remains %s." +msgstr "" + +#: includes/i18n.php:847 +msgid "From unknown reason, the API connectivity test failed." +msgstr "" + +#: includes/i18n.php:851 +msgid "" +"It's probably a temporary issue on our end. Just to be sure, with your " +"permission, would it be o.k to run another connectivity test?" +msgstr "" + +#: includes/i18n.php:855 +msgid "" +"We use PHP cURL library for the API calls, which is a very common library " +"and usually installed out of the box. Unfortunately, cURL is not installed " +"on your server." +msgstr "" + +#: includes/i18n.php:859 +msgid "" +"From unknown reason, CloudFlare, the firewall we use, blocks the connection." +msgstr "" + +#: includes/i18n.php:863 +msgctxt "as pluginX requires an access to our API" +msgid "%s requires an access to our API." +msgstr "" + +#: includes/i18n.php:867 +msgid "" +"It looks like your server is using Squid ACL (access control lists), which " +"blocks the connection." +msgstr "" + +#: includes/i18n.php:871 +msgid "I don't know what is Squid or ACL, help me!" +msgstr "" + +#: includes/i18n.php873, includes/i18n.php:887 +msgid "" +"We'll make sure to contact your hosting company and resolve the issue. You " +"will get a follow-up email to %s once we have an update." +msgstr "" + +#: includes/i18n.php:877 +msgid "I'm a system administrator" +msgstr "Jeg er en system-administrator" + +#: includes/i18n.php:879 +msgid "" +"Great, please whitelist the following domains: %s. Once you done, deactivate" +" the plugin and activate it again." +msgstr "" + +#: includes/i18n.php:883 +msgid "I don't know what is cURL or how to install it, help me!" +msgstr "" + +#: includes/i18n.php:891 +msgid "" +"Great, please install cURL and enable it in your php.ini file. To make sure " +"it was successfully activated, use 'phpinfo()'. Once activated, deactivate " +"the plugin and reactivate it back again." +msgstr "" + +#: includes/i18n.php:895 +msgid "" +"We are sure it's an issue on our side and more than happy to resolve it for " +"you ASAP if you give us a chance." +msgstr "" + +#: includes/i18n.php:899 +msgid "" +"Sorry for the inconvenience and we are here to help if you give us a chance." +msgstr "" + +#: includes/i18n.php:903 +msgid "Yes - I'm giving you a chance to fix it" +msgstr "Ja - jeg giver jer en chance for at rette det" + +#: includes/i18n.php:905 +msgid "" +"We will do our best to whitelist your server and resolve this issue ASAP. " +"You will get a follow-up email to %s once we have an update." +msgstr "" + +#: includes/i18n.php:909 +msgid "Let's try your previous version" +msgstr "Lad os prøve din forrige version" + +#: includes/i18n.php:911 +msgid "Uninstall this version and install the previous one." +msgstr "Afinstaller denne version og installer den forrige." + +#: includes/i18n.php:915 +msgid "That's exhausting, please deactivate" +msgstr "" + +#: includes/i18n.php:917 +msgid "" +"We feel your frustration and sincerely apologize for the inconvenience. Hope" +" to see you again in the future." +msgstr "" + +#: includes/i18n.php:921 +msgid "" +"Thank for giving us the chance to fix it! A message was just sent to our " +"technical staff. We will get back to you as soon as we have an update to %s." +" Appreciate your patience." +msgstr "" + +#: includes/i18n.php:925 +msgctxt "%1s - plugin title, %2s - API domain" +msgid "" +"Your server is blocking the access to Freemius' API, which is crucial for " +"%1s synchronization. Please contact your host to whitelist %2s" +msgstr "" + +#: includes/i18n.php:929 +msgid "" +"It seems like one of the authentication parameters is wrong. Update your " +"Public Key, Secret Key & User ID, and try again." +msgstr "" + +#: includes/i18n.php:937 +msgid "" +"Please check your mailbox, you should receive an email via %s to confirm the" +" ownership change. From security reasons, you must confirm the change within" +" the next 15 min. If you cannot find the email, please check your spam " +"folder." +msgstr "" + +#: includes/i18n.php:941 +msgid "" +"Thanks for confirming the ownership change. An email was just sent to %s for" +" final approval." +msgstr "" + +#: includes/i18n.php:945 +msgid "%s is the new owner of the account." +msgstr "%s er den nye ejer af kontoen." + +#: includes/i18n.php:949 +msgctxt "addonX cannot run without pluginY" +msgid "%s cannot run without %s." +msgstr "%s virker ikke uden %s." + +#: includes/i18n.php:953 +msgctxt "addonX cannot run..." +msgid "%s cannot run without the plugin." +msgstr "%s virker ikke uden pluginnet." + +#: includes/i18n.php:957 +msgctxt "pluginX activation was successfully..." +msgid "%s activation was successfully completed." +msgstr "Aktivering af %s blev gennemført." + +#: includes/i18n.php:961 +msgctxt "Plugin installer section title" +msgid "Features & Pricing" +msgstr "Funktioner og priser" + +#: includes/i18n.php:965 +msgid "Add-on must be deployed to WordPress.org or Freemius." +msgstr "" + +#: includes/i18n.php:969 +msgid "Paid add-on must be deployed to Freemius." +msgstr "" + +#: includes/i18n.php:977 +msgid "" +"%s is a premium only add-on. You have to purchase a license first before " +"activating the plugin." +msgstr "" + +#: includes/i18n.php:981 +msgid "" +"%s free trial was successfully cancelled. Since the add-on is premium only " +"it was automatically deactivated. If you like to use it in the future, " +"you'll have to purchase a license." +msgstr "" + +#: includes/i18n.php:993 +msgctxt "as every month" +msgid "Monthly" +msgstr "Månedligt" + +#: includes/i18n.php:995 +msgctxt "as monthly period" +msgid "mo" +msgstr "md" + +#: includes/i18n.php:997 +msgctxt "as once a year" +msgid "Annual" +msgstr "Årligt" + +#: includes/i18n.php:999 +msgctxt "as once a year" +msgid "Annually" +msgstr "Årligt" + +#: includes/i18n.php:1001 +msgctxt "as once a year" +msgid "Once" +msgstr "Engangsbeløb" + +#: includes/i18n.php:1003 +msgctxt "as annual period" +msgid "year" +msgstr "år" + +#: includes/i18n.php:1005 +msgid "Lifetime" +msgstr "" + +#: includes/i18n.php:1007 +msgctxt "e.g. the best product" +msgid "Best" +msgstr "Bedste" + +#: includes/i18n.php:1009 +msgctxt "e.g. billed monthly" +msgid "Billed %s" +msgstr "" + +#: includes/i18n.php:1011 +msgctxt "as a discount of $5 or 10%" +msgid "Save %s" +msgstr "Spar %s" + +#: includes/i18n.php:1015 +msgid "View details" +msgstr "Vis detaljer" + +#: includes/i18n.php:1023 +msgctxt "button label" +msgid "Approve & Start Trial" +msgstr "" + +#: includes/i18n.php:1027 +msgid "" +"You are 1-click away from starting your %1$s-day free trial of the %2$s " +"plan." +msgstr "" + +#: includes/i18n.php:1031 +msgid "" +"For compliance with the WordPress.org guidelines, before we start the trial " +"we ask that you opt-in with your user and non-sensitive site information, " +"allowing the plugin to periodically send data to %s to check for version " +"updates and to validate your trial." +msgstr "" + +#: includes/i18n.php:1043 +msgid "Business name" +msgstr "" + +#: includes/i18n.php:1045 +msgid "Tax / VAT ID" +msgstr "" + +#: includes/i18n.php:1047 +msgid "Address Line %d" +msgstr "" + +#: includes/i18n.php:1049 +msgid "Country" +msgstr "" + +#: includes/i18n.php:1051 +msgid "Select Country" +msgstr "" + +#: includes/i18n.php:1053 +msgid "City" +msgstr "" + +#: includes/i18n.php:1055 +msgid "Town" +msgstr "" + +#: includes/i18n.php:1057 +msgid "State" +msgstr "" + +#: includes/i18n.php:1059 +msgid "Province" +msgstr "" + +#: includes/i18n.php:1061 +msgid "ZIP / Postal Code" +msgstr "" diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.mo b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.mo index 15507062496997d1e5d93ca3730618f075ddf270..fea49bce36f1583480f4c5f505566878d56475d7 100755 Binary files a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.mo and b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.mo differ diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.po b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.po index 2ae39b49a7512094ac0ba8ffdbeaeeddfb0bf1fe..76df2e2c57c6e3ada1f307734bc323c0d7b803bd 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.po +++ b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-en.po @@ -130,1267 +130,1393 @@ msgid "Edit" msgstr "Edit" #: includes/i18n.php:119 +msgctxt "verb" +msgid "Update" +msgstr "Update" + +#: includes/i18n.php:121 msgid "Date" msgstr "Date" -#: includes/i18n.php:121 +#: includes/i18n.php:123 msgid "Amount" msgstr "Amount" -#: includes/i18n.php:123 +#: includes/i18n.php:125 msgid "Invoice" msgstr "Invoice" -#: includes/i18n.php:125 +#: includes/i18n.php:127 msgid "Billing" msgstr "Billing" -#: includes/i18n.php:127 +#: includes/i18n.php:129 msgid "Payments" msgstr "Payments" -#: includes/i18n.php:129 +#: includes/i18n.php:131 msgid "Delete Account" msgstr "Delete Account" -#: includes/i18n.php:131 +#: includes/i18n.php:133 msgctxt "as close a window" msgid "Dismiss" msgstr "Dismiss" -#: includes/i18n.php:133 +#: includes/i18n.php:135 msgctxt "as product pricing plan" msgid "Plan" msgstr "Plan" -#: includes/i18n.php:135 +#: includes/i18n.php:137 msgid "Change Plan" msgstr "Change Plan" -#: includes/i18n.php:137 +#: includes/i18n.php:139 msgctxt "as download professional version" msgid "Download %s Version" msgstr "Download %s Version" -#: includes/i18n.php:139 +#: includes/i18n.php:141 msgctxt "as download professional version now" msgid "Download %s version now" msgstr "Download %s version now" -#: includes/i18n.php:141 +#: includes/i18n.php:145 msgctxt "as download latest version" msgid "Download Latest" msgstr "Download Latest" -#: includes/i18n.php:143 +#: includes/i18n.php:147 msgctxt "E.g. you have a professional license." msgid "You have a %s license." msgstr "You have a %s license." -#: includes/i18n.php:145 +#: includes/i18n.php:151 msgid "New" msgstr "New" -#: includes/i18n.php:147 +#: includes/i18n.php:153 msgid "Free" msgstr "Free" -#: includes/i18n.php:149 +#: includes/i18n.php:155 msgctxt "as trial plan" msgid "Trial" msgstr "Trial" -#: includes/i18n.php:151 +#: includes/i18n.php:157 +msgctxt "as starting a trial plan" +msgid "Start Trial" +msgstr "Start Trial" + +#: includes/i18n.php:159 msgctxt "verb" msgid "Purchase" msgstr "Purchase" -#: includes/i18n.php:153 +#: includes/i18n.php:161 msgid "Purchase License" msgstr "Purchase License" -#: includes/i18n.php:155 +#: includes/i18n.php:163 msgctxt "verb" msgid "Buy" msgstr "Buy" -#: includes/i18n.php:157 +#: includes/i18n.php:165 msgid "Buy License" msgstr "Buy License" -#: includes/i18n.php:159 +#: includes/i18n.php:167 msgid "Single Site License" msgstr "Single Site License" -#: includes/i18n.php:161 +#: includes/i18n.php:169 msgid "Unlimited Licenses" msgstr "Unlimited Licenses" -#: includes/i18n.php:163 +#: includes/i18n.php:171 msgid "Up to %s Sites" msgstr "Up to %s Sites" -#: includes/i18n.php:165 +#: includes/i18n.php:173 msgid "%sRenew your license now%s to access version %s features and support." msgstr "%sRenew your license now%s to access version %s features and support." -#: includes/i18n.php:167 +#: includes/i18n.php:177 msgid "Enter the email address you've used for the upgrade below and we will resend you the license key." msgstr "Enter the email address you've used for the upgrade below and we will resend you the license key." -#: includes/i18n.php:169 +#: includes/i18n.php:181 msgctxt "e.g. Professional Plan" msgid "%s Plan" msgstr "%s Plan" -#: includes/i18n.php:171 +#: includes/i18n.php:183 msgid "You are just one step away - %s" msgstr "You are just one step away - %s" -#: includes/i18n.php:173 +#: includes/i18n.php:185 msgctxt "%s - plugin name. As complete \"Jetpack\" activation now" msgid "Complete \"%s\" Activation Now" msgstr "Complete \"%s\" Activation Now" -#: includes/i18n.php:175 +#: includes/i18n.php:189 msgid "We made a few tweaks to the plugin, %s" msgstr "We made a few tweaks to the plugin, %s" -#: includes/i18n.php:177 +#: includes/i18n.php:191 msgid "Opt-in to make \"%s\" Better!" msgstr "Opt-in to make \"%s\" Better!" -#: includes/i18n.php:179 +#: includes/i18n.php:193 msgid "Error" msgstr "Error" -#: includes/i18n.php:181 +#: includes/i18n.php:195 msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error." msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error." -#: includes/i18n.php:187 +#: includes/i18n.php:203 msgctxt "as expiration date" msgid "Expiration" msgstr "Expiration" -#: includes/i18n.php:189 +#: includes/i18n.php:205 msgctxt "as software license" msgid "License" msgstr "License" -#: includes/i18n.php:191 +#: includes/i18n.php:207 msgid "not verified" msgstr "not verified" -#: includes/i18n.php:193 +#: includes/i18n.php:209 msgid "Verify Email" msgstr "Verify Email" -#: includes/i18n.php:195 +#: includes/i18n.php:211 msgctxt "e.g. expires in 2 months" msgid "Expires in %s" msgstr "Expires in %s" -#: includes/i18n.php:197 +#: includes/i18n.php:213 msgctxt "e.g. auto renews in 2 months" msgid "Auto renews in %s" msgstr "Auto renews in %s" -#: includes/i18n.php:199 +#: includes/i18n.php:215 msgid "No expiration" msgstr "No expiration" -#: includes/i18n.php:201 +#: includes/i18n.php:217 msgid "Expired" msgstr "Expired" -#: includes/i18n.php:203 +#: includes/i18n.php:219 msgid "Cancelled" msgstr "Cancelled" -#: includes/i18n.php:205 +#: includes/i18n.php:221 msgctxt "e.g. In 2 hours" msgid "In %s" msgstr "In %s" -#: includes/i18n.php:207 +#: includes/i18n.php:223 msgctxt "e.g. 2 min ago" msgid "%s ago" msgstr "%s ago" -#: includes/i18n.php:209 +#: includes/i18n.php:225 msgctxt "as plugin version" msgid "Version" msgstr "Version" -#: includes/i18n.php:211 +#: includes/i18n.php:227 msgid "Name" msgstr "Name" -#: includes/i18n.php:213 +#: includes/i18n.php:229 msgid "Email" msgstr "Email" -#: includes/i18n.php:215 +#: includes/i18n.php:231 msgid "Email address" msgstr "Email address" -#: includes/i18n.php:217 +#: includes/i18n.php:233 msgid "Verified" msgstr "Verified" -#: includes/i18n.php:219 +#: includes/i18n.php:235 msgid "Plugin" msgstr "Plugin" -#: includes/i18n.php:221 +#: includes/i18n.php:237 msgid "Plugins" msgstr "Plugins" -#: includes/i18n.php:223 +#: includes/i18n.php:239 msgid "Themes" msgstr "Themes" -#: includes/i18n.php:225 +#: includes/i18n.php:241 msgctxt "as file/folder path" msgid "Path" msgstr "Path" -#: includes/i18n.php:227 +#: includes/i18n.php:243 msgid "Title" msgstr "Title" -#: includes/i18n.php:229 +#: includes/i18n.php:245 msgid "Free version" msgstr "Free version" -#: includes/i18n.php:231 +#: includes/i18n.php:247 msgid "Premium version" msgstr "Premium version" -#: includes/i18n.php:233 +#: includes/i18n.php:249 msgctxt "as WP plugin slug" msgid "Slug" msgstr "Slug" -#: includes/i18n.php:235 +#: includes/i18n.php:251 msgid "ID" msgstr "ID" -#: includes/i18n.php:237 +#: includes/i18n.php:253 msgid "Users" msgstr "Users" -#: includes/i18n.php:239 +#: includes/i18n.php:255 msgid "Plugin Installs" msgstr "Plugin Installs" -#: includes/i18n.php:241 +#: includes/i18n.php:257 msgctxt "like websites" msgid "Sites" msgstr "Sites" -#: includes/i18n.php:243 +#: includes/i18n.php:259 msgid "User ID" msgstr "User ID" -#: includes/i18n.php:245 +#: includes/i18n.php:261 msgid "Site ID" msgstr "Site ID" -#: includes/i18n.php:247 +#: includes/i18n.php:263 msgid "Public Key" msgstr "Public Key" -#: includes/i18n.php:249 +#: includes/i18n.php:265 msgid "Secret Key" msgstr "Secret Key" -#: includes/i18n.php:251 +#: includes/i18n.php:267 msgctxt "as secret encryption key missing" msgid "No Secret" msgstr "No Secret" -#: includes/i18n.php:253 +#: includes/i18n.php:269 msgid "No ID" msgstr "No ID" -#: includes/i18n.php:255 +#: includes/i18n.php:271 msgctxt "as synchronize license" msgid "Sync License" msgstr "Sync License" -#: includes/i18n.php:257 +#: includes/i18n.php:273 msgctxt "as synchronize" msgid "Sync" msgstr "Sync" -#: includes/i18n.php:259 +#: includes/i18n.php:275 msgid "Activate License" msgstr "Activate License" -#: includes/i18n.php:261 +#: includes/i18n.php:277 msgid "Activate Free Version" msgstr "Activate Free Version" -#: includes/i18n.php:263 +#: includes/i18n.php:279 msgid "Please enter the license key that you received in the email right after the purchase:" msgstr "Please enter the license key that you received in the email right after the purchase:" -#: includes/i18n.php:265 +#: includes/i18n.php:283 msgid "Activating license..." msgstr "Activating license..." -#: includes/i18n.php:267 +#: includes/i18n.php:285 msgid "Change License" msgstr "Change License" -#: includes/i18n.php:269 +#: includes/i18n.php:287 msgid "Update License" msgstr "Update License" -#: includes/i18n.php:271 +#: includes/i18n.php:289 msgid "Deactivate License" msgstr "Deactivate License" -#: includes/i18n.php:273 +#: includes/i18n.php:291 msgid "Activate" msgstr "Activate" -#: includes/i18n.php:275 +#: includes/i18n.php:293 msgid "Deactivate" msgstr "Deactivate" -#: includes/i18n.php:277 +#: includes/i18n.php:295 msgid "Skip & Deactivate" msgstr "Skip & Deactivate" -#: includes/i18n.php:279 +#: includes/i18n.php:297 msgid "No - just deactivate" msgstr "No - just deactivate" -#: includes/i18n.php:281 +#: includes/i18n.php:299 msgid "Yes - do your thing" msgstr "Yes - do your thing" -#: includes/i18n.php:283 +#: includes/i18n.php:301 msgctxt "active mode" msgid "Active" msgstr "Active" -#: includes/i18n.php:285 +#: includes/i18n.php:303 msgctxt "is active mode?" msgid "Is Active" msgstr "Is Active" -#: includes/i18n.php:287 +#: includes/i18n.php:305 msgid "Install Now" msgstr "Install Now" -#: includes/i18n.php:289 +#: includes/i18n.php:307 msgid "Install Update Now" msgstr "Install Update Now" -#: includes/i18n.php:291 +#: includes/i18n.php:309 msgid "More information about %s" msgstr "More information about %s" -#: includes/i18n.php:293 +#: includes/i18n.php:311 msgid "Localhost" msgstr "Localhost" -#: includes/i18n.php:295 +#: includes/i18n.php:313 msgctxt "as activate Professional plan" msgid "Activate %s Plan" msgstr "Activate %s Plan" -#: includes/i18n.php:297 +#: includes/i18n.php:315 msgctxt "as 5 licenses left" msgid "%s left" msgstr "%s left" -#: includes/i18n.php:299 +#: includes/i18n.php:317 msgid "Last license" msgstr "Last license" -#: includes/i18n.php:301 +#: includes/i18n.php:319 msgid "What is your %s?" msgstr "What is your %s?" -#: includes/i18n.php:303 +#: includes/i18n.php:321 msgid "Activate this add-on" msgstr "Activate this add-on" -#: includes/i18n.php:305 +#: includes/i18n.php:323 msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?" msgstr "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?" -#: includes/i18n.php:307 +#: includes/i18n.php:327 msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?" msgstr "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?" -#: includes/i18n.php:309 +#: includes/i18n.php:331 msgid "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?" msgstr "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?" -#: includes/i18n.php:311 +#: includes/i18n.php:335 msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s." msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s." -#: includes/i18n.php:313 +#: includes/i18n.php:339 msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?" msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?" -#: includes/i18n.php:315 +#: includes/i18n.php:343 msgid "You can still enjoy all %s features but you will not have access to plugin updates and support." msgstr "You can still enjoy all %s features but you will not have access to plugin updates and support." -#: includes/i18n.php:317 +#: includes/i18n.php:347 msgid "Once your license expire you can still use the Free version but you will NOT have access to the %s features." msgstr "Once your license expire you can still use the Free version but you will NOT have access to the %s features." -#: includes/i18n.php:319 +#: includes/i18n.php:351 msgid "Are you sure you want to proceed?" msgstr "Are you sure you want to proceed?" -#: includes/i18n.php:325 +#: includes/i18n.php:357 msgid "Add Ons for %s" msgstr "Add Ons for %s" -#: includes/i18n.php:327 +#: includes/i18n.php:359 msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes." msgstr "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes." -#: includes/i18n.php:331 +#: includes/i18n.php:365 msgid "Anonymous feedback" msgstr "Anonymous feedback" -#: includes/i18n.php:333 +#: includes/i18n.php:367 msgid "Quick feedback" msgstr "Quick feedback" -#: includes/i18n.php:335 +#: includes/i18n.php:369 msgid "If you have a moment, please let us know why you are deactivating" msgstr "If you have a moment, please let us know why you are deactivating" -#: includes/i18n.php:337 +#: includes/i18n.php:373 msgid "Yes - Deactivate" msgstr "Yes - Deactivate" -#: includes/i18n.php:339 +#: includes/i18n.php:375 msgid "Submit & Deactivate" msgstr "Submit & Deactivate" -#: includes/i18n.php:341 -msgctxt "the text of the cancel button of the plugin deactivation dialog box." +#: includes/i18n.php:377 msgid "Cancel" msgstr "Cancel" -#: includes/i18n.php:343 +#: includes/i18n.php:379 msgid "I no longer need the plugin" msgstr "I no longer need the plugin" -#: includes/i18n.php:345 +#: includes/i18n.php:381 msgid "I found a better plugin" msgstr "I found a better plugin" -#: includes/i18n.php:347 +#: includes/i18n.php:383 msgid "I only needed the plugin for a short period" msgstr "I only needed the plugin for a short period" -#: includes/i18n.php:349 +#: includes/i18n.php:385 msgid "The plugin broke my site" msgstr "The plugin broke my site" -#: includes/i18n.php:351 +#: includes/i18n.php:387 msgid "The plugin suddenly stopped working" msgstr "The plugin suddenly stopped working" -#: includes/i18n.php:353 +#: includes/i18n.php:389 msgid "I can't pay for it anymore" msgstr "I can't pay for it anymore" -#: includes/i18n.php:355 +#: includes/i18n.php:391 msgid "It's a temporary deactivation. I'm just debugging an issue." msgstr "It's a temporary deactivation. I'm just debugging an issue." -#: includes/i18n.php:357 +#: includes/i18n.php:395 msgctxt "the text of the \"other\" reason for deactivating the plugin that is shown in the modal box." msgid "Other" msgstr "Other" -#: includes/i18n.php:359 +#: includes/i18n.php:399 msgid "Kindly tell us the reason so we can improve." msgstr "Kindly tell us the reason so we can improve." -#: includes/i18n.php:361 +#: includes/i18n.php:401 msgid "What's the plugin's name?" msgstr "What's the plugin's name?" -#: includes/i18n.php:363 +#: includes/i18n.php:403 msgid "What price would you feel comfortable paying?" msgstr "What price would you feel comfortable paying?" -#: includes/i18n.php:365 +#: includes/i18n.php:405 msgid "I couldn't understand how to make it work" msgstr "I couldn't understand how to make it work" -#: includes/i18n.php:367 +#: includes/i18n.php:407 msgid "The plugin is great, but I need specific feature that you don't support" msgstr "The plugin is great, but I need specific feature that you don't support" -#: includes/i18n.php:369 +#: includes/i18n.php:411 msgid "The plugin is not working" msgstr "The plugin is not working" -#: includes/i18n.php:371 +#: includes/i18n.php:413 msgid "It's not what I was looking for" msgstr "It's not what I was looking for" -#: includes/i18n.php:373 +#: includes/i18n.php:415 msgid "The plugin didn't work as expected" msgstr "The plugin didn't work as expected" -#: includes/i18n.php:375 +#: includes/i18n.php:417 msgid "What feature?" msgstr "What feature?" -#: includes/i18n.php:377 +#: includes/i18n.php:419 msgid "Kindly share what didn't work so we can fix it for future users..." msgstr "Kindly share what didn't work so we can fix it for future users..." -#: includes/i18n.php:379 +#: includes/i18n.php:423 msgid "What you've been looking for?" msgstr "What you've been looking for?" -#: includes/i18n.php:381 +#: includes/i18n.php:425 msgid "What did you expect?" msgstr "What did you expect?" -#: includes/i18n.php:383 +#: includes/i18n.php:427 msgid "The plugin didn't work" msgstr "The plugin didn't work" -#: includes/i18n.php:385 +#: includes/i18n.php:429 msgid "I don't like to share my information with you" msgstr "I don't like to share my information with you" -#: includes/i18n.php:387 +#: includes/i18n.php:431 msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in." msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in." -#: includes/i18n.php:395 +#: includes/i18n.php:441 msgctxt "greeting" msgid "Hey %s," msgstr "Hey %s," -#: includes/i18n.php:397 +#: includes/i18n.php:443 msgctxt "a greeting. E.g. Thanks John!" msgid "Thanks %s!" msgstr "Thanks %s!" -#: includes/i18n.php:399 -msgid "In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s" -msgstr "In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s" +#: includes/i18n.php:445 +msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s." +msgstr "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s." -#: includes/i18n.php:401 -msgid "Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still work just fine." -msgstr "Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still work just fine." +#: includes/i18n.php:449 +msgid "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine." +msgstr "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine." -#: includes/i18n.php:403 -msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install." -msgstr "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install." +#: includes/i18n.php:453 +msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s." +msgstr "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s." -#: includes/i18n.php:405 +#: includes/i18n.php:455 +msgid "complete the install" +msgstr "complete the install" + +#: includes/i18n.php:457 +msgid "start the trial" +msgstr "start the trial" + +#: includes/i18n.php:459 msgid "Thanks for purchasing %s! To get started, please enter your license key:" msgstr "Thanks for purchasing %s! To get started, please enter your license key:" -#: includes/i18n.php:407 +#: includes/i18n.php:463 msgid "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license." msgstr "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license." -#: includes/i18n.php:409 +#: includes/i18n.php:467 msgid "What permissions are being granted?" msgstr "What permissions are being granted?" -#: includes/i18n.php:411 +#: includes/i18n.php:469 msgid "Your Profile Overview" msgstr "Your Profile Overview" -#: includes/i18n.php:413 +#: includes/i18n.php:471 msgid "Name and email address" msgstr "Name and email address" -#: includes/i18n.php:415 +#: includes/i18n.php:473 msgid "Your Site Overview" msgstr "Your Site Overview" -#: includes/i18n.php:417 +#: includes/i18n.php:475 msgid "Site URL, WP version, PHP info, plugins & themes" msgstr "Site URL, WP version, PHP info, plugins & themes" -#: includes/i18n.php:419 +#: includes/i18n.php:479 msgid "Current Plugin Events" msgstr "Current Plugin Events" -#: includes/i18n.php:421 +#: includes/i18n.php:481 msgid "Activation, deactivation and uninstall" msgstr "Activation, deactivation and uninstall" -#: includes/i18n.php:423 +#: includes/i18n.php:483 msgid "Plugins & Themes" msgstr "Plugins & Themes" -#: includes/i18n.php:425 +#: includes/i18n.php:485 msgid "Titles, versions and state." msgstr "Titles, versions and state." -#: includes/i18n.php:427 +#: includes/i18n.php:487 +msgid "Admin Notices" +msgstr "Admin Notices" + +#: includes/i18n.php:489 msgid "Newsletter" msgstr "Newsletter" -#: includes/i18n.php:429 +#: includes/i18n.php:491 msgid "Updates, announcements, marketing, no spam" msgstr "Updates, announcements, marketing, no spam" -#: includes/i18n.php:431 +#: includes/i18n.php:493 msgid "Privacy Policy" msgstr "Privacy Policy" -#: includes/i18n.php:433 +#: includes/i18n.php:495 msgid "Terms of Service" msgstr "Terms of Service" -#: includes/i18n.php:435 +#: includes/i18n.php:497 msgctxt "as activating plugin" msgid "Activating" msgstr "Activating" -#: includes/i18n.php:437 +#: includes/i18n.php:499 msgctxt "as in the process of sending an email" msgid "Sending email" msgstr "Sending email" -#: includes/i18n.php:439 +#: includes/i18n.php:503 msgctxt "button label" msgid "Allow & Continue" msgstr "Allow & Continue" -#: includes/i18n.php:441 +#: includes/i18n.php:505 msgctxt "button label" msgid "Agree & Activate License" msgstr "Agree & Activate License" -#: includes/i18n.php:443 +#: includes/i18n.php:507 msgctxt "verb" msgid "Skip" msgstr "Skip" -#: includes/i18n.php:445 +#: includes/i18n.php:509 msgid "Click here to use the plugin anonymously" msgstr "Click here to use the plugin anonymously" -#: includes/i18n.php:447 +#: includes/i18n.php:511 msgid "Re-send activation email" msgstr "Re-send activation email" -#: includes/i18n.php:449 +#: includes/i18n.php:513 msgid "License key" msgstr "License key" -#: includes/i18n.php:451 +#: includes/i18n.php:515 msgid "Send License Key" msgstr "Send License Key" -#: includes/i18n.php:453 +#: includes/i18n.php:517 msgid "Sending license key" msgstr "Sending license key" -#: includes/i18n.php:455 +#: includes/i18n.php:519 msgid "Have a license key?" msgstr "Have a license key?" -#: includes/i18n.php:457 +#: includes/i18n.php:521 msgid "Don't have a license key?" msgstr "Don't have a license key?" -#: includes/i18n.php:459 +#: includes/i18n.php:523 msgid "Can't find your license key?" msgstr "Can't find your license key?" -#: includes/i18n.php:471 +#: includes/i18n.php:525 +msgid "We couldn't find your email address in the system, are you sure it's the right address?" +msgstr "We couldn't find your email address in the system, are you sure it's the right address?" + +#: includes/i18n.php:529 +msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?" +msgstr "We can't see any active licenses associated with that email address, are you sure it's the right address?" + +#: includes/i18n.php:533 +msgid "Opt In" +msgstr "Opt In" + +#: includes/i18n.php:535 +msgid "Opt Out" +msgstr "Opt Out" + +#: includes/i18n.php:537 +msgid "On second thought - I want to continue helping" +msgstr "On second thought - I want to continue helping" + +#: includes/i18n.php:541 +msgid "Opting out..." +msgstr "Opting out..." + +#: includes/i18n.php:543 +msgid "Opting in..." +msgstr "Opting in..." + +#: includes/i18n.php:545 +msgid "We appreciate your help in making the %s better by letting us track some usage data." +msgstr "We appreciate your help in making the %s better by letting us track some usage data." + +#: includes/i18n.php:549 +msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking." +msgstr "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking." + +#: includes/i18n.php:553 +msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s." +msgstr "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s." + +#: includes/i18n.php:563 msgid "Screenshots" msgstr "Screenshots" -#: includes/i18n.php:473 +#: includes/i18n.php:565 msgid "Click to view full-size screenshot %d" msgstr "Click to view full-size screenshot %d" -#: includes/i18n.php:481 +#: includes/i18n.php:573 msgid "Freemius Debug" msgstr "Freemius Debug" -#: includes/i18n.php:483 +#: includes/i18n.php:575 msgctxt "as turned on" msgid "On" msgstr "On" -#: includes/i18n.php:485 +#: includes/i18n.php:577 msgctxt "as turned off" msgid "Off" msgstr "Off" -#: includes/i18n.php:487 +#: includes/i18n.php:579 msgctxt "as code debugging" msgid "Debugging" msgstr "Debugging" -#: includes/i18n.php:489 +#: includes/i18n.php:581 msgid "Freemius State" msgstr "Freemius State" -#: includes/i18n.php:491 +#: includes/i18n.php:583 msgctxt "as connection was successful" msgid "Connected" msgstr "Connected" -#: includes/i18n.php:493 +#: includes/i18n.php:585 msgctxt "as connection blocked" msgid "Blocked" msgstr "Blocked" -#: includes/i18n.php:495 +#: includes/i18n.php:587 msgctxt "as application program interface" msgid "API" msgstr "API" -#: includes/i18n.php:497 +#: includes/i18n.php:589 msgctxt "as software development kit versions" msgid "SDK" msgstr "SDK" -#: includes/i18n.php:499 +#: includes/i18n.php:591 msgctxt "as software development kit versions" msgid "SDK Versions" msgstr "SDK Versions" -#: includes/i18n.php:501 +#: includes/i18n.php:595 msgctxt "as plugin folder path" msgid "Plugin Path" msgstr "Plugin Path" -#: includes/i18n.php:503 +#: includes/i18n.php:597 msgctxt "as sdk path" msgid "SDK Path" msgstr "SDK Path" -#: includes/i18n.php:505 +#: includes/i18n.php:599 msgid "Add Ons of Plugin %s" msgstr "Add Ons of Plugin %s" -#: includes/i18n.php:507 +#: includes/i18n.php:601 msgid "Are you sure you want to delete all Freemius data?" msgstr "Are you sure you want to delete all Freemius data?" -#: includes/i18n.php:509 +#: includes/i18n.php:605 msgid "Actions" msgstr "Actions" -#: includes/i18n.php:511 +#: includes/i18n.php:607 msgid "Delete All Accounts" msgstr "Delete All Accounts" -#: includes/i18n.php:513 +#: includes/i18n.php:609 msgid "Start Fresh" msgstr "Start Fresh" -#: includes/i18n.php:515 +#: includes/i18n.php:611 msgid "Clear API Cache" msgstr "Clear API Cache" -#: includes/i18n.php:517 +#: includes/i18n.php:613 msgid "Sync Data From Server" msgstr "Sync Data From Server" -#: includes/i18n.php:519 +#: includes/i18n.php:615 msgid "Scheduled Crons" msgstr "Scheduled Crons" -#: includes/i18n.php:521 +#: includes/i18n.php:617 msgid "Plugins & Themes Sync" msgstr "Plugins & Themes Sync" -#: includes/i18n.php:529 +#: includes/i18n.php:625 msgctxt "as congratulations" msgid "Congrats" msgstr "Congrats" -#: includes/i18n.php:531 +#: includes/i18n.php:627 msgctxt "exclamation" msgid "Oops" msgstr "Oops" -#: includes/i18n.php:533 +#: includes/i18n.php:629 msgctxt "interjection expressing joy or exuberance" msgid "Yee-haw" msgstr "Yee-haw" -#: includes/i18n.php:535 +#: includes/i18n.php:633 msgctxt "(especially in electronic communication) used to express elation, enthusiasm, or triumph." msgid "W00t" msgstr "W00t" -#: includes/i18n.php:537 +#: includes/i18n.php:637 msgctxt "a positive response" msgid "Right on" msgstr "Right on" -#: includes/i18n.php:539 +#: includes/i18n.php:639 msgctxt "something somebody says when they are thinking about what you have just said. " msgid "Hmm" msgstr "Hmm" -#: includes/i18n.php:541 +#: includes/i18n.php:643 msgid "O.K" msgstr "O.K" -#: includes/i18n.php:543 +#: includes/i18n.php:645 msgctxt "exclamation" msgid "Hey" msgstr "Hey" -#: includes/i18n.php:545 +#: includes/i18n.php:647 msgctxt "advance notice of something that will need attention." msgid "Heads up" msgstr "Heads up" -#: includes/i18n.php:553 +#: includes/i18n.php:657 msgid "Seems like you got the latest release." msgstr "Seems like you got the latest release." -#: includes/i18n.php:555 +#: includes/i18n.php:659 msgid "You are all good!" msgstr "You are all good!" -#: includes/i18n.php:557 +#: includes/i18n.php:661 msgid "Sorry, we could not complete the email update. Another user with the same email is already registered." msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered." -#: includes/i18n.php:559 +#: includes/i18n.php:665 msgid "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button." msgstr "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button." -#: includes/i18n.php:561 +#: includes/i18n.php:669 msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments." msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments." -#: includes/i18n.php:563 +#: includes/i18n.php:673 msgid "Your name was successfully updated." msgstr "Your name was successfully updated." -#: includes/i18n.php:565 +#: includes/i18n.php:675 msgid "You have successfully updated your %s." msgstr "You have successfully updated your %s." -#: includes/i18n.php:567 +#: includes/i18n.php:677 msgid "Please provide your full name." msgstr "Please provide your full name." -#: includes/i18n.php:569 +#: includes/i18n.php:679 msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box." msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box." -#: includes/i18n.php:571 +#: includes/i18n.php:683 msgid "Just letting you know that the add-ons information of %s is being pulled from an external server." msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server." -#: includes/i18n.php:573 +#: includes/i18n.php:687 msgid "No credit card required" msgstr "No credit card required" -#: includes/i18n.php:575 +#: includes/i18n.php:689 msgid "Premium plugin version was successfully activated." msgstr "Premium plugin version was successfully activated." -#: includes/i18n.php:577 +#: includes/i18n.php:693 msgid "The upgrade of %s was successfully completed." msgstr "The upgrade of %s was successfully completed." -#: includes/i18n.php:579 +#: includes/i18n.php:695 msgid "Your account was successfully activated with the %s plan." msgstr "Your account was successfully activated with the %s plan." -#: includes/i18n.php:581 +#: includes/i18n.php:699 msgid "Download the latest %s version now" msgstr "Download the latest %s version now" -#: includes/i18n.php:583 +#: includes/i18n.php:701 msgid "Please follow these steps to complete the upgrade" msgstr "Please follow these steps to complete the upgrade" -#: includes/i18n.php:585 +#: includes/i18n.php:705 msgid "Download the latest %s version" msgstr "Download the latest %s version" -#: includes/i18n.php:587 +#: includes/i18n.php:707 +msgid "Download the latest version" +msgstr "Download the latest version" + +#: includes/i18n.php:709 msgid "Deactivate the free version" msgstr "Deactivate the free version" -#: includes/i18n.php:589 +#: includes/i18n.php:711 msgid "Upload and activate the downloaded version" msgstr "Upload and activate the downloaded version" -#: includes/i18n.php:591 +#: includes/i18n.php:713 msgid "How to upload and activate?" msgstr "How to upload and activate?" -#: includes/i18n.php:593 +#: includes/i18n.php:715 msgctxt "%s - product name, e.g. Facebook add-on was successfully..." msgid "%s Add-on was successfully purchased." msgstr "%s Add-on was successfully purchased." -#: includes/i18n.php:595 +#: includes/i18n.php:719 msgid "Your %s Add-on plan was successfully upgraded." msgstr "Your %s Add-on plan was successfully upgraded." -#: includes/i18n.php:597 +#: includes/i18n.php:723 msgid "Your email has been successfully verified - you are AWESOME!" msgstr "Your email has been successfully verified - you are AWESOME!" -#: includes/i18n.php:599 +#: includes/i18n.php:727 msgid "Your plan was successfully upgraded." msgstr "Your plan was successfully upgraded." -#: includes/i18n.php:601 +#: includes/i18n.php:729 msgid "Your plan was successfully changed to %s." msgstr "Your plan was successfully changed to %s." -#: includes/i18n.php:603 +#: includes/i18n.php:731 msgid "Your license has expired. You can still continue using the free plugin forever." msgstr "Your license has expired. You can still continue using the free plugin forever." -#: includes/i18n.php:605 +#: includes/i18n.php:735 msgid "Your license has been cancelled. If you think it's a mistake, please contact support." msgstr "Your license has been cancelled. If you think it's a mistake, please contact support." -#: includes/i18n.php:607 +#: includes/i18n.php:739 msgid "Your trial has been successfully started." msgstr "Your trial has been successfully started." -#: includes/i18n.php:609 +#: includes/i18n.php:741 msgid "Your license was successfully activated." msgstr "Your license was successfully activated." -#: includes/i18n.php:611 +#: includes/i18n.php:743 msgid "It looks like your site currently doesn't have an active license." msgstr "It looks like your site currently doesn't have an active license." -#: includes/i18n.php:613 +#: includes/i18n.php:747 msgid "Your license was successfully deactivated, you are back to the %s plan." msgstr "Your license was successfully deactivated, you are back to the %s plan." -#: includes/i18n.php:615 +#: includes/i18n.php:751 msgid "It looks like the license deactivation failed." msgstr "It looks like the license deactivation failed." -#: includes/i18n.php:617 +#: includes/i18n.php:755 msgid "It looks like the license could not be activated." msgstr "It looks like the license could not be activated." -#: includes/i18n.php:619 +#: includes/i18n.php:759 msgid "Error received from the server:" msgstr "Error received from the server:" -#: includes/i18n.php:621 +#: includes/i18n.php:761 msgid "Your trial has expired. You can still continue using all our free features." msgstr "Your trial has expired. You can still continue using all our free features." -#: includes/i18n.php:623 +#: includes/i18n.php:765 msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s." msgstr "Your plan was successfully downgraded. Your %s plan license will expire in %s." -#: includes/i18n.php:625 +#: includes/i18n.php:769 msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes." msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes." -#: includes/i18n.php:627 +#: includes/i18n.php:773 msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)" msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)" -#: includes/i18n.php:629 +#: includes/i18n.php:777 msgid "Your %s free trial was successfully cancelled." msgstr "Your %s free trial was successfully cancelled." -#: includes/i18n.php:631 +#: includes/i18n.php:781 msgctxt "%s - numeric version number" msgid "Version %s was released." msgstr "Version %s was released." -#: includes/i18n.php:633 +#: includes/i18n.php:785 msgid "Please download %s." msgstr "Please download %s." -#: includes/i18n.php:635 +#: includes/i18n.php:787 msgctxt "%s - plan name, as the latest professional version here" msgid "the latest %s version here" msgstr "the latest %s version here" -#: includes/i18n.php:637 +#: includes/i18n.php:791 msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial." msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial." -#: includes/i18n.php:639 +#: includes/i18n.php:795 msgctxt "call to action" msgid "Start free trial" msgstr "Start free trial" -#: includes/i18n.php:641 +#: includes/i18n.php:797 +msgid "Starting trial" +msgstr "Starting trial" + +#: includes/i18n.php:799 +msgid "Please wait" +msgstr "Please wait" + +#: includes/i18n.php:801 msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes." msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes." -#: includes/i18n.php:643 +#: includes/i18n.php:805 msgid "You already utilized a trial before." msgstr "You already utilized a trial before." -#: includes/i18n.php:645 +#: includes/i18n.php:807 msgid "You are already running the plugin in a trial mode." msgstr "You are already running the plugin in a trial mode." -#: includes/i18n.php:647 +#: includes/i18n.php:811 msgid "Plan %s do not exist, therefore, can't start a trial." msgstr "Plan %s do not exist, therefore, can't start a trial." -#: includes/i18n.php:649 +#: includes/i18n.php:815 msgid "Plan %s does not support a trial period." msgstr "Plan %s does not support a trial period." -#: includes/i18n.php:651 +#: includes/i18n.php:817 msgid "None of the plugin's plans supports a trial period." msgstr "None of the plugin's plans supports a trial period." -#: includes/i18n.php:653 +#: includes/i18n.php:821 msgid "Unexpected API error. Please contact the plugin's author with the following error." msgstr "Unexpected API error. Please contact the plugin's author with the following error." -#: includes/i18n.php:655 +#: includes/i18n.php:825 msgid "No commitment for %s days - cancel anytime!" msgstr "No commitment for %s days - cancel anytime!" -#: includes/i18n.php:657 +#: includes/i18n.php:827 msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support." msgstr "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support." -#: includes/i18n.php:659 +#: includes/i18n.php:831 msgid "Couldn't activate %s." msgstr "Couldn't activate %s." -#: includes/i18n.php:661 +#: includes/i18n.php:833 msgid "Please contact us with the following message:" msgstr "Please contact us with the following message:" -#: includes/i18n.php:663 +#: includes/i18n.php:835 msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry." msgstr "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry." -#: includes/i18n.php:665 +#: includes/i18n.php:839 msgid "Please contact us here" msgstr "Please contact us here" -#: includes/i18n.php:667 +#: includes/i18n.php:841 msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s." msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s." -#: includes/i18n.php:673 +#: includes/i18n.php:849 msgid "From unknown reason, the API connectivity test failed." msgstr "From unknown reason, the API connectivity test failed." -#: includes/i18n.php:675 +#: includes/i18n.php:853 msgid "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?" msgstr "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?" -#: includes/i18n.php:677 +#: includes/i18n.php:857 msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server." msgstr "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server." -#: includes/i18n.php:679 +#: includes/i18n.php:861 msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection." msgstr "From unknown reason, CloudFlare, the firewall we use, blocks the connection." -#: includes/i18n.php:681 +#: includes/i18n.php:865 msgctxt "as pluginX requires an access to our API" msgid "%s requires an access to our API." msgstr "%s requires an access to our API." -#: includes/i18n.php:683 +#: includes/i18n.php:869 msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection." msgstr "It looks like your server is using Squid ACL (access control lists), which blocks the connection." -#: includes/i18n.php:685 +#: includes/i18n.php:873 msgid "I don't know what is Squid or ACL, help me!" msgstr "I don't know what is Squid or ACL, help me!" -#: includes/i18n.php:687, includes/i18n.php:695 +#: includes/i18n.php:875, includes/i18n.php:889 msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update." msgstr "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update." -#: includes/i18n.php:689 +#: includes/i18n.php:879 msgid "I'm a system administrator" msgstr "I'm a system administrator" -#: includes/i18n.php:691 +#: includes/i18n.php:881 msgid "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again." msgstr "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again." -#: includes/i18n.php:693 +#: includes/i18n.php:885 msgid "I don't know what is cURL or how to install it, help me!" msgstr "I don't know what is cURL or how to install it, help me!" -#: includes/i18n.php:697 +#: includes/i18n.php:893 msgid "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again." msgstr "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again." -#: includes/i18n.php:699 +#: includes/i18n.php:897 msgid "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance." msgstr "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance." -#: includes/i18n.php:701 +#: includes/i18n.php:901 msgid "Sorry for the inconvenience and we are here to help if you give us a chance." msgstr "Sorry for the inconvenience and we are here to help if you give us a chance." -#: includes/i18n.php:703 +#: includes/i18n.php:905 msgid "Yes - I'm giving you a chance to fix it" msgstr "Yes - I'm giving you a chance to fix it" -#: includes/i18n.php:705 +#: includes/i18n.php:907 msgid "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update." msgstr "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update." -#: includes/i18n.php:707 +#: includes/i18n.php:911 msgid "Let's try your previous version" msgstr "Let's try your previous version" -#: includes/i18n.php:709 +#: includes/i18n.php:913 msgid "Uninstall this version and install the previous one." msgstr "Uninstall this version and install the previous one." -#: includes/i18n.php:711 +#: includes/i18n.php:917 msgid "That's exhausting, please deactivate" msgstr "That's exhausting, please deactivate" -#: includes/i18n.php:713 +#: includes/i18n.php:919 msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future." msgstr "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future." -#: includes/i18n.php:715 +#: includes/i18n.php:923 msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience." msgstr "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience." -#: includes/i18n.php:717 +#: includes/i18n.php:927 msgctxt "%1s - plugin title, %2s - API domain" msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s" msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s" -#: includes/i18n.php:719 +#: includes/i18n.php:931 msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again." msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again." -#: includes/i18n.php:725 +#: includes/i18n.php:939 msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder." msgstr "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder." -#: includes/i18n.php:727 +#: includes/i18n.php:943 msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval." msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval." -#: includes/i18n.php:729 +#: includes/i18n.php:947 msgid "%s is the new owner of the account." msgstr "%s is the new owner of the account." -#: includes/i18n.php:733 +#: includes/i18n.php:951 msgctxt "addonX cannot run without pluginY" msgid "%s cannot run without %s." msgstr "%s cannot run without %s." -#: includes/i18n.php:735 +#: includes/i18n.php:955 msgctxt "addonX cannot run..." msgid "%s cannot run without the plugin." msgstr "%s cannot run without the plugin." -#: includes/i18n.php:737 +#: includes/i18n.php:959 msgctxt "pluginX activation was successfully..." msgid "%s activation was successfully completed." msgstr "%s activation was successfully completed." -#: includes/i18n.php:739 +#: includes/i18n.php:963 msgctxt "Plugin installer section title" msgid "Features & Pricing" msgstr "Features & Pricing" -#: includes/i18n.php:741 +#: includes/i18n.php:967 msgid "Add-on must be deployed to WordPress.org or Freemius." msgstr "Add-on must be deployed to WordPress.org or Freemius." -#: includes/i18n.php:743 +#: includes/i18n.php:971 msgid "Paid add-on must be deployed to Freemius." msgstr "Paid add-on must be deployed to Freemius." -#: includes/i18n.php:747 +#: includes/i18n.php:979 msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin." msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin." -#: includes/i18n.php:749 +#: includes/i18n.php:983 msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license." msgstr "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license." -#: includes/i18n.php:755 +#: includes/i18n.php:995 msgctxt "as every month" msgid "Monthly" msgstr "Monthly" -#: includes/i18n.php:757 +#: includes/i18n.php:997 msgctxt "as monthly period" msgid "mo" msgstr "mo" -#: includes/i18n.php:759 +#: includes/i18n.php:999 msgctxt "as once a year" msgid "Annual" msgstr "Annual" -#: includes/i18n.php:761 +#: includes/i18n.php:1001 msgctxt "as once a year" msgid "Annually" msgstr "Annually" -#: includes/i18n.php:763 +#: includes/i18n.php:1003 msgctxt "as once a year" msgid "Once" msgstr "Once" -#: includes/i18n.php:765 +#: includes/i18n.php:1005 msgctxt "as annual period" msgid "year" msgstr "year" -#: includes/i18n.php:767 +#: includes/i18n.php:1007 msgid "Lifetime" msgstr "Lifetime" -#: includes/i18n.php:769 +#: includes/i18n.php:1009 msgctxt "e.g. the best product" msgid "Best" msgstr "Best" -#: includes/i18n.php:771 +#: includes/i18n.php:1011 msgctxt "e.g. billed monthly" msgid "Billed %s" msgstr "Billed %s" -#: includes/i18n.php:773 +#: includes/i18n.php:1013 msgctxt "as a discount of $5 or 10%" msgid "Save %s" msgstr "Save %s" -#: includes/i18n.php:777 +#: includes/i18n.php:1017 msgid "View details" msgstr "View details" + +#: includes/i18n.php:1025 +msgctxt "button label" +msgid "Approve & Start Trial" +msgstr "Approve & Start Trial" + +#: includes/i18n.php:1029 +msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan." +msgstr "You are 1-click away from starting your %1$s-day free trial of the %2$s plan." + +#: includes/i18n.php:1033 +msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt-in with your user and non-sensitive site information, allowing the plugin to periodically send data to %s to check for version updates and to validate your trial." +msgstr "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt-in with your user and non-sensitive site information, allowing the plugin to periodically send data to %s to check for version updates and to validate your trial." + +#: includes/i18n.php:1045 +msgid "Business name" +msgstr "Business name" + +#: includes/i18n.php:1047 +msgid "Tax / VAT ID" +msgstr "Tax / VAT ID" + +#: includes/i18n.php:1049 +msgid "Address Line %d" +msgstr "Address Line %d" + +#: includes/i18n.php:1051 +msgid "Country" +msgstr "Country" + +#: includes/i18n.php:1053 +msgid "Select Country" +msgstr "Select Country" + +#: includes/i18n.php:1055 +msgid "City" +msgstr "City" + +#: includes/i18n.php:1057 +msgid "Town" +msgstr "Town" + +#: includes/i18n.php:1059 +msgid "State" +msgstr "State" + +#: includes/i18n.php:1061 +msgid "Province" +msgstr "Province" + +#: includes/i18n.php:1063 +msgid "ZIP / Postal Code" +msgstr "ZIP / Postal Code" diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-he.mo b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-he.mo new file mode 100644 index 0000000000000000000000000000000000000000..fc7250a7411ae0b17413452c43ab1b3e7e4ada88 Binary files /dev/null and b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-he.mo differ diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-he.po b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-he.po new file mode 100644 index 0000000000000000000000000000000000000000..19c8e430dfa0bf7f868118736e3000864f7957af --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-he.po @@ -0,0 +1,1661 @@ +# Copyright (C) 2016 freemius +# This file is distributed under the same license as the freemius package. +# Translators: +# Vova Feldman <vova@freemius.com>, 2016 +msgid "" +msgstr "" +"Project-Id-Version: WordPress SDK\n" +"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n" +"PO-Revision-Date: 2016-12-07 01:29+0000\n" +"Last-Translator: Vova Feldman <vova@freemius.com>\n" +"Language-Team: Hebrew (http://www.transifex.com/freemius/wordpress-sdk/language/he/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: he\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" +"X-Poedit-SourceCharset: UTF-8\n" + +#: includes/i18n.php41, includes/i18n.php:55 +msgid "Yes - I'm in!" +msgstr "" + +#: includes/i18n.php43, includes/i18n.php:57 +msgid "Not today" +msgstr "לא היום" + +#: includes/i18n.php:69 +msgid "Account" +msgstr "חשבון" + +#: includes/i18n.php:71 +msgid "Add On" +msgstr "תוסף" + +#: includes/i18n.php:73 +msgid "Contact Us" +msgstr "יצירת קשר" + +#: includes/i18n.php:75 +msgid "Contact Support" +msgstr "צור קשר" + +#: includes/i18n.php:77 +msgid "Change Ownership" +msgstr "עדכון בעלות" + +#: includes/i18n.php:79 +msgid "Support" +msgstr "תמיכה" + +#: includes/i18n.php:81 +msgid "Support Forum" +msgstr "פורום תמיכה" + +#: includes/i18n.php:83 +msgid "Add Ons" +msgstr "תוספים" + +#: includes/i18n.php:85 +msgctxt "verb" +msgid "Upgrade" +msgstr "שדרג" + +#: includes/i18n.php:87 +msgid "Awesome" +msgstr "אדיר" + +#: includes/i18n.php:89 +msgctxt "noun" +msgid "Pricing" +msgstr "מחירון" + +#: includes/i18n.php:91 +msgctxt "noun" +msgid "Price" +msgstr "מחיר" + +#: includes/i18n.php:93 +msgid "Unlimited Updates" +msgstr "עדכונים ללא הגבלה" + +#: includes/i18n.php:95 +msgctxt "verb" +msgid "Downgrade" +msgstr "שנמך" + +#: includes/i18n.php:97 +msgid "Cancel Trial" +msgstr "ביט" + +#: includes/i18n.php:99 +msgid "Free Trial" +msgstr "ניסיון חינם" + +#: includes/i18n.php:101 +msgid "Start my free %s" +msgstr "התחל את %s הניסיון שלי" + +#: includes/i18n.php:103 +msgid "No commitment for %s - cancel anytime" +msgstr "" + +#: includes/i18n.php:105 +msgid "After your free %s, pay as little as %s" +msgstr "" + +#: includes/i18n.php:107 +msgid "Details" +msgstr "פרטים" + +#: includes/i18n.php:109 +msgid "Account Details" +msgstr "פרטי חשבון" + +#: includes/i18n.php:111 +msgctxt "verb" +msgid "Delete" +msgstr "מחק" + +#: includes/i18n.php:113 +msgctxt "verb" +msgid "Show" +msgstr "הצג" + +#: includes/i18n.php:115 +msgctxt "verb" +msgid "Hide" +msgstr "הסתר" + +#: includes/i18n.php:117 +msgctxt "verb" +msgid "Edit" +msgstr "ערוך" + +#: includes/i18n.php:119 +msgctxt "verb" +msgid "Update" +msgstr "" + +#: includes/i18n.php:121 +msgid "Date" +msgstr "תאריך" + +#: includes/i18n.php:123 +msgid "Amount" +msgstr "סכום" + +#: includes/i18n.php:125 +msgid "Invoice" +msgstr "חשבונית" + +#: includes/i18n.php:127 +msgid "Billing" +msgstr "בילינג" + +#: includes/i18n.php:129 +msgid "Payments" +msgstr "תשלומים" + +#: includes/i18n.php:131 +msgid "Delete Account" +msgstr "מחיקת חשבון" + +#: includes/i18n.php:133 +msgctxt "as close a window" +msgid "Dismiss" +msgstr "סגירה" + +#: includes/i18n.php:135 +msgctxt "as product pricing plan" +msgid "Plan" +msgstr "חבילה" + +#: includes/i18n.php:137 +msgid "Change Plan" +msgstr "שינוי חבילה" + +#: includes/i18n.php:139 +msgctxt "as download professional version" +msgid "Download %s Version" +msgstr "" + +#: includes/i18n.php:141 +msgctxt "as download professional version now" +msgid "Download %s version now" +msgstr "" + +#: includes/i18n.php:145 +msgctxt "as download latest version" +msgid "Download Latest" +msgstr "הורד גרסה אחרונה" + +#: includes/i18n.php:147 +msgctxt "E.g. you have a professional license." +msgid "You have a %s license." +msgstr "" + +#: includes/i18n.php:151 +msgid "New" +msgstr "חדש" + +#: includes/i18n.php:153 +msgid "Free" +msgstr "חינם" + +#: includes/i18n.php:155 +msgctxt "as trial plan" +msgid "Trial" +msgstr "ניסיון" + +#: includes/i18n.php:157 +msgctxt "as starting a trial plan" +msgid "Start Trial" +msgstr "" + +#: includes/i18n.php:159 +msgctxt "verb" +msgid "Purchase" +msgstr "רכישה" + +#: includes/i18n.php:161 +msgid "Purchase License" +msgstr "קניית רישיון" + +#: includes/i18n.php:163 +msgctxt "verb" +msgid "Buy" +msgstr "קנייה" + +#: includes/i18n.php:165 +msgid "Buy License" +msgstr "קניית רישיון" + +#: includes/i18n.php:167 +msgid "Single Site License" +msgstr "רשיון לאתר אחד" + +#: includes/i18n.php:169 +msgid "Unlimited Licenses" +msgstr "רשיונות ללא הגבלה" + +#: includes/i18n.php:171 +msgid "Up to %s Sites" +msgstr "עד %s אתרים" + +#: includes/i18n.php:173 +msgid "%sRenew your license now%s to access version %s features and support." +msgstr "" + +#: includes/i18n.php:177 +msgid "" +"Enter the email address you've used for the upgrade below and we will resend" +" you the license key." +msgstr "" + +#: includes/i18n.php:181 +msgctxt "e.g. Professional Plan" +msgid "%s Plan" +msgstr "" + +#: includes/i18n.php:183 +msgid "You are just one step away - %s" +msgstr "" + +#: includes/i18n.php:185 +msgctxt "%s - plugin name. As complete \"Jetpack\" activation now" +msgid "Complete \"%s\" Activation Now" +msgstr "" + +#: includes/i18n.php:189 +msgid "We made a few tweaks to the plugin, %s" +msgstr "ביצענו מספר שינויים לתוסף, %s" + +#: includes/i18n.php:191 +msgid "Opt-in to make \"%s\" Better!" +msgstr "" + +#: includes/i18n.php:193 +msgid "Error" +msgstr "שגיאה" + +#: includes/i18n.php:195 +msgid "" +"Freemius SDK couldn't find the plugin's main file. Please contact " +"sdk@freemius.com with the current error." +msgstr "" + +#: includes/i18n.php:203 +msgctxt "as expiration date" +msgid "Expiration" +msgstr "תפוגה" + +#: includes/i18n.php:205 +msgctxt "as software license" +msgid "License" +msgstr "רישיון" + +#: includes/i18n.php:207 +msgid "not verified" +msgstr "לא מאומת" + +#: includes/i18n.php:209 +msgid "Verify Email" +msgstr "אמת כתובת דוא\"ל" + +#: includes/i18n.php:211 +msgctxt "e.g. expires in 2 months" +msgid "Expires in %s" +msgstr "" + +#: includes/i18n.php:213 +msgctxt "e.g. auto renews in 2 months" +msgid "Auto renews in %s" +msgstr "" + +#: includes/i18n.php:215 +msgid "No expiration" +msgstr "ללא תפוגה" + +#: includes/i18n.php:217 +msgid "Expired" +msgstr "פג תוקף" + +#: includes/i18n.php:219 +msgid "Cancelled" +msgstr "בוטל" + +#: includes/i18n.php:221 +msgctxt "e.g. In 2 hours" +msgid "In %s" +msgstr "בעוד %s" + +#: includes/i18n.php:223 +msgctxt "e.g. 2 min ago" +msgid "%s ago" +msgstr "" + +#: includes/i18n.php:225 +msgctxt "as plugin version" +msgid "Version" +msgstr "גרסה" + +#: includes/i18n.php:227 +msgid "Name" +msgstr "שם" + +#: includes/i18n.php:229 +msgid "Email" +msgstr "דוא\"ל" + +#: includes/i18n.php:231 +msgid "Email address" +msgstr "כתובת דוא\"ל" + +#: includes/i18n.php:233 +msgid "Verified" +msgstr "מאומת" + +#: includes/i18n.php:235 +msgid "Plugin" +msgstr "תוסף" + +#: includes/i18n.php:237 +msgid "Plugins" +msgstr "תוספים" + +#: includes/i18n.php:239 +msgid "Themes" +msgstr "תבניות" + +#: includes/i18n.php:241 +msgctxt "as file/folder path" +msgid "Path" +msgstr "" + +#: includes/i18n.php:243 +msgid "Title" +msgstr "כותרת" + +#: includes/i18n.php:245 +msgid "Free version" +msgstr "גירסה חינאמית" + +#: includes/i18n.php:247 +msgid "Premium version" +msgstr "גירסת פרימיום" + +#: includes/i18n.php:249 +msgctxt "as WP plugin slug" +msgid "Slug" +msgstr "" + +#: includes/i18n.php:251 +msgid "ID" +msgstr "מזהה" + +#: includes/i18n.php:253 +msgid "Users" +msgstr "משתמשים" + +#: includes/i18n.php:255 +msgid "Plugin Installs" +msgstr "התקנות תוסף" + +#: includes/i18n.php:257 +msgctxt "like websites" +msgid "Sites" +msgstr "אתרים" + +#: includes/i18n.php:259 +msgid "User ID" +msgstr "מזהה משתמש" + +#: includes/i18n.php:261 +msgid "Site ID" +msgstr "מזהה אתר" + +#: includes/i18n.php:263 +msgid "Public Key" +msgstr "מפתח פומבי" + +#: includes/i18n.php:265 +msgid "Secret Key" +msgstr "מפתח סודי" + +#: includes/i18n.php:267 +msgctxt "as secret encryption key missing" +msgid "No Secret" +msgstr "אין מפתח סודי" + +#: includes/i18n.php:269 +msgid "No ID" +msgstr "אין מזהה" + +#: includes/i18n.php:271 +msgctxt "as synchronize license" +msgid "Sync License" +msgstr "סינכרן רישיון" + +#: includes/i18n.php:273 +msgctxt "as synchronize" +msgid "Sync" +msgstr "סינכרון" + +#: includes/i18n.php:275 +msgid "Activate License" +msgstr "הפעלת רישיון" + +#: includes/i18n.php:277 +msgid "Activate Free Version" +msgstr "הפעלת גירסה חינאמית" + +#: includes/i18n.php:279 +msgid "" +"Please enter the license key that you received in the email right after the " +"purchase:" +msgstr "" + +#: includes/i18n.php:283 +msgid "Activating license..." +msgstr "מפעיל רישיון..." + +#: includes/i18n.php:285 +msgid "Change License" +msgstr "שינוי רישיון" + +#: includes/i18n.php:287 +msgid "Update License" +msgstr "עדכון רישיון" + +#: includes/i18n.php:289 +msgid "Deactivate License" +msgstr "שיחרור רישיון" + +#: includes/i18n.php:291 +msgid "Activate" +msgstr "הפעלה" + +#: includes/i18n.php:293 +msgid "Deactivate" +msgstr "כיבוי" + +#: includes/i18n.php:295 +msgid "Skip & Deactivate" +msgstr "דלג והמשך כיבוי" + +#: includes/i18n.php:297 +msgid "No - just deactivate" +msgstr "לא - פשוט כבה" + +#: includes/i18n.php:299 +msgid "Yes - do your thing" +msgstr "כן - בצעו את מה שצריך" + +#: includes/i18n.php:301 +msgctxt "active mode" +msgid "Active" +msgstr "מופעל" + +#: includes/i18n.php:303 +msgctxt "is active mode?" +msgid "Is Active" +msgstr "האם פעיל" + +#: includes/i18n.php:305 +msgid "Install Now" +msgstr "התקן עכשיו" + +#: includes/i18n.php:307 +msgid "Install Update Now" +msgstr "התקן עדכון במיידי" + +#: includes/i18n.php:309 +msgid "More information about %s" +msgstr "" + +#: includes/i18n.php:311 +msgid "Localhost" +msgstr "שרת לוקאלי" + +#: includes/i18n.php:313 +msgctxt "as activate Professional plan" +msgid "Activate %s Plan" +msgstr "" + +#: includes/i18n.php:315 +msgctxt "as 5 licenses left" +msgid "%s left" +msgstr "נשארו %s" + +#: includes/i18n.php:317 +msgid "Last license" +msgstr "רישיון אחרון" + +#: includes/i18n.php:319 +msgid "What is your %s?" +msgstr "" + +#: includes/i18n.php:321 +msgid "Activate this add-on" +msgstr "הפעל את התוסף" + +#: includes/i18n.php:323 +msgid "" +"Deactivating your license will block all premium features, but will enable " +"you to activate the license on another site. Are you sure you want to " +"proceed?" +msgstr "" + +#: includes/i18n.php:327 +msgid "" +"Deleting the account will automatically deactivate your %s plan license so " +"you can use it on other sites. If you want to terminate the recurring " +"payments as well, click the \"Cancel\" button, and first \"Downgrade\" your " +"account. Are you sure you would like to continue with the deletion?" +msgstr "" + +#: includes/i18n.php:331 +msgid "" +"Deletion is not temporary. Only delete if you no longer want to use this " +"plugin anymore. Are you sure you would like to continue with the deletion?" +msgstr "" + +#: includes/i18n.php:335 +msgid "" +"Downgrading your plan will immediately stop all future recurring payments " +"and your %s plan license will expire in %s." +msgstr "" + +#: includes/i18n.php:339 +msgid "" +"Cancelling the trial will immediately block access to all premium features. " +"Are you sure?" +msgstr "" + +#: includes/i18n.php:343 +msgid "" +"You can still enjoy all %s features but you will not have access to plugin " +"updates and support." +msgstr "" + +#: includes/i18n.php:347 +msgid "" +"Once your license expire you can still use the Free version but you will NOT" +" have access to the %s features." +msgstr "" + +#: includes/i18n.php:351 +msgid "Are you sure you want to proceed?" +msgstr "האם את/ה בטוח רוצה להמשיך?" + +#: includes/i18n.php:357 +msgid "Add Ons for %s" +msgstr "" + +#: includes/i18n.php:359 +msgid "" +"We could'nt load the add-ons list. It's probably an issue on our side, " +"please try to come back in few minutes." +msgstr "" + +#: includes/i18n.php:365 +msgid "Anonymous feedback" +msgstr "פידבק אנונימי" + +#: includes/i18n.php:367 +msgid "Quick feedback" +msgstr "פידבק זריז" + +#: includes/i18n.php:369 +msgid "If you have a moment, please let us know why you are deactivating" +msgstr "" + +#: includes/i18n.php:373 +msgid "Yes - Deactivate" +msgstr "כן - " + +#: includes/i18n.php:375 +msgid "Submit & Deactivate" +msgstr "שלח וכבה" + +#: includes/i18n.php:377 +msgid "Cancel" +msgstr "בטל" + +#: includes/i18n.php:379 +msgid "I no longer need the plugin" +msgstr "אין לי צורך יותר בתוסף" + +#: includes/i18n.php:381 +msgid "I found a better plugin" +msgstr "מצאתי תוסף טוב יותר" + +#: includes/i18n.php:383 +msgid "I only needed the plugin for a short period" +msgstr "השתמשתי בתוסף לתקופה קצרה" + +#: includes/i18n.php:385 +msgid "The plugin broke my site" +msgstr "התוסף הרס לי את האתר" + +#: includes/i18n.php:387 +msgid "The plugin suddenly stopped working" +msgstr "התוסף לפתע הפסיק לעבוד" + +#: includes/i18n.php:389 +msgid "I can't pay for it anymore" +msgstr "אני לא יכול/ה להמשיך לשלם על זה" + +#: includes/i18n.php:391 +msgid "It's a temporary deactivation. I'm just debugging an issue." +msgstr "כיבוי זמני לשם דיבאג." + +#: includes/i18n.php:395 +msgctxt "" +"the text of the \"other\" reason for deactivating the plugin that is shown " +"in the modal box." +msgid "Other" +msgstr "אחר" + +#: includes/i18n.php:399 +msgid "Kindly tell us the reason so we can improve." +msgstr "אנא שתף את הסיבה כדי שנוכל להשתפר." + +#: includes/i18n.php:401 +msgid "What's the plugin's name?" +msgstr "מהו שם התוסף?" + +#: includes/i18n.php:403 +msgid "What price would you feel comfortable paying?" +msgstr "מה המחיר שכן תרגיש\\י בנוח לשלם?" + +#: includes/i18n.php:405 +msgid "I couldn't understand how to make it work" +msgstr "לא הצלחתי להבין איך לגרום לזה לעבוד" + +#: includes/i18n.php:407 +msgid "" +"The plugin is great, but I need specific feature that you don't support" +msgstr "התוסף מעולה, אבל אני צריכ\\ה פיצ'ר ספציפי שלא נתמך" + +#: includes/i18n.php:411 +msgid "The plugin is not working" +msgstr "התוסף לא עובד" + +#: includes/i18n.php:413 +msgid "It's not what I was looking for" +msgstr "חיפשתי משהו אחר" + +#: includes/i18n.php:415 +msgid "The plugin didn't work as expected" +msgstr "התוסף לא עבד כמצופה" + +#: includes/i18n.php:417 +msgid "What feature?" +msgstr "איזה פיטצ'ר?" + +#: includes/i18n.php:419 +msgid "Kindly share what didn't work so we can fix it for future users..." +msgstr "אנא שתפ\\י מה לא עבד כדי שנוכל לתקן זאת עבור משתמשים עתידיים..." + +#: includes/i18n.php:423 +msgid "What you've been looking for?" +msgstr "מה חיפשת?" + +#: includes/i18n.php:425 +msgid "What did you expect?" +msgstr "למה ציפית?" + +#: includes/i18n.php:427 +msgid "The plugin didn't work" +msgstr "התוסף לא עבד" + +#: includes/i18n.php:429 +msgid "I don't like to share my information with you" +msgstr "אני לא אוהב את הרעיון של שיתוף מידע איתכם" + +#: includes/i18n.php:431 +msgid "" +"You might have missed it, but you don't have to share any data and can just " +"%s the opt-in." +msgstr "אולי פספסת את זה אבל אינך חייב\\ת לשתף כל מידע איתנו, ביכולתך %s על שיתוף המידע." + +#: includes/i18n.php:441 +msgctxt "greeting" +msgid "Hey %s," +msgstr "היי %s," + +#: includes/i18n.php:443 +msgctxt "a greeting. E.g. Thanks John!" +msgid "Thanks %s!" +msgstr "תודה %s!" + +#: includes/i18n.php:445 +msgid "" +"Never miss an important update - opt-in to our security and feature updates " +"notifications, and non-sensitive diagnostic tracking with %4$s." +msgstr "" + +#: includes/i18n.php:449 +msgid "" +"Please help us improve %1$s! If you opt-in, some data about your usage of " +"%1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still " +"work just fine." +msgstr "" + +#: includes/i18n.php:453 +msgid "" +"You should receive an activation email for %s to your mailbox at %s. Please " +"make sure you click the activation button in that email to %s." +msgstr "" + +#: includes/i18n.php:455 +msgid "complete the install" +msgstr "" + +#: includes/i18n.php:457 +msgid "start the trial" +msgstr "" + +#: includes/i18n.php:459 +msgid "" +"Thanks for purchasing %s! To get started, please enter your license key:" +msgstr "" + +#: includes/i18n.php:463 +msgid "" +"The plugin will be periodically sending data to %s to check for plugin " +"updates and verify the validity of your license." +msgstr "" + +#: includes/i18n.php:467 +msgid "What permissions are being granted?" +msgstr "מהן ההרשאות המוענקות?" + +#: includes/i18n.php:469 +msgid "Your Profile Overview" +msgstr "פרטים כלליים על הפרופיל" + +#: includes/i18n.php:471 +msgid "Name and email address" +msgstr "שם וכתובת דו\"אל" + +#: includes/i18n.php:473 +msgid "Your Site Overview" +msgstr "פרטים כלליים על האתר" + +#: includes/i18n.php:475 +msgid "Site URL, WP version, PHP info, plugins & themes" +msgstr "כתובת אתר, גרסת וורדפרס, פרטי PHP, תוספים ותבניות" + +#: includes/i18n.php:479 +msgid "Current Plugin Events" +msgstr "שינויי מצב בתוסף הנוכחי" + +#: includes/i18n.php:481 +msgid "Activation, deactivation and uninstall" +msgstr "הפעלה, כיבוי והסרה" + +#: includes/i18n.php:483 +msgid "Plugins & Themes" +msgstr "תוספים ותבניות" + +#: includes/i18n.php:485 +msgid "Titles, versions and state." +msgstr "שמות, גרסאות וסטאטוס." + +#: includes/i18n.php:487 +msgid "Admin Notices" +msgstr "" + +#: includes/i18n.php:489 +msgid "Newsletter" +msgstr "ניוסלטר" + +#: includes/i18n.php:491 +msgid "Updates, announcements, marketing, no spam" +msgstr "" + +#: includes/i18n.php:493 +msgid "Privacy Policy" +msgstr "מדיניות פרטיות" + +#: includes/i18n.php:495 +msgid "Terms of Service" +msgstr "תנאי השירות" + +#: includes/i18n.php:497 +msgctxt "as activating plugin" +msgid "Activating" +msgstr "מפעיל" + +#: includes/i18n.php:499 +msgctxt "as in the process of sending an email" +msgid "Sending email" +msgstr "שולח דוא\"ל" + +#: includes/i18n.php:503 +msgctxt "button label" +msgid "Allow & Continue" +msgstr "אפשר\\י והמשכ\\י" + +#: includes/i18n.php:505 +msgctxt "button label" +msgid "Agree & Activate License" +msgstr "הסכמה והפעלת רישיון" + +#: includes/i18n.php:507 +msgctxt "verb" +msgid "Skip" +msgstr "דלג" + +#: includes/i18n.php:509 +msgid "Click here to use the plugin anonymously" +msgstr "" + +#: includes/i18n.php:511 +msgid "Re-send activation email" +msgstr "שליחה חוזרת של מייל האקטיבציה" + +#: includes/i18n.php:513 +msgid "License key" +msgstr "מפתח רישיון" + +#: includes/i18n.php:515 +msgid "Send License Key" +msgstr "שליחת מפתח רישיון" + +#: includes/i18n.php:517 +msgid "Sending license key" +msgstr "שולח מפתח רישיון" + +#: includes/i18n.php:519 +msgid "Have a license key?" +msgstr "האם ברשותך רישיון?" + +#: includes/i18n.php:521 +msgid "Don't have a license key?" +msgstr "האם אין ברשותך מפתח רישיון?" + +#: includes/i18n.php:523 +msgid "Can't find your license key?" +msgstr "האם אינך מוצא את מפתח הרישיון?" + +#: includes/i18n.php:525 +msgid "" +"We couldn't find your email address in the system, are you sure it's the " +"right address?" +msgstr "" + +#: includes/i18n.php:529 +msgid "" +"We can't see any active licenses associated with that email address, are you" +" sure it's the right address?" +msgstr "" + +#: includes/i18n.php:533 +msgid "Opt In" +msgstr "" + +#: includes/i18n.php:535 +msgid "Opt Out" +msgstr "" + +#: includes/i18n.php:537 +msgid "On second thought - I want to continue helping" +msgstr "" + +#: includes/i18n.php:541 +msgid "Opting out..." +msgstr "" + +#: includes/i18n.php:543 +msgid "Opting in..." +msgstr "" + +#: includes/i18n.php:545 +msgid "" +"We appreciate your help in making the %s better by letting us track some " +"usage data." +msgstr "" + +#: includes/i18n.php:549 +msgid "" +"Usage tracking is done in the name of making %s better. Making a better user" +" experience, prioritizing new features, and more good things. We'd really " +"appreciate if you'll reconsider letting us continue with the tracking." +msgstr "" + +#: includes/i18n.php:553 +msgid "" +"By clicking \"Opt Out\", we will no longer be sending any data from %s to " +"%s." +msgstr "" + +#: includes/i18n.php:563 +msgid "Screenshots" +msgstr "צילומי מסך" + +#: includes/i18n.php:565 +msgid "Click to view full-size screenshot %d" +msgstr "" + +#: includes/i18n.php:573 +msgid "Freemius Debug" +msgstr "" + +#: includes/i18n.php:575 +msgctxt "as turned on" +msgid "On" +msgstr "דלוק" + +#: includes/i18n.php:577 +msgctxt "as turned off" +msgid "Off" +msgstr "כבוי" + +#: includes/i18n.php:579 +msgctxt "as code debugging" +msgid "Debugging" +msgstr "דיבוג" + +#: includes/i18n.php:581 +msgid "Freemius State" +msgstr "" + +#: includes/i18n.php:583 +msgctxt "as connection was successful" +msgid "Connected" +msgstr "מחובר" + +#: includes/i18n.php:585 +msgctxt "as connection blocked" +msgid "Blocked" +msgstr "חסום" + +#: includes/i18n.php:587 +msgctxt "as application program interface" +msgid "API" +msgstr "API" + +#: includes/i18n.php:589 +msgctxt "as software development kit versions" +msgid "SDK" +msgstr "SDK" + +#: includes/i18n.php:591 +msgctxt "as software development kit versions" +msgid "SDK Versions" +msgstr "גרסאות SDK" + +#: includes/i18n.php:595 +msgctxt "as plugin folder path" +msgid "Plugin Path" +msgstr "" + +#: includes/i18n.php:597 +msgctxt "as sdk path" +msgid "SDK Path" +msgstr "מיקום SDK" + +#: includes/i18n.php:599 +msgid "Add Ons of Plugin %s" +msgstr "" + +#: includes/i18n.php:601 +msgid "Are you sure you want to delete all Freemius data?" +msgstr "" + +#: includes/i18n.php:605 +msgid "Actions" +msgstr "פעולות" + +#: includes/i18n.php:607 +msgid "Delete All Accounts" +msgstr "מחיקת כל החשבונות" + +#: includes/i18n.php:609 +msgid "Start Fresh" +msgstr "התחל מחדש" + +#: includes/i18n.php:611 +msgid "Clear API Cache" +msgstr "ניקוי מטמון ה-API" + +#: includes/i18n.php:613 +msgid "Sync Data From Server" +msgstr "סנכרון מידע מהשרת" + +#: includes/i18n.php:615 +msgid "Scheduled Crons" +msgstr "" + +#: includes/i18n.php:617 +msgid "Plugins & Themes Sync" +msgstr "" + +#: includes/i18n.php:625 +msgctxt "as congratulations" +msgid "Congrats" +msgstr "מזל טוב" + +#: includes/i18n.php:627 +msgctxt "exclamation" +msgid "Oops" +msgstr "אופס" + +#: includes/i18n.php:629 +msgctxt "interjection expressing joy or exuberance" +msgid "Yee-haw" +msgstr "" + +#: includes/i18n.php:633 +msgctxt "" +"(especially in electronic communication) used to express elation, " +"enthusiasm, or triumph." +msgid "W00t" +msgstr "" + +#: includes/i18n.php:637 +msgctxt "a positive response" +msgid "Right on" +msgstr "" + +#: includes/i18n.php:639 +msgctxt "" +"something somebody says when they are thinking about what you have just " +"said. " +msgid "Hmm" +msgstr "הממ" + +#: includes/i18n.php:643 +msgid "O.K" +msgstr "אוקיי" + +#: includes/i18n.php:645 +msgctxt "exclamation" +msgid "Hey" +msgstr "היי" + +#: includes/i18n.php:647 +msgctxt "advance notice of something that will need attention." +msgid "Heads up" +msgstr "לתשמות לבך" + +#: includes/i18n.php:657 +msgid "Seems like you got the latest release." +msgstr "" + +#: includes/i18n.php:659 +msgid "You are all good!" +msgstr "את\\ה מסודר!" + +#: includes/i18n.php:661 +msgid "" +"Sorry, we could not complete the email update. Another user with the same " +"email is already registered." +msgstr "" + +#: includes/i18n.php:665 +msgid "" +"If you would like to give up the ownership of the plugin's account to %s " +"click the Change Ownership button." +msgstr "" + +#: includes/i18n.php:669 +msgid "" +"Your email was successfully updated. You should receive an email with " +"confirmation instructions in few moments." +msgstr "" + +#: includes/i18n.php:673 +msgid "Your name was successfully updated." +msgstr "שמך עודכן בהצלחה." + +#: includes/i18n.php:675 +msgid "You have successfully updated your %s." +msgstr "" + +#: includes/i18n.php:677 +msgid "Please provide your full name." +msgstr "נא למלא את שמך המלא." + +#: includes/i18n.php:679 +msgid "" +"Verification mail was just sent to %s. If you can't find it after 5 min, " +"please check your spam box." +msgstr "" + +#: includes/i18n.php:683 +msgid "" +"Just letting you know that the add-ons information of %s is being pulled " +"from an external server." +msgstr "" + +#: includes/i18n.php:687 +msgid "No credit card required" +msgstr "לא נדרש כרטיס אשראי" + +#: includes/i18n.php:689 +msgid "Premium plugin version was successfully activated." +msgstr "" + +#: includes/i18n.php:693 +msgid "The upgrade of %s was successfully completed." +msgstr "" + +#: includes/i18n.php:695 +msgid "Your account was successfully activated with the %s plan." +msgstr "חשבונך הופעל בהצלחה עם חבילת ה-%s." + +#: includes/i18n.php:699 +msgid "Download the latest %s version now" +msgstr "הורדת גרסת ה-%s העדכנית - עכשיו" + +#: includes/i18n.php:701 +msgid "Please follow these steps to complete the upgrade" +msgstr "נא לבצע את הצעדים הבאים להשלמת השידרוג" + +#: includes/i18n.php:705 +msgid "Download the latest %s version" +msgstr "הורד\\י את גרסת ה-%s העדכנית" + +#: includes/i18n.php:707 +msgid "Deactivate the free version" +msgstr "כבה\\י את הגרסה החינאמית" + +#: includes/i18n.php:709 +msgid "Upload and activate the downloaded version" +msgstr "העלה\\י והפעיל\\י את הגרסה שהורדת" + +#: includes/i18n.php:711 +msgid "How to upload and activate?" +msgstr "איך להעלות ולהפעיל?" + +#: includes/i18n.php:713 +msgctxt "%s - product name, e.g. Facebook add-on was successfully..." +msgid "%s Add-on was successfully purchased." +msgstr "" + +#: includes/i18n.php:717 +msgid "Your %s Add-on plan was successfully upgraded." +msgstr "" + +#: includes/i18n.php:721 +msgid "Your email has been successfully verified - you are AWESOME!" +msgstr "" + +#: includes/i18n.php:725 +msgid "Your plan was successfully upgraded." +msgstr "החבילה הופעלה בהצלחה." + +#: includes/i18n.php:727 +msgid "Your plan was successfully changed to %s." +msgstr "" + +#: includes/i18n.php:729 +msgid "" +"Your license has expired. You can still continue using the free plugin " +"forever." +msgstr "פג תוקפו של הרישיון. עדיין ניתן להמשיך להשתמש בגרסה החינאמית של התוסף ללא מגבלת זמן." + +#: includes/i18n.php:733 +msgid "" +"Your license has been cancelled. If you think it's a mistake, please contact" +" support." +msgstr "רשיונך בוטל. אם לדעתך זו טעות, נא ליצור קשר עם התמיכה." + +#: includes/i18n.php:737 +msgid "Your trial has been successfully started." +msgstr "הניסיון שלך הופעל בהצלחה." + +#: includes/i18n.php:739 +msgid "Your license was successfully activated." +msgstr "הרישיון הופעל בהצלחה." + +#: includes/i18n.php:741 +msgid "It looks like your site currently doesn't have an active license." +msgstr "נראה לאתר עדיין אין רישיון פעיל." + +#: includes/i18n.php:745 +msgid "" +"Your license was successfully deactivated, you are back to the %s plan." +msgstr "רישיונך נותק בהצלחה, חזרת לחבילת ה-%s" + +#: includes/i18n.php:749 +msgid "It looks like the license deactivation failed." +msgstr "נראה שניתוק הרישיון נכשל." + +#: includes/i18n.php:753 +msgid "It looks like the license could not be activated." +msgstr "נראה שלא ניתן להפעיל את הרישיון." + +#: includes/i18n.php:757 +msgid "Error received from the server:" +msgstr "הוחזרה שגיאה מהשרת:" + +#: includes/i18n.php:759 +msgid "" +"Your trial has expired. You can still continue using all our free features." +msgstr "תקופת הניסיון נגמרה. ביכולתך להמשיך להשתמש בכל הפיטצ'רים החינאמיים." + +#: includes/i18n.php:763 +msgid "" +"Your plan was successfully downgraded. Your %s plan license will expire in " +"%s." +msgstr "" + +#: includes/i18n.php:767 +msgid "" +"Seems like we are having some temporary issue with your plan downgrade. " +"Please try again in few minutes." +msgstr "" + +#: includes/i18n.php:771 +msgid "" +"It looks like you are not in trial mode anymore so there's nothing to cancel" +" :)" +msgstr "" + +#: includes/i18n.php:775 +msgid "Your %s free trial was successfully cancelled." +msgstr "" + +#: includes/i18n.php:779 +msgctxt "%s - numeric version number" +msgid "Version %s was released." +msgstr "גרסה %s הושקה." + +#: includes/i18n.php:783 +msgid "Please download %s." +msgstr "" + +#: includes/i18n.php:785 +msgctxt "%s - plan name, as the latest professional version here" +msgid "the latest %s version here" +msgstr "גרסת ה-%s האחרונה כאן" + +#: includes/i18n.php:789 +msgid "" +"How do you like %s so far? Test all our %s premium features with a %d-day " +"free trial." +msgstr "" + +#: includes/i18n.php:793 +msgctxt "call to action" +msgid "Start free trial" +msgstr "התחלת ניסיון חינם" + +#: includes/i18n.php:795 +msgid "Starting trial" +msgstr "" + +#: includes/i18n.php:797 +msgid "Please wait" +msgstr "" + +#: includes/i18n.php:799 +msgid "" +"Seems like we are having some temporary issue with your trial cancellation. " +"Please try again in few minutes." +msgstr "" + +#: includes/i18n.php:803 +msgid "You already utilized a trial before." +msgstr "הניסיון כבר נוצל בעבר." + +#: includes/i18n.php:805 +msgid "You are already running the plugin in a trial mode." +msgstr "התוסף כבר עכשיו בתקופת ניסיון." + +#: includes/i18n.php:809 +msgid "Plan %s do not exist, therefore, can't start a trial." +msgstr "" + +#: includes/i18n.php:813 +msgid "Plan %s does not support a trial period." +msgstr "" + +#: includes/i18n.php:815 +msgid "None of the plugin's plans supports a trial period." +msgstr "אף אחת מחבילות התוסף מאפשרת תקופת ניסיון." + +#: includes/i18n.php:819 +msgid "" +"Unexpected API error. Please contact the plugin's author with the following " +"error." +msgstr "שגיאת API בלתי צפוייה. נא לפנות למפתח התוסף עם השגיאה הבאה." + +#: includes/i18n.php:823 +msgid "No commitment for %s days - cancel anytime!" +msgstr "" + +#: includes/i18n.php:825 +msgid "" +"Your license has expired. You can still continue using all the %s features, " +"but you'll need to renew your license to continue getting updates and " +"support." +msgstr "" + +#: includes/i18n.php:829 +msgid "Couldn't activate %s." +msgstr "" + +#: includes/i18n.php:831 +msgid "Please contact us with the following message:" +msgstr "אנא צור איתנו קשר יחד עם ההודעה הבאה:" + +#: includes/i18n.php:833 +msgid "" +"It looks like you are still on the %s plan. If you did upgrade or change " +"your plan, it's probably an issue on our side - sorry." +msgstr "" + +#: includes/i18n.php:837 +msgid "Please contact us here" +msgstr "אנא צור איתנו קשר כאן" + +#: includes/i18n.php:839 +msgid "" +"I have upgraded my account but when I try to Sync the License, the plan " +"remains %s." +msgstr "שידרגתי את החשבון שלי אבל כשאני מנסה לבצע סנכרון לרישיון החבילה נשארת %s" + +#: includes/i18n.php:847 +msgid "From unknown reason, the API connectivity test failed." +msgstr "יש בעיית תקשורת ל-API מסיבה בלתי ברורה." + +#: includes/i18n.php:851 +msgid "" +"It's probably a temporary issue on our end. Just to be sure, with your " +"permission, would it be o.k to run another connectivity test?" +msgstr "ככל הנראה זאת בעיה זמנית בצד שלנו. ברשותך, ורק כדי להיות בטוחים שזאת הבעיה, האם זה יהיה בסדר לבצע בדיקת תקשורת נוספת?" + +#: includes/i18n.php:855 +msgid "" +"We use PHP cURL library for the API calls, which is a very common library " +"and usually installed out of the box. Unfortunately, cURL is not installed " +"on your server." +msgstr "" + +#: includes/i18n.php:859 +msgid "" +"From unknown reason, CloudFlare, the firewall we use, blocks the connection." +msgstr "מסיבה בלתי ברורה, CloudFlare, חומת האש שאנחנו משתמשים בה, חוסמת את התקשורת." + +#: includes/i18n.php:863 +msgctxt "as pluginX requires an access to our API" +msgid "%s requires an access to our API." +msgstr "%s מחייב גישה ל-API שלנו." + +#: includes/i18n.php:867 +msgid "" +"It looks like your server is using Squid ACL (access control lists), which " +"blocks the connection." +msgstr "" + +#: includes/i18n.php:871 +msgid "I don't know what is Squid or ACL, help me!" +msgstr "אין לי מושג מה זה Squid או ACL - אשמח לעזרה!" + +#: includes/i18n.php873, includes/i18n.php:887 +msgid "" +"We'll make sure to contact your hosting company and resolve the issue. You " +"will get a follow-up email to %s once we have an update." +msgstr "" + +#: includes/i18n.php:877 +msgid "I'm a system administrator" +msgstr "" + +#: includes/i18n.php:879 +msgid "" +"Great, please whitelist the following domains: %s. Once you done, deactivate" +" the plugin and activate it again." +msgstr "" + +#: includes/i18n.php:883 +msgid "I don't know what is cURL or how to install it, help me!" +msgstr "אין לי מושג מה זה cURL או איך להתקין אותו - אשמח לעזרה!" + +#: includes/i18n.php:891 +msgid "" +"Great, please install cURL and enable it in your php.ini file. To make sure " +"it was successfully activated, use 'phpinfo()'. Once activated, deactivate " +"the plugin and reactivate it back again." +msgstr "" + +#: includes/i18n.php:895 +msgid "" +"We are sure it's an issue on our side and more than happy to resolve it for " +"you ASAP if you give us a chance." +msgstr "זו בטח בעיה בצד שלנו ואנחנו נשמח לעזור כדי לפתור את העניין בהקדם האפשר, רק במידה ותאפשר\\י זאת." + +#: includes/i18n.php:899 +msgid "" +"Sorry for the inconvenience and we are here to help if you give us a chance." +msgstr "מצטערים על חוסר הנעימות, אנחנו כאן כדי לעזור אם תאפשר\\י זאת." + +#: includes/i18n.php:903 +msgid "Yes - I'm giving you a chance to fix it" +msgstr "כן - אני נותן לך צ'אנס לתקן את זה" + +#: includes/i18n.php:905 +msgid "" +"We will do our best to whitelist your server and resolve this issue ASAP. " +"You will get a follow-up email to %s once we have an update." +msgstr "" + +#: includes/i18n.php:909 +msgid "Let's try your previous version" +msgstr "בוא ננסה את הגירסה הקודמת" + +#: includes/i18n.php:911 +msgid "Uninstall this version and install the previous one." +msgstr "הסר את הגרסה הנוכחית והתקן את הגרסה קודמת." + +#: includes/i18n.php:915 +msgid "That's exhausting, please deactivate" +msgstr "זה מתיש, אנא לכבות" + +#: includes/i18n.php:917 +msgid "" +"We feel your frustration and sincerely apologize for the inconvenience. Hope" +" to see you again in the future." +msgstr "" + +#: includes/i18n.php:921 +msgid "" +"Thank for giving us the chance to fix it! A message was just sent to our " +"technical staff. We will get back to you as soon as we have an update to %s." +" Appreciate your patience." +msgstr "" + +#: includes/i18n.php:925 +msgctxt "%1s - plugin title, %2s - API domain" +msgid "" +"Your server is blocking the access to Freemius' API, which is crucial for " +"%1s synchronization. Please contact your host to whitelist %2s" +msgstr "" + +#: includes/i18n.php:929 +msgid "" +"It seems like one of the authentication parameters is wrong. Update your " +"Public Key, Secret Key & User ID, and try again." +msgstr "" + +#: includes/i18n.php:937 +msgid "" +"Please check your mailbox, you should receive an email via %s to confirm the" +" ownership change. From security reasons, you must confirm the change within" +" the next 15 min. If you cannot find the email, please check your spam " +"folder." +msgstr "" + +#: includes/i18n.php:941 +msgid "" +"Thanks for confirming the ownership change. An email was just sent to %s for" +" final approval." +msgstr "תודה על אישור ביצוע החלפת הבעלות. הרגע נשלח מייל ל-%s כדי לקבל אישור סופי." + +#: includes/i18n.php:945 +msgid "%s is the new owner of the account." +msgstr "%s הינו הבעלים החד של חשבון זה." + +#: includes/i18n.php:949 +msgctxt "addonX cannot run without pluginY" +msgid "%s cannot run without %s." +msgstr "%s לא יכול לעבוד ללא %s." + +#: includes/i18n.php:953 +msgctxt "addonX cannot run..." +msgid "%s cannot run without the plugin." +msgstr "" + +#: includes/i18n.php:957 +msgctxt "pluginX activation was successfully..." +msgid "%s activation was successfully completed." +msgstr "" + +#: includes/i18n.php:961 +msgctxt "Plugin installer section title" +msgid "Features & Pricing" +msgstr "פיטצ'רים ומחירים" + +#: includes/i18n.php:965 +msgid "Add-on must be deployed to WordPress.org or Freemius." +msgstr "" + +#: includes/i18n.php:969 +msgid "Paid add-on must be deployed to Freemius." +msgstr "" + +#: includes/i18n.php:977 +msgid "" +"%s is a premium only add-on. You have to purchase a license first before " +"activating the plugin." +msgstr "" + +#: includes/i18n.php:981 +msgid "" +"%s free trial was successfully cancelled. Since the add-on is premium only " +"it was automatically deactivated. If you like to use it in the future, " +"you'll have to purchase a license." +msgstr "" + +#: includes/i18n.php:993 +msgctxt "as every month" +msgid "Monthly" +msgstr "חודשי" + +#: includes/i18n.php:995 +msgctxt "as monthly period" +msgid "mo" +msgstr "" + +#: includes/i18n.php:997 +msgctxt "as once a year" +msgid "Annual" +msgstr "שנתי" + +#: includes/i18n.php:999 +msgctxt "as once a year" +msgid "Annually" +msgstr "שנתי" + +#: includes/i18n.php:1001 +msgctxt "as once a year" +msgid "Once" +msgstr "פעם אחת" + +#: includes/i18n.php:1003 +msgctxt "as annual period" +msgid "year" +msgstr "שנה" + +#: includes/i18n.php:1005 +msgid "Lifetime" +msgstr "לכל החיים" + +#: includes/i18n.php:1007 +msgctxt "e.g. the best product" +msgid "Best" +msgstr "הכי טוב" + +#: includes/i18n.php:1009 +msgctxt "e.g. billed monthly" +msgid "Billed %s" +msgstr "מחוייב על בסיס %s" + +#: includes/i18n.php:1011 +msgctxt "as a discount of $5 or 10%" +msgid "Save %s" +msgstr "שמירת %s" + +#: includes/i18n.php:1015 +msgid "View details" +msgstr "פרטים נוספים" + +#: includes/i18n.php:1023 +msgctxt "button label" +msgid "Approve & Start Trial" +msgstr "" + +#: includes/i18n.php:1027 +msgid "" +"You are 1-click away from starting your %1$s-day free trial of the %2$s " +"plan." +msgstr "" + +#: includes/i18n.php:1031 +msgid "" +"For compliance with the WordPress.org guidelines, before we start the trial " +"we ask that you opt-in with your user and non-sensitive site information, " +"allowing the plugin to periodically send data to %s to check for version " +"updates and to validate your trial." +msgstr "" + +#: includes/i18n.php:1043 +msgid "Business name" +msgstr "" + +#: includes/i18n.php:1045 +msgid "Tax / VAT ID" +msgstr "" + +#: includes/i18n.php:1047 +msgid "Address Line %d" +msgstr "" + +#: includes/i18n.php:1049 +msgid "Country" +msgstr "" + +#: includes/i18n.php:1051 +msgid "Select Country" +msgstr "" + +#: includes/i18n.php:1053 +msgid "City" +msgstr "" + +#: includes/i18n.php:1055 +msgid "Town" +msgstr "" + +#: includes/i18n.php:1057 +msgid "State" +msgstr "" + +#: includes/i18n.php:1059 +msgid "Province" +msgstr "" + +#: includes/i18n.php:1061 +msgid "ZIP / Postal Code" +msgstr "" diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.mo b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.mo index 240828f1c9deb1b39c320fe77431c19329fb7071..ee52d58980f66cffa8e53b203efac3ad94ad289a 100755 Binary files a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.mo and b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.mo differ diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.po b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.po index 6262ddd6b5fac40c29778cf01196b314fb4c136b..6f4f9cedbd2fd9d43eaa5fae6f2ffc3108be705b 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.po +++ b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius-it_IT.po @@ -1,23 +1,28 @@ -# +# Copyright (C) 2016 freemius +# This file is distributed under the same license as the freemius package. # Translators: -# Alessandro Benassi <plasmax@gmail.com>, 2016 +# Pelly Benassi <plasmax@gmail.com>, 2016 # Daniele Scasciafratte Mte90 <mte90net@gmail.com>, 2015 -# Vova Feldman <vova@freemius.com>, 2015 +# Pelly Benassi <plasmax@gmail.com>, 2016 +# Vova Feldman <vova@freemius.com>, 2015-2016 msgid "" msgstr "" "Project-Id-Version: WordPress SDK\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: \n" -"PO-Revision-Date: 2016-09-13 08:22+0000\n" -"Last-Translator: Alessandro Benassi <plasmax@gmail.com>\n" +"Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n" +"PO-Revision-Date: 2016-12-12 02:13+0000\n" +"Last-Translator: Vova Feldman <vova@freemius.com>\n" "Language-Team: Italian (Italy) (http://www.transifex.com/freemius/wordpress-sdk/language/it_IT/)\n" +"MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Language: it_IT\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Basepath: ..\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPathExcluded-0: *.js\n" +"X-Poedit-SourceCharset: UTF-8\n" -# Copyright (C) 2016 freemius -# This file is distributed under the same license as the freemius package. #: includes/i18n.php41, includes/i18n.php:55 msgid "Yes - I'm in!" msgstr "Sì, ci sto!" @@ -135,411 +140,421 @@ msgid "Edit" msgstr "Modifica" #: includes/i18n.php:119 +msgctxt "verb" +msgid "Update" +msgstr "Aggiorna" + +#: includes/i18n.php:121 msgid "Date" msgstr "Data" -#: includes/i18n.php:121 +#: includes/i18n.php:123 msgid "Amount" msgstr "Importo" -#: includes/i18n.php:123 +#: includes/i18n.php:125 msgid "Invoice" msgstr "Fattura" -#: includes/i18n.php:125 +#: includes/i18n.php:127 msgid "Billing" msgstr "Fatturazione" -#: includes/i18n.php:127 +#: includes/i18n.php:129 msgid "Payments" msgstr "Pagamenti" -#: includes/i18n.php:129 +#: includes/i18n.php:131 msgid "Delete Account" msgstr "Elimina Account" -#: includes/i18n.php:131 +#: includes/i18n.php:133 msgctxt "as close a window" msgid "Dismiss" msgstr "Chiudi" -#: includes/i18n.php:133 +#: includes/i18n.php:135 msgctxt "as product pricing plan" msgid "Plan" msgstr "Piano" -#: includes/i18n.php:135 +#: includes/i18n.php:137 msgid "Change Plan" msgstr "Cambia piano" -#: includes/i18n.php:137 +#: includes/i18n.php:139 msgctxt "as download professional version" msgid "Download %s Version" msgstr "Scarica la versione %s" -#: includes/i18n.php:139 +#: includes/i18n.php:141 msgctxt "as download professional version now" msgid "Download %s version now" msgstr "Scarica la versione %s ora" -#: includes/i18n.php:141 +#: includes/i18n.php:145 msgctxt "as download latest version" msgid "Download Latest" msgstr "Scarica l'ultima versione" -#: includes/i18n.php:143 +#: includes/i18n.php:147 msgctxt "E.g. you have a professional license." msgid "You have a %s license." msgstr "Hai la licenza %s." -#: includes/i18n.php:145 +#: includes/i18n.php:151 msgid "New" msgstr "Nuovo" -#: includes/i18n.php:147 +#: includes/i18n.php:153 msgid "Free" msgstr "Gratuito" -#: includes/i18n.php:149 +#: includes/i18n.php:155 msgctxt "as trial plan" msgid "Trial" msgstr "Prova gratuita" -#: includes/i18n.php:151 +#: includes/i18n.php:157 +msgctxt "as starting a trial plan" +msgid "Start Trial" +msgstr "Inizia il periodo di prova gratuito" + +#: includes/i18n.php:159 msgctxt "verb" msgid "Purchase" msgstr "Acquisto" -#: includes/i18n.php:153 +#: includes/i18n.php:161 msgid "Purchase License" msgstr "Acquista licenza" -#: includes/i18n.php:155 +#: includes/i18n.php:163 msgctxt "verb" msgid "Buy" msgstr "Compra" -#: includes/i18n.php:157 +#: includes/i18n.php:165 msgid "Buy License" msgstr "Compra licenza" -#: includes/i18n.php:159 +#: includes/i18n.php:167 msgid "Single Site License" msgstr "Licenza per sito singolo" -#: includes/i18n.php:161 +#: includes/i18n.php:169 msgid "Unlimited Licenses" msgstr "Licenze illimitate" -#: includes/i18n.php:163 +#: includes/i18n.php:171 msgid "Up to %s Sites" msgstr "Fino a %s siti" -#: includes/i18n.php:165 +#: includes/i18n.php:173 msgid "%sRenew your license now%s to access version %s features and support." msgstr "%sRinnova la tua licenza ora%s per accedere a funzionalità e supporto della versione %s." -#: includes/i18n.php:167 +#: includes/i18n.php:177 msgid "" "Enter the email address you've used for the upgrade below and we will resend" " you the license key." msgstr "Inserisci qui sotto l'indirizzo email che hai usato per registrare l'aggiornamento e ti invieremo di nuovo la chiave di licenza." -#: includes/i18n.php:169 +#: includes/i18n.php:181 msgctxt "e.g. Professional Plan" msgid "%s Plan" msgstr "Piano %s" -#: includes/i18n.php:171 +#: includes/i18n.php:183 msgid "You are just one step away - %s" msgstr "Sei a un passo dalla fine - %s" -#: includes/i18n.php:173 +#: includes/i18n.php:185 msgctxt "%s - plugin name. As complete \"Jetpack\" activation now" msgid "Complete \"%s\" Activation Now" msgstr "Completa l'attivazione di \"%s\" ora" -#: includes/i18n.php:175 +#: includes/i18n.php:189 msgid "We made a few tweaks to the plugin, %s" msgstr "Abbiamo apportato alcune modifiche al plugin, %s" -#: includes/i18n.php:177 +#: includes/i18n.php:191 msgid "Opt-in to make \"%s\" Better!" msgstr "Contribuisci a rendere \"%s\" migliore!" -#: includes/i18n.php:179 +#: includes/i18n.php:193 msgid "Error" msgstr "Errore" -#: includes/i18n.php:181 +#: includes/i18n.php:195 msgid "" "Freemius SDK couldn't find the plugin's main file. Please contact " "sdk@freemius.com with the current error." msgstr "L'SDK di Freemius non è riuscito a trovare il file principale del plugin. Per favore contatta sdk@freemius.com riportando l'errore." -#: includes/i18n.php:187 +#: includes/i18n.php:203 msgctxt "as expiration date" msgid "Expiration" msgstr "Scadenza" -#: includes/i18n.php:189 +#: includes/i18n.php:205 msgctxt "as software license" msgid "License" msgstr "Licenza" -#: includes/i18n.php:191 +#: includes/i18n.php:207 msgid "not verified" msgstr "non verificato" -#: includes/i18n.php:193 +#: includes/i18n.php:209 msgid "Verify Email" msgstr "Verifica email" -#: includes/i18n.php:195 +#: includes/i18n.php:211 msgctxt "e.g. expires in 2 months" msgid "Expires in %s" msgstr "Scade in %s" -#: includes/i18n.php:197 +#: includes/i18n.php:213 msgctxt "e.g. auto renews in 2 months" msgid "Auto renews in %s" msgstr "Rinnovo automatico in %s" -#: includes/i18n.php:199 +#: includes/i18n.php:215 msgid "No expiration" msgstr "Nessuna scadenza" -#: includes/i18n.php:201 +#: includes/i18n.php:217 msgid "Expired" msgstr "Scaduto" -#: includes/i18n.php:203 +#: includes/i18n.php:219 msgid "Cancelled" msgstr "Annullato" -#: includes/i18n.php:205 +#: includes/i18n.php:221 msgctxt "e.g. In 2 hours" msgid "In %s" msgstr "In %s" -#: includes/i18n.php:207 +#: includes/i18n.php:223 msgctxt "e.g. 2 min ago" msgid "%s ago" msgstr "%s fa" -#: includes/i18n.php:209 +#: includes/i18n.php:225 msgctxt "as plugin version" msgid "Version" msgstr "Versione" -#: includes/i18n.php:211 +#: includes/i18n.php:227 msgid "Name" msgstr "Nome" -#: includes/i18n.php:213 +#: includes/i18n.php:229 msgid "Email" msgstr "Email" -#: includes/i18n.php:215 +#: includes/i18n.php:231 msgid "Email address" msgstr "Indirizzo email" -#: includes/i18n.php:217 +#: includes/i18n.php:233 msgid "Verified" msgstr "Verificato" -#: includes/i18n.php:219 +#: includes/i18n.php:235 msgid "Plugin" msgstr "Plugin" -#: includes/i18n.php:221 +#: includes/i18n.php:237 msgid "Plugins" msgstr "Plugin" -#: includes/i18n.php:223 +#: includes/i18n.php:239 msgid "Themes" msgstr "Temi" -#: includes/i18n.php:225 +#: includes/i18n.php:241 msgctxt "as file/folder path" msgid "Path" msgstr "Percorso" -#: includes/i18n.php:227 +#: includes/i18n.php:243 msgid "Title" msgstr "Titolo" -#: includes/i18n.php:229 +#: includes/i18n.php:245 msgid "Free version" msgstr "Versione gratuita" -#: includes/i18n.php:231 +#: includes/i18n.php:247 msgid "Premium version" msgstr "Versione premium" -#: includes/i18n.php:233 +#: includes/i18n.php:249 msgctxt "as WP plugin slug" msgid "Slug" msgstr "Slug" -#: includes/i18n.php:235 +#: includes/i18n.php:251 msgid "ID" msgstr "ID" -#: includes/i18n.php:237 +#: includes/i18n.php:253 msgid "Users" msgstr "Utenti" -#: includes/i18n.php:239 +#: includes/i18n.php:255 msgid "Plugin Installs" msgstr "Installazioni Plugin" -#: includes/i18n.php:241 +#: includes/i18n.php:257 msgctxt "like websites" msgid "Sites" msgstr "Siti" -#: includes/i18n.php:243 +#: includes/i18n.php:259 msgid "User ID" msgstr "ID utente" -#: includes/i18n.php:245 +#: includes/i18n.php:261 msgid "Site ID" msgstr "ID del sito" -#: includes/i18n.php:247 +#: includes/i18n.php:263 msgid "Public Key" msgstr "Chiave pubblica" -#: includes/i18n.php:249 +#: includes/i18n.php:265 msgid "Secret Key" msgstr "Chiave segreta" -#: includes/i18n.php:251 +#: includes/i18n.php:267 msgctxt "as secret encryption key missing" msgid "No Secret" msgstr "Nessuna chiave" -#: includes/i18n.php:253 +#: includes/i18n.php:269 msgid "No ID" msgstr "Nessun ID" -#: includes/i18n.php:255 +#: includes/i18n.php:271 msgctxt "as synchronize license" msgid "Sync License" msgstr "Sincronizza la licenza" -#: includes/i18n.php:257 +#: includes/i18n.php:273 msgctxt "as synchronize" msgid "Sync" msgstr "Sincronizza" -#: includes/i18n.php:259 +#: includes/i18n.php:275 msgid "Activate License" msgstr "Attiva licenza" -#: includes/i18n.php:261 +#: includes/i18n.php:277 msgid "Activate Free Version" msgstr "Attiva versione gratuita" -#: includes/i18n.php:263 +#: includes/i18n.php:279 msgid "" "Please enter the license key that you received in the email right after the " "purchase:" msgstr "Per favore inserisci la chiave di licenza che hai ricevuto via mail subito dopo l'acquisto:" -#: includes/i18n.php:265 +#: includes/i18n.php:283 msgid "Activating license..." msgstr "Sto attivando la licenza..." -#: includes/i18n.php:267 +#: includes/i18n.php:285 msgid "Change License" msgstr "Cambia licenza" -#: includes/i18n.php:269 +#: includes/i18n.php:287 msgid "Update License" msgstr "Aggiorna licenza" -#: includes/i18n.php:271 +#: includes/i18n.php:289 msgid "Deactivate License" msgstr "Disattiva licenza" -#: includes/i18n.php:273 +#: includes/i18n.php:291 msgid "Activate" msgstr "Attiva" -#: includes/i18n.php:275 +#: includes/i18n.php:293 msgid "Deactivate" msgstr "Disattiva" -#: includes/i18n.php:277 +#: includes/i18n.php:295 msgid "Skip & Deactivate" msgstr "Salta e disattiva" -#: includes/i18n.php:279 +#: includes/i18n.php:297 msgid "No - just deactivate" msgstr "No - disattiva e basta" -#: includes/i18n.php:281 +#: includes/i18n.php:299 msgid "Yes - do your thing" msgstr "Sì - fai pure" -#: includes/i18n.php:283 +#: includes/i18n.php:301 msgctxt "active mode" msgid "Active" msgstr "Attiva" -#: includes/i18n.php:285 +#: includes/i18n.php:303 msgctxt "is active mode?" msgid "Is Active" msgstr "è attiva" -#: includes/i18n.php:287 +#: includes/i18n.php:305 msgid "Install Now" msgstr "Installa ora" -#: includes/i18n.php:289 +#: includes/i18n.php:307 msgid "Install Update Now" msgstr "Installa l'aggiornamento ora" -#: includes/i18n.php:291 +#: includes/i18n.php:309 msgid "More information about %s" msgstr "Ulteriori informazioni su %s" -#: includes/i18n.php:293 +#: includes/i18n.php:311 msgid "Localhost" msgstr "Localhost" -#: includes/i18n.php:295 +#: includes/i18n.php:313 msgctxt "as activate Professional plan" msgid "Activate %s Plan" msgstr "Attivare il piano %s" -#: includes/i18n.php:297 +#: includes/i18n.php:315 msgctxt "as 5 licenses left" msgid "%s left" msgstr "%s rimanenti" -#: includes/i18n.php:299 +#: includes/i18n.php:317 msgid "Last license" msgstr "Ultima licenza" -#: includes/i18n.php:301 +#: includes/i18n.php:319 msgid "What is your %s?" msgstr "Qual è il tuo %s?" -#: includes/i18n.php:303 +#: includes/i18n.php:321 msgid "Activate this add-on" msgstr "Attivare questo addon" -#: includes/i18n.php:305 +#: includes/i18n.php:323 msgid "" "Deactivating your license will block all premium features, but will enable " "you to activate the license on another site. Are you sure you want to " "proceed?" msgstr "La disattivazione della licenza bloccherà tutte le funzionalità premium, ma vi permetterà di attivare la licenza su un altro sito. Sei sicuro di voler procedere?" -#: includes/i18n.php:307 +#: includes/i18n.php:327 msgid "" "Deleting the account will automatically deactivate your %s plan license so " "you can use it on other sites. If you want to terminate the recurring " @@ -547,868 +562,941 @@ msgid "" "account. Are you sure you would like to continue with the deletion?" msgstr "L'eliminazione dell'account disattiva automaticamente la tua licenza del piano %s quindi è possibile utilizzarlo su altri siti. Se si desidera anche terminare i pagamenti ricorrenti, fare clic sul pulsante \"Annulla\" ed effettuare il \"Downgrade\" del tuo account. Sei sicuro di voler continuare con l'eliminazione?" -#: includes/i18n.php:309 +#: includes/i18n.php:331 msgid "" "Deletion is not temporary. Only delete if you no longer want to use this " "plugin anymore. Are you sure you would like to continue with the deletion?" msgstr "L'eliminazione non è temporanea. Cancella solo se non si desidera più utilizzare questo plugin. Sei sicuro di voler continuare con l'eliminazione?" -#: includes/i18n.php:311 +#: includes/i18n.php:335 msgid "" "Downgrading your plan will immediately stop all future recurring payments " "and your %s plan license will expire in %s." msgstr "Effettuare il downgrade del piano interromperà immediatamente tutti i futuri pagamenti ricorrenti e la licenza del piano %s scadrà in %s." -#: includes/i18n.php:313 +#: includes/i18n.php:339 msgid "" "Cancelling the trial will immediately block access to all premium features. " "Are you sure?" msgstr "Cancellando il periodo di prova gratuito bloccherai immediatamente l'accesso a tutte le funzionalità premium. Vuoi continuare?" -#: includes/i18n.php:315 +#: includes/i18n.php:343 msgid "" "You can still enjoy all %s features but you will not have access to plugin " "updates and support." msgstr "Puoi ancora sfruttare tutte le funzionalità di %s, ma non avrai accesso al supporto ed agli aggiornamenti del plugin." -#: includes/i18n.php:317 +#: includes/i18n.php:347 msgid "" "Once your license expire you can still use the Free version but you will NOT" " have access to the %s features." msgstr "Una volta scaduta la licenza, sarà possibile ancora utilizzare la versione gratuita ma non avrete accesso alle funzionalità di %s." -#: includes/i18n.php:319 +#: includes/i18n.php:351 msgid "Are you sure you want to proceed?" msgstr "Sei sicuro di voler procedere?" -#: includes/i18n.php:325 +#: includes/i18n.php:357 msgid "Add Ons for %s" msgstr "Add-on per %s" -#: includes/i18n.php:327 +#: includes/i18n.php:359 msgid "" "We could'nt load the add-ons list. It's probably an issue on our side, " "please try to come back in few minutes." msgstr "Non siamo riusciti a caricare la lista degli add-on. Si tratta probabilmente di un problema nel nostro sistema, per favore riprova tra qualche minuto." -#: includes/i18n.php:331 +#: includes/i18n.php:365 msgid "Anonymous feedback" msgstr "Feedback anonimo" -#: includes/i18n.php:333 +#: includes/i18n.php:367 msgid "Quick feedback" msgstr "Feedback veloce" -#: includes/i18n.php:335 +#: includes/i18n.php:369 msgid "If you have a moment, please let us know why you are deactivating" msgstr "Se hai un momento, potresti dirci perché lo hai disattivato?" -#: includes/i18n.php:337 +#: includes/i18n.php:373 msgid "Yes - Deactivate" msgstr "Si - Disattiva" -#: includes/i18n.php:339 +#: includes/i18n.php:375 msgid "Submit & Deactivate" msgstr "Invia & Disattiva" -#: includes/i18n.php:341 -msgctxt "the text of the cancel button of the plugin deactivation dialog box." +#: includes/i18n.php:377 msgid "Cancel" -msgstr "Cancella" +msgstr "Annulla" -#: includes/i18n.php:343 +#: includes/i18n.php:379 msgid "I no longer need the plugin" msgstr "Non ho piú bisogno di questo plugin" -#: includes/i18n.php:345 +#: includes/i18n.php:381 msgid "I found a better plugin" msgstr "Ho trovato un plugin migliore" -#: includes/i18n.php:347 +#: includes/i18n.php:383 msgid "I only needed the plugin for a short period" msgstr "Avevo bisogno del plugin solo per un breve periodo" -#: includes/i18n.php:349 +#: includes/i18n.php:385 msgid "The plugin broke my site" msgstr "Il plugin ha causato problemi al mio sito" -#: includes/i18n.php:351 +#: includes/i18n.php:387 msgid "The plugin suddenly stopped working" msgstr "Il plugin ha smesso di funzionare" -#: includes/i18n.php:353 +#: includes/i18n.php:389 msgid "I can't pay for it anymore" msgstr "Non posso piú pagarlo" -#: includes/i18n.php:355 +#: includes/i18n.php:391 msgid "It's a temporary deactivation. I'm just debugging an issue." msgstr "È una disattivazione temporanea. Sto solo cercando di risolvere un problema." -#: includes/i18n.php:357 +#: includes/i18n.php:395 msgctxt "" "the text of the \"other\" reason for deactivating the plugin that is shown " "in the modal box." msgid "Other" msgstr "Altro" -#: includes/i18n.php:359 +#: includes/i18n.php:399 msgid "Kindly tell us the reason so we can improve." msgstr "Spiegandoci il motivo ci aiuterai a migliorare." -#: includes/i18n.php:361 +#: includes/i18n.php:401 msgid "What's the plugin's name?" msgstr "Qual è il nome del plugin?" -#: includes/i18n.php:363 +#: includes/i18n.php:403 msgid "What price would you feel comfortable paying?" msgstr "Che prezzo ritieni opportuno pagare?" -#: includes/i18n.php:365 +#: includes/i18n.php:405 msgid "I couldn't understand how to make it work" msgstr "Non capisco come farlo funzionare" -#: includes/i18n.php:367 +#: includes/i18n.php:407 msgid "" "The plugin is great, but I need specific feature that you don't support" msgstr "Il plugin é ottimo ma ho bisogno di una funzionalitá specifica che non é supportata" -#: includes/i18n.php:369 +#: includes/i18n.php:411 msgid "The plugin is not working" msgstr "Il plugin non funziona" -#: includes/i18n.php:371 +#: includes/i18n.php:413 msgid "It's not what I was looking for" msgstr "Non é quello che stavo cercando" -#: includes/i18n.php:373 +#: includes/i18n.php:415 msgid "The plugin didn't work as expected" msgstr "Il plugin non funziona come mi aspettavo" -#: includes/i18n.php:375 +#: includes/i18n.php:417 msgid "What feature?" msgstr "Quale funzionalitá?" -#: includes/i18n.php:377 +#: includes/i18n.php:419 msgid "Kindly share what didn't work so we can fix it for future users..." msgstr "Condividi cosa non ha funzionato in modo da migliorare il prodotto per gli utenti futuri..." -#: includes/i18n.php:379 +#: includes/i18n.php:423 msgid "What you've been looking for?" msgstr "Che cosa stai cercando?" -#: includes/i18n.php:381 +#: includes/i18n.php:425 msgid "What did you expect?" msgstr "Che cosa ti aspettavi?" -#: includes/i18n.php:383 +#: includes/i18n.php:427 msgid "The plugin didn't work" msgstr "Il plugin non funziona" -#: includes/i18n.php:385 +#: includes/i18n.php:429 msgid "I don't like to share my information with you" msgstr "Non voglio condividere i miei dati con te" -#: includes/i18n.php:387 +#: includes/i18n.php:431 msgid "" "You might have missed it, but you don't have to share any data and can just " "%s the opt-in." msgstr "Potresti non averci fatto caso, ma non sei obbligato a condividere i tuoi dati e puoi semplicemente %s la tua partecipazione." -#: includes/i18n.php:395 +#: includes/i18n.php:441 msgctxt "greeting" msgid "Hey %s," msgstr "Hey %s," -#: includes/i18n.php:397 +#: includes/i18n.php:443 msgctxt "a greeting. E.g. Thanks John!" msgid "Thanks %s!" msgstr "Grazie %s!" -#: includes/i18n.php:399 +#: includes/i18n.php:445 msgid "" -"In order to enjoy all our features and functionality, %s needs to connect " -"your user, %s at %s, to %s" -msgstr "Per poter sfruttare tutte le caratteristiche e funzionalità, %s deve connettere il tuo utente, %s a %s su %s" +"Never miss an important update - opt-in to our security and feature updates " +"notifications, and non-sensitive diagnostic tracking with %4$s." +msgstr "Non perdere nessun aggiornamento importante - iscriviti per ricevere notifiche su aggiornamenti relativi alla sicurezza e nuove versioni, oltre al tracciamento di diagnostica non sensibile con %4$s." -#: includes/i18n.php:401 +#: includes/i18n.php:449 msgid "" -"Please help us improve %2$s! If you opt-in, some data about your usage of " -"%2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still " +"Please help us improve %1$s! If you opt-in, some data about your usage of " +"%1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still " "work just fine." -msgstr "Per favore aiutaci a migliorare %2$s! Se decidi di contribuire, alcuni dei tuoi dati di utilizzo inerenti a %2$s verranno inviati a %5$s. Se salti questo passaggio, non c'è problema! %2$s funzionerà comunque perfettamente." +msgstr "Aiutaci a migliorare %1$s! Se ti iscrivi, alcuni dati riguardanti il tuo utilizzo di %1$s verranno inviati a %4$s. Se salti questo passaggio, non c'è problema! %1$s funzionerà ugualmente." -#: includes/i18n.php:403 +#: includes/i18n.php:453 msgid "" "You should receive an activation email for %s to your mailbox at %s. Please " -"make sure you click the activation button in that email to complete the " -"install." -msgstr "Dovresti ricevere un'email di attivazione di %s all'indirizzo %s. Assicurati di fare clic sul pulsante di attivazione nell'email per completare l'installazione." +"make sure you click the activation button in that email to %s." +msgstr "Dovresti ricevere un'email di attivazione di %s all'indirizzo %s. Assicurati di fare clic sul pulsante di attivazione nell'email per &s." -#: includes/i18n.php:405 +#: includes/i18n.php:455 +msgid "complete the install" +msgstr "completa l'installazione" + +#: includes/i18n.php:457 +msgid "start the trial" +msgstr "Inizia il periodo di prova gratuito" + +#: includes/i18n.php:459 msgid "" "Thanks for purchasing %s! To get started, please enter your license key:" msgstr "Grazie per aver acquistato %s! Per iniziare, per favore inserisci la tua chiave di licenza:" -#: includes/i18n.php:407 +#: includes/i18n.php:463 msgid "" "The plugin will be periodically sending data to %s to check for plugin " "updates and verify the validity of your license." msgstr "Il plugin invierà dati periodicamente a %s per controllare l'esistenza di aggiornamenti e verificare la validità della tua licenza." -#: includes/i18n.php:409 +#: includes/i18n.php:467 msgid "What permissions are being granted?" msgstr "Quali autorizzazioni vengono concesse?" -#: includes/i18n.php:411 +#: includes/i18n.php:469 msgid "Your Profile Overview" msgstr "Panoramica del tuo profilo" -#: includes/i18n.php:413 +#: includes/i18n.php:471 msgid "Name and email address" msgstr "Nome ed indirizzo email" -#: includes/i18n.php:415 +#: includes/i18n.php:473 msgid "Your Site Overview" msgstr "Panoramica del tuo sito" -#: includes/i18n.php:417 +#: includes/i18n.php:475 msgid "Site URL, WP version, PHP info, plugins & themes" msgstr "URL del sito, versione di WP, informazioni PHP, plugin e temi" -#: includes/i18n.php:419 +#: includes/i18n.php:479 msgid "Current Plugin Events" msgstr "Eventi correnti del plugin" -#: includes/i18n.php:421 +#: includes/i18n.php:481 msgid "Activation, deactivation and uninstall" msgstr "Attiva, disattivazione e disinstallazione" -#: includes/i18n.php:423 +#: includes/i18n.php:483 msgid "Plugins & Themes" msgstr "Plugin e temi" -#: includes/i18n.php:425 +#: includes/i18n.php:485 msgid "Titles, versions and state." msgstr "Titoli, versioni e stato." -#: includes/i18n.php:427 +#: includes/i18n.php:487 +msgid "Admin Notices" +msgstr "Avvisi amministratore" + +#: includes/i18n.php:489 msgid "Newsletter" msgstr "Newsletter" -#: includes/i18n.php:429 +#: includes/i18n.php:491 msgid "Updates, announcements, marketing, no spam" msgstr "Aggiornamenti, annunci, marketing, no spam" -#: includes/i18n.php:431 +#: includes/i18n.php:493 msgid "Privacy Policy" msgstr "Politica sulla privacy" -#: includes/i18n.php:433 +#: includes/i18n.php:495 msgid "Terms of Service" msgstr "Termini del Servizio" -#: includes/i18n.php:435 +#: includes/i18n.php:497 msgctxt "as activating plugin" msgid "Activating" msgstr "Attivazione" -#: includes/i18n.php:437 +#: includes/i18n.php:499 msgctxt "as in the process of sending an email" msgid "Sending email" msgstr "Invio email" -#: includes/i18n.php:439 +#: includes/i18n.php:503 msgctxt "button label" msgid "Allow & Continue" msgstr "Consenti & Continua" -#: includes/i18n.php:441 +#: includes/i18n.php:505 msgctxt "button label" msgid "Agree & Activate License" msgstr "Accetta e attiva la licenza" -#: includes/i18n.php:443 +#: includes/i18n.php:507 msgctxt "verb" msgid "Skip" msgstr "Salta" -#: includes/i18n.php:445 +#: includes/i18n.php:509 msgid "Click here to use the plugin anonymously" msgstr "Fai clic qui per usare il plugin anonimamente" -#: includes/i18n.php:447 +#: includes/i18n.php:511 msgid "Re-send activation email" msgstr "Invia nuovamente l'email di attivazione" -#: includes/i18n.php:449 +#: includes/i18n.php:513 msgid "License key" msgstr "Chiave di licenza" -#: includes/i18n.php:451 +#: includes/i18n.php:515 msgid "Send License Key" msgstr "Invia chiave di licenza" -#: includes/i18n.php:453 +#: includes/i18n.php:517 msgid "Sending license key" msgstr "Invio chiave di licenza" -#: includes/i18n.php:455 +#: includes/i18n.php:519 msgid "Have a license key?" msgstr "Hai una chiave di licenza?" -#: includes/i18n.php:457 +#: includes/i18n.php:521 msgid "Don't have a license key?" msgstr "Non hai una chiave di licenza?" -#: includes/i18n.php:459 +#: includes/i18n.php:523 msgid "Can't find your license key?" msgstr "Non trovi la tua chiave di licenza?" -#: includes/i18n.php:471 +#: includes/i18n.php:525 +msgid "" +"We couldn't find your email address in the system, are you sure it's the " +"right address?" +msgstr "Non siamo riusciti a trovare il tuo indirizzo email nel sistema, sei sicuro che sia l'indirizzo giusto?" + +#: includes/i18n.php:529 +msgid "" +"We can't see any active licenses associated with that email address, are you" +" sure it's the right address?" +msgstr "Non siamo riusciti a trovare alcuna licenza attiva associata al tuo indirizzo email, sei sicuro che sia l'indirizzo giusto?" + +#: includes/i18n.php:533 +msgid "Opt In" +msgstr "Iscriviti" + +#: includes/i18n.php:535 +msgid "Opt Out" +msgstr "Cancella iscrizione" + +#: includes/i18n.php:537 +msgid "On second thought - I want to continue helping" +msgstr "Ci ho ripensato, voglio continuare a fornire il mio aiuto" + +#: includes/i18n.php:541 +msgid "Opting out..." +msgstr "Cancellamento dell'iscrizione..." + +#: includes/i18n.php:543 +msgid "Opting in..." +msgstr "Iscrizione in corso..." + +#: includes/i18n.php:545 +msgid "" +"We appreciate your help in making the %s better by letting us track some " +"usage data." +msgstr "Ti ringraziamo per averci concesso di tracciare alcuni dati di utilizzo al fine di migliorare %s" + +#: includes/i18n.php:549 +msgid "" +"Usage tracking is done in the name of making %s better. Making a better user" +" experience, prioritizing new features, and more good things. We'd really " +"appreciate if you'll reconsider letting us continue with the tracking." +msgstr "Tracciamo l'utilizzo esclusivamente per rendere %s migliore, creando una migliore esperienza utente e dando priorità a nuove funzionalità, oltre a molte altre buone cose. Saremmo veramente felici di vederti cambiare idea e lasciarci continuare con il tracciamento." + +#: includes/i18n.php:553 +msgid "" +"By clicking \"Opt Out\", we will no longer be sending any data from %s to " +"%s." +msgstr "Cliccando su \"Cancella iscrizione\", non invieremo più nessuna informazione da %s a %s." + +#: includes/i18n.php:563 msgid "Screenshots" msgstr "Screenshots" -#: includes/i18n.php:473 +#: includes/i18n.php:565 msgid "Click to view full-size screenshot %d" msgstr "Fare clic per visualizzare lo screenshot in grandi dimensioni %d" -#: includes/i18n.php:481 +#: includes/i18n.php:573 msgid "Freemius Debug" msgstr "Debug Freemius" -#: includes/i18n.php:483 +#: includes/i18n.php:575 msgctxt "as turned on" msgid "On" msgstr "Attivo" -#: includes/i18n.php:485 +#: includes/i18n.php:577 msgctxt "as turned off" msgid "Off" msgstr "Non attivo" -#: includes/i18n.php:487 +#: includes/i18n.php:579 msgctxt "as code debugging" msgid "Debugging" msgstr "Debugging" -#: includes/i18n.php:489 +#: includes/i18n.php:581 msgid "Freemius State" msgstr "Stato di Freemius" -#: includes/i18n.php:491 +#: includes/i18n.php:583 msgctxt "as connection was successful" msgid "Connected" msgstr "Connesso" -#: includes/i18n.php:493 +#: includes/i18n.php:585 msgctxt "as connection blocked" msgid "Blocked" msgstr "Bloccato" -#: includes/i18n.php:495 +#: includes/i18n.php:587 msgctxt "as application program interface" msgid "API" msgstr "API" -#: includes/i18n.php:497 +#: includes/i18n.php:589 msgctxt "as software development kit versions" msgid "SDK" msgstr "SDK" -#: includes/i18n.php:499 +#: includes/i18n.php:591 msgctxt "as software development kit versions" msgid "SDK Versions" msgstr "Versioni SDK" -#: includes/i18n.php:501 +#: includes/i18n.php:595 msgctxt "as plugin folder path" msgid "Plugin Path" msgstr "Percorso del plugin" -#: includes/i18n.php:503 +#: includes/i18n.php:597 msgctxt "as sdk path" msgid "SDK Path" msgstr "Percorso SDK" -#: includes/i18n.php:505 +#: includes/i18n.php:599 msgid "Add Ons of Plugin %s" msgstr "Add-on del Plugin %s" -#: includes/i18n.php:507 +#: includes/i18n.php:601 msgid "Are you sure you want to delete all Freemius data?" msgstr "Sei sicuro di voler eliminare tutti i dati di Freemius?" -#: includes/i18n.php:509 +#: includes/i18n.php:605 msgid "Actions" msgstr "Azioni" -#: includes/i18n.php:511 +#: includes/i18n.php:607 msgid "Delete All Accounts" msgstr "Eliminare tutti gli account" -#: includes/i18n.php:513 +#: includes/i18n.php:609 msgid "Start Fresh" msgstr "Inizia da capo" -#: includes/i18n.php:515 +#: includes/i18n.php:611 msgid "Clear API Cache" msgstr "Elimina cache API" -#: includes/i18n.php:517 +#: includes/i18n.php:613 msgid "Sync Data From Server" msgstr "Sincronizza i dati dal server" -#: includes/i18n.php:519 +#: includes/i18n.php:615 msgid "Scheduled Crons" msgstr "Azioni programmate" -#: includes/i18n.php:521 +#: includes/i18n.php:617 msgid "Plugins & Themes Sync" msgstr "Sincronizzazione plugin e temi" -#: includes/i18n.php:529 +#: includes/i18n.php:625 msgctxt "as congratulations" msgid "Congrats" msgstr "Congratulazioni" -#: includes/i18n.php:531 +#: includes/i18n.php:627 msgctxt "exclamation" msgid "Oops" msgstr "Ops" -#: includes/i18n.php:533 +#: includes/i18n.php:629 msgctxt "interjection expressing joy or exuberance" msgid "Yee-haw" msgstr "Evvai" -#: includes/i18n.php:535 +#: includes/i18n.php:633 msgctxt "" "(especially in electronic communication) used to express elation, " "enthusiasm, or triumph." msgid "W00t" msgstr "Forte" -#: includes/i18n.php:537 +#: includes/i18n.php:637 msgctxt "a positive response" msgid "Right on" msgstr "Sì" -#: includes/i18n.php:539 +#: includes/i18n.php:639 msgctxt "" "something somebody says when they are thinking about what you have just " "said. " msgid "Hmm" msgstr "Uhm" -#: includes/i18n.php:541 +#: includes/i18n.php:643 msgid "O.K" msgstr "OK" -#: includes/i18n.php:543 +#: includes/i18n.php:645 msgctxt "exclamation" msgid "Hey" msgstr "Hey" -#: includes/i18n.php:545 +#: includes/i18n.php:647 msgctxt "advance notice of something that will need attention." msgid "Heads up" msgstr "Attenzione" -#: includes/i18n.php:553 +#: includes/i18n.php:657 msgid "Seems like you got the latest release." msgstr "Sembra che tu abbia la versione più recente." -#: includes/i18n.php:555 +#: includes/i18n.php:659 msgid "You are all good!" msgstr "Sei fantastico!" -#: includes/i18n.php:557 +#: includes/i18n.php:661 msgid "" "Sorry, we could not complete the email update. Another user with the same " "email is already registered." msgstr "Siamo spiacenti, non siamo riusciti a completare l'aggiornamento via email. Un altro utente con lo stesso indirizzo email è già registrato." -#: includes/i18n.php:559 +#: includes/i18n.php:665 msgid "" "If you would like to give up the ownership of the plugin's account to %s " "click the Change Ownership button." msgstr "Se vuoi cedere la proprietá dell'account del plugin a %s clicca su Cambia Proprietà." -#: includes/i18n.php:561 +#: includes/i18n.php:669 msgid "" "Your email was successfully updated. You should receive an email with " "confirmation instructions in few moments." msgstr "Il tuo indirizzo email è stato aggiornato correttamente. Riceverai un'email con le istruzioni di conferma in pochi istanti." -#: includes/i18n.php:563 +#: includes/i18n.php:673 msgid "Your name was successfully updated." msgstr "Il tuo nome è stato aggiornato correttamente." -#: includes/i18n.php:565 +#: includes/i18n.php:675 msgid "You have successfully updated your %s." msgstr "Hai aggiornato con successo il tuo %s." -#: includes/i18n.php:567 +#: includes/i18n.php:677 msgid "Please provide your full name." msgstr "Per favore inserisci il tuo nome completo." -#: includes/i18n.php:569 +#: includes/i18n.php:679 msgid "" "Verification mail was just sent to %s. If you can't find it after 5 min, " "please check your spam box." msgstr "L'email di verifica è stata inviata a %s. Se dopo 5 minuti non è ancora arrivata, per favore controlla nella tua casella di posta indesiderata." -#: includes/i18n.php:571 +#: includes/i18n.php:683 msgid "" "Just letting you know that the add-ons information of %s is being pulled " "from an external server." msgstr "Le informazioni sugli add-on di %s vengono scaricate da un server esterno." -#: includes/i18n.php:573 +#: includes/i18n.php:687 msgid "No credit card required" msgstr "Nessuna carta di credito richiesta" -#: includes/i18n.php:575 +#: includes/i18n.php:689 msgid "Premium plugin version was successfully activated." msgstr "La versione Premium del plugin è stata attivata correttamente." -#: includes/i18n.php:577 +#: includes/i18n.php:693 msgid "The upgrade of %s was successfully completed." msgstr "L'aggiornamento di %s è stato completato con successo." -#: includes/i18n.php:579 +#: includes/i18n.php:695 msgid "Your account was successfully activated with the %s plan." msgstr "Il tuo account è stato attivato correttamente con il piano %s." -#: includes/i18n.php:581 +#: includes/i18n.php:699 msgid "Download the latest %s version now" msgstr "Scarica l'ultima versione di %s" -#: includes/i18n.php:583 +#: includes/i18n.php:701 msgid "Please follow these steps to complete the upgrade" msgstr "Segui i passi seguenti per completare l'aggiornamento" -#: includes/i18n.php:585 +#: includes/i18n.php:705 msgid "Download the latest %s version" msgstr "Scarica l'ultima versione di %s" -#: includes/i18n.php:587 +#: includes/i18n.php:707 +msgid "Download the latest version" +msgstr "Scarica l'ultima versione" + +#: includes/i18n.php:709 msgid "Deactivate the free version" msgstr "Disattiva la versione gratuita" -#: includes/i18n.php:589 +#: includes/i18n.php:711 msgid "Upload and activate the downloaded version" msgstr "Carica e attiva la versione scaricata" -#: includes/i18n.php:591 +#: includes/i18n.php:713 msgid "How to upload and activate?" msgstr "Come faccio a caricare ed attivare?" -#: includes/i18n.php:593 +#: includes/i18n.php:715 msgctxt "%s - product name, e.g. Facebook add-on was successfully..." msgid "%s Add-on was successfully purchased." msgstr "L' add-on %s è stato acquistato con successo." -#: includes/i18n.php:595 +#: includes/i18n.php:719 msgid "Your %s Add-on plan was successfully upgraded." msgstr "Il piano del tuo add-on %s è stato aggiornato con successo." -#: includes/i18n.php:597 +#: includes/i18n.php:723 msgid "Your email has been successfully verified - you are AWESOME!" msgstr "Il tuo indirizzo email è stato verificato con successo - SEI UN GRANDE!" -#: includes/i18n.php:599 +#: includes/i18n.php:727 msgid "Your plan was successfully upgraded." msgstr "Il piano è stato aggiornato con successo." -#: includes/i18n.php:601 +#: includes/i18n.php:729 msgid "Your plan was successfully changed to %s." msgstr "Il piano è stato cambiato con successo a %s." -#: includes/i18n.php:603 +#: includes/i18n.php:731 msgid "" "Your license has expired. You can still continue using the free plugin " "forever." msgstr "La licenza è scaduta. È comunque possibile continuare ad utilizzare il plugin gratuito per sempre." -#: includes/i18n.php:605 +#: includes/i18n.php:735 msgid "" "Your license has been cancelled. If you think it's a mistake, please contact" " support." msgstr "La tua licenza è stata cancellata. Se credi sia un errore, per favore contatta il supporto." -#: includes/i18n.php:607 +#: includes/i18n.php:739 msgid "Your trial has been successfully started." msgstr "La versione di prova è stata avviata correttamente." -#: includes/i18n.php:609 +#: includes/i18n.php:741 msgid "Your license was successfully activated." msgstr "La tua licenza è stata attivata correttamente." -#: includes/i18n.php:611 +#: includes/i18n.php:743 msgid "It looks like your site currently doesn't have an active license." msgstr "Sembra che il tuo sito non disponga di alcuna licenza attiva." -#: includes/i18n.php:613 +#: includes/i18n.php:747 msgid "" "Your license was successfully deactivated, you are back to the %s plan." msgstr "La tua licenza é stata disattivata con successo, sei tornato al piano %s." -#: includes/i18n.php:615 +#: includes/i18n.php:751 msgid "It looks like the license deactivation failed." msgstr "Sembra che la disattivazione della licenza non sia riuscita." -#: includes/i18n.php:617 +#: includes/i18n.php:755 msgid "It looks like the license could not be activated." msgstr "Sembra che la licenza non possa essere attivata." -#: includes/i18n.php:619 +#: includes/i18n.php:759 msgid "Error received from the server:" msgstr "Errore ricevuto dal server:" -#: includes/i18n.php:621 +#: includes/i18n.php:761 msgid "" "Your trial has expired. You can still continue using all our free features." msgstr "La versione di prova è scaduta. Si può comunque continuare a utilizzare tutte le nostre funzioni gratuite." -#: includes/i18n.php:623 +#: includes/i18n.php:765 msgid "" "Your plan was successfully downgraded. Your %s plan license will expire in " "%s." msgstr "Il tuo piano è stato declassato con successo. La licenza del piano %s scadrà in %s." -#: includes/i18n.php:625 +#: includes/i18n.php:769 msgid "" "Seems like we are having some temporary issue with your plan downgrade. " "Please try again in few minutes." msgstr "Stiamo avendo qualche problema temporaneo con il downgrade del piano. Riprova tra qualche minuto." -#: includes/i18n.php:627 +#: includes/i18n.php:773 msgid "" "It looks like you are not in trial mode anymore so there's nothing to cancel" " :)" msgstr "Sembra che tu non stia più usando la prova gratuita, quindi non c'è niente che tu debba annullare :)" -#: includes/i18n.php:629 +#: includes/i18n.php:777 msgid "Your %s free trial was successfully cancelled." msgstr "Il tuo periodo di prova gratuito %s è stato annullato con successo." -#: includes/i18n.php:631 +#: includes/i18n.php:781 msgctxt "%s - numeric version number" msgid "Version %s was released." msgstr "La versione %s é stata rilasciata." -#: includes/i18n.php:633 +#: includes/i18n.php:785 msgid "Please download %s." msgstr "Scarica %s." -#: includes/i18n.php:635 +#: includes/i18n.php:787 msgctxt "%s - plan name, as the latest professional version here" msgid "the latest %s version here" msgstr "l'ultima versione %s é quì" -#: includes/i18n.php:637 +#: includes/i18n.php:791 msgid "" "How do you like %s so far? Test all our %s premium features with a %d-day " "free trial." msgstr "Come sta andando con %s? Prova tutte le funzionalità premium di %s con una prova gratuita di %d giorni." -#: includes/i18n.php:639 +#: includes/i18n.php:795 msgctxt "call to action" msgid "Start free trial" msgstr "Inizia il periodo di prova gratuito" -#: includes/i18n.php:641 +#: includes/i18n.php:797 +msgid "Starting trial" +msgstr "Inizio del periodo di prova gratuito" + +#: includes/i18n.php:799 +msgid "Please wait" +msgstr "Attendere" + +#: includes/i18n.php:801 msgid "" "Seems like we are having some temporary issue with your trial cancellation. " "Please try again in few minutes." msgstr "Stiamo avendo qualche problema temporaneo con l'annullamento del periodo di prova. Riprova tra qualche minuto." -#: includes/i18n.php:643 +#: includes/i18n.php:805 msgid "You already utilized a trial before." msgstr "Hai già utilizzato una prova gratuita in passato." -#: includes/i18n.php:645 +#: includes/i18n.php:807 msgid "You are already running the plugin in a trial mode." msgstr "Stai già usando il plugin in modalità di prova gratuita." -#: includes/i18n.php:647 +#: includes/i18n.php:811 msgid "Plan %s do not exist, therefore, can't start a trial." msgstr "Il piano %s non esiste, per questo motivo non è possibile iniziare il periodo di prova." -#: includes/i18n.php:649 +#: includes/i18n.php:815 msgid "Plan %s does not support a trial period." msgstr "Il piano %s non supporta il periodo di prova." -#: includes/i18n.php:651 +#: includes/i18n.php:817 msgid "None of the plugin's plans supports a trial period." msgstr "Non esiste alcun piano del plugin che offra il periodo di prova." -#: includes/i18n.php:653 +#: includes/i18n.php:821 msgid "" "Unexpected API error. Please contact the plugin's author with the following " "error." msgstr "Errore inaspettato dell'API. Per favore contatta l'autore del plugin riportando il seguente errore." -#: includes/i18n.php:655 +#: includes/i18n.php:825 msgid "No commitment for %s days - cancel anytime!" msgstr "Nessun impegno per %s giorni - puoi annullare in qualsiasi momento!" -#: includes/i18n.php:657 +#: includes/i18n.php:827 msgid "" "Your license has expired. You can still continue using all the %s features, " "but you'll need to renew your license to continue getting updates and " "support." msgstr "La licenza è scaduta. È comunque possibile continuare a utilizzare tutte le funzionalità di %s, ma sarà necessario rinnovare la licenza per continuare a ricevere gli aggiornamenti ed il supporto." -#: includes/i18n.php:659 +#: includes/i18n.php:831 msgid "Couldn't activate %s." msgstr "Non é stato possibile attivare %s." -#: includes/i18n.php:661 +#: includes/i18n.php:833 msgid "Please contact us with the following message:" msgstr "Contattaci con il seguente messaggio:" -#: includes/i18n.php:663 +#: includes/i18n.php:835 msgid "" "It looks like you are still on the %s plan. If you did upgrade or change " "your plan, it's probably an issue on our side - sorry." msgstr "Sembra che tu sia ancora usando il piano %s. Se hai effettuato un upgrade o cambiato il piano, è probabile che ci sia un problema nei nostri sistemi." -#: includes/i18n.php:665 +#: includes/i18n.php:839 msgid "Please contact us here" msgstr "Contattaci qui" -#: includes/i18n.php:667 +#: includes/i18n.php:841 msgid "" "I have upgraded my account but when I try to Sync the License, the plan " "remains %s." msgstr "Ho aggiornato il mio account, ma quando cerco di sincronizzare la licenza, il piano rimane %s." -#: includes/i18n.php:673 +#: includes/i18n.php:849 msgid "From unknown reason, the API connectivity test failed." msgstr "Il test di connettività dell'API ha fallito per motivi sconosciuti." -#: includes/i18n.php:675 +#: includes/i18n.php:853 msgid "" "It's probably a temporary issue on our end. Just to be sure, with your " "permission, would it be o.k to run another connectivity test?" msgstr "Si tratta probabilmente di un problema nei nostri sistemi. Per esserne sicuri, potresti darci il permesso di effettuare un ulteriore test della connettività? " -#: includes/i18n.php:677 +#: includes/i18n.php:857 msgid "" "We use PHP cURL library for the API calls, which is a very common library " "and usually installed out of the box. Unfortunately, cURL is not installed " "on your server." msgstr "Utilizziamo la libreria PHP cURL per le chiamate alla nostra API. Questa libreria è molto comune ed è installata di base. Sfortunatamente cURL non è presente nel tuo server." -#: includes/i18n.php:679 +#: includes/i18n.php:861 msgid "" "From unknown reason, CloudFlare, the firewall we use, blocks the connection." msgstr "Per un motivo sconosciuto, CloudFlare, il firewall che utilizziamo, blocca la connessione." -#: includes/i18n.php:681 +#: includes/i18n.php:865 msgctxt "as pluginX requires an access to our API" msgid "%s requires an access to our API." msgstr "%s richiede un accesso alla nostra API." -#: includes/i18n.php:683 +#: includes/i18n.php:869 msgid "" "It looks like your server is using Squid ACL (access control lists), which " "blocks the connection." msgstr "Sembra che il tuo server stia usando Squid ACL (lista per il controllo degli accessi) il quale blocca la connessione." -#: includes/i18n.php:685 +#: includes/i18n.php:873 msgid "I don't know what is Squid or ACL, help me!" msgstr "Non ho idea di cosa sia Squid o ACL, aiutami!" -#: includes/i18n.php687, includes/i18n.php:695 +#: includes/i18n.php875, includes/i18n.php:889 msgid "" "We'll make sure to contact your hosting company and resolve the issue. You " "will get a follow-up email to %s once we have an update." msgstr "Contatteremo il tuo hosting e risolveremo il problema. Riceverai un' email a %s non appena ci saranno aggiornamenti." -#: includes/i18n.php:689 +#: includes/i18n.php:879 msgid "I'm a system administrator" msgstr "Sono un sistemista" -#: includes/i18n.php:691 +#: includes/i18n.php:881 msgid "" "Great, please whitelist the following domains: %s. Once you done, deactivate" " the plugin and activate it again." msgstr "Perfetto, aggiungi alla whitelist i seguenti domini: %s. Una volta che hai fatto, disattiva il plugin e attivalo di nuovo." -#: includes/i18n.php:693 +#: includes/i18n.php:885 msgid "I don't know what is cURL or how to install it, help me!" msgstr "Non ho idea di cosa sia cURL o come installarlo, aiutami!" -#: includes/i18n.php:697 +#: includes/i18n.php:893 msgid "" "Great, please install cURL and enable it in your php.ini file. To make sure " "it was successfully activated, use 'phpinfo()'. Once activated, deactivate " "the plugin and reactivate it back again." msgstr "Perfetto, installa cURL ed attivalo nel tuo file php.ini. Per essere sicuro di averlo attivato con successo, usa \"phpinfo()\". Una volta attivato disattva il plugin e attivalo di nuovo." -#: includes/i18n.php:699 +#: includes/i18n.php:897 msgid "" "We are sure it's an issue on our side and more than happy to resolve it for " "you ASAP if you give us a chance." msgstr "Siamo sicuri che sia un nostro problema e siamo più che felici di risolverlo per te al più presto. Per poter procedere abbiamo bisogno del tuo consenso." -#: includes/i18n.php:701 +#: includes/i18n.php:901 msgid "" "Sorry for the inconvenience and we are here to help if you give us a chance." msgstr "Siamo spiacenti per l'inconveniente e siamo qui per aiutarti con il tuo permesso." -#: includes/i18n.php:703 +#: includes/i18n.php:905 msgid "Yes - I'm giving you a chance to fix it" msgstr "Sì - sto dandovi la possibilità di risolvere il problema" -#: includes/i18n.php:705 +#: includes/i18n.php:907 msgid "" "We will do our best to whitelist your server and resolve this issue ASAP. " "You will get a follow-up email to %s once we have an update." msgstr "Faremo del nostro meglio per mettere il server in whitelist e risolvere il problema il prima possibile. Avrai un aggiornamento dello stato tramite email all'indirizzo %s." -#: includes/i18n.php:707 +#: includes/i18n.php:911 msgid "Let's try your previous version" msgstr "Proviamo con la versione precedente" -#: includes/i18n.php:709 +#: includes/i18n.php:913 msgid "Uninstall this version and install the previous one." msgstr "Disinstalla questa versione e installa quella precedente." -#: includes/i18n.php:711 +#: includes/i18n.php:917 msgid "That's exhausting, please deactivate" msgstr "È estenuante, disattivalo" -#: includes/i18n.php:713 +#: includes/i18n.php:919 msgid "" "We feel your frustration and sincerely apologize for the inconvenience. Hope" " to see you again in the future." msgstr "Capiamo la tua frustrazione e ci scusiamo per l'inconveniente. Speriamo di rivederti nuovamente in futuro." -#: includes/i18n.php:715 +#: includes/i18n.php:923 msgid "" "Thank for giving us the chance to fix it! A message was just sent to our " "technical staff. We will get back to you as soon as we have an update to %s." " Appreciate your patience." msgstr "Grazie per averci dato la possibilità di risolvere il problema! È stato appena inviato un messaggio al nostro staff tecnico. Ti risponderemo non appena avremo un aggiornamento riguardante %s. Grazie per la tua pazienza." -#: includes/i18n.php:717 +#: includes/i18n.php:927 msgctxt "%1s - plugin title, %2s - API domain" msgid "" "Your server is blocking the access to Freemius' API, which is crucial for " "%1s synchronization. Please contact your host to whitelist %2s" msgstr "Il tuo server sta bloccando l'accesso all'API di Freemius. L'accesso è cruciale per quanto riguarda la la sincronizzazione di %1s. Per favore contatta il tuo host per aggiungere %2s alla whitelist." -#: includes/i18n.php:719 +#: includes/i18n.php:931 msgid "" "It seems like one of the authentication parameters is wrong. Update your " "Public Key, Secret Key & User ID, and try again." msgstr "Sembra che uno dei parametri di autenticazione sia sbagliato. Aggiorna la tua chiave pubblica, Secret Key & User ID e riprova." -#: includes/i18n.php:725 +#: includes/i18n.php:939 msgid "" "Please check your mailbox, you should receive an email via %s to confirm the" " ownership change. From security reasons, you must confirm the change within" @@ -1416,106 +1504,165 @@ msgid "" "folder." msgstr "Verifica di aver ricevuto l'email da %s per confermare il cambiamento del proprietario. Per ragioni di sicurezza devi confermare il cambiamento entro 15 minuti. Se non trovi l'email controlla nella posta indesiderata." -#: includes/i18n.php:727 +#: includes/i18n.php:943 msgid "" "Thanks for confirming the ownership change. An email was just sent to %s for" " final approval." msgstr "Grazie per aver confermato il cambiamento del proprietario. Un' email è stata appena inviata a %s per la conferma finale." -#: includes/i18n.php:729 +#: includes/i18n.php:947 msgid "%s is the new owner of the account." msgstr "%s è il nuovo proprietario dell'account." -#: includes/i18n.php:733 +#: includes/i18n.php:951 msgctxt "addonX cannot run without pluginY" msgid "%s cannot run without %s." msgstr "%s non può funzionare senza %s." -#: includes/i18n.php:735 +#: includes/i18n.php:955 msgctxt "addonX cannot run..." msgid "%s cannot run without the plugin." msgstr "%s non può funzionare senza il plugin." -#: includes/i18n.php:737 +#: includes/i18n.php:959 msgctxt "pluginX activation was successfully..." msgid "%s activation was successfully completed." msgstr "%s è stato attivato con successo." -#: includes/i18n.php:739 +#: includes/i18n.php:963 msgctxt "Plugin installer section title" msgid "Features & Pricing" msgstr "Caratteristiche & prezzi" -#: includes/i18n.php:741 +#: includes/i18n.php:967 msgid "Add-on must be deployed to WordPress.org or Freemius." msgstr "L'add-on dev'essere distribuito da WordPress.org o Freemius." -#: includes/i18n.php:743 +#: includes/i18n.php:971 msgid "Paid add-on must be deployed to Freemius." msgstr "Gli add-on a pagamento devono essere distribuiti da Freemius." -#: includes/i18n.php:747 +#: includes/i18n.php:979 msgid "" "%s is a premium only add-on. You have to purchase a license first before " "activating the plugin." msgstr "%s è un add-on premium. Devi comprare una licenza prima di poter attivare il plugin." -#: includes/i18n.php:749 +#: includes/i18n.php:983 msgid "" "%s free trial was successfully cancelled. Since the add-on is premium only " "it was automatically deactivated. If you like to use it in the future, " "you'll have to purchase a license." msgstr "Il periodo di prova gratuito %s è stato annullato con successo. Siccome l'add-on è premium, è stato disattivato automaticamente. Se vorrai usarlo in futuro, dovrai comprare una licenza." -#: includes/i18n.php:755 +#: includes/i18n.php:995 msgctxt "as every month" msgid "Monthly" msgstr "Mensilmente" -#: includes/i18n.php:757 +#: includes/i18n.php:997 msgctxt "as monthly period" msgid "mo" msgstr "mese" -#: includes/i18n.php:759 +#: includes/i18n.php:999 msgctxt "as once a year" msgid "Annual" msgstr "Annuale" -#: includes/i18n.php:761 +#: includes/i18n.php:1001 msgctxt "as once a year" msgid "Annually" msgstr "Annualmente" -#: includes/i18n.php:763 +#: includes/i18n.php:1003 msgctxt "as once a year" msgid "Once" msgstr "Una volta" -#: includes/i18n.php:765 +#: includes/i18n.php:1005 msgctxt "as annual period" msgid "year" msgstr "anno" -#: includes/i18n.php:767 +#: includes/i18n.php:1007 msgid "Lifetime" msgstr "Tutta la vita" -#: includes/i18n.php:769 +#: includes/i18n.php:1009 msgctxt "e.g. the best product" msgid "Best" msgstr "Migliore" -#: includes/i18n.php:771 +#: includes/i18n.php:1011 msgctxt "e.g. billed monthly" msgid "Billed %s" msgstr "Fatturato %s" -#: includes/i18n.php:773 +#: includes/i18n.php:1013 msgctxt "as a discount of $5 or 10%" msgid "Save %s" msgstr "Risparmia %s" -#: includes/i18n.php:777 +#: includes/i18n.php:1017 msgid "View details" msgstr "Visualizza dettagli" + +#: includes/i18n.php:1025 +msgctxt "button label" +msgid "Approve & Start Trial" +msgstr "Approva e inizia il periodo di prova gratuito" + +#: includes/i18n.php:1029 +msgid "" +"You are 1-click away from starting your %1$s-day free trial of the %2$s " +"plan." +msgstr "Sei a un clic di distanza dall'iniziare il tuo periodo di prova gratuito di %1$s giorni per il piano %2$s." + +#: includes/i18n.php:1033 +msgid "" +"For compliance with the WordPress.org guidelines, before we start the trial " +"we ask that you opt-in with your user and non-sensitive site information, " +"allowing the plugin to periodically send data to %s to check for version " +"updates and to validate your trial." +msgstr "Per seguire le linee guida di WordPress, prima di iniziare il periodo di prova ti chiediamo di iscriverti con il tuo utente e i dati non sensibili inerenti al tuo sito, così da permettere periodicamente al plugin di inviare dati a %s per poter controllare la presenza di nuove versioni e convalidare il tuo periodo di prova gratuito." + +#: includes/i18n.php:1045 +msgid "Business name" +msgstr "Nome della compagnia" + +#: includes/i18n.php:1047 +msgid "Tax / VAT ID" +msgstr "Numero Partita Iva o VAT" + +#: includes/i18n.php:1049 +msgid "Address Line %d" +msgstr "Riga indirizzo %d" + +#: includes/i18n.php:1051 +msgid "Country" +msgstr "Nazione" + +#: includes/i18n.php:1053 +msgid "Select Country" +msgstr "Seleziona Nazione" + +#: includes/i18n.php:1055 +msgid "City" +msgstr "Città" + +#: includes/i18n.php:1057 +msgid "Town" +msgstr "Cittadina" + +#: includes/i18n.php:1059 +msgid "State" +msgstr "Stato" + +#: includes/i18n.php:1061 +msgid "Province" +msgstr "Provincia" + +#: includes/i18n.php:1063 +msgid "ZIP / Postal Code" +msgstr "CAP" diff --git a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius.pot b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius.pot index 5314cdb4b5622663b79075a02ebc280e54144263..16a010085d3a6b4e32e19e800be12ae0a4957374 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/languages/freemius.pot +++ b/wp-content/plugins/nextgen-gallery/freemius/languages/freemius.pot @@ -133,1267 +133,1393 @@ msgid "Edit" msgstr "" #: includes/i18n.php:119 -msgid "Date" +msgctxt "verb" +msgid "Update" msgstr "" #: includes/i18n.php:121 -msgid "Amount" +msgid "Date" msgstr "" #: includes/i18n.php:123 -msgid "Invoice" +msgid "Amount" msgstr "" #: includes/i18n.php:125 -msgid "Billing" +msgid "Invoice" msgstr "" #: includes/i18n.php:127 -msgid "Payments" +msgid "Billing" msgstr "" #: includes/i18n.php:129 -msgid "Delete Account" +msgid "Payments" msgstr "" #: includes/i18n.php:131 +msgid "Delete Account" +msgstr "" + +#: includes/i18n.php:133 msgctxt "as close a window" msgid "Dismiss" msgstr "" -#: includes/i18n.php:133 +#: includes/i18n.php:135 msgctxt "as product pricing plan" msgid "Plan" msgstr "" -#: includes/i18n.php:135 +#: includes/i18n.php:137 msgid "Change Plan" msgstr "" -#: includes/i18n.php:137 +#: includes/i18n.php:139 msgctxt "as download professional version" msgid "Download %s Version" msgstr "" -#: includes/i18n.php:139 +#: includes/i18n.php:141 msgctxt "as download professional version now" msgid "Download %s version now" msgstr "" -#: includes/i18n.php:141 +#: includes/i18n.php:145 msgctxt "as download latest version" msgid "Download Latest" msgstr "" -#: includes/i18n.php:143 +#: includes/i18n.php:147 msgctxt "E.g. you have a professional license." msgid "You have a %s license." msgstr "" -#: includes/i18n.php:145 +#: includes/i18n.php:151 msgid "New" msgstr "" -#: includes/i18n.php:147 +#: includes/i18n.php:153 msgid "Free" msgstr "" -#: includes/i18n.php:149 +#: includes/i18n.php:155 msgctxt "as trial plan" msgid "Trial" msgstr "" -#: includes/i18n.php:151 +#: includes/i18n.php:157 +msgctxt "as starting a trial plan" +msgid "Start Trial" +msgstr "" + +#: includes/i18n.php:159 msgctxt "verb" msgid "Purchase" msgstr "" -#: includes/i18n.php:153 +#: includes/i18n.php:161 msgid "Purchase License" msgstr "" -#: includes/i18n.php:155 +#: includes/i18n.php:163 msgctxt "verb" msgid "Buy" msgstr "" -#: includes/i18n.php:157 +#: includes/i18n.php:165 msgid "Buy License" msgstr "" -#: includes/i18n.php:159 +#: includes/i18n.php:167 msgid "Single Site License" msgstr "" -#: includes/i18n.php:161 +#: includes/i18n.php:169 msgid "Unlimited Licenses" msgstr "" -#: includes/i18n.php:163 +#: includes/i18n.php:171 msgid "Up to %s Sites" msgstr "" -#: includes/i18n.php:165 +#: includes/i18n.php:173 msgid "%sRenew your license now%s to access version %s features and support." msgstr "" -#: includes/i18n.php:167 +#: includes/i18n.php:177 msgid "Enter the email address you've used for the upgrade below and we will resend you the license key." msgstr "" -#: includes/i18n.php:169 +#: includes/i18n.php:181 msgctxt "e.g. Professional Plan" msgid "%s Plan" msgstr "" -#: includes/i18n.php:171 +#: includes/i18n.php:183 msgid "You are just one step away - %s" msgstr "" -#: includes/i18n.php:173 +#: includes/i18n.php:185 msgctxt "%s - plugin name. As complete \"Jetpack\" activation now" msgid "Complete \"%s\" Activation Now" msgstr "" -#: includes/i18n.php:175 +#: includes/i18n.php:189 msgid "We made a few tweaks to the plugin, %s" msgstr "" -#: includes/i18n.php:177 +#: includes/i18n.php:191 msgid "Opt-in to make \"%s\" Better!" msgstr "" -#: includes/i18n.php:179 +#: includes/i18n.php:193 msgid "Error" msgstr "" -#: includes/i18n.php:181 +#: includes/i18n.php:195 msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error." msgstr "" -#: includes/i18n.php:187 +#: includes/i18n.php:203 msgctxt "as expiration date" msgid "Expiration" msgstr "" -#: includes/i18n.php:189 +#: includes/i18n.php:205 msgctxt "as software license" msgid "License" msgstr "" -#: includes/i18n.php:191 +#: includes/i18n.php:207 msgid "not verified" msgstr "" -#: includes/i18n.php:193 +#: includes/i18n.php:209 msgid "Verify Email" msgstr "" -#: includes/i18n.php:195 +#: includes/i18n.php:211 msgctxt "e.g. expires in 2 months" msgid "Expires in %s" msgstr "" -#: includes/i18n.php:197 +#: includes/i18n.php:213 msgctxt "e.g. auto renews in 2 months" msgid "Auto renews in %s" msgstr "" -#: includes/i18n.php:199 +#: includes/i18n.php:215 msgid "No expiration" msgstr "" -#: includes/i18n.php:201 +#: includes/i18n.php:217 msgid "Expired" msgstr "" -#: includes/i18n.php:203 +#: includes/i18n.php:219 msgid "Cancelled" msgstr "" -#: includes/i18n.php:205 +#: includes/i18n.php:221 msgctxt "e.g. In 2 hours" msgid "In %s" msgstr "" -#: includes/i18n.php:207 +#: includes/i18n.php:223 msgctxt "e.g. 2 min ago" msgid "%s ago" msgstr "" -#: includes/i18n.php:209 +#: includes/i18n.php:225 msgctxt "as plugin version" msgid "Version" msgstr "" -#: includes/i18n.php:211 +#: includes/i18n.php:227 msgid "Name" msgstr "" -#: includes/i18n.php:213 +#: includes/i18n.php:229 msgid "Email" msgstr "" -#: includes/i18n.php:215 +#: includes/i18n.php:231 msgid "Email address" msgstr "" -#: includes/i18n.php:217 +#: includes/i18n.php:233 msgid "Verified" msgstr "" -#: includes/i18n.php:219 +#: includes/i18n.php:235 msgid "Plugin" msgstr "" -#: includes/i18n.php:221 +#: includes/i18n.php:237 msgid "Plugins" msgstr "" -#: includes/i18n.php:223 +#: includes/i18n.php:239 msgid "Themes" msgstr "" -#: includes/i18n.php:225 +#: includes/i18n.php:241 msgctxt "as file/folder path" msgid "Path" msgstr "" -#: includes/i18n.php:227 +#: includes/i18n.php:243 msgid "Title" msgstr "" -#: includes/i18n.php:229 +#: includes/i18n.php:245 msgid "Free version" msgstr "" -#: includes/i18n.php:231 +#: includes/i18n.php:247 msgid "Premium version" msgstr "" -#: includes/i18n.php:233 +#: includes/i18n.php:249 msgctxt "as WP plugin slug" msgid "Slug" msgstr "" -#: includes/i18n.php:235 +#: includes/i18n.php:251 msgid "ID" msgstr "" -#: includes/i18n.php:237 +#: includes/i18n.php:253 msgid "Users" msgstr "" -#: includes/i18n.php:239 +#: includes/i18n.php:255 msgid "Plugin Installs" msgstr "" -#: includes/i18n.php:241 +#: includes/i18n.php:257 msgctxt "like websites" msgid "Sites" msgstr "" -#: includes/i18n.php:243 +#: includes/i18n.php:259 msgid "User ID" msgstr "" -#: includes/i18n.php:245 +#: includes/i18n.php:261 msgid "Site ID" msgstr "" -#: includes/i18n.php:247 +#: includes/i18n.php:263 msgid "Public Key" msgstr "" -#: includes/i18n.php:249 +#: includes/i18n.php:265 msgid "Secret Key" msgstr "" -#: includes/i18n.php:251 +#: includes/i18n.php:267 msgctxt "as secret encryption key missing" msgid "No Secret" msgstr "" -#: includes/i18n.php:253 +#: includes/i18n.php:269 msgid "No ID" msgstr "" -#: includes/i18n.php:255 +#: includes/i18n.php:271 msgctxt "as synchronize license" msgid "Sync License" msgstr "" -#: includes/i18n.php:257 +#: includes/i18n.php:273 msgctxt "as synchronize" msgid "Sync" msgstr "" -#: includes/i18n.php:259 +#: includes/i18n.php:275 msgid "Activate License" msgstr "" -#: includes/i18n.php:261 +#: includes/i18n.php:277 msgid "Activate Free Version" msgstr "" -#: includes/i18n.php:263 +#: includes/i18n.php:279 msgid "Please enter the license key that you received in the email right after the purchase:" msgstr "" -#: includes/i18n.php:265 +#: includes/i18n.php:283 msgid "Activating license..." msgstr "" -#: includes/i18n.php:267 +#: includes/i18n.php:285 msgid "Change License" msgstr "" -#: includes/i18n.php:269 +#: includes/i18n.php:287 msgid "Update License" msgstr "" -#: includes/i18n.php:271 +#: includes/i18n.php:289 msgid "Deactivate License" msgstr "" -#: includes/i18n.php:273 +#: includes/i18n.php:291 msgid "Activate" msgstr "" -#: includes/i18n.php:275 +#: includes/i18n.php:293 msgid "Deactivate" msgstr "" -#: includes/i18n.php:277 +#: includes/i18n.php:295 msgid "Skip & Deactivate" msgstr "" -#: includes/i18n.php:279 +#: includes/i18n.php:297 msgid "No - just deactivate" msgstr "" -#: includes/i18n.php:281 +#: includes/i18n.php:299 msgid "Yes - do your thing" msgstr "" -#: includes/i18n.php:283 +#: includes/i18n.php:301 msgctxt "active mode" msgid "Active" msgstr "" -#: includes/i18n.php:285 +#: includes/i18n.php:303 msgctxt "is active mode?" msgid "Is Active" msgstr "" -#: includes/i18n.php:287 +#: includes/i18n.php:305 msgid "Install Now" msgstr "" -#: includes/i18n.php:289 +#: includes/i18n.php:307 msgid "Install Update Now" msgstr "" -#: includes/i18n.php:291 +#: includes/i18n.php:309 msgid "More information about %s" msgstr "" -#: includes/i18n.php:293 +#: includes/i18n.php:311 msgid "Localhost" msgstr "" -#: includes/i18n.php:295 +#: includes/i18n.php:313 msgctxt "as activate Professional plan" msgid "Activate %s Plan" msgstr "" -#: includes/i18n.php:297 +#: includes/i18n.php:315 msgctxt "as 5 licenses left" msgid "%s left" msgstr "" -#: includes/i18n.php:299 +#: includes/i18n.php:317 msgid "Last license" msgstr "" -#: includes/i18n.php:301 +#: includes/i18n.php:319 msgid "What is your %s?" msgstr "" -#: includes/i18n.php:303 +#: includes/i18n.php:321 msgid "Activate this add-on" msgstr "" -#: includes/i18n.php:305 +#: includes/i18n.php:323 msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?" msgstr "" -#: includes/i18n.php:307 +#: includes/i18n.php:327 msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?" msgstr "" -#: includes/i18n.php:309 +#: includes/i18n.php:331 msgid "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?" msgstr "" -#: includes/i18n.php:311 +#: includes/i18n.php:335 msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s." msgstr "" -#: includes/i18n.php:313 +#: includes/i18n.php:339 msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?" msgstr "" -#: includes/i18n.php:315 +#: includes/i18n.php:343 msgid "You can still enjoy all %s features but you will not have access to plugin updates and support." msgstr "" -#: includes/i18n.php:317 +#: includes/i18n.php:347 msgid "Once your license expire you can still use the Free version but you will NOT have access to the %s features." msgstr "" -#: includes/i18n.php:319 +#: includes/i18n.php:351 msgid "Are you sure you want to proceed?" msgstr "" -#: includes/i18n.php:325 +#: includes/i18n.php:357 msgid "Add Ons for %s" msgstr "" -#: includes/i18n.php:327 +#: includes/i18n.php:359 msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes." msgstr "" -#: includes/i18n.php:331 +#: includes/i18n.php:365 msgid "Anonymous feedback" msgstr "" -#: includes/i18n.php:333 +#: includes/i18n.php:367 msgid "Quick feedback" msgstr "" -#: includes/i18n.php:335 +#: includes/i18n.php:369 msgid "If you have a moment, please let us know why you are deactivating" msgstr "" -#: includes/i18n.php:337 +#: includes/i18n.php:373 msgid "Yes - Deactivate" msgstr "" -#: includes/i18n.php:339 +#: includes/i18n.php:375 msgid "Submit & Deactivate" msgstr "" -#: includes/i18n.php:341 -msgctxt "the text of the cancel button of the plugin deactivation dialog box." +#: includes/i18n.php:377 msgid "Cancel" msgstr "" -#: includes/i18n.php:343 +#: includes/i18n.php:379 msgid "I no longer need the plugin" msgstr "" -#: includes/i18n.php:345 +#: includes/i18n.php:381 msgid "I found a better plugin" msgstr "" -#: includes/i18n.php:347 +#: includes/i18n.php:383 msgid "I only needed the plugin for a short period" msgstr "" -#: includes/i18n.php:349 +#: includes/i18n.php:385 msgid "The plugin broke my site" msgstr "" -#: includes/i18n.php:351 +#: includes/i18n.php:387 msgid "The plugin suddenly stopped working" msgstr "" -#: includes/i18n.php:353 +#: includes/i18n.php:389 msgid "I can't pay for it anymore" msgstr "" -#: includes/i18n.php:355 +#: includes/i18n.php:391 msgid "It's a temporary deactivation. I'm just debugging an issue." msgstr "" -#: includes/i18n.php:357 +#: includes/i18n.php:395 msgctxt "the text of the \"other\" reason for deactivating the plugin that is shown in the modal box." msgid "Other" msgstr "" -#: includes/i18n.php:359 +#: includes/i18n.php:399 msgid "Kindly tell us the reason so we can improve." msgstr "" -#: includes/i18n.php:361 +#: includes/i18n.php:401 msgid "What's the plugin's name?" msgstr "" -#: includes/i18n.php:363 +#: includes/i18n.php:403 msgid "What price would you feel comfortable paying?" msgstr "" -#: includes/i18n.php:365 +#: includes/i18n.php:405 msgid "I couldn't understand how to make it work" msgstr "" -#: includes/i18n.php:367 +#: includes/i18n.php:407 msgid "The plugin is great, but I need specific feature that you don't support" msgstr "" -#: includes/i18n.php:369 +#: includes/i18n.php:411 msgid "The plugin is not working" msgstr "" -#: includes/i18n.php:371 +#: includes/i18n.php:413 msgid "It's not what I was looking for" msgstr "" -#: includes/i18n.php:373 +#: includes/i18n.php:415 msgid "The plugin didn't work as expected" msgstr "" -#: includes/i18n.php:375 +#: includes/i18n.php:417 msgid "What feature?" msgstr "" -#: includes/i18n.php:377 +#: includes/i18n.php:419 msgid "Kindly share what didn't work so we can fix it for future users..." msgstr "" -#: includes/i18n.php:379 +#: includes/i18n.php:423 msgid "What you've been looking for?" msgstr "" -#: includes/i18n.php:381 +#: includes/i18n.php:425 msgid "What did you expect?" msgstr "" -#: includes/i18n.php:383 +#: includes/i18n.php:427 msgid "The plugin didn't work" msgstr "" -#: includes/i18n.php:385 +#: includes/i18n.php:429 msgid "I don't like to share my information with you" msgstr "" -#: includes/i18n.php:387 +#: includes/i18n.php:431 msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in." msgstr "" -#: includes/i18n.php:395 +#: includes/i18n.php:441 msgctxt "greeting" msgid "Hey %s," msgstr "" -#: includes/i18n.php:397 +#: includes/i18n.php:443 msgctxt "a greeting. E.g. Thanks John!" msgid "Thanks %s!" msgstr "" -#: includes/i18n.php:399 -msgid "In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s" +#: includes/i18n.php:445 +msgid "Never miss an important update - opt-in to our security and feature updates notifications, and non-sensitive diagnostic tracking with %4$s." msgstr "" -#: includes/i18n.php:401 -msgid "Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still work just fine." +#: includes/i18n.php:449 +msgid "Please help us improve %1$s! If you opt-in, some data about your usage of %1$s will be sent to %4$s. If you skip this, that's okay! %1$s will still work just fine." msgstr "" -#: includes/i18n.php:403 -msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install." +#: includes/i18n.php:453 +msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s." msgstr "" -#: includes/i18n.php:405 +#: includes/i18n.php:455 +msgid "complete the install" +msgstr "" + +#: includes/i18n.php:457 +msgid "start the trial" +msgstr "" + +#: includes/i18n.php:459 msgid "Thanks for purchasing %s! To get started, please enter your license key:" msgstr "" -#: includes/i18n.php:407 +#: includes/i18n.php:463 msgid "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license." msgstr "" -#: includes/i18n.php:409 +#: includes/i18n.php:467 msgid "What permissions are being granted?" msgstr "" -#: includes/i18n.php:411 +#: includes/i18n.php:469 msgid "Your Profile Overview" msgstr "" -#: includes/i18n.php:413 +#: includes/i18n.php:471 msgid "Name and email address" msgstr "" -#: includes/i18n.php:415 +#: includes/i18n.php:473 msgid "Your Site Overview" msgstr "" -#: includes/i18n.php:417 +#: includes/i18n.php:475 msgid "Site URL, WP version, PHP info, plugins & themes" msgstr "" -#: includes/i18n.php:419 +#: includes/i18n.php:479 msgid "Current Plugin Events" msgstr "" -#: includes/i18n.php:421 +#: includes/i18n.php:481 msgid "Activation, deactivation and uninstall" msgstr "" -#: includes/i18n.php:423 +#: includes/i18n.php:483 msgid "Plugins & Themes" msgstr "" -#: includes/i18n.php:425 +#: includes/i18n.php:485 msgid "Titles, versions and state." msgstr "" -#: includes/i18n.php:427 +#: includes/i18n.php:487 +msgid "Admin Notices" +msgstr "" + +#: includes/i18n.php:489 msgid "Newsletter" msgstr "" -#: includes/i18n.php:429 +#: includes/i18n.php:491 msgid "Updates, announcements, marketing, no spam" msgstr "" -#: includes/i18n.php:431 +#: includes/i18n.php:493 msgid "Privacy Policy" msgstr "" -#: includes/i18n.php:433 +#: includes/i18n.php:495 msgid "Terms of Service" msgstr "" -#: includes/i18n.php:435 +#: includes/i18n.php:497 msgctxt "as activating plugin" msgid "Activating" msgstr "" -#: includes/i18n.php:437 +#: includes/i18n.php:499 msgctxt "as in the process of sending an email" msgid "Sending email" msgstr "" -#: includes/i18n.php:439 +#: includes/i18n.php:503 msgctxt "button label" msgid "Allow & Continue" msgstr "" -#: includes/i18n.php:441 +#: includes/i18n.php:505 msgctxt "button label" msgid "Agree & Activate License" msgstr "" -#: includes/i18n.php:443 +#: includes/i18n.php:507 msgctxt "verb" msgid "Skip" msgstr "" -#: includes/i18n.php:445 +#: includes/i18n.php:509 msgid "Click here to use the plugin anonymously" msgstr "" -#: includes/i18n.php:447 +#: includes/i18n.php:511 msgid "Re-send activation email" msgstr "" -#: includes/i18n.php:449 +#: includes/i18n.php:513 msgid "License key" msgstr "" -#: includes/i18n.php:451 +#: includes/i18n.php:515 msgid "Send License Key" msgstr "" -#: includes/i18n.php:453 +#: includes/i18n.php:517 msgid "Sending license key" msgstr "" -#: includes/i18n.php:455 +#: includes/i18n.php:519 msgid "Have a license key?" msgstr "" -#: includes/i18n.php:457 +#: includes/i18n.php:521 msgid "Don't have a license key?" msgstr "" -#: includes/i18n.php:459 +#: includes/i18n.php:523 msgid "Can't find your license key?" msgstr "" -#: includes/i18n.php:471 +#: includes/i18n.php:525 +msgid "We couldn't find your email address in the system, are you sure it's the right address?" +msgstr "" + +#: includes/i18n.php:529 +msgid "We can't see any active licenses associated with that email address, are you sure it's the right address?" +msgstr "" + +#: includes/i18n.php:533 +msgid "Opt In" +msgstr "" + +#: includes/i18n.php:535 +msgid "Opt Out" +msgstr "" + +#: includes/i18n.php:537 +msgid "On second thought - I want to continue helping" +msgstr "" + +#: includes/i18n.php:541 +msgid "Opting out..." +msgstr "" + +#: includes/i18n.php:543 +msgid "Opting in..." +msgstr "" + +#: includes/i18n.php:545 +msgid "We appreciate your help in making the %s better by letting us track some usage data." +msgstr "" + +#: includes/i18n.php:549 +msgid "Usage tracking is done in the name of making %s better. Making a better user experience, prioritizing new features, and more good things. We'd really appreciate if you'll reconsider letting us continue with the tracking." +msgstr "" + +#: includes/i18n.php:553 +msgid "By clicking \"Opt Out\", we will no longer be sending any data from %s to %s." +msgstr "" + +#: includes/i18n.php:563 msgid "Screenshots" msgstr "" -#: includes/i18n.php:473 +#: includes/i18n.php:565 msgid "Click to view full-size screenshot %d" msgstr "" -#: includes/i18n.php:481 +#: includes/i18n.php:573 msgid "Freemius Debug" msgstr "" -#: includes/i18n.php:483 +#: includes/i18n.php:575 msgctxt "as turned on" msgid "On" msgstr "" -#: includes/i18n.php:485 +#: includes/i18n.php:577 msgctxt "as turned off" msgid "Off" msgstr "" -#: includes/i18n.php:487 +#: includes/i18n.php:579 msgctxt "as code debugging" msgid "Debugging" msgstr "" -#: includes/i18n.php:489 +#: includes/i18n.php:581 msgid "Freemius State" msgstr "" -#: includes/i18n.php:491 +#: includes/i18n.php:583 msgctxt "as connection was successful" msgid "Connected" msgstr "" -#: includes/i18n.php:493 +#: includes/i18n.php:585 msgctxt "as connection blocked" msgid "Blocked" msgstr "" -#: includes/i18n.php:495 +#: includes/i18n.php:587 msgctxt "as application program interface" msgid "API" msgstr "" -#: includes/i18n.php:497 +#: includes/i18n.php:589 msgctxt "as software development kit versions" msgid "SDK" msgstr "" -#: includes/i18n.php:499 +#: includes/i18n.php:591 msgctxt "as software development kit versions" msgid "SDK Versions" msgstr "" -#: includes/i18n.php:501 +#: includes/i18n.php:595 msgctxt "as plugin folder path" msgid "Plugin Path" msgstr "" -#: includes/i18n.php:503 +#: includes/i18n.php:597 msgctxt "as sdk path" msgid "SDK Path" msgstr "" -#: includes/i18n.php:505 +#: includes/i18n.php:599 msgid "Add Ons of Plugin %s" msgstr "" -#: includes/i18n.php:507 +#: includes/i18n.php:601 msgid "Are you sure you want to delete all Freemius data?" msgstr "" -#: includes/i18n.php:509 +#: includes/i18n.php:605 msgid "Actions" msgstr "" -#: includes/i18n.php:511 +#: includes/i18n.php:607 msgid "Delete All Accounts" msgstr "" -#: includes/i18n.php:513 +#: includes/i18n.php:609 msgid "Start Fresh" msgstr "" -#: includes/i18n.php:515 +#: includes/i18n.php:611 msgid "Clear API Cache" msgstr "" -#: includes/i18n.php:517 +#: includes/i18n.php:613 msgid "Sync Data From Server" msgstr "" -#: includes/i18n.php:519 +#: includes/i18n.php:615 msgid "Scheduled Crons" msgstr "" -#: includes/i18n.php:521 +#: includes/i18n.php:617 msgid "Plugins & Themes Sync" msgstr "" -#: includes/i18n.php:529 +#: includes/i18n.php:625 msgctxt "as congratulations" msgid "Congrats" msgstr "" -#: includes/i18n.php:531 +#: includes/i18n.php:627 msgctxt "exclamation" msgid "Oops" msgstr "" -#: includes/i18n.php:533 +#: includes/i18n.php:629 msgctxt "interjection expressing joy or exuberance" msgid "Yee-haw" msgstr "" -#: includes/i18n.php:535 +#: includes/i18n.php:633 msgctxt "(especially in electronic communication) used to express elation, enthusiasm, or triumph." msgid "W00t" msgstr "" -#: includes/i18n.php:537 +#: includes/i18n.php:637 msgctxt "a positive response" msgid "Right on" msgstr "" -#: includes/i18n.php:539 +#: includes/i18n.php:639 msgctxt "something somebody says when they are thinking about what you have just said. " msgid "Hmm" msgstr "" -#: includes/i18n.php:541 +#: includes/i18n.php:643 msgid "O.K" msgstr "" -#: includes/i18n.php:543 +#: includes/i18n.php:645 msgctxt "exclamation" msgid "Hey" msgstr "" -#: includes/i18n.php:545 +#: includes/i18n.php:647 msgctxt "advance notice of something that will need attention." msgid "Heads up" msgstr "" -#: includes/i18n.php:553 +#: includes/i18n.php:657 msgid "Seems like you got the latest release." msgstr "" -#: includes/i18n.php:555 +#: includes/i18n.php:659 msgid "You are all good!" msgstr "" -#: includes/i18n.php:557 +#: includes/i18n.php:661 msgid "Sorry, we could not complete the email update. Another user with the same email is already registered." msgstr "" -#: includes/i18n.php:559 +#: includes/i18n.php:665 msgid "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button." msgstr "" -#: includes/i18n.php:561 +#: includes/i18n.php:669 msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments." msgstr "" -#: includes/i18n.php:563 +#: includes/i18n.php:673 msgid "Your name was successfully updated." msgstr "" -#: includes/i18n.php:565 +#: includes/i18n.php:675 msgid "You have successfully updated your %s." msgstr "" -#: includes/i18n.php:567 +#: includes/i18n.php:677 msgid "Please provide your full name." msgstr "" -#: includes/i18n.php:569 +#: includes/i18n.php:679 msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box." msgstr "" -#: includes/i18n.php:571 +#: includes/i18n.php:683 msgid "Just letting you know that the add-ons information of %s is being pulled from an external server." msgstr "" -#: includes/i18n.php:573 +#: includes/i18n.php:687 msgid "No credit card required" msgstr "" -#: includes/i18n.php:575 +#: includes/i18n.php:689 msgid "Premium plugin version was successfully activated." msgstr "" -#: includes/i18n.php:577 +#: includes/i18n.php:693 msgid "The upgrade of %s was successfully completed." msgstr "" -#: includes/i18n.php:579 +#: includes/i18n.php:695 msgid "Your account was successfully activated with the %s plan." msgstr "" -#: includes/i18n.php:581 +#: includes/i18n.php:699 msgid "Download the latest %s version now" msgstr "" -#: includes/i18n.php:583 +#: includes/i18n.php:701 msgid "Please follow these steps to complete the upgrade" msgstr "" -#: includes/i18n.php:585 +#: includes/i18n.php:705 msgid "Download the latest %s version" msgstr "" -#: includes/i18n.php:587 +#: includes/i18n.php:707 +msgid "Download the latest version" +msgstr "" + +#: includes/i18n.php:709 msgid "Deactivate the free version" msgstr "" -#: includes/i18n.php:589 +#: includes/i18n.php:711 msgid "Upload and activate the downloaded version" msgstr "" -#: includes/i18n.php:591 +#: includes/i18n.php:713 msgid "How to upload and activate?" msgstr "" -#: includes/i18n.php:593 +#: includes/i18n.php:715 msgctxt "%s - product name, e.g. Facebook add-on was successfully..." msgid "%s Add-on was successfully purchased." msgstr "" -#: includes/i18n.php:595 +#: includes/i18n.php:719 msgid "Your %s Add-on plan was successfully upgraded." msgstr "" -#: includes/i18n.php:597 +#: includes/i18n.php:723 msgid "Your email has been successfully verified - you are AWESOME!" msgstr "" -#: includes/i18n.php:599 +#: includes/i18n.php:727 msgid "Your plan was successfully upgraded." msgstr "" -#: includes/i18n.php:601 +#: includes/i18n.php:729 msgid "Your plan was successfully changed to %s." msgstr "" -#: includes/i18n.php:603 +#: includes/i18n.php:731 msgid "Your license has expired. You can still continue using the free plugin forever." msgstr "" -#: includes/i18n.php:605 +#: includes/i18n.php:735 msgid "Your license has been cancelled. If you think it's a mistake, please contact support." msgstr "" -#: includes/i18n.php:607 +#: includes/i18n.php:739 msgid "Your trial has been successfully started." msgstr "" -#: includes/i18n.php:609 +#: includes/i18n.php:741 msgid "Your license was successfully activated." msgstr "" -#: includes/i18n.php:611 +#: includes/i18n.php:743 msgid "It looks like your site currently doesn't have an active license." msgstr "" -#: includes/i18n.php:613 +#: includes/i18n.php:747 msgid "Your license was successfully deactivated, you are back to the %s plan." msgstr "" -#: includes/i18n.php:615 +#: includes/i18n.php:751 msgid "It looks like the license deactivation failed." msgstr "" -#: includes/i18n.php:617 +#: includes/i18n.php:755 msgid "It looks like the license could not be activated." msgstr "" -#: includes/i18n.php:619 +#: includes/i18n.php:759 msgid "Error received from the server:" msgstr "" -#: includes/i18n.php:621 +#: includes/i18n.php:761 msgid "Your trial has expired. You can still continue using all our free features." msgstr "" -#: includes/i18n.php:623 +#: includes/i18n.php:765 msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s." msgstr "" -#: includes/i18n.php:625 +#: includes/i18n.php:769 msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes." msgstr "" -#: includes/i18n.php:627 +#: includes/i18n.php:773 msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)" msgstr "" -#: includes/i18n.php:629 +#: includes/i18n.php:777 msgid "Your %s free trial was successfully cancelled." msgstr "" -#: includes/i18n.php:631 +#: includes/i18n.php:781 msgctxt "%s - numeric version number" msgid "Version %s was released." msgstr "" -#: includes/i18n.php:633 +#: includes/i18n.php:785 msgid "Please download %s." msgstr "" -#: includes/i18n.php:635 +#: includes/i18n.php:787 msgctxt "%s - plan name, as the latest professional version here" msgid "the latest %s version here" msgstr "" -#: includes/i18n.php:637 +#: includes/i18n.php:791 msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial." msgstr "" -#: includes/i18n.php:639 +#: includes/i18n.php:795 msgctxt "call to action" msgid "Start free trial" msgstr "" -#: includes/i18n.php:641 +#: includes/i18n.php:797 +msgid "Starting trial" +msgstr "" + +#: includes/i18n.php:799 +msgid "Please wait" +msgstr "" + +#: includes/i18n.php:801 msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes." msgstr "" -#: includes/i18n.php:643 +#: includes/i18n.php:805 msgid "You already utilized a trial before." msgstr "" -#: includes/i18n.php:645 +#: includes/i18n.php:807 msgid "You are already running the plugin in a trial mode." msgstr "" -#: includes/i18n.php:647 +#: includes/i18n.php:811 msgid "Plan %s do not exist, therefore, can't start a trial." msgstr "" -#: includes/i18n.php:649 +#: includes/i18n.php:815 msgid "Plan %s does not support a trial period." msgstr "" -#: includes/i18n.php:651 +#: includes/i18n.php:817 msgid "None of the plugin's plans supports a trial period." msgstr "" -#: includes/i18n.php:653 +#: includes/i18n.php:821 msgid "Unexpected API error. Please contact the plugin's author with the following error." msgstr "" -#: includes/i18n.php:655 +#: includes/i18n.php:825 msgid "No commitment for %s days - cancel anytime!" msgstr "" -#: includes/i18n.php:657 +#: includes/i18n.php:827 msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support." msgstr "" -#: includes/i18n.php:659 +#: includes/i18n.php:831 msgid "Couldn't activate %s." msgstr "" -#: includes/i18n.php:661 +#: includes/i18n.php:833 msgid "Please contact us with the following message:" msgstr "" -#: includes/i18n.php:663 +#: includes/i18n.php:835 msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry." msgstr "" -#: includes/i18n.php:665 +#: includes/i18n.php:839 msgid "Please contact us here" msgstr "" -#: includes/i18n.php:667 +#: includes/i18n.php:841 msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s." msgstr "" -#: includes/i18n.php:673 +#: includes/i18n.php:849 msgid "From unknown reason, the API connectivity test failed." msgstr "" -#: includes/i18n.php:675 +#: includes/i18n.php:853 msgid "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?" msgstr "" -#: includes/i18n.php:677 +#: includes/i18n.php:857 msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server." msgstr "" -#: includes/i18n.php:679 +#: includes/i18n.php:861 msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection." msgstr "" -#: includes/i18n.php:681 +#: includes/i18n.php:865 msgctxt "as pluginX requires an access to our API" msgid "%s requires an access to our API." msgstr "" -#: includes/i18n.php:683 +#: includes/i18n.php:869 msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection." msgstr "" -#: includes/i18n.php:685 +#: includes/i18n.php:873 msgid "I don't know what is Squid or ACL, help me!" msgstr "" -#: includes/i18n.php:687, includes/i18n.php:695 +#: includes/i18n.php:875, includes/i18n.php:889 msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update." msgstr "" -#: includes/i18n.php:689 +#: includes/i18n.php:879 msgid "I'm a system administrator" msgstr "" -#: includes/i18n.php:691 +#: includes/i18n.php:881 msgid "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again." msgstr "" -#: includes/i18n.php:693 +#: includes/i18n.php:885 msgid "I don't know what is cURL or how to install it, help me!" msgstr "" -#: includes/i18n.php:697 +#: includes/i18n.php:893 msgid "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again." msgstr "" -#: includes/i18n.php:699 +#: includes/i18n.php:897 msgid "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance." msgstr "" -#: includes/i18n.php:701 +#: includes/i18n.php:901 msgid "Sorry for the inconvenience and we are here to help if you give us a chance." msgstr "" -#: includes/i18n.php:703 +#: includes/i18n.php:905 msgid "Yes - I'm giving you a chance to fix it" msgstr "" -#: includes/i18n.php:705 +#: includes/i18n.php:907 msgid "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update." msgstr "" -#: includes/i18n.php:707 +#: includes/i18n.php:911 msgid "Let's try your previous version" msgstr "" -#: includes/i18n.php:709 +#: includes/i18n.php:913 msgid "Uninstall this version and install the previous one." msgstr "" -#: includes/i18n.php:711 +#: includes/i18n.php:917 msgid "That's exhausting, please deactivate" msgstr "" -#: includes/i18n.php:713 +#: includes/i18n.php:919 msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future." msgstr "" -#: includes/i18n.php:715 +#: includes/i18n.php:923 msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience." msgstr "" -#: includes/i18n.php:717 +#: includes/i18n.php:927 msgctxt "%1s - plugin title, %2s - API domain" msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s" msgstr "" -#: includes/i18n.php:719 +#: includes/i18n.php:931 msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again." msgstr "" -#: includes/i18n.php:725 +#: includes/i18n.php:939 msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder." msgstr "" -#: includes/i18n.php:727 +#: includes/i18n.php:943 msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval." msgstr "" -#: includes/i18n.php:729 +#: includes/i18n.php:947 msgid "%s is the new owner of the account." msgstr "" -#: includes/i18n.php:733 +#: includes/i18n.php:951 msgctxt "addonX cannot run without pluginY" msgid "%s cannot run without %s." msgstr "" -#: includes/i18n.php:735 +#: includes/i18n.php:955 msgctxt "addonX cannot run..." msgid "%s cannot run without the plugin." msgstr "" -#: includes/i18n.php:737 +#: includes/i18n.php:959 msgctxt "pluginX activation was successfully..." msgid "%s activation was successfully completed." msgstr "" -#: includes/i18n.php:739 +#: includes/i18n.php:963 msgctxt "Plugin installer section title" msgid "Features & Pricing" msgstr "" -#: includes/i18n.php:741 +#: includes/i18n.php:967 msgid "Add-on must be deployed to WordPress.org or Freemius." msgstr "" -#: includes/i18n.php:743 +#: includes/i18n.php:971 msgid "Paid add-on must be deployed to Freemius." msgstr "" -#: includes/i18n.php:747 +#: includes/i18n.php:979 msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin." msgstr "" -#: includes/i18n.php:749 +#: includes/i18n.php:983 msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license." msgstr "" -#: includes/i18n.php:755 +#: includes/i18n.php:995 msgctxt "as every month" msgid "Monthly" msgstr "" -#: includes/i18n.php:757 +#: includes/i18n.php:997 msgctxt "as monthly period" msgid "mo" msgstr "" -#: includes/i18n.php:759 +#: includes/i18n.php:999 msgctxt "as once a year" msgid "Annual" msgstr "" -#: includes/i18n.php:761 +#: includes/i18n.php:1001 msgctxt "as once a year" msgid "Annually" msgstr "" -#: includes/i18n.php:763 +#: includes/i18n.php:1003 msgctxt "as once a year" msgid "Once" msgstr "" -#: includes/i18n.php:765 +#: includes/i18n.php:1005 msgctxt "as annual period" msgid "year" msgstr "" -#: includes/i18n.php:767 +#: includes/i18n.php:1007 msgid "Lifetime" msgstr "" -#: includes/i18n.php:769 +#: includes/i18n.php:1009 msgctxt "e.g. the best product" msgid "Best" msgstr "" -#: includes/i18n.php:771 +#: includes/i18n.php:1011 msgctxt "e.g. billed monthly" msgid "Billed %s" msgstr "" -#: includes/i18n.php:773 +#: includes/i18n.php:1013 msgctxt "as a discount of $5 or 10%" msgid "Save %s" msgstr "" -#: includes/i18n.php:777 +#: includes/i18n.php:1017 msgid "View details" msgstr "" + +#: includes/i18n.php:1025 +msgctxt "button label" +msgid "Approve & Start Trial" +msgstr "" + +#: includes/i18n.php:1029 +msgid "You are 1-click away from starting your %1$s-day free trial of the %2$s plan." +msgstr "" + +#: includes/i18n.php:1033 +msgid "For compliance with the WordPress.org guidelines, before we start the trial we ask that you opt-in with your user and non-sensitive site information, allowing the plugin to periodically send data to %s to check for version updates and to validate your trial." +msgstr "" + +#: includes/i18n.php:1045 +msgid "Business name" +msgstr "" + +#: includes/i18n.php:1047 +msgid "Tax / VAT ID" +msgstr "" + +#: includes/i18n.php:1049 +msgid "Address Line %d" +msgstr "" + +#: includes/i18n.php:1051 +msgid "Country" +msgstr "" + +#: includes/i18n.php:1053 +msgid "Select Country" +msgstr "" + +#: includes/i18n.php:1055 +msgid "City" +msgstr "" + +#: includes/i18n.php:1057 +msgid "Town" +msgstr "" + +#: includes/i18n.php:1059 +msgid "State" +msgstr "" + +#: includes/i18n.php:1061 +msgid "Province" +msgstr "" + +#: includes/i18n.php:1063 +msgid "ZIP / Postal Code" +msgstr "" diff --git a/wp-content/plugins/nextgen-gallery/freemius/start.php b/wp-content/plugins/nextgen-gallery/freemius/start.php index 552d84eeeef01b270a13d7e4606d7977a9ed9e03..d6817d9efa271d95f1d1c43015ce8029e50b0dda 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/start.php +++ b/wp-content/plugins/nextgen-gallery/freemius/start.php @@ -15,7 +15,7 @@ * * @var string */ - $this_sdk_version = '1.2.1'; + $this_sdk_version = '1.2.1.5'; #region SDK Selection Logic -------------------------------------------------------------------- @@ -84,9 +84,7 @@ } // Refresh page. - if ( fs_redirect( $_SERVER['REQUEST_URI'] ) ) { - exit(); - } + fs_redirect( $_SERVER['REQUEST_URI'] ); } } else { if ( ! function_exists( 'get_plugins' ) ) { @@ -144,9 +142,7 @@ if ( fs_newest_sdk_plugin_first() ) { // Refresh page after re-order to make sure activated plugin loads newest SDK. if ( class_exists( 'Freemius' ) ) { - if ( fs_redirect( $_SERVER['REQUEST_URI'] ) ) { - exit(); - } + fs_redirect( $_SERVER['REQUEST_URI'] ); } } } diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/account.php b/wp-content/plugins/nextgen-gallery/freemius/templates/account.php index 6f72702199eaa0c7d218038786e445f3555ac06f..484fdc311e3fbbd79089ba2332e38cf86ee47f2f 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/account.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/account.php @@ -36,7 +36,7 @@ $show_upgrade = ( $fs->has_paid_plan() && ! $is_paying && ! $is_paid_trial ); if ( $show_upgrade ) { - $fs->_require_license_activation_dialog(); + $fs->_add_license_activation_dialog_box(); } ?> <div class="wrap"> @@ -84,7 +84,7 @@ </li> <?php if ( $is_paying ) : ?> <li> - • + • <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"> <input type="hidden" name="fs_action" value="deactivate_license"> <?php wp_nonce_field( 'deactivate_license' ) ?> @@ -98,7 +98,7 @@ $is_active_subscription ) : ?> <li> - • + • <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"> <input type="hidden" name="fs_action" value="downgrade_account"> <?php wp_nonce_field( 'downgrade_account' ) ?> @@ -113,13 +113,13 @@ </li> <?php endif ?> <li> - • + • <a href="<?php echo $fs->get_upgrade_url() ?>"><i class="dashicons dashicons-grid-view"></i> <?php _efs( 'change-plan', $slug ) ?></a> </li> <?php elseif ( $is_paid_trial ) : ?> <li> - • + • <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"> <input type="hidden" name="fs_action" value="cancel_trial"> <?php wp_nonce_field( 'cancel_trial' ) ?> @@ -130,7 +130,7 @@ </li> <?php endif ?> <li> - • + • <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"> <input type="hidden" name="fs_action" value="<?php echo $slug ?>_sync_license"> <?php wp_nonce_field( $slug . '_sync_license' ) ?> @@ -290,7 +290,7 @@ <?php else : ?> <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST" class="button-group"> - <?php if ($show_upgrade) : ?> + <?php if ( $show_upgrade && $fs->is_premium() ) : ?> <a class="button activate-license-trigger <?php echo $slug ?>" href="#"><?php _efs( 'activate-license', $slug ) ?></a> <?php endif ?> <input type="submit" class="button" @@ -533,6 +533,31 @@ array( 'plugin_id' => $addon_id ), false ); + + $human_readable_license_expiration = human_time_diff( time(), strtotime( $license->expiration ) ); + $downgrade_confirmation_message = sprintf( __fs( 'downgrade-x-confirm', $slug ), + $plan->title, + $human_readable_license_expiration ); + + $after_downgrade_message_id = ( ! $license->is_block_features ? + 'after-downgrade-non-blocking' : + 'after-downgrade-blocking' ); + + $after_downgrade_message = sprintf( __fs( $after_downgrade_message_id, $slug ), $plan->title ); + + if ( ! $license->is_lifetime() && $is_active_subscription ) { + $buttons[] = fs_ui_get_action_button( + $slug, + 'account', + 'downgrade_account', + __fs( 'downgrade', $slug ), + array( 'plugin_id' => $addon_id ), + false, + false, + ( $downgrade_confirmation_message . ' ' . $after_downgrade_message ), + 'POST' + ); + } } else if ( $is_paid_trial ) { $buttons[] = fs_ui_get_action_button( $slug, diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/add-trial-to-pricing.php b/wp-content/plugins/nextgen-gallery/freemius/templates/add-trial-to-pricing.php new file mode 100644 index 0000000000000000000000000000000000000000..169ae855bbfb05799f4c4052bca8bef72868e126 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/add-trial-to-pricing.php @@ -0,0 +1,31 @@ +<?php + /** + * Add "&trial=true" to pricing menu item href when running in trial + * promotion context. + * + * @package Freemius + * @copyright Copyright (c) 2016, Freemius, Inc. + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License + * @since 1.2.1.5 + */ + + if ( ! defined( 'ABSPATH' ) ) { + exit; + } + + /** + * @var array $VARS + */ + $slug = $VARS['slug']; +?> +<script type="text/javascript"> + (function ($) { + $(document).ready(function () { + var $pricingMenu = $('.fs-submenu-item.<?php echo $slug ?>.pricing'), + $pricingMenuLink = $pricingMenu.parents('a'); + + // Add trial querystring param. + $pricingMenuLink.attr('href', $pricingMenuLink.attr('href') + '&trial=true'); + }); + })(jQuery); +</script> \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/billing.php b/wp-content/plugins/nextgen-gallery/freemius/templates/billing.php index baaff59ba1137892d28d00abe4e0490fb4ced4f8..e5f375466db559589f53dae1855f033fed9da5bc 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/billing.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/billing.php @@ -34,6 +34,14 @@ $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() ); $is_paid_trial = $fs->is_paid_trial(); $show_upgrade = ( ! $is_paying && ! $is_paid_trial ); + + $billing = $fs->_fetch_billing(); + $has_billing = ( $billing instanceof FS_Billing ); + if ( ! $has_billing ) { + $billing = new FS_Billing(); + } + + $readonly_attr = $has_billing ? 'readonly' : ''; ?> <div id="fs_account" class="wrap"> @@ -57,14 +65,305 @@ </h2> <div id="poststuff"> - <div> + <div id="fs_billing"> <div class="has-sidebar has-right-sidebar"> <div class="has-sidebar-content"> <div class="postbox"> - <h3><?php _efs( 'payments', $slug ) ?></h3> + <h3><span class="dashicons dashicons-businessman"></span> <?php _efs( 'billing', $slug ) ?></h3> + <table id="fs_billing_address"<?php if ( $has_billing ) { + echo ' class="fs-read-mode"'; + } ?>> + <tr> + <td><label><span><?php _efs( 'business-name', $slug ) ?>:</span> <input id="business_name" value="<?php echo $billing->business_name ?>" placeholder="<?php _efs( 'business-name', $slug ) ?>"></label></td> + <td><label><span><?php _efs( 'tax-vat-id', $slug ) ?>:</span> <input id="tax_id" value="<?php echo $billing->tax_id ?>" placeholder="<?php _efs( 'tax-vat-id', $slug ) ?>"></label></td> + </tr> + <tr> + <td><label><span><?php printf( __fs( 'address-line-n', $slug ), 1 ) ?>:</span> <input id="address_street" value="<?php echo $billing->address_street ?>" placeholder="<?php printf( __fs( 'address-line-n', $slug ), 1 ) ?>"></label></td> + <td><label><span><?php printf( __fs( 'address-line-n', $slug ), 2 ) ?>:</span> <input id="address_apt" value="<?php echo $billing->address_apt ?>" placeholder="<?php printf( __fs( 'address-line-n', $slug ), 2 ) ?>"></label></td> + </tr> + <tr> + <td><label><span><?php _efs( 'city', $slug ) ?> / <?php _efs( 'town', $slug ) ?>:</span> <input id="address_city" value="<?php echo $billing->address_city ?>" placeholder="<?php _efs( 'city', $slug ) ?> / <?php _efs( 'town', $slug ) ?>"></label></td> + <td><label><span><?php _efs( 'zip-postal-code', $slug ) ?>:</span> <input id="address_zip" value="<?php echo $billing->address_zip ?>" placeholder="<?php _efs( 'zip-postal-code', $slug ) ?>"></label></td> + </tr> + <tr> + <?php $countries = array( + 'AF' => 'Afghanistan', + 'AX' => 'Aland Islands', + 'AL' => 'Albania', + 'DZ' => 'Algeria', + 'AS' => 'American Samoa', + 'AD' => 'Andorra', + 'AO' => 'Angola', + 'AI' => 'Anguilla', + 'AQ' => 'Antarctica', + 'AG' => 'Antigua and Barbuda', + 'AR' => 'Argentina', + 'AM' => 'Armenia', + 'AW' => 'Aruba', + 'AU' => 'Australia', + 'AT' => 'Austria', + 'AZ' => 'Azerbaijan', + 'BS' => 'Bahamas', + 'BH' => 'Bahrain', + 'BD' => 'Bangladesh', + 'BB' => 'Barbados', + 'BY' => 'Belarus', + 'BE' => 'Belgium', + 'BZ' => 'Belize', + 'BJ' => 'Benin', + 'BM' => 'Bermuda', + 'BT' => 'Bhutan', + 'BO' => 'Bolivia', + 'BQ' => 'Bonaire, Saint Eustatius and Saba', + 'BA' => 'Bosnia and Herzegovina', + 'BW' => 'Botswana', + 'BV' => 'Bouvet Island', + 'BR' => 'Brazil', + 'IO' => 'British Indian Ocean Territory', + 'VG' => 'British Virgin Islands', + 'BN' => 'Brunei', + 'BG' => 'Bulgaria', + 'BF' => 'Burkina Faso', + 'BI' => 'Burundi', + 'KH' => 'Cambodia', + 'CM' => 'Cameroon', + 'CA' => 'Canada', + 'CV' => 'Cape Verde', + 'KY' => 'Cayman Islands', + 'CF' => 'Central African Republic', + 'TD' => 'Chad', + 'CL' => 'Chile', + 'CN' => 'China', + 'CX' => 'Christmas Island', + 'CC' => 'Cocos Islands', + 'CO' => 'Colombia', + 'KM' => 'Comoros', + 'CK' => 'Cook Islands', + 'CR' => 'Costa Rica', + 'HR' => 'Croatia', + 'CU' => 'Cuba', + 'CW' => 'Curacao', + 'CY' => 'Cyprus', + 'CZ' => 'Czech Republic', + 'CD' => 'Democratic Republic of the Congo', + 'DK' => 'Denmark', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DO' => 'Dominican Republic', + 'TL' => 'East Timor', + 'EC' => 'Ecuador', + 'EG' => 'Egypt', + 'SV' => 'El Salvador', + 'GQ' => 'Equatorial Guinea', + 'ER' => 'Eritrea', + 'EE' => 'Estonia', + 'ET' => 'Ethiopia', + 'FK' => 'Falkland Islands', + 'FO' => 'Faroe Islands', + 'FJ' => 'Fiji', + 'FI' => 'Finland', + 'FR' => 'France', + 'GF' => 'French Guiana', + 'PF' => 'French Polynesia', + 'TF' => 'French Southern Territories', + 'GA' => 'Gabon', + 'GM' => 'Gambia', + 'GE' => 'Georgia', + 'DE' => 'Germany', + 'GH' => 'Ghana', + 'GI' => 'Gibraltar', + 'GR' => 'Greece', + 'GL' => 'Greenland', + 'GD' => 'Grenada', + 'GP' => 'Guadeloupe', + 'GU' => 'Guam', + 'GT' => 'Guatemala', + 'GG' => 'Guernsey', + 'GN' => 'Guinea', + 'GW' => 'Guinea-Bissau', + 'GY' => 'Guyana', + 'HT' => 'Haiti', + 'HM' => 'Heard Island and McDonald Islands', + 'HN' => 'Honduras', + 'HK' => 'Hong Kong', + 'HU' => 'Hungary', + 'IS' => 'Iceland', + 'IN' => 'India', + 'ID' => 'Indonesia', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IE' => 'Ireland', + 'IM' => 'Isle of Man', + 'IL' => 'Israel', + 'IT' => 'Italy', + 'CI' => 'Ivory Coast', + 'JM' => 'Jamaica', + 'JP' => 'Japan', + 'JE' => 'Jersey', + 'JO' => 'Jordan', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KI' => 'Kiribati', + 'XK' => 'Kosovo', + 'KW' => 'Kuwait', + 'KG' => 'Kyrgyzstan', + 'LA' => 'Laos', + 'LV' => 'Latvia', + 'LB' => 'Lebanon', + 'LS' => 'Lesotho', + 'LR' => 'Liberia', + 'LY' => 'Libya', + 'LI' => 'Liechtenstein', + 'LT' => 'Lithuania', + 'LU' => 'Luxembourg', + 'MO' => 'Macao', + 'MK' => 'Macedonia', + 'MG' => 'Madagascar', + 'MW' => 'Malawi', + 'MY' => 'Malaysia', + 'MV' => 'Maldives', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MH' => 'Marshall Islands', + 'MQ' => 'Martinique', + 'MR' => 'Mauritania', + 'MU' => 'Mauritius', + 'YT' => 'Mayotte', + 'MX' => 'Mexico', + 'FM' => 'Micronesia', + 'MD' => 'Moldova', + 'MC' => 'Monaco', + 'MN' => 'Mongolia', + 'ME' => 'Montenegro', + 'MS' => 'Montserrat', + 'MA' => 'Morocco', + 'MZ' => 'Mozambique', + 'MM' => 'Myanmar', + 'NA' => 'Namibia', + 'NR' => 'Nauru', + 'NP' => 'Nepal', + 'NL' => 'Netherlands', + 'NC' => 'New Caledonia', + 'NZ' => 'New Zealand', + 'NI' => 'Nicaragua', + 'NE' => 'Niger', + 'NG' => 'Nigeria', + 'NU' => 'Niue', + 'NF' => 'Norfolk Island', + 'KP' => 'North Korea', + 'MP' => 'Northern Mariana Islands', + 'NO' => 'Norway', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PW' => 'Palau', + 'PS' => 'Palestinian Territory', + 'PA' => 'Panama', + 'PG' => 'Papua New Guinea', + 'PY' => 'Paraguay', + 'PE' => 'Peru', + 'PH' => 'Philippines', + 'PN' => 'Pitcairn', + 'PL' => 'Poland', + 'PT' => 'Portugal', + 'PR' => 'Puerto Rico', + 'QA' => 'Qatar', + 'CG' => 'Republic of the Congo', + 'RE' => 'Reunion', + 'RO' => 'Romania', + 'RU' => 'Russia', + 'RW' => 'Rwanda', + 'BL' => 'Saint Barthelemy', + 'SH' => 'Saint Helena', + 'KN' => 'Saint Kitts and Nevis', + 'LC' => 'Saint Lucia', + 'MF' => 'Saint Martin', + 'PM' => 'Saint Pierre and Miquelon', + 'VC' => 'Saint Vincent and the Grenadines', + 'WS' => 'Samoa', + 'SM' => 'San Marino', + 'ST' => 'Sao Tome and Principe', + 'SA' => 'Saudi Arabia', + 'SN' => 'Senegal', + 'RS' => 'Serbia', + 'SC' => 'Seychelles', + 'SL' => 'Sierra Leone', + 'SG' => 'Singapore', + 'SX' => 'Sint Maarten', + 'SK' => 'Slovakia', + 'SI' => 'Slovenia', + 'SB' => 'Solomon Islands', + 'SO' => 'Somalia', + 'ZA' => 'South Africa', + 'GS' => 'South Georgia and the South Sandwich Islands', + 'KR' => 'South Korea', + 'SS' => 'South Sudan', + 'ES' => 'Spain', + 'LK' => 'Sri Lanka', + 'SD' => 'Sudan', + 'SR' => 'Suriname', + 'SJ' => 'Svalbard and Jan Mayen', + 'SZ' => 'Swaziland', + 'SE' => 'Sweden', + 'CH' => 'Switzerland', + 'SY' => 'Syria', + 'TW' => 'Taiwan', + 'TJ' => 'Tajikistan', + 'TZ' => 'Tanzania', + 'TH' => 'Thailand', + 'TG' => 'Togo', + 'TK' => 'Tokelau', + 'TO' => 'Tonga', + 'TT' => 'Trinidad and Tobago', + 'TN' => 'Tunisia', + 'TR' => 'Turkey', + 'TM' => 'Turkmenistan', + 'TC' => 'Turks and Caicos Islands', + 'TV' => 'Tuvalu', + 'VI' => 'U.S. Virgin Islands', + 'UG' => 'Uganda', + 'UA' => 'Ukraine', + 'AE' => 'United Arab Emirates', + 'GB' => 'United Kingdom', + 'US' => 'United States', + 'UM' => 'United States Minor Outlying Islands', + 'UY' => 'Uruguay', + 'UZ' => 'Uzbekistan', + 'VU' => 'Vanuatu', + 'VA' => 'Vatican', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'WF' => 'Wallis and Futuna', + 'EH' => 'Western Sahara', + 'YE' => 'Yemen', + 'ZM' => 'Zambia', + 'ZW' => 'Zimbabwe', + ) ?> + <td><label><span><?php _efs( 'country', $slug ) ?>:</span> <select id="address_country_code"> + <?php if ( empty( $billing->address_country_code ) ) : ?> + <option value="" + selected><?php _efs( 'select-country', $slug ) ?></option> + <?php endif ?> + <?php foreach ( $countries as $code => $country ) : ?> + <option + value="<?php echo $code ?>" <?php selected( $billing->address_country_code, $code ) ?>><?php echo $country ?></option> + <?php endforeach ?> + </select></label></td> + <td><label><span><?php _efs( 'state', $slug ) ?> / <?php _efs( 'province', $slug ) ?>:</span> + <input id="address_state" value="<?php echo $billing->address_state ?>" placeholder="<?php _efs( 'state', $slug ) ?> / <?php _efs( 'province', $slug ) ?>"></label></td> + </tr> + <tr> + <td colspan="2"> + <button + class="button"><?php _efs( $has_billing ? 'edit' : 'update', $slug ) ?></button> + </td> + </tr> + </table> + </div> + <div class="postbox"> + <h3><span class="dashicons dashicons-paperclip"></span> <?php _efs( 'payments', $slug ) ?></h3> <?php - $payments = $fs->_fetch_payments(); + $payments = $fs->_fetch_payments(); ?> <div class="inside"> @@ -85,7 +384,8 @@ <td><?php echo $payment->id ?></td> <td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td> <td>$<?php echo $payment->gross ?></td> - <td><a href="<?php echo $fs->_get_invoice_api_url($payment->id) ?>" class="button button-small" + <td><a href="<?php echo $fs->_get_invoice_api_url( $payment->id ) ?>" + class="button button-small" target="_blank"><?php _efs( 'invoice', $slug ) ?></a></td> </tr> <?php $odd = ! $odd; endforeach ?> @@ -98,6 +398,103 @@ </div> </div> </div> + <script type="text/javascript"> + (function($){ + var $billingAddress = $('#fs_billing_address'), + $billingInputs = $billingAddress.find('input, select'); + + var setPrevValues = function () { + $billingInputs.each(function () { + $(this).attr('data-val', $(this).val()); + }); + }; + + setPrevValues(); + + var hasBillingChanged = function () { + for (var i = 0, len = $billingInputs.length; i < len; i++){ + var $this = $($billingInputs[i]); + if ($this.attr('data-val') !== $this.val()) { + return true; + } + } + + return false; + }; + + var isEditAllFieldsMode = false; + + $billingAddress.find('.button').click(function(){ + $billingAddress.toggleClass('fs-read-mode'); + + var isEditMode = !$billingAddress.hasClass('fs-read-mode'); + + $(this) + .html(isEditMode ? <?php echo json_encode(__fs('update', $slug)) ?> : <?php echo json_encode(__fs('edit', $slug)) ?>) + .toggleClass('button-primary'); + + if (isEditMode) { + $('#business_name').focus().select(); + isEditAllFieldsMode = true; + } else { + isEditAllFieldsMode = false; + + if (!hasBillingChanged()) + return; + + var billing = {}; + + $billingInputs.each(function(){ + if ($(this).attr('data-val') !== $(this).val()) { + billing[$(this).attr('id')] = $(this).val(); + } + }); + + $.ajax({ + url : ajaxurl, + method : 'POST', + data : { + action : '<?php echo $fs->get_action_tag( 'update_billing' ) ?>', + security: '<?php echo wp_create_nonce( $fs->get_action_tag( 'update_billing' ) ) ?>', + slug : '<?php echo $slug ?>', + billing : billing + }, + success: function (resultObj) { + if (resultObj.success) { + setPrevValues(); + } else { + alert(resultObj.error); + } + } + }); + } + }); + + $billingInputs + // Get into edit mode upon selection. + .focus(function () { + var isEditMode = !$billingAddress.hasClass('fs-read-mode'); + + if (isEditMode) { + return; + } + + $billingAddress.toggleClass('fs-read-mode'); + $billingAddress.find('.button') + .html(<?php echo json_encode( __fs( 'update', $slug ) ) ?>) + .toggleClass('button-primary'); + }) + // If blured after editing only one field without changes, exit edit mode. + .blur(function () { + if (!isEditAllFieldsMode && !hasBillingChanged()) { + $billingAddress.toggleClass('fs-read-mode'); + $billingAddress.find('.button') + .html(<?php echo json_encode( __fs( 'edit', $slug ) ) ?>) + .toggleClass('button-primary'); + } + }); + })(jQuery); + </script> <?php $params = array( 'page' => 'account', diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/checkout.php b/wp-content/plugins/nextgen-gallery/freemius/templates/checkout.php index 6762a666f19558377a2a598842408d596bef1369..f3241c30be668fc328444d4a48d8e2e92be4a35c 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/checkout.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/checkout.php @@ -32,13 +32,13 @@ // Get site context secure params. if ( $fs->is_registered() ) { - $site = $fs->get_site(); + $site = $fs->get_site(); $plugin_id = fs_request_get( 'plugin_id', $fs->get_id() ); - if ($plugin_id != $fs->get_id()) { + if ( $plugin_id != $fs->get_id() ) { if ( $fs->is_addon_activated( $plugin_id ) ) { $fs_addon = Freemius::get_instance_by_id( $plugin_id ); - $site = $fs_addon->get_site(); + $site = $fs_addon->get_site(); } } @@ -57,17 +57,7 @@ 'user_firstname' => $current_user->user_firstname, 'user_lastname' => $current_user->user_lastname, 'user_email' => $current_user->user_email, -// 'user_nickname' => $current_user->user_nicename, -// 'plugin_slug' => $slug, -// 'site_url' => get_site_url(), -// 'site_name' => get_bloginfo( 'name' ), -// 'platform_version' => get_bloginfo( 'version' ), -// 'language' => get_bloginfo( 'language' ), -// 'charset' => get_bloginfo( 'charset' ), -// 'account_url' => fs_nonce_url( $fs->_get_admin_page_url( -// 'account', -// array( 'fs_action' => 'sync_user' ) -// ), 'sync_user' ), + 'home_url' => home_url(), ) ); $fs_user = Freemius::_get_user_by_email( $current_user->user_email ); @@ -81,8 +71,7 @@ } } - if ( $fs->is_payments_sandbox() ) - { + if ( $fs->is_payments_sandbox() ) { // Append plugin secure token for sandbox mode authentication. $context_params['sandbox'] = FS_Security::instance()->get_secure_token( $fs->get_plugin(), @@ -162,16 +151,16 @@ $(function () { var - // Keep track of the iframe height. - iframe_height = 800, - base_url = '<?php echo WP_FS__ADDRESS ?>', - // Pass the parent page URL into the Iframe in a meaningful way (this URL could be - // passed via query string or hard coded into the child page, it depends on your needs). - src = base_url + '/checkout/?<?php echo (isset($_REQUEST['XDEBUG_SESSION']) ? 'XDEBUG_SESSION=' . $_REQUEST['XDEBUG_SESSION'] . '&' : '') . http_build_query($query_params) ?>#' + encodeURIComponent(document.location.href), + // Keep track of the iframe height. + iframe_height = 800, + base_url = '<?php echo WP_FS__ADDRESS ?>', + // Pass the parent page URL into the Iframe in a meaningful way (this URL could be + // passed via query string or hard coded into the child page, it depends on your needs). + src = base_url + '/checkout/?<?php echo ( isset( $_REQUEST['XDEBUG_SESSION'] ) ? 'XDEBUG_SESSION=' . $_REQUEST['XDEBUG_SESSION'] . '&' : '' ) . http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href), - // Append the Iframe into the DOM. - iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>') - .appendTo('#iframe'); + // Append the Iframe into the DOM. + iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>') + .appendTo('#iframe'); FS.PostMessage.init(base_url, [iframe[0]]); FS.PostMessage.receiveOnce('height', function (data) { @@ -186,10 +175,10 @@ FS.PostMessage.receiveOnce('install', function (data) { // Post data to activation URL. - $.form('<?php echo fs_nonce_url($fs->_get_admin_page_url('account', array( + $.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array( 'fs_action' => $slug . '_activate_new', - 'plugin_id' => isset($_GET['plugin_id']) ? $_GET['plugin_id'] : $fs->get_id() - )), $slug . '_activate_new') ?>', { + 'plugin_id' => isset( $_GET['plugin_id'] ) ? $_GET['plugin_id'] : $fs->get_id() + ) ), $slug . '_activate_new' ) ?>', { user_id : data.user.id, user_secret_key : data.user.secret_key, user_public_key : data.user.public_key, @@ -200,11 +189,11 @@ }); FS.PostMessage.receiveOnce('pending_activation', function (data) { - $.form('<?php echo fs_nonce_url($fs->_get_admin_page_url('account', array( - 'fs_action' => $slug . '_activate_new', - 'plugin_id' => fs_request_get('plugin_id', $fs->get_id()), + $.form('<?php echo fs_nonce_url( $fs->_get_admin_page_url( 'account', array( + 'fs_action' => $slug . '_activate_new', + 'plugin_id' => fs_request_get( 'plugin_id', $fs->get_id() ), 'pending_activation' => true, - )), $slug . '_activate_new') ?>', { + ) ), $slug . '_activate_new' ) ?>', { user_email: data.user_email }).submit(); }); @@ -217,28 +206,17 @@ // and then click the purchase button, the context information // of the user will be shared with Freemius in order to complete the // purchase workflow and activate the license for the right user. - FS.PostMessage.post('context', { - plugin_id : '<?php echo $fs->get_id() ?>', - plugin_public_key: '<?php echo $fs->get_public_key() ?>', - plugin_version : '<?php echo $fs->get_plugin_version() ?>', - plugin_slug : '<?php echo $slug ?>', - site_name : '<?php echo get_bloginfo('name') ?>', - platform_version : '<?php echo get_bloginfo('version') ?>', - language : '<?php echo get_bloginfo('language') ?>', - charset : '<?php echo get_bloginfo('charset') ?>', - return_url : '<?php echo $return_url ?>', - account_url : '<?php echo fs_nonce_url($fs->_get_admin_page_url( - 'account', - array('fs_action' => 'sync_user') - ), 'sync_user') ?>', - activation_url : '<?php echo fs_nonce_url($fs->_get_admin_page_url('', - array( - 'fs_action' => $slug . '_activate_new', - 'plugin_id' => fs_request_get('plugin_id', $fs->get_id()), - - )), - $slug . '_activate_new') ?>' - }, iframe[0]); + <?php $install_data = array_merge( $fs->get_opt_in_params(), + array( + 'activation_url' => fs_nonce_url( $fs->_get_admin_page_url( '', + array( + 'fs_action' => $slug . '_activate_new', + 'plugin_id' => fs_request_get( 'plugin_id', $fs->get_id() ), + + ) ), + $slug . '_activate_new' ) + ) ) ?> + FS.PostMessage.post('context', <?php echo json_encode( $install_data ) ?>, iframe[0]); }); FS.PostMessage.receiveOnce('get_dimensions', function (data) { diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/connect.php b/wp-content/plugins/nextgen-gallery/freemius/templates/connect.php index 5850013d2489c1decc2115d05de984d92b7c1537..520bc74c511037ec19fc9017a31d2324e42c2653 100755 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/connect.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/connect.php @@ -58,8 +58,11 @@ } if ( $require_license_key ) { - $fs->_require_license_activation_dialog(); + $fs->_add_license_activation_dialog_box(); } + + $fs_user = Freemius::_get_user_by_email( $current_user->user_email ); + $activate_with_current_user = is_object( $fs_user ) && ! $is_pending_activation; ?> <div id="fs_connect" class="wrap<?php if ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) { @@ -90,7 +93,8 @@ __fs( 'pending-activation-message', $slug ), $first_name, '<b>' . $fs->get_plugin_name() . '</b>', - '<b>' . $current_user->user_email . '</b>' + '<b>' . $current_user->user_email . '</b>', + __fs( 'complete-the-install', $slug ) ) ); } else if ( $require_license_key ) { $button_label = 'agree-activate-license'; @@ -119,10 +123,9 @@ } echo $fs->apply_filters( $filter, + sprintf( __fs( 'hey-x', $slug ), $first_name ) . '<br>' . sprintf( - __fs( 'hey-x', $slug ) . '<br>' . __fs( $default_optin_message, $slug ), - $first_name, '<b>' . $fs->get_plugin_name() . '</b>', '<b>' . $current_user->user_login . '</b>', '<a href="' . $site_url . '" target="_blank">' . $site_url . '</a>', @@ -148,12 +151,11 @@ </div> <div class="fs-actions"> <?php if ( $fs->is_enable_anonymous() && ! $is_pending_activation && ! $require_license_key ) : ?> - <a href="<?php echo wp_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' ) ?>" + <a href="<?php echo fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' ) ?>" class="button button-secondary" tabindex="2"><?php _efs( 'skip', $slug ) ?></a> <?php endif ?> - <?php $fs_user = Freemius::_get_user_by_email( $current_user->user_email ) ?> - <?php if ( is_object( $fs_user ) && ! $is_pending_activation ) : ?> + <?php if ( $activate_with_current_user ) : ?> <form action="" method="POST"> <input type="hidden" name="fs_action" value="<?php echo $slug ?>_activate_existing"> <?php wp_nonce_field( 'activate_existing_' . $fs->get_public_key() ) ?> @@ -190,6 +192,12 @@ 'desc' => __fs( 'permissions-site_desc' ), 'priority' => 10, ), + 'notices' => array( + 'icon-class' => 'dashicons dashicons-testimonial', + 'label' => __fs( 'permissions-admin-notices' ), + 'desc' => __fs( 'permissions-newsletter_desc' ), + 'priority' => 13, + ), 'events' => array( 'icon-class' => 'dashicons dashicons-admin-plugins', 'label' => __fs( 'permissions-events' ), @@ -228,14 +236,14 @@ <a class="fs-trigger" href="#" tabindex="1"><?php _efs( 'what-permissions', $slug ) ?></a> <ul><?php foreach ( $permissions as $id => $permission ) : ?> - <li id="fs-permission-<?php esc_attr_e( $id ); ?>" - class="fs-permission fs-<?php esc_attr_e( $id ); ?>"> - <i class="<?php esc_attr_e( $permission['icon-class'] ); ?>"></i> + <li id="fs-permission-<?php echo esc_attr( $id ); ?>" + class="fs-permission fs-<?php echo esc_attr( $id ); ?>"> + <i class="<?php echo esc_attr( $permission['icon-class'] ); ?>"></i> <div> - <span><?php esc_html_e( $permission['label'] ); ?></span> + <span><?php echo esc_html( $permission['label'] ); ?></span> - <p><?php esc_html_e( $permission['desc'] ); ?></p> + <p><?php echo esc_html( $permission['desc'] ); ?></p> </div> </li> <?php endforeach; ?> @@ -267,12 +275,20 @@ var $primaryCta = $('.fs-actions .button.button-primary'), $form = $('.fs-actions form'), requireLicenseKey = <?php echo $require_license_key ? 'true' : 'false' ?>, + hasContextUser = <?php echo $activate_with_current_user ? 'true' : 'false' ?>, $licenseSecret, $licenseKeyInput = $('#fs_license_key'); $('.fs-actions .button').on('click', function () { // Set loading mode. $(document.body).css({'cursor': 'wait'}); + + var $this = $(this); + $this.css({'cursor': 'wait'}); + + setTimeout(function () { + $this.attr('disabled', 'disabled'); + }, 200); }); $form.on('submit', function () { @@ -281,13 +297,53 @@ * @since 1.1.9 */ if (requireLicenseKey) { - if (null == $licenseSecret) { - $licenseSecret = $('<input type="hidden" name="license_secret_key" value="" />'); - $form.append($licenseSecret); + if (!hasContextUser) { + $('.fs-error').remove(); + + /** + * Use the AJAX opt-in when license key is required to potentially + * process the after install failure hook. + * + * @author Vova Feldman (@svovaf) + * @since 1.2.1.5 + */ + $.ajax({ + url : ajaxurl, + method : 'POST', + data : { + action : 'fs_activate_license_<?php echo $slug ?>', + slug : '<?php echo $slug ?>', + license_key: $licenseKeyInput.val() + }, + success: function (result) { + var resultObj = $.parseJSON(result); + if (resultObj.success) { + // Redirect to the "Account" page and sync the license. + window.location.href = resultObj.next_page; + } else { + // Show error. + $('.fs-content').prepend('<p class="fs-error">' + resultObj.error + '</p>'); + + // Reset loading mode. + $primaryCta.removeClass('fs-loading').css({'cursor': 'auto'}); + $primaryCta.html(<?php echo json_encode(__fs( $button_label, $slug )) ?>); + $primaryCta.prop('disabled', false); + $(document.body).css({'cursor': 'auto'}); + } + } + }); + + return false; } + else { + if (null == $licenseSecret) { + $licenseSecret = $('<input type="hidden" name="license_secret_key" value="" />'); + $form.append($licenseSecret); + } - // Update secret key if premium only plugin. - $licenseSecret.val($licenseKeyInput.val()); + // Update secret key if premium only plugin. + $licenseSecret.val($licenseKeyInput.val()); + } } return true; @@ -295,7 +351,7 @@ $primaryCta.on('click', function () { $(this).addClass('fs-loading'); - $(this).html('<?php _efs( $is_pending_activation ? 'sending-email' : 'activating' , $slug ) ?>...').css({'cursor': 'wait'}); + $(this).html(<?php echo json_encode(__fs( $is_pending_activation ? 'sending-email' : 'activating' , $slug )) ?> +'...'); }); $('.fs-permissions .fs-trigger').on('click', function () { diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/debug.php b/wp-content/plugins/nextgen-gallery/freemius/templates/debug.php index 7fd79496699e7d77c690628f49a5d39cf1e35824..df0c46749a2d071a5890ef974e906c2de041af73 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/debug.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/debug.php @@ -78,6 +78,58 @@ </tr> </tbody> </table> +<?php + if ( ! defined( 'FS_API__ADDRESS' ) ) { + define( 'FS_API__ADDRESS', '://api.freemius.com' ); + } + if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) { + define( 'FS_API__SANDBOX_ADDRESS', '://sandbox-api.freemius.com' ); + } + + $defines = array( + array( + 'key' => 'WP_FS__REMOTE_ADDR', + 'val' => WP_FS__REMOTE_ADDR, + ), + array( + 'key' => 'WP_FS__ADDRESS_PRODUCTION', + 'val' => WP_FS__ADDRESS_PRODUCTION, + ), + array( + 'key' => 'FS_API__ADDRESS', + 'val' => FS_API__ADDRESS, + ), + array( + 'key' => 'FS_API__SANDBOX_ADDRESS', + 'val' => FS_API__SANDBOX_ADDRESS, + ), + array( + 'key' => 'WP_FS__DIR', + 'val' => WP_FS__DIR, + ), + ) +?> + <br> + <table class="widefat"> + <thead> + <tr> + <th><?php _efs( 'key' ) ?></th> + <th><?php _efs( 'value' ) ?></th> + </tr> + </thead> + <tbody> + <?php $alternate = false; + foreach ( $defines as $p ) : ?> + <tr<?php if ( $alternate ) { + echo ' class="alternate"'; + } ?>> + <td><?php echo $p['key'] ?></td> + <td><?php echo $p['val'] ?></td> + </tr> + <?php $alternate = ! $alternate ?> + <?php endforeach ?> + </tbody> + </table> <h2><?php _efs( 'sdk-versions' ) ?></h2> <table id="fs_sdks" class="widefat"> <thead> @@ -116,6 +168,7 @@ <th><?php _efs( 'freemius-state' ) ?></th> <th><?php _efs( 'plugin-path' ) ?></th> <th><?php _efs( 'public-key' ) ?></th> + <th><?php _efs( 'actions' ) ?></th> </tr> </thead> <tbody> @@ -123,24 +176,42 @@ <?php $is_active = is_plugin_active( $data->file ) ?> <?php $fs = $is_active ? freemius( $slug ) : null ?> <tr<?php if ( $is_active ) { - echo ' style="background: #E6FFE6; font-weight: bold"'; + if ($fs->has_api_connectivity() && $fs->is_on()) { + echo ' style="background: #E6FFE6; font-weight: bold"'; + }else{ + echo ' style="background: #ffd0d0; font-weight: bold"'; + } } ?>> <td><?php echo $data->id ?></td> <td><?php echo $slug ?></td> <td><?php echo $data->version ?></td> <td><?php echo $data->title ?></td> - <td><?php if ( $is_active ) { + <td<?php if ( $is_active && ! $fs->has_api_connectivity() ) { + echo ' style="color: red; text-transform: uppercase;"'; + } ?>><?php if ( $is_active ) { echo $fs->has_api_connectivity() ? __fs( 'connected' ) : __fs( 'blocked' ); } ?></td> - <td><?php if ( $is_active ) { + <td<?php if ( $is_active && ! $fs->is_on() ) { + echo ' style="color: red; text-transform: uppercase;"'; + } ?>><?php if ( $is_active ) { echo $fs->is_on() ? __fs( 'on' ) : __fs( 'off' ); } ?></td> <td><?php echo $data->file ?></td> <td><?php echo $data->public_key ?></td> + <td> + <?php if ($is_active && $fs->has_trial_plan()) : ?> + <form action="" method="POST"> + <input type="hidden" name="fs_action" value="simulate_trial"> + <input type="hidden" name="slug" value="<?php echo $slug ?>"> + <?php wp_nonce_field( 'simulate_trial' ) ?> + + <button type="submit" class="button button-primary simulate-trial"><?php _efs( 'Simulate Trial' ) ?></button> + <?php endif ?> + </td> </tr> <?php endforeach ?> </tbody> @@ -148,7 +219,7 @@ <?php endif ?> <?php /** - * @var array $VARS + * @var array $VARS * @var FS_Site[] $sites */ $sites = $VARS['sites']; @@ -240,7 +311,7 @@ <tr> <td><?php echo $user->id ?></td> <td><?php echo $user->get_name() ?></td> - <td><a href="mailto:<?php esc_attr_e( $user->email ) ?>"><?php echo $user->email ?></a></td> + <td><a href="mailto:<?php echo esc_attr( $user->email ) ?>"><?php echo $user->email ?></a></td> <td><?php echo json_encode( $user->is_verified ) ?></td> <td><?php echo $user->public_key ?></td> <td><?php echo $user->secret_key ?></td> diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/debug/logger.php b/wp-content/plugins/nextgen-gallery/freemius/templates/debug/logger.php index 21fad48063ab19600ae25789db102206daf20bfd..111d49823a020b91402c1d3e1bbd028b98c8cb41 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/debug/logger.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/debug/logger.php @@ -47,11 +47,11 @@ <?php printf( '<a href="#" style="color: darkorange !important;" onclick="jQuery(this).parent().find(\'div\').toggle(); return false;"><nobr>%s</nobr></a>', - substr( $log['msg'], 0, 32 ) . ( 32 < strlen( $log['msg'] ) ? '...' : '' ) + esc_html( substr( $log['msg'], 0, 32 ) ) . ( 32 < strlen( $log['msg'] ) ? '...' : '' ) ); ?> <div style="display: none;"> - <b style="color: darkorange;"><?php echo $log['msg'] ?></b> + <b style="color: darkorange;"><?php echo esc_html( $log['msg'] ) ?></b> </div> </td> <td><?php diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/form.php b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/form.php index 7dc0f55a80b356eca11a9ab87d19363cad0db31e..a0abfc24e4d3e73783a00a3fd6dd1c2429ed03f7 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/form.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/form.php @@ -77,7 +77,7 @@ HTML; + ' <div class="fs-modal-footer">' + ' <?php echo $anonymous_feedback_checkbox_html ?>' + ' <a href="#" class="button button-secondary button-deactivate"></a>' - + ' <a href="#" class="button button-primary button-close"><?php printf( __fs( 'deactivation-modal-button-cancel' , $slug ) ) ?></a>' + + ' <a href="#" class="button button-primary button-close"><?php _efs( 'cancel' , $slug ) ?></a>' + ' </div>' + ' </div>' + '</div>', @@ -168,6 +168,7 @@ HTML; method : 'POST', data : { 'action' : '<?php echo $fs->get_action_tag( 'submit_uninstall_reason' ) ?>', + 'slug' : '<?php echo $slug ?>', 'reason_id' : $radio.val(), 'reason_info' : userReason, 'is_anonymous': isAnonymousFeedback() diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/retry-skip.php b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/retry-skip.php index 07583a16155d67507126a3837dab3973f4294495..1e24089001019bf0233ff946bb95ea6dc777e311 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/retry-skip.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/deactivation/retry-skip.php @@ -16,7 +16,7 @@ $slug = $VARS['slug']; $fs = freemius( $slug ); - $skip_url = wp_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' ); + $skip_url = fs_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' ); $skip_text = strtolower( __fs( 'skip', $slug ) ); $use_plugin_anonymously_text = __fs( 'click-here-to-use-plugin-anonymously', $slug ); diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/license-activation.php b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/license-activation.php index efd1fde167ed6cc889068be9af048d3b41c6fcb4..88608b26a33c76e95f713e271c511af8f80385a1 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/license-activation.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/license-activation.php @@ -16,28 +16,6 @@ $slug = $VARS['slug']; $fs = freemius( $slug ); - if ($fs->is_registered()) { - // The URL to redirect to after successfully activating the license from the "Plugins" page. - if ( $fs->is_addon() ) { - $sync_license_url = $fs->get_parent_instance()->_get_sync_license_url( $fs->get_id(), true ); - } else { - $sync_license_url = $fs->_get_sync_license_url( $fs->get_id(), true ); - } - - /** - * Trigger license sync after valid license activation. - */ - $after_license_activation_url = $sync_license_url; - } - else - { - /** - * If user not yet registered, the license activation triggers - * an opt-in, which automatically sync the license. - */ - $after_license_activation_url = $fs->get_account_url(); - } - $cant_find_license_key_text = __fs( 'cant-find-license-key', $slug ); $message_above_input_field = __fs( 'activate-license-message', $slug ); $message_below_input_field = ''; @@ -61,6 +39,12 @@ $license_key_text = __fs( 'license-key' , $slug ); + /** + * IMPORTANT: + * DO NOT ADD MAXLENGTH OR LIMIT THE LICENSE KEY LENGTH SINCE + * WE DO WANT TO ALLOW INPUT OF LONGER KEYS (E.G. WooCommerce Keys) + * FOR MIGRATED MODULES. + */ $modal_content_html = <<< HTML <div class="notice notice-error inline license-activation-message"><p></p></div> <p>{$message_above_input_field}</p> @@ -86,7 +70,7 @@ HTML; + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>' + ' </div>' + ' <div class="fs-modal-footer">' - + ' <button class="button button-secondary button-close" tabindex="4"><?php _efs('deactivation-modal-button-cancel', $slug); ?></button>' + + ' <button class="button button-secondary button-close" tabindex="4"><?php _efs('cancel', $slug); ?></button>' + ' <button class="button button-primary button-activate-license" tabindex="3"><?php echo $activate_button_text; ?></button>' + ' </div>' + ' </div>' @@ -96,8 +80,7 @@ HTML; $activateLicenseButton = $modal.find('.button-activate-license'), $licenseKeyInput = $modal.find('input.license_key'), $licenseActivationMessage = $modal.find( '.license-activation-message' ), - pluginSlug = '<?php echo $slug ?>', - afterActivationUrl = '<?php echo $after_license_activation_url ?>'; + pluginSlug = '<?php echo $slug ?>'; $modal.appendTo($('body')); @@ -163,7 +146,7 @@ HTML; closeModal(); // Redirect to the "Account" page and sync the license. - window.location.href = afterActivationUrl; + window.location.href = resultObj.next_page; } else { showError( resultObj.error ); resetActivateLicenseButton(); diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/optout.php b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/optout.php new file mode 100644 index 0000000000000000000000000000000000000000..baf0e4237fabfdba68362ece31e63f51252e6347 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/optout.php @@ -0,0 +1,211 @@ +<?php + /** + * @package Freemius + * @copyright Copyright (c) 2015, Freemius, Inc. + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License + * @since 1.2.1.5 + */ + + if ( ! defined( 'ABSPATH' ) ) { + exit; + } + + /** + * @var array $VARS + */ + $slug = $VARS['slug']; + $fs = freemius( $slug ); + + $action = $fs->is_tracking_allowed() ? + 'stop_tracking' : + 'allow_tracking'; + + $plugin_title = "<strong>{$fs->get_plugin()->title}</strong>"; + $opt_out_button_text = __fs( 'opt-out', $slug ); + // @todo Change 'plugin' with module type when migrating with 1.2.2 (themes version). + $opt_out_message_appreciation = sprintf( __fs( 'opt-out-message-appreciation', $slug ), 'plugin' ); + $opt_out_message_usage_tracking = sprintf( __fs( 'opt-out-message-usage-tracking', $slug ), + $plugin_title ); + $opt_out_message_clicking_opt_out = sprintf( __fs( 'opt-out-message-clicking-opt-out', $slug ), + $plugin_title, + '<a href="http://freemius.com" target="_blank">freemius.com</a>' ); + + $admin_notice_params = array( + 'id' => '', + 'slug' => $fs->get_id(), + 'type' => 'success', + 'sticky' => false, + 'plugin' => $fs->get_plugin()->title, + 'message' => $opt_out_message_appreciation + ); + + $admin_notice_html = fs_get_template( 'admin-notice.php', $admin_notice_params ); + + $modal_content_html = <<< HTML + <h2>{$opt_out_message_appreciation}</h2> + <div class="notice notice-error inline opt-out-error-message"><p></p></div> + <p>{$opt_out_message_usage_tracking}</p> + <p>{$opt_out_message_clicking_opt_out}</p> +HTML; + + fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' ); + fs_enqueue_local_style( 'fs_common', '/admin/common.css' ); +?> +<script type="text/javascript"> +(function( $ ) { + $( document ).ready(function() { + var modalContentHtml = <?php echo json_encode( $modal_content_html ) ?>, + modalHtml = + '<div class="fs-modal fs-modal-opt-out">' + + ' <div class="fs-modal-dialog">' + + ' <div class="fs-modal-header">' + + ' <h4><?php echo $opt_out_button_text ?></h4>' + + ' </div>' + + ' <div class="fs-modal-body">' + + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>' + + ' </div>' + + ' <div class="fs-modal-footer">' + + ' <button class="button button-secondary button-opt-out" tabindex="1"><?php echo $opt_out_button_text ?></button>' + + ' <button class="button button-primary button-close" tabindex="2"><?php _efs( 'opt-out-cancel', $slug ) ?></button>' + + ' </div>' + + ' </div>' + + '</div>', + $modal = $( modalHtml ), + $adminNotice = $( <?php echo json_encode( $admin_notice_html ) ?> ), + action = '<?php echo $action ?>', + optOutActionTag = '<?php echo $fs->get_action_tag( 'stop_tracking' ) ?>', + optInActionTag = '<?php echo $fs->get_action_tag( 'allow_tracking' ) ?>', + $actionLink = $( 'span.opt-in-or-opt-out.<?php echo $VARS['slug'] ?> a' ), + $optOutButton = $modal.find( '.button-opt-out' ), + $optOutErrorMessage = $modal.find( '.opt-out-error-message' ), + pluginSlug = '<?php echo $slug ?>'; + + $actionLink.attr( 'data-action', action ); + $modal.appendTo( $( 'body' ) ); + + function registerEventHandlers() { + $actionLink.click(function( evt ) { + evt.preventDefault(); + + if ( 'stop_tracking' == $actionLink.attr( 'data-action' ) ) { + showModal(); + } else { + optIn(); + } + }); + + $modal.on( 'click', '.button-opt-out', function( evt ) { + evt.preventDefault(); + + if ( $( this ).hasClass( 'disabled' ) ) { + return; + } + + disableOptOutButton(); + optOut(); + }); + + // If the user has clicked outside the window, close the modal. + $modal.on( 'click', '.fs-close, .button-close', function() { + closeModal(); + return false; + }); + } + + registerEventHandlers(); + + function showModal() { + resetModal(); + + // Display the dialog box. + $modal.addClass( 'active' ); + $( 'body' ).addClass( 'has-fs-modal' ); + } + + function closeModal() { + $modal.removeClass( 'active' ); + $( 'body' ).removeClass( 'has-fs-modal' ); + } + + function resetOptOutButton() { + enableOptOutButton(); + $optOutButton.text( '<?php echo $opt_out_button_text; ?>' ); + } + + function resetModal() { + hideError(); + resetOptOutButton(); + } + + function optIn() { + sendRequest(); + } + + function optOut() { + sendRequest(); + } + + function sendRequest() { + $.ajax({ + url: ajaxurl, + method: 'POST', + data: { + action: ( 'stop_tracking' == action ? optOutActionTag : optInActionTag ), + slug : pluginSlug + }, + beforeSend: function() { + if ( 'opt-in' == action ) { + $actionLink.text( '<?php _efs( 'opting-in', $slug ) ?>' ) + } else { + $optOutButton.text( '<?php _efs( 'opting-out', $slug ) ?>' ); + } + }, + success: function( resultObj ) { + if ( resultObj.success ) { + if ( 'allow_tracking' == action ) { + action = 'stop_tracking'; + $actionLink.text( '<?php _efs( 'opt-out', $slug ) ?>' ); + showOptInAppreciationMessageAndScrollToTop(); + } else { + action = 'allow_tracking'; + $actionLink.text( '<?php _efs( 'opt-in', $slug ) ?>' ); + closeModal(); + + if ( $adminNotice.length > 0 ) { + $adminNotice.remove(); + } + } + + $actionLink.attr( 'data-action', action ); + } else { + showError( resultObj.error ); + resetOptOutButton(); + } + } + }); + } + + function enableOptOutButton() { + $optOutButton.removeClass( 'disabled' ); + } + + function disableOptOutButton() { + $optOutButton.addClass( 'disabled' ); + } + + function hideError() { + $optOutErrorMessage.hide(); + } + + function showOptInAppreciationMessageAndScrollToTop() { + $adminNotice.insertAfter( $( '#wpbody-content' ).find( ' > .wrap > h1' ) ); + window.scrollTo(0, 0); + } + + function showError( msg ) { + $optOutErrorMessage.find( ' > p' ).html( msg ); + $optOutErrorMessage.show(); + } + }); +})( jQuery ); +</script> diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/resend-key.php b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/resend-key.php index ade082a38de1684d9ea85ef4b2813bacabfbc4c2..ff33af2eeef4c2869a997b63d484df957bcb7b1c 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/resend-key.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/resend-key.php @@ -18,7 +18,7 @@ $message_above_input_field = __fs( 'ask-for-upgrade-email-address', $slug ); $send_button_text = __fs( 'send-license-key', $slug ); - $cancel_button_text = __fs( 'deactivation-modal-button-cancel', $slug ); + $cancel_button_text = __fs( 'cancel', $slug ); $email_address_placeholder = __fs( 'email-address', $slug ); $modal_content_html = <<< HTML diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/forms/trial-start.php b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/trial-start.php new file mode 100644 index 0000000000000000000000000000000000000000..5f9bf752bebce82fdf7b3c45676af578543acf76 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/forms/trial-start.php @@ -0,0 +1,174 @@ +<?php + /** + * @package Freemius + * @copyright Copyright (c) 2015, Freemius, Inc. + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License + * @since 1.2.0 + */ + + if ( ! defined( 'ABSPATH' ) ) { + exit; + } + + /** + * @var array $VARS + */ + $slug = $VARS['slug']; + $fs = freemius( $slug ); + + $message_header = sprintf( + __fs( 'start-trial-prompt-header', $slug ), + '<span class="var-trial_period"></span>', + '<span class="var-plan_title"></span>' + ); + $message_content = sprintf( + __fs( 'start-trial-prompt-message', $slug ), + '<a href="https://freemius.com" target="_blank">freemius.com</a>' + ); + + $modal_content_html = <<< HTML + <div class="notice notice-error inline"><p></p></div> + <h3>{$message_header}</h3> + <p>{$message_content}</p> +HTML; + + fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' ); +?> +<script type="text/javascript"> + (function ($) { + $(document).ready(function () { + var modalContentHtml = <?php echo json_encode( $modal_content_html ); ?>, + modalHtml = + '<div class="fs-modal fs-modal-license-key-resend">' + + ' <div class="fs-modal-dialog">' + + ' <div class="fs-modal-header">' + + ' <h4><?php _efs( 'start-free-trial' ) ?></h4>' + + ' </div>' + + ' <div class="fs-modal-body">' + modalContentHtml + '</div>' + + ' <div class="fs-modal-footer">' + + ' <button class="button button-secondary button-close">' + <?php echo json_encode( __fs( 'cancel', $slug ) ) ?> +'</button>' + + ' <button class="button button-primary button-connect">' + <?php echo json_encode( __fs( 'approve-start-trial', $slug ) ) ?> +'</button>' + + ' </div>' + + ' </div>' + + '</div>', + $modal = $(modalHtml), + moduleSlug = '<?php echo $slug; ?>', + trialData; + + $modal.appendTo($('body')); + + var $errorNotice = $modal.find('.notice-error'); + + registerEventHandlers(); + + function registerEventHandlers() { + $modal.on('click', '.button-close', function () { + closeModal(); + return false; + }); + + $modal.on('click', '.button-connect', function (evt) { + evt.preventDefault(); + + var $button = $(this); + + $.ajax({ + url : ajaxurl, + method : 'POST', + data : { + action : '<?php echo $fs->get_action_tag( 'start_trial' ) ?>', + security: '<?php echo wp_create_nonce( $fs->get_action_tag( 'start_trial' ) ) ?>', + slug : moduleSlug, + trial : trialData + }, + beforeSend: function () { + // Disable all buttons during trial activation. + $modal.find('.button').prop('disabled', true); + + $button.text('<?php _efs( 'starting-trial', $slug ) ?>...'); + + setLoadingMode(); + }, + success : function (resultObj) { + if (resultObj.success) { + $button.text('<?php _efs( 'please-wait', $slug ) ?>...'); + + // Redirect to the "Account" page and sync the license. + window.location.href = resultObj.data.next_page; + } else { + $button.text(<?php json_encode( __fs( 'approve-start-trial', $slug ) ) ?>); + + resetLoadingMode(); + showError(resultObj.error); + } + } + }); + }); + } + + window.openTrialConfirmationModal = function showModal(data) { + resetModal(); + + // Display the dialog box. + $modal.addClass('active'); + + trialData = data; + + var $modalBody = $modal.find('.fs-modal-body'), + $var; + + for (var key in data) { + if (data.hasOwnProperty(key)) { + $var = $modalBody.find('.var-' + key); + + if ($var.length > 0) + $var.html(data[key]); + } + } + + $('body').addClass('has-fs-modal'); + }; + + function closeModal() { + $modal.removeClass('active'); + + $('body').removeClass('has-fs-modal'); + } + + function resetModal() { + hideError(); + } + + function hideError() { + $errorNotice.hide(); + } + + function setLoadingMode() { + $modal.find('.button') + // Re-enable all buttons. + .prop('disabled', trialData) + // Stop loading cursor. + .css({'cursor': 'wait'}); + + // Stop loading cursor. + $(document.body).css({'cursor': 'wait'}); + } + + function resetLoadingMode() { + $modal.find('.button') + // Re-enable all buttons. + .prop('disabled', false) + // Stop loading cursor. + .css({'cursor': 'initial'}); + + // Stop loading cursor. + $(document.body).css({'cursor': 'initial'}); + } + + function showError(msg) { + $errorNotice.find(' > p').html(msg); + $errorNotice.show(); + } + }); + })(jQuery); +</script> diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/plugin-icon.php b/wp-content/plugins/nextgen-gallery/freemius/templates/plugin-icon.php index 9bc70cfd35a66d9b016924a31e11f508447444e5..ee24f1b03b62692faf448c12045e46be3f4a105d 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/plugin-icon.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/plugin-icon.php @@ -29,9 +29,15 @@ $img_dir = WP_FS__DIR_IMG; if ( 1 < count( $fs_active_plugins->plugins ) ) { + $plugin_or_theme_img_dir = WP_PLUGIN_DIR; + foreach ( $fs_active_plugins->plugins as $sdk_path => &$data ) { if ( $data->plugin_path == $fs->get_plugin_basename() ) { - $img_dir = WP_PLUGIN_DIR . '/' . $sdk_path . '/assets/img'; + $img_dir = $plugin_or_theme_img_dir + . '/' + . str_replace( '../themes/', '', $sdk_path ) + . '/assets/img'; + break; } } @@ -39,9 +45,10 @@ $icons = glob( fs_normalize_path( $img_dir . '/' . $slug . '.*' ) ); if ( ! is_array( $icons ) || 0 === count( $icons ) ) { - $icon_found = false; - $local_path = fs_normalize_path( $img_dir . '/' . $slug . '.png' ); - $have_write_permissions = is_writable( fs_normalize_path( $img_dir ) ); + $icon_found = false; + $local_path = fs_normalize_path( $img_dir . '/' . $slug . '.png' ); + + $have_write_permissions = ( 'direct' === get_filesystem_method( array(), fs_normalize_path( $img_dir ) ) ); if ( WP_FS__IS_LOCALHOST && $fs->is_org_repo_compliant() && $have_write_permissions ) { /** @@ -52,24 +59,48 @@ * already exist in the assets folder when the plugin is deployed to * the repository. */ - $suffixes = array( - '-128x128.png', - '-128x128.jpg', - '-256x256.png', - '-256x256.jpg', - '.svg', - ); - - $base_url = 'https://plugins.svn.wordpress.org/' . $slug . '/assets/icon'; - - foreach ( $suffixes as $s ) { - $headers = get_headers( $base_url . $s ); - if ( strpos( $headers[0], '200' ) ) { - $local_path = fs_normalize_path( $img_dir . '/' . $slug . '.' . substr( $s, strpos( $s, '.' ) + 1 ) ); - fs_download_image( $base_url . $s, $local_path ); - $icon_found = true; - break; + if ( ! function_exists( 'plugins_api' ) ) { + require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); + } + + $plugin_information = plugins_api( 'plugin_information', array( + 'slug' => $slug, + 'fields' => array( + 'sections' => false, + 'tags' => false, + 'icons' => true + ) + ) ); + + if ( + ! is_wp_error( $plugin_information ) + && isset( $plugin_information->icons ) + && ! empty( $plugin_information->icons ) + ) { + /** + * Get the smallest icon. + * + * @author Leo Fajardo (@leorw) + * @since 1.2.2 + */ + $icon = end( $plugin_information->icons ); + + if ( 0 !== strpos( $icon, 'http' ) ) { + $icon = 'http:' . $icon; } + + /** + * Get a clean file extension, e.g.: "jpg" and not "jpg?rev=1305765". + * + * @author Leo Fajardo (@leorw) + * @since 1.2.2 + */ + $ext = pathinfo( strtok( $icon, '?' ), PATHINFO_EXTENSION ); + + $local_path = fs_normalize_path( $img_dir . '/' . $slug . '.' . $ext ); + fs_download_image( $icon, $local_path ); + + $icon_found = true; } } @@ -92,5 +123,5 @@ $relative_url = fs_img_url( substr( $icons[0], strlen( $icon_dir ) ), $icon_dir ); ?> <div class="fs-plugin-icon"> - <img src="<?php echo $relative_url ?>" width="80" height="80" /> -</div> \ No newline at end of file + <img src="<?php echo $relative_url ?>" width="80" height="80"/> +</div> diff --git a/wp-content/plugins/nextgen-gallery/freemius/templates/pricing.php b/wp-content/plugins/nextgen-gallery/freemius/templates/pricing.php index 0f4fe3c2425fc6a5e8f9fbc3298a0d5f543e7e4d..8d17e9f2519b37d13e9b0485574f8f30c5545e1c 100644 --- a/wp-content/plugins/nextgen-gallery/freemius/templates/pricing.php +++ b/wp-content/plugins/nextgen-gallery/freemius/templates/pricing.php @@ -35,6 +35,8 @@ $timestamp, 'upgrade' ) ); + } else { + $context_params['home_url'] = home_url(); } if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.) @@ -53,7 +55,12 @@ 'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ), ) ); ?> - + <?php if ( ! $fs->is_registered() ) { + $template_data = array( + 'slug' => $slug, + ); + fs_require_template( 'forms/trial-start.php', $template_data); + } ?> <div id="fs_pricing" class="wrap" style="margin: 0 0 -65px -20px;"> <div id="iframe"></div> <form action="" method="POST"> @@ -69,16 +76,16 @@ (function ($, undef) { $(function () { var - // Keep track of the iframe height. - iframe_height = 800, - base_url = '<?php echo WP_FS__ADDRESS ?>', - // Pass the parent page URL into the Iframe in a meaningful way (this URL could be - // passed via query string or hard coded into the child page, it depends on your needs). - src = base_url + '/pricing/?<?php echo http_build_query($query_params) ?>#' + encodeURIComponent(document.location.href), + // Keep track of the iframe height. + iframe_height = 800, + base_url = '<?php echo WP_FS__ADDRESS ?>', + // Pass the parent page URL into the Iframe in a meaningful way (this URL could be + // passed via query string or hard coded into the child page, it depends on your needs). + src = base_url + '/pricing/?<?php echo http_build_query( $query_params ) ?>#' + encodeURIComponent(document.location.href), - // Append the Iframe into the DOM. - iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>') - .appendTo('#iframe'); + // Append the Iframe into the DOM. + iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>') + .appendTo('#iframe'); FS.PostMessage.init(base_url); @@ -96,6 +103,10 @@ scrollTop: $(document).scrollTop() }, iframe[0]); }); + + FS.PostMessage.receive('start_trial', function (data) { + openTrialConfirmationModal(data); + }); }); })(jQuery); </script> diff --git a/wp-content/plugins/nextgen-gallery/nggallery.php b/wp-content/plugins/nextgen-gallery/nggallery.php index 1e3718887f1fa401247a8340d0016d99b3a91ebb..da9a84ea55d814ea15d821476a76f532d279a597 100644 --- a/wp-content/plugins/nextgen-gallery/nggallery.php +++ b/wp-content/plugins/nextgen-gallery/nggallery.php @@ -3,8 +3,8 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You /** * Plugin Name: NextGEN Gallery - * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 16.5 million downloads. - * Version: 2.1.79 + * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 17 million downloads. + * Version: 2.2.3 * Author: Imagely * Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/ * Author URI: https://www.imagely.com @@ -60,7 +60,7 @@ if (!function_exists('nextgen_esc_url')) { } /** - * NextGEN Gallery is built on top of the Photocrati Pope Framework: + * NextGEN Gallery is built on top of the Pope Framework: * https://bitbucket.org/photocrati/pope-framework * * Pope constructs applications by assembling modules. @@ -160,7 +160,7 @@ class C_NextGEN_Bootstrap function is_activating() { - $retval = strpos($_SERVER['REQUEST_URI'], 'plugins.php') !== FALSE && isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('activate', 'activate-selected')); + $retval = strpos($_SERVER['REQUEST_URI'], 'plugins.php') !== FALSE && isset($_REQUEST['action']) && in_array($_REQUEST['action'], array('activate-selected')); if (!$retval && strpos($_SERVER['REQUEST_URI'], 'update.php') !== FALSE && isset($_REQUEST['action']) && $_REQUEST['action'] == 'install-plugin' && isset($_REQUEST['plugin']) && strpos($_REQUEST['plugin'], 'nextgen-gallery') === 0) { $retval = TRUE; @@ -209,6 +209,7 @@ class C_NextGEN_Bootstrap // If a plugin wasn't activated/deactivated siliently, we can listen for these things if (did_action('activate_plugin') || did_action('deactivate_plugin')) return; else if (strpos($_SERVER['REQUEST_URI'], 'plugins') !== FALSE) return; + else if (!$this->is_page_request()) return; $plugins = get_option('active_plugins'); @@ -389,7 +390,7 @@ class C_NextGEN_Bootstrap } // Update modules - add_action('init', array(&$this, 'update'), PHP_INT_MAX-1); + add_action('init', array(&$this, 'update'), PHP_INT_MAX-2); // Start the plugin! add_action('init', array(&$this, 'route'), 11); @@ -606,6 +607,11 @@ class C_NextGEN_Bootstrap } } + function is_page_request() + { + return !(defined('DOING_AJAX') && DOING_AJAX) && !(defined('DOING_CRON') && DOING_CRON) && !(defined('NGG_AJAX_SLUG') && strpos($_SERVER['REQUEST_URI'], NGG_AJAX_SLUG) !== FALSE); + } + /** * Run the uninstaller */ @@ -631,7 +637,7 @@ class C_NextGEN_Bootstrap define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products')); define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules')); define('NGG_PLUGIN_STARTED_AT', microtime()); - define('NGG_PLUGIN_VERSION', '2.1.79'); + define('NGG_PLUGIN_VERSION', '2.2.3'); if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax())); diff --git a/wp-content/plugins/nextgen-gallery/non_pope/class.nextgen_settings.php b/wp-content/plugins/nextgen-gallery/non_pope/class.nextgen_settings.php index 42a9be7a2d0c956736e69b99a8fe17a5cb18e70b..2d2ad1f38261c7831d656eacbb1870b031ea8c77 100644 --- a/wp-content/plugins/nextgen-gallery/non_pope/class.nextgen_settings.php +++ b/wp-content/plugins/nextgen-gallery/non_pope/class.nextgen_settings.php @@ -3,6 +3,9 @@ if (!class_exists('C_NextGen_Settings')) { class C_NextGen_Settings { + /** + * @return C_NextGen_Settings + */ static function get_instance() { return C_Photocrati_Settings_Manager::get_instance(); diff --git a/wp-content/plugins/nextgen-gallery/pope/lib/class.base_module.php b/wp-content/plugins/nextgen-gallery/pope/lib/class.base_module.php index 39a4392617081a68c79efbddcdcde3ff8fa7ad5e..fc867fbbdf36ed3801881adec6edb419c0695e17 100755 --- a/wp-content/plugins/nextgen-gallery/pope/lib/class.base_module.php +++ b/wp-content/plugins/nextgen-gallery/pope/lib/class.base_module.php @@ -63,7 +63,10 @@ abstract class C_Base_Module function load() { - @include_once($this->get_package_abspath()); + // Package files may not exist until releases are built + $path = $this->get_package_abspath(); + if (@file_exists($path)) + @include_once($path); $this->_register_utilities(); $this->_register_adapters(); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/module.ajax.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/module.ajax.php index 5c073ed1d0640cd5c138107d60e7578c821d3432..2c2b0858e036b0be0f174e83ee7832e56d305a3d 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/module.ajax.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ajax/module.ajax.php @@ -4,15 +4,22 @@ define('NGG_AJAX_SLUG', 'photocrati_ajax'); class M_Ajax extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-ajax', 'AJAX', 'Provides AJAX functionality', '0.10', - 'https://www.imagely.com', - 'Photocrati Media', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', 'https://www.imagely.com' ); C_NextGen_Settings::get_instance()->add_option_handler('C_Ajax_Option_Handler', array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php index 8cc3691b7829284496424e1b3f4143e58c9fe105..574138ef2a09b89ccd70554f8f58c2648cec6cc2 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php @@ -12,16 +12,23 @@ class M_Attach_To_Post extends C_Base_Module * Defines the module * @param string|bool $context */ - function define($context=FALSE) + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-attach_to_post', 'Attach To Post', 'Provides the "Attach to Post" interface for displaying galleries and albums', '0.18', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com', $context ); @@ -95,7 +102,7 @@ class M_Attach_To_Post extends C_Base_Module function does_request_require_frame_communication() { - return (strpos($_SERVER['REQUEST_URI'], 'attach_to_post') !== FALSE OR strpos($_SERVER['HTTP_REFERER'], 'attach_to_post') !== FALSE OR array_key_exists('attach_to_post', $_REQUEST)); + return (strpos($_SERVER['REQUEST_URI'], 'attach_to_post') !== FALSE OR (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'attach_to_post') !== FALSE) OR array_key_exists('attach_to_post', $_REQUEST)); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php index 526b8e748eeadedb2c051486c72a70e1af728280..2dbf1be45bfd7623dfa431b24b475d68502218eb 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php @@ -356,7 +356,7 @@ class Mixin_Attach_To_Post extends Mixin usort($display_types, array($this->object, '_display_type_list_sort')); wp_enqueue_script('ngg_display_tab', $this->get_static_url('photocrati-attach_to_post#display_tab.js'), array('jquery', 'backbone', 'underscore.string', 'photocrati_ajax')); $this->object->mark_script('ngg_display_tab'); - wp_localize_script('ngg_display_tab', 'igw_data', array('displayed_gallery_preview_url' => $settings->gallery_preview_url, 'displayed_gallery' => $this->object->_displayed_gallery->get_entity(), 'sources' => $sources->get_all(), 'gallery_primary_key' => $gallery_mapper->get_primary_key_column(), 'galleries' => $gallery_mapper->find_all(), 'albums' => $album_mapper->find_all(), 'tags' => $tags, 'display_types' => $display_types, 'sec_token' => $security->get_request_token('nextgen_edit_displayed_gallery')->get_json(), 'image_primary_key' => $image_mapper->get_primary_key_column(), 'display_type_priority_base' => NGG_DISPLAY_PRIORITY_BASE, 'display_type_priority_step' => NGG_DISPLAY_PRIORITY_STEP, 'shortcode_ref' => isset($_REQUEST['ref']) ? doubleval($_REQUEST['ref']) : null, 'i18n' => array('sources' => __('Sources', 'nggallery'), 'optional' => __('(optional)', 'nggallery'), 'slug_tooltip' => __('Sets an SEO-friendly name to this gallery for URLs. Currently only in use by the Pro Lightbox', 'nggallery'), 'slug_label' => __('Slug', 'nggallery'), 'no_entities' => __('No entities to display for this source', 'nggallery'), 'exclude_question' => __('Exlude?', 'nggallery'), 'select_gallery' => __('Select a gallery', 'nggallery'), 'galleries' => __('Galleries', 'nggallery'), 'albums' => __('Albums', 'nggallery')))); + wp_localize_script('ngg_display_tab', 'igw_data', array('displayed_gallery_preview_url' => $settings->gallery_preview_url, 'displayed_gallery' => $this->object->_displayed_gallery->get_entity(), 'sources' => $sources->get_all(), 'gallery_primary_key' => $gallery_mapper->get_primary_key_column(), 'galleries' => $gallery_mapper->find_all(), 'albums' => $album_mapper->find_all(), 'tags' => $tags, 'display_types' => $display_types, 'sec_token' => $security->get_request_token('nextgen_edit_displayed_gallery')->get_json(), 'image_primary_key' => $image_mapper->get_primary_key_column(), 'display_type_priority_base' => NGG_DISPLAY_PRIORITY_BASE, 'display_type_priority_step' => NGG_DISPLAY_PRIORITY_STEP, 'shortcode_ref' => isset($_REQUEST['ref']) ? floatval($_REQUEST['ref']) : null, 'i18n' => array('sources' => __('Sources', 'nggallery'), 'optional' => __('(optional)', 'nggallery'), 'slug_tooltip' => __('Sets an SEO-friendly name to this gallery for URLs. Currently only in use by the Pro Lightbox', 'nggallery'), 'slug_label' => __('Slug', 'nggallery'), 'no_entities' => __('No entities to display for this source', 'nggallery'), 'exclude_question' => __('Exlude?', 'nggallery'), 'select_gallery' => __('Select a gallery', 'nggallery'), 'galleries' => __('Galleries', 'nggallery'), 'albums' => __('Albums', 'nggallery')))); } function enqueue_backend_resources() { diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.js b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.js index b4659474b7839287511882249ec6340aab9e03c4..a39d201a93d20782aaff466dfba54d2d0e3f7284 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.js +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.js @@ -353,7 +353,9 @@ jQuery(function($){ 'exclusions', 'sortorder', '__defaults_set', - 'id_field' + 'id_field', + 'post_category', + 'ID' ]; if (skipped.indexOf(key) > -1) continue; diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.min.js b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.min.js index d8152b2dbb457ff89df50ac2257fd59485eae1ed..a7304a9b8427dfe738d63d6dff90058b8dc2380d 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.min.js +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/attach_to_post/static/display_tab.min.js @@ -1 +1 @@ -jQuery(function(e){var t={Models:{},Views:{}};t.Models.SelectableItems=Backbone.Collection.extend({selected:function(){return this.filter(function(e){return 1==e.get("selected")})},deselect_all:function(){this.each(function(e){e.set("selected",!1)})},selected_ids:function(){return _.pluck(this.selected(),"id")},select:function(e){_.isArray(e)||(e=[e]),this.each(function(t){_.indexOf(e,t.id)>=0&&t.set("selected",!0)}),this.trigger("selected")}}),t.Views.SelectTag=Backbone.View.extend({tagName:"select",collection:null,multiple:!1,value_field:"id",text_field:"title",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.collection.on("add",this.render_new_option,this),this.collection.on("remove",this.remove_existing_option,this),this.collection.on("reset",this.empty_list,this)},events:{change:"selection_changed"},empty_list:function(){this.$el.empty()},render_new_option:function(e){this.$el.append(new this.Option({model:e,value_field:this.value_field,text_field:this.text_field}).render().el)},remove_existing_option:function(e){this.$el.find("option[value='"+e.id+"']").remove()},selection_changed:function(){var t=_.map(this.$el.find(":selected"),function(t){return e(t).val()});this.collection.each(function(e){_.indexOf(t,e.id)>=0||_.indexOf(t,e.id.toString())>=0?e.set("selected",!0):e.set("selected",!1)}),this.collection.trigger("selected")},render:function(){return this.$el.empty(),this.options.include_blank&&this.$el.append("<option></option>"),this.collection.each(function(e){var t=new this.Option({model:e,value_field:this.value_field,text_field:this.text_field});this.$el.append(t.render().el)},this),this.multiple&&this.$el.prop("multiple",!0).attr("multiple","multiple"),this.width&&this.$el.width(this.width),this},Option:Backbone.View.extend({tagName:"option",model:null,initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.model.on("change",this.render,this)},render:function(){var e=this;return this.$el.html(this.model.get(this.text_field).replace(/\\&/g,"&").replace(/\\'/g,"'")),this.$el.prop({value:"id"==this.value_field?this.model.id:this.model.get(this.value_field)}),1==e.model.get("selected")&&this.$el.prop("selected",!0).attr("selected","selected"),this}})}),t.Views.Chosen=Backbone.View.extend({tagName:"span",initialize:function(e){this.options=e||{},this.collection=this.options.collection,this.options.include_blank=!0,this.select_tag=new t.Views.SelectTag(this.options),this.collection.on("change",this.selection_changed,this)},selection_changed:function(e){_.isUndefined(e.changed.selected)&&this.render()},render:function(){if(this.$el.append(this.select_tag.render().$el),this.options.width&&this.select_tag.$el.width(this.options.width),this.select2_opts={placeholder:this.options.placeholder},0==this.$el.parent().length){e("body").append(this.$el),this.select_tag.$el.select2(this.select2_opts);var t=this.select_tag.$el.select2("container").detach();this.$el.append(t),this.$el.detach()}else this.select_tag.$el.select2(this.select2_opts);if(this.options.multiple){var i=[];_.each(this.collection.selected_ids(),function(e){i.push(e.toString())}),0==i.length&&(i=""),this.select_tag.$el.select2("val",i)}return this.$el.find(".select2-input").width(this.options.width-20),this}}),t.DisplayTab={Models:{},Views:{},App:{}},t.Models.Remote_Collection=t.Models.SelectableItems.extend({fetch_limit:5e3,in_progress:!1,fetch_url:photocrati_ajax.url,action:"",extra_data:{},_create_request:function(e,t){var i=_.extend({},igw_data.sec_token,{action:this.action,limit:e?e:this.fetch_limit,offset:t?t:0});for(var s in this.extra_data){var l=this.extra_data[s];"undefined"==typeof i[s]&&(i[s]={}),"undefined"!=typeof l.toJSON&&(l=l.toJSON()),i[s]=_.extend(i[s],l)}return i},_add_item:function(e){this.push(e)},fetch:function(t,i){var s=this;this.in_progress=!0,e.post(this.fetch_url,this._create_request(t,i),function(e){"undefined"!=typeof _&&(_.isObject(e)||(e=JSON.parse(e)),e.items&&(_.each(e.items,function(e){s._add_item(e)}),e.total>=e.limit+e.offset?s.fetch(e.limit,e.offset+e.limit):(s.in_progress=!1,s.trigger("finished_fetching"))))})}}),t.DisplayTab.Models.Displayed_Gallery=Backbone.Model.extend({defaults:{source:null,container_ids:[],entity_ids:[],display_type:null,display_settings:{},exclusions:[],sortorder:[],slug:null},to_shortcode:function(){retval=null;var e=function(e,t){var i=e[t];if(_.isArray(i)&&(i=i.length>0?i.join(","):null),i)return i=i.toString().replace("[","["),i=i.toString().replace("]","]"),t+'="'+i+'"'},i=t.DisplayTab.instance.display_types.find_by_name_or_alias(this.get("display_type")),s=this.toJSON();s.display_type=i.get_shortcode_value();var l="[ngg_images",n=null;(n=e(s,"source"))&&(l+=" "+n),(n=e(s,"container_ids"))&&(l+=" "+n),(n=e(s,"entity_ids"))&&(l+=" "+n),(n=e(s,"exclusions"))&&(l+=" "+n),(n=e(s,"sortorder"))&&(l+=" "+n);for(var a in s){var o=["source","container_ids","entity_ids","exclusions","sortorder","__defaults_set","id_field"];if(!(o.indexOf(a)>-1))if("display_settings"==a)for(var r in s[a])(n=e(s[a],r))&&(l+=" "+n);else n=e(s,a),n&&(l+=" "+n)}return l+="]"}}),t.DisplayTab.Models.Source=Backbone.Model.extend({idAttribute:"name",defaults:{title:"",name:"",selected:!1}}),t.DisplayTab.Models.Source_Collection=t.Models.SelectableItems.extend({model:t.DisplayTab.Models.Source,selected_value:function(){var e=null,t=this.selected();return t.length>0&&(e=t[0].get("name")),e},find_by_name_or_alias:function(e){return this.find(function(t){return t.get("name")==e||_.isArray(t.get("aliases"))&&t.get("aliases").indexOf(e)>-1})}}),t.DisplayTab.Models.Gallery=Backbone.Model.extend({idAttribute:igw_data.gallery_primary_key,defaults:{title:"",name:""}}),t.DisplayTab.Models.Gallery_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Gallery,action:"get_existing_galleries"}),t.DisplayTab.Models.Album=Backbone.Model.extend({defaults:{title:"",name:""}}),t.DisplayTab.Models.Album_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Album,action:"get_existing_albums"}),t.DisplayTab.Models.Tag=Backbone.Model.extend({defaults:{title:""}}),t.DisplayTab.Models.Tag_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Tag,action:"get_existing_image_tags"}),t.DisplayTab.Models.Display_Type=Backbone.Model.extend({idAttribute:"name",defaults:{title:""},is_compatible_with_source:function(e){var t=!0;for(index in e.get("returns")){var i=e.get("returns")[index];if(_.indexOf(this.get("entity_types"),i)<0){t=!1;break}}return t},get_shortcode_value:function(){var e=this.id;return e}}),t.DisplayTab.Models.Display_Type_Collection=t.Models.SelectableItems.extend({model:t.DisplayTab.Models.Display_Type,selected_value:function(){var e=null,t=this.selected();return t.length>0?t[0].get("name"):e},find_by_name_or_alias:function(e){return this.find(function(t){return t.get("name")==e||_.isArray(t.get("aliases"))&&t.get("aliases").indexOf(e)>-1})}}),t.DisplayTab.Models.Entity=Backbone.Model.extend({entity_id:function(){return this.get(this.get("id_field"))},is_excluded:function(){return current_value=this.get("exclude"),!_.isUndefined(current_value)&&(_.isBoolean(current_value)?current_value:0!=parseInt(current_value))},is_included:function(){return!this.is_excluded()},is_gallery:function(){return retval=!1,1==this.get("is_gallery")&&(retval=!0),retval},is_album:function(){return retval=!1,1==this.get("is_album")&&(retval=!0),retval},is_image:function(){return!this.is_album()&&!this.is_gallery()},alttext:function(){return this.is_image()?this.get("alttext"):this.is_gallery()?this.get("title"):this.is_album()?this.get("name"):void 0}}),t.DisplayTab.Models.Entity_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Entity,action:"get_displayed_gallery_entities",_add_item:function(e){e.exclude=1==parseInt(e.exclude),e.is_gallery=1==parseInt(e.is_gallery),e.is_album=1==parseInt(e.is_album),this.push(e)},entity_ids:function(){return this.map(function(e){return e.entity_id()})},included_ids:function(){return _.compact(this.map(function(e){if(e.is_included())return e.entity_id()}))},excluded_ids:function(){return _.compact(this.map(function(e){if(!e.is_included())return e.entity_id()}))}}),t.DisplayTab.Models.SortOrder=Backbone.Model.extend({}),t.DisplayTab.Models.SortOrder_Options=t.Models.SelectableItems.extend({model:t.DisplayTab.Models.SortOrder}),t.DisplayTab.Models.SortDirection=Backbone.Model.extend({}),t.DisplayTab.Models.SortDirection_Options=Backbone.Collection.extend({model:t.DisplayTab.Models.SortDirection}),t.DisplayTab.Models.Slug=Backbone.Model.extend({}),t.DisplayTab.Views.Source_Config=Backbone.View.extend({el:"#source_configuration",selected_view:null,initialize:function(){this.sources=t.DisplayTab.instance.sources,this.sources.on("selected",this.render,this),_.bindAll(this,"render"),this.render()},render:function(){var e=new t.Views.Chosen({id:"source_select",collection:this.sources,placeholder:"Select a source",width:500}),i=_.template('<tr><td><label><%- sources %></label></td><td id="source_column"></td></tr>');this.$el.html(i(igw_data.i18n)),this.$el.find("#source_column").append(e.render().el);var s=this.sources.selected();if(s.length){var l=_.str.capitalize(s.pop().id)+"Source";if("undefined"!=typeof t.DisplayTab.Views[l]){var n=new t.DisplayTab.Views[l];this.$el.append(n.render().el)}}return this}}),t.DisplayTab.Views.Slug_Config=Backbone.View.extend({el:"#slug_configuration",selected_view:null,initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.slug=t.DisplayTab.instance.displayed_gallery.get("slug"),this.render()},render:function(){var t=this,i=e("<input>").prop({type:"text",name:"slug",value:this.slug,placeholder:igw_data.i18n.optional,id:"field_slug"});i.on("input",function(){e(this).val(e(this).val().replace(/\s|\?|\\|\/|&|=|\[|]|#/gm,"-")),t.displayed_gallery.set("slug",e(this).val())}),i.on("change",function(){e(this).val(e(this).val().replace(/^-*/gm,"").replace(/-*$/gm,"")),t.displayed_gallery.set("slug",e(this).val())});var s=_.template('<tr><td id="slug_label"><label for="field_slug" class="tooltip" title="<%- slug_tooltip %><"><<%- slug_label %></label></td><td id="slug_column"></td></tr>');return this.$el.append(s(igw_data.i18n)),this.$el.find("#slug_column").append(i),this}}),t.DisplayTab.Views.Display_Type_Selector=Backbone.View.extend({el:"#display_type_selector",initialize:function(){this.display_types=t.DisplayTab.instance.display_types,this.display_type_order_base=t.DisplayTab.instance.display_type_order_base,this.display_type_order_step=t.DisplayTab.instance.display_type_order_step,this.sources=t.DisplayTab.instance.sources,this.render()},selection_changed:function(t){var i=null;if(this.display_types.each(function(e){e.get("name")==t?(i=e,e.set("selected",!0)):e.set("selected",!1)}),i){var s=this.sources.selected_value(),l=i.get("default_source");l&&s!=l&&(l=this.sources.where({name:l}),l.length>0&&(l=l[0],this.sources.deselect_all(),this.sources.select(l.id)))}e(".display_settings_form").each(function(){$this=e(this),$this.attr("rel")==t?$this.removeClass("hidden"):$this.addClass("hidden")})},render:function(){var t=this.sources.selected(),i=0;t=t.length>0&&t[0],this.$el.empty();var s=this.display_type_order_base,l=this.display_type_order_step;return this.display_types.each(function(n){if(t&&!n.is_compatible_with_source(t)){var a=e("#display_type_tab_content:visible");if(0==a.length)return;if("hidden"==a.css("visibility"))return}var o=new this.DisplayType;o.model=n,o.on("selected",this.selection_changed,this),this.display_types.selected_value()||(n.set("selected",!0),this.selection_changed(n.id));var r=n.get("view_order");r||(r=s);var d=Math.floor(r/l);i>0&&d>i&&this.$el.append('<li class="clear" style="height: 10px" />'),i=d,this.$el.append(o.render().el)},this),this},DisplayType:Backbone.View.extend({className:"display_type_preview",events:{click:"clicked"},clicked:function(e){this.trigger("selected",this.model.get("name"))},render:function(){var t=e('<label style="display: block; cursor: pointer;"/>').addClass("image_container"),i=this.model.get("installed_at_version"),s=photocrati_ajax.wp_plugins_url,l=this.model.get("preview_image_relpath");"undefined"==typeof i&&(s=photocrati_ajax.wp_site_url,s=s.replace(/(.*)\/index\.php$/i,"$1"),0==l.indexOf("/nextgen-gallery")&&(s=photocrati_ajax.wp_plugins_url));var n=e("<img/>").attr({src:s+"/"+l,title:this.model.get("title"),alt:this.model.get("alt")}),a=e("<div/>"),o=e("<input/>").prop({type:"radio",value:this.model.get("name"),title:this.model.get("title"),name:"display_type",checked:this.model.get("selected")});return t.append(a),t.append(n),a.append(o),a.append(this.model.get("title")),this.$el.append(t),this}})}),t.DisplayTab.Views.Preview_Area=Backbone.View.extend({el:"#preview_area",initialize:function(){this.entities=t.DisplayTab.instance.entities,this.sources=t.DisplayTab.instance.sources,this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.entity_list=e("<ul/>").attr("id","entity_list").append('<li class="clear"/>'),this.entities.on("add",this.render_entity,this),this.entities.on("remove",this.remove_entity,this),this.entities.on("reset",this.entities_reset,this),this.entities.on("change:sortorder",function(e){this.entities.remove(e,{silent:!0}),this.entities.add(e,{at:e.changed.sortorder,silent:!0}),this.displayed_gallery.set("sortorder",this.entities.entity_ids()),"undefined"!=typeof console&&"undefined"!=typeof console.log&&console.log(this.entities.entity_ids()),this.displayed_gallery.set("order_by","sortorder")},this),this.sources.on("selected",this.render,this),this.render()},events:{opened:"entities_reset"},entities_reset:function(e){this.entities.reset(null,{silent:!0}),this.entity_list.empty().append('<li class="clear"/>'),this.entities.in_progress||this.entities.fetch()},render_entity:function(e){var t=new this.EntityElement({model:e});this.entity_list.find(".clear").before(t.render().$el),t.$el.css("visibility","hidden"),setTimeout(function(){t.$el.css("visibility","visible")},0),1==this.$el.find(".no_entities").length?this.render():this.entities.length>1&&this.entity_list.sortable("refresh")},remove_entity:function(e){var t=this.id=e.get("id_field")+"_"+e.entity_id();this.entity_list.find("#"+t).remove();this.entity_list.sortable("refresh"),0==this.entities.length&&this.render_no_images_notice()},render_no_images_notice:function(){this.$el.empty(),this.$el.append("<p class='no_entities'>"+igw_data.i18n.no_entities+"</p>")},render:function(){return this.$el.empty(),this.entities.length>0&&this.displayed_gallery.get("container_ids").length>0?(this.$el.append(new this.RefreshButton({entities:this.entities}).render().el),this.$el.append(new this.SortButtons({entities:this.entities,displayed_gallery:this.displayed_gallery,sources:this.sources}).render().el),this.$el.append(new this.ExcludeButtons({entities:this.entities}).render().el),this.$el.append(this.entity_list),this.entity_list.sortable({placeholder:"placeholder",forcePlaceholderSize:!0,containment:"parent",opacity:.7,revert:!0,dropOnEmpty:!0,start:function(e,t){return t.placeholder.css({height:t.item.height()}),!0},stop:function(e,t){t.item.trigger("drop",t.item.index())}}),this.entity_list.disableSelection()):this.render_no_images_notice(),this},RefreshButton:Backbone.View.extend({className:"refresh_button",tagName:"input",label:"Refresh",events:{click:"clicked"},clicked:function(){this.entities.reset()},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},render:function(){return this.$el.attr({value:this.label,type:"button"}),this}}),ExcludeButtons:Backbone.View.extend({className:"header_row",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},render:function(){this.$el.empty(),this.$el.append("<strong>Exclude:</strong>");var e=new this.Button({value:!0,text:"All",entities:this.entities});this.$el.append(e.render().el),this.$el.append('<span class="separator">|</span>');var t=new this.Button({value:!1,text:"None",entities:this.entities});return this.$el.append(t.render().el),this},Button:Backbone.View.extend({tagName:"a",value:1,text:"",events:{click:"clicked"},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},clicked:function(e){e.preventDefault(),this.entities.each(function(e){e.set("exclude",this.value)},this)},render:function(){return this.$el.text(this.text).attr("href","#"),this}})}),SortButtons:Backbone.View.extend({className:"header_row",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.sortorder_options=new t.DisplayTab.Models.SortOrder_Options,this.sortorder_options.on("change:selected",this.sortoption_changed,this),this.sortdirection_options=new t.DisplayTab.Models.SortDirection_Options([{value:"ASC",title:"Ascending",selected:"ASC"==this.displayed_gallery.get("order_direction")},{value:"DESC",title:"Descending",selected:"DESC"==this.displayed_gallery.get("order_direction")}]),this.sortdirection_options.on("change:selected",this.sortdirection_changed,this),this.displayed_gallery.on("change:order_by",this.displayed_gallery_order_changed,this),this.displayed_gallery.on("change.order_direction",this.displayed_gallery_order_dir_changed,this)},populate_sorting_fields:function(){var e=this.sources.selected().pop().get("returns");_.indexOf(e,"image")!==-1?this.fill_image_sortorder_options():this.fill_gallery_sortorder_options()},create_sortorder_option:function(e,i){return new t.DisplayTab.Models.SortOrder({name:e,title:i,value:e,selected:this.displayed_gallery.get("order_by")==e})},fill_image_sortorder_options:function(){this.sortorder_options.reset(),this.sortorder_options.push(this.create_sortorder_option("","None")),this.sortorder_options.push(this.create_sortorder_option("sortorder","Custom")),this.sortorder_options.push(this.create_sortorder_option(t.DisplayTab.instance.image_key,"Image ID")),this.sortorder_options.push(this.create_sortorder_option("filename","Filename")),this.sortorder_options.push(this.create_sortorder_option("alttext","Alt/Title Text")),this.sortorder_options.push(this.create_sortorder_option("imagedate","Date/Time"))},fill_gallery_sortorder_options:function(){this.sortorder_options.reset(),this.sortorder_options.push(this.create_sortorder_option("","None")),this.sortorder_options.push(this.create_sortorder_option("sortorder","Custom")),this.sortorder_options.push(this.create_sortorder_option("name","Name")),this.sortorder_options.push(this.create_sortorder_option("galdesc","Description"))},displayed_gallery_order_changed:function(e){this.sortorder_options.findWhere({value:e.get("order_by")}).set("selected",!0)},displayed_gallery_order_dir_changed:function(e){this.sortdirection_options.findWhere({value:e.get("order_direction")}).set("selected",!0)},sortoption_changed:function(t){this.sortorder_options.each(function(e){e.set("selected",t.get("value")==e.get("value"),{silent:!0})}),this.displayed_gallery.set("sortorder",[]);var i=t.get("value");0==t.get("value").length&&(i="sortorder"),this.displayed_gallery.set("order_by",i),this.entities.reset(),this.$el.find("a.sortorder").each(function(){var i=e(this);i.attr("value")==t.get("value")?i.addClass("selected"):i.removeClass("selected")})},sortdirection_changed:function(t){this.sortdirection_options.each(function(e){e.set("selected",t.get("value")==e.get("value"),{silent:!0})}),this.displayed_gallery.set("order_direction",t.get("value")),this.entities.reset(),this.$el.find("a.sortdirection").each(function(){var i=e(this);i.attr("value")==t.get("value")?i.addClass("selected"):i.removeClass("selected")})},render:function(){return this.$el.empty(),this.populate_sorting_fields(),this.$el.append("<strong>Sort By:</strong>"),this.sortorder_options.each(function(e,t){var i=new this.Button({model:e,className:"sortorder"});this.$el.append(i.render().el),this.sortorder_options.length-1>t&&this.$el.append('<span class="separator">|</span>')},this),this.$el.append('<strong style="margin-left: 30px;">Order By:</strong>'),this.sortdirection_options.each(function(e,t){var i=new this.Button({model:e,className:"sortdirection"});this.$el.append(i.render().el),this.sortdirection_options.length-1>t&&this.$el.append('<span class="separator">|</span>')},this),this},Button:Backbone.View.extend({tagName:"a",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},events:{click:"clicked"},clicked:function(e){e.preventDefault(),this.model.set("selected",!0)},render:function(){return this.$el.prop({value:this.model.get("value"),href:"#"}),this.$el.text(this.model.get("title")),this.model.get("selected")&&this.$el.addClass("selected"),this}})}),EntityElement:Backbone.View.extend({tagName:"li",events:{drop:"item_dropped"},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.initTime=(new Date).getTime(),this.model.on("change",this.render,this),0==this.model.get("sortorder")&&this.model.set("sortorder",-1,{silent:!0}),this.id=this.model.get("id_field")+"_"+this.model.entity_id()},item_dropped:function(e,i){t.DisplayTab.instance.displayed_gallery.set("order_by","sortorder"),this.model.set("sortorder",i)},render:function(){this.$el.empty();var t=e("<div/>").addClass("preview_item"),i=e("<div/>").addClass("image_container"),s=this.model.alttext().replace(/\\&/g,"&").replace(/\\'/g,"'"),l=this.initTime;i.attr({title:s,style:"background-image: url('"+this.model.get("thumb_url")+"?timestamp"+l+"')"}),this.$el.append(t).addClass("ui-state-default"),t.append(i);var n=e("<div/>").addClass("exclude_container"),a=e("<label/>");a.append(igw_data.i18n.exclude_question);var o=new this.ExcludeCheckbox({model:this.model});return a.append(o.render().el),n.append(a),t.append(n),this},ExcludeCheckbox:Backbone.View.extend({tagName:"input",events:{change:"entity_excluded"},type_set:!1,entity_excluded:function(e){this.model.set("exclude",e.target.checked)},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.model.on("change:exclude",this.render,this)},render:function(){return this.type_set||(this.$el.attr("type","checkbox"),this.type_set=!0),this.model.is_excluded()?this.$el.prop("checked",!0):this.$el.prop("checked",!1),this}})})}),t.DisplayTab.Views.GalleriesSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.galleries=t.DisplayTab.instance.galleries},render:function(){var i=new t.Views.Chosen({collection:this.galleries,placeholder:igw_data.i18n.select_gallery,multiple:!0,width:500}),s=e("<tr><td><label>"+igw_data.i18n.galleries+'</label></td><td class="galleries_column"></td></tr>');return this.$el.empty(),this.$el.append(s),this.$el.find(".galleries_column").append(i.render().el),this}}),t.DisplayTab.Views.AlbumsSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.albums=t.DisplayTab.instance.albums},render:function(){var e=new t.Views.Chosen({collection:this.albums,multiple:!0,placeholder:"Select an album",text_field:"name",width:500});return this.$el.empty(),this.$el.append("<tr><td><label>"+igw_data.i18n.albums+'</label></td><td class="albums_column"></td></tr>'),this.$el.find(".albums_column").append(e.render().el),this}}),t.DisplayTab.Views.TagsSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.tags=t.DisplayTab.instance.tags},render:function(){var e=new t.Views.Chosen({collection:this.tags,multiple:!0,placeholder:"Select a tag",text_field:"name",width:500});return this.$el.empty(),this.$el.append('<tr><td><label>Tags</label></td><td class="tags_column"></td></tr>'),this.$el.find(".tags_column").append(e.render().el),this}}),t.DisplayTab.Views.Recent_imagesSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.maximum_entity_count=t.DisplayTab.instance.displayed_gallery.get("maximum_entity_count"),this.displayed_gallery.set("container_ids",[])},render:function(){var t=this,i=e("<input/>").prop({type:"text",value:this.maximum_entity_count,name:"maximum_entity_count"});return i.change(function(){t.displayed_gallery.set("maximum_entity_count",e(this).val())}),this.$el.empty(),this.$el.append('<tr><td><label># of Images To Display</label></td><td class="recent_images_column"></td></tr>'),this.$el.find(".recent_images_column").append(i),this}}),t.DisplayTab.Views.Random_imagesSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.maximum_entity_count=t.DisplayTab.instance.displayed_gallery.get("maximum_entity_count"),this.displayed_gallery.set("container_ids",[])},render:function(){var t=this,i=e("<input/>").prop({type:"text",value:this.maximum_entity_count,name:"maximum_entity_count"});return i.change(function(){t.displayed_gallery.set("maximum_entity_count",e(this).val())}),this.$el.empty(),this.$el.append('<tr><td><label># of Images To Display</label></td><td class="random_images_column"></td></tr>'),this.$el.find(".random_images_column").append(i),this}}),t.DisplayTab.Views.SaveButton=Backbone.View.extend({el:"#save_displayed_gallery",errors_el:"#errors",displayed_gallery:null,events:{click:"clicked"},initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.entities=t.DisplayTab.instance.entities,this.render()},clicked:function(){this.set_display_settings(),insert_into_editor(this.displayed_gallery.to_shortcode(),this.displayed_gallery.id?this.displayed_gallery.id:igw_data.shortcode_ref),close_attach_to_post_window()},set_display_settings:function(){var t=this.displayed_gallery.get("display_type");if(t){var i=e("form[rel='"+t+"']"),s=function(t){var i={};return e.each(t.serializeArray(),function(e,t){for(var s=t.name.split("["),l=i,n=0;n<s.length;n++){var a=s[n].replace(/\]$/,"");l[a]||(n==s.length-1?l[a]=t.value:l[a]={}),l=l[a]}}),i}(i);this.displayed_gallery.set("display_settings",s[t])}},render:function(){return this.$el.css("z-index",1e3),this}}),t.DisplayTab.App=Backbone.View.extend({initialize:function(){if(this.displayed_gallery=new t.DisplayTab.Models.Displayed_Gallery(igw_data.displayed_gallery),this.original_displayed_gallery=new t.DisplayTab.Models.Displayed_Gallery(igw_data.displayed_gallery),this.galleries=new t.DisplayTab.Models.Gallery_Collection(igw_data.galleries),this.albums=new t.DisplayTab.Models.Album_Collection(igw_data.albums),this.tags=new t.DisplayTab.Models.Tag_Collection(igw_data.tags),this.sources=new t.DisplayTab.Models.Source_Collection(igw_data.sources),this.display_types=new t.DisplayTab.Models.Display_Type_Collection(igw_data.display_types),this.display_type_order_base=igw_data.display_type_priority_base,this.display_type_order_step=igw_data.display_type_priority_step,this.entities=new t.DisplayTab.Models.Entity_Collection,this.entities.extra_data.displayed_gallery=this.displayed_gallery,this.image_key=igw_data.image_primary_key,this.displayed_gallery.get("source")){if(this.displayed_gallery.get("source")){var e=this.sources.find_by_name_or_alias(this.displayed_gallery.get("source"));e&&e.set("selected",!0)}if(this.displayed_gallery.get("container_ids")&&_.each(this.displayed_gallery.get("container_ids"),function(e){var t=this[this.displayed_gallery.get("source")].find(function(t){return t.id==e},this);t&&t.set("selected",!0)},this),this.displayed_gallery.get("display_type")){var i=this.display_types.find_by_name_or_alias(this.displayed_gallery.get("display_type"));i&&(i.set("selected",!0),this.displayed_gallery.set("display_type",i.get("name")))}}if(collections=["galleries","albums","tags"],_.each(collections,function(e){this[e].on("selected",function(){this.update_selected_containers(e)},this)},this),this.display_types.on("change:selected",function(){this.displayed_gallery.set("display_type",this.display_types.selected_value())},this),this.sources.on("selected",function(){this.displayed_gallery.set("source",this.sources.selected_value()),this.sources.selected_value()!=this.original_displayed_gallery.get("source")?this.displayed_gallery.set("exclusions",this.entities.excluded_ids()):this.displayed_gallery.set("exclusions",this.original_displayed_gallery.get("exclusions")),"random_images"!=this.sources.selected_value()&&"recent_images"!=this.sources.selected_value()||this.displayed_gallery.set("maximum_entity_count",20),this.galleries.deselect_all(),this.albums.deselect_all(),this.tags.deselect_all();var e=this.display_types.selected(),t=this.sources.selected();e.length>0&&t.length>0&&(e=e[0],t=t[0],e.is_compatible_with_source(t)||this.display_types.deselect_all(),this.display_type_selector&&this.display_type_selector.render()),this.preview_area&&this.preview_area.render()},this),this.entities.on("change:exclude finished_fetching",function(){this.displayed_gallery.set("exclusions",this.entities.excluded_ids())},this),window.Frame_Event_Publisher){var s=this;Frame_Event_Publisher.listen_for("attach_to_post:new_gallery",function(){s.galleries.reset(),s.galleries.fetch()}),Frame_Event_Publisher.listen_for("attach_to_post:manage_galleries attach_to_post:manage_images",function(e){s.galleries.reset(),s.galleries.fetch();var t=s.sources.selected().pop();t&&(_.indexOf(t.get("returns"),"image")>=0||_.indexOf(t.get("returns"),"gallery"))&&s.entities.reset()}),Frame_Event_Publisher.listen_for("attach_to_post:manage_album",function(e){s.albums.reset(),s.albums.fetch();var t=s.sources.selected().pop();t&&_.indexOf(t.get("returns"),"album")>=0&&s.entities.reset()}),Frame_Event_Publisher.listen_for("attach_to_post:manage_tags attach_to_post:manage_images",function(e){s.tags.reset(),s.tags.fetch();var t=s.sources.selected().pop();t&&(_.indexOf(t.get("returns"),"image")>=0||_.indexOf(t.get("returns"),"gallery"))&&s.entities.reset()}),Frame_Event_Publisher.listen_for("attach_to_post:thumbnail_modified",function(e){var t=s.sources.selected().pop(),i=e.image[e.image.id_field];if(t)if(_.indexOf(t.get("returns"),"image")>=0){var l=s.entities.find(function(e){return parseInt(e.entity_id())==parseInt(i)},this);l&&l.set("thumb_url",e.image.thumb_url)}else{var n=s.entities.find(function(e){return parseInt(e.get("previewpic"))==i},this);n&&n.trigger("change")}})}},update_selected_containers:function(e){this.displayed_gallery.set("container_ids",this[e].selected_ids())},render:function(){this.display_type_selector=new t.DisplayTab.Views.Display_Type_Selector,new t.DisplayTab.Views.Source_Config,new t.DisplayTab.Views.Slug_Config,this.preview_area=new t.DisplayTab.Views.Preview_Area,new t.DisplayTab.Views.SaveButton}}),t.DisplayTab.instance=new t.DisplayTab.App,t.DisplayTab.instance.render(),window.Ngg=t,e("span.tooltip, label.tooltip").tooltip()}); \ No newline at end of file +jQuery(function(e){var t={Models:{},Views:{}};t.Models.SelectableItems=Backbone.Collection.extend({selected:function(){return this.filter(function(e){return 1==e.get("selected")})},deselect_all:function(){this.each(function(e){e.set("selected",!1)})},selected_ids:function(){return _.pluck(this.selected(),"id")},select:function(e){_.isArray(e)||(e=[e]),this.each(function(t){_.indexOf(e,t.id)>=0&&t.set("selected",!0)}),this.trigger("selected")}}),t.Views.SelectTag=Backbone.View.extend({tagName:"select",collection:null,multiple:!1,value_field:"id",text_field:"title",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.collection.on("add",this.render_new_option,this),this.collection.on("remove",this.remove_existing_option,this),this.collection.on("reset",this.empty_list,this)},events:{change:"selection_changed"},empty_list:function(){this.$el.empty()},render_new_option:function(e){this.$el.append(new this.Option({model:e,value_field:this.value_field,text_field:this.text_field}).render().el)},remove_existing_option:function(e){this.$el.find("option[value='"+e.id+"']").remove()},selection_changed:function(){var t=_.map(this.$el.find(":selected"),function(t){return e(t).val()});this.collection.each(function(e){_.indexOf(t,e.id)>=0||_.indexOf(t,e.id.toString())>=0?e.set("selected",!0):e.set("selected",!1)}),this.collection.trigger("selected")},render:function(){return this.$el.empty(),this.options.include_blank&&this.$el.append("<option></option>"),this.collection.each(function(e){var t=new this.Option({model:e,value_field:this.value_field,text_field:this.text_field});this.$el.append(t.render().el)},this),this.multiple&&this.$el.prop("multiple",!0).attr("multiple","multiple"),this.width&&this.$el.width(this.width),this},Option:Backbone.View.extend({tagName:"option",model:null,initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.model.on("change",this.render,this)},render:function(){var e=this;return this.$el.html(this.model.get(this.text_field).replace(/\\&/g,"&").replace(/\\'/g,"'")),this.$el.prop({value:"id"==this.value_field?this.model.id:this.model.get(this.value_field)}),1==e.model.get("selected")&&this.$el.prop("selected",!0).attr("selected","selected"),this}})}),t.Views.Chosen=Backbone.View.extend({tagName:"span",initialize:function(e){this.options=e||{},this.collection=this.options.collection,this.options.include_blank=!0,this.select_tag=new t.Views.SelectTag(this.options),this.collection.on("change",this.selection_changed,this)},selection_changed:function(e){_.isUndefined(e.changed.selected)&&this.render()},render:function(){if(this.$el.append(this.select_tag.render().$el),this.options.width&&this.select_tag.$el.width(this.options.width),this.select2_opts={placeholder:this.options.placeholder},0==this.$el.parent().length){e("body").append(this.$el),this.select_tag.$el.select2(this.select2_opts);var t=this.select_tag.$el.select2("container").detach();this.$el.append(t),this.$el.detach()}else this.select_tag.$el.select2(this.select2_opts);if(this.options.multiple){var i=[];_.each(this.collection.selected_ids(),function(e){i.push(e.toString())}),0==i.length&&(i=""),this.select_tag.$el.select2("val",i)}return this.$el.find(".select2-input").width(this.options.width-20),this}}),t.DisplayTab={Models:{},Views:{},App:{}},t.Models.Remote_Collection=t.Models.SelectableItems.extend({fetch_limit:5e3,in_progress:!1,fetch_url:photocrati_ajax.url,action:"",extra_data:{},_create_request:function(e,t){var i=_.extend({},igw_data.sec_token,{action:this.action,limit:e?e:this.fetch_limit,offset:t?t:0});for(var s in this.extra_data){var l=this.extra_data[s];"undefined"==typeof i[s]&&(i[s]={}),"undefined"!=typeof l.toJSON&&(l=l.toJSON()),i[s]=_.extend(i[s],l)}return i},_add_item:function(e){this.push(e)},fetch:function(t,i){var s=this;this.in_progress=!0,e.post(this.fetch_url,this._create_request(t,i),function(e){"undefined"!=typeof _&&(_.isObject(e)||(e=JSON.parse(e)),e.items&&(_.each(e.items,function(e){s._add_item(e)}),e.total>=e.limit+e.offset?s.fetch(e.limit,e.offset+e.limit):(s.in_progress=!1,s.trigger("finished_fetching"))))})}}),t.DisplayTab.Models.Displayed_Gallery=Backbone.Model.extend({defaults:{source:null,container_ids:[],entity_ids:[],display_type:null,display_settings:{},exclusions:[],sortorder:[],slug:null},to_shortcode:function(){retval=null;var e=function(e,t){var i=e[t];if(_.isArray(i)&&(i=i.length>0?i.join(","):null),i)return i=i.toString().replace("[","["),i=i.toString().replace("]","]"),t+'="'+i+'"'},i=t.DisplayTab.instance.display_types.find_by_name_or_alias(this.get("display_type")),s=this.toJSON();s.display_type=i.get_shortcode_value();var l="[ngg_images",n=null;(n=e(s,"source"))&&(l+=" "+n),(n=e(s,"container_ids"))&&(l+=" "+n),(n=e(s,"entity_ids"))&&(l+=" "+n),(n=e(s,"exclusions"))&&(l+=" "+n),(n=e(s,"sortorder"))&&(l+=" "+n);for(var a in s){var o=["source","container_ids","entity_ids","exclusions","sortorder","__defaults_set","id_field","post_category","ID"];if(!(o.indexOf(a)>-1))if("display_settings"==a)for(var r in s[a])(n=e(s[a],r))&&(l+=" "+n);else n=e(s,a),n&&(l+=" "+n)}return l+="]"}}),t.DisplayTab.Models.Source=Backbone.Model.extend({idAttribute:"name",defaults:{title:"",name:"",selected:!1}}),t.DisplayTab.Models.Source_Collection=t.Models.SelectableItems.extend({model:t.DisplayTab.Models.Source,selected_value:function(){var e=null,t=this.selected();return t.length>0&&(e=t[0].get("name")),e},find_by_name_or_alias:function(e){return this.find(function(t){return t.get("name")==e||_.isArray(t.get("aliases"))&&t.get("aliases").indexOf(e)>-1})}}),t.DisplayTab.Models.Gallery=Backbone.Model.extend({idAttribute:igw_data.gallery_primary_key,defaults:{title:"",name:""}}),t.DisplayTab.Models.Gallery_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Gallery,action:"get_existing_galleries"}),t.DisplayTab.Models.Album=Backbone.Model.extend({defaults:{title:"",name:""}}),t.DisplayTab.Models.Album_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Album,action:"get_existing_albums"}),t.DisplayTab.Models.Tag=Backbone.Model.extend({defaults:{title:""}}),t.DisplayTab.Models.Tag_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Tag,action:"get_existing_image_tags"}),t.DisplayTab.Models.Display_Type=Backbone.Model.extend({idAttribute:"name",defaults:{title:""},is_compatible_with_source:function(e){var t=!0;for(index in e.get("returns")){var i=e.get("returns")[index];if(_.indexOf(this.get("entity_types"),i)<0){t=!1;break}}return t},get_shortcode_value:function(){var e=this.id;return e}}),t.DisplayTab.Models.Display_Type_Collection=t.Models.SelectableItems.extend({model:t.DisplayTab.Models.Display_Type,selected_value:function(){var e=null,t=this.selected();return t.length>0?t[0].get("name"):e},find_by_name_or_alias:function(e){return this.find(function(t){return t.get("name")==e||_.isArray(t.get("aliases"))&&t.get("aliases").indexOf(e)>-1})}}),t.DisplayTab.Models.Entity=Backbone.Model.extend({entity_id:function(){return this.get(this.get("id_field"))},is_excluded:function(){return current_value=this.get("exclude"),!_.isUndefined(current_value)&&(_.isBoolean(current_value)?current_value:0!=parseInt(current_value))},is_included:function(){return!this.is_excluded()},is_gallery:function(){return retval=!1,1==this.get("is_gallery")&&(retval=!0),retval},is_album:function(){return retval=!1,1==this.get("is_album")&&(retval=!0),retval},is_image:function(){return!this.is_album()&&!this.is_gallery()},alttext:function(){return this.is_image()?this.get("alttext"):this.is_gallery()?this.get("title"):this.is_album()?this.get("name"):void 0}}),t.DisplayTab.Models.Entity_Collection=t.Models.Remote_Collection.extend({model:t.DisplayTab.Models.Entity,action:"get_displayed_gallery_entities",_add_item:function(e){e.exclude=1==parseInt(e.exclude),e.is_gallery=1==parseInt(e.is_gallery),e.is_album=1==parseInt(e.is_album),this.push(e)},entity_ids:function(){return this.map(function(e){return e.entity_id()})},included_ids:function(){return _.compact(this.map(function(e){if(e.is_included())return e.entity_id()}))},excluded_ids:function(){return _.compact(this.map(function(e){if(!e.is_included())return e.entity_id()}))}}),t.DisplayTab.Models.SortOrder=Backbone.Model.extend({}),t.DisplayTab.Models.SortOrder_Options=t.Models.SelectableItems.extend({model:t.DisplayTab.Models.SortOrder}),t.DisplayTab.Models.SortDirection=Backbone.Model.extend({}),t.DisplayTab.Models.SortDirection_Options=Backbone.Collection.extend({model:t.DisplayTab.Models.SortDirection}),t.DisplayTab.Models.Slug=Backbone.Model.extend({}),t.DisplayTab.Views.Source_Config=Backbone.View.extend({el:"#source_configuration",selected_view:null,initialize:function(){this.sources=t.DisplayTab.instance.sources,this.sources.on("selected",this.render,this),_.bindAll(this,"render"),this.render()},render:function(){var e=new t.Views.Chosen({id:"source_select",collection:this.sources,placeholder:"Select a source",width:500}),i=_.template('<tr><td><label><%- sources %></label></td><td id="source_column"></td></tr>');this.$el.html(i(igw_data.i18n)),this.$el.find("#source_column").append(e.render().el);var s=this.sources.selected();if(s.length){var l=_.str.capitalize(s.pop().id)+"Source";if("undefined"!=typeof t.DisplayTab.Views[l]){var n=new t.DisplayTab.Views[l];this.$el.append(n.render().el)}}return this}}),t.DisplayTab.Views.Slug_Config=Backbone.View.extend({el:"#slug_configuration",selected_view:null,initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.slug=t.DisplayTab.instance.displayed_gallery.get("slug"),this.render()},render:function(){var t=this,i=e("<input>").prop({type:"text",name:"slug",value:this.slug,placeholder:igw_data.i18n.optional,id:"field_slug"});i.on("input",function(){e(this).val(e(this).val().replace(/\s|\?|\\|\/|&|=|\[|]|#/gm,"-")),t.displayed_gallery.set("slug",e(this).val())}),i.on("change",function(){e(this).val(e(this).val().replace(/^-*/gm,"").replace(/-*$/gm,"")),t.displayed_gallery.set("slug",e(this).val())});var s=_.template('<tr><td id="slug_label"><label for="field_slug" class="tooltip" title="<%- slug_tooltip %><"><<%- slug_label %></label></td><td id="slug_column"></td></tr>');return this.$el.append(s(igw_data.i18n)),this.$el.find("#slug_column").append(i),this}}),t.DisplayTab.Views.Display_Type_Selector=Backbone.View.extend({el:"#display_type_selector",initialize:function(){this.display_types=t.DisplayTab.instance.display_types,this.display_type_order_base=t.DisplayTab.instance.display_type_order_base,this.display_type_order_step=t.DisplayTab.instance.display_type_order_step,this.sources=t.DisplayTab.instance.sources,this.render()},selection_changed:function(t){var i=null;if(this.display_types.each(function(e){e.get("name")==t?(i=e,e.set("selected",!0)):e.set("selected",!1)}),i){var s=this.sources.selected_value(),l=i.get("default_source");l&&s!=l&&(l=this.sources.where({name:l}),l.length>0&&(l=l[0],this.sources.deselect_all(),this.sources.select(l.id)))}e(".display_settings_form").each(function(){$this=e(this),$this.attr("rel")==t?$this.removeClass("hidden"):$this.addClass("hidden")})},render:function(){var t=this.sources.selected(),i=0;t=t.length>0&&t[0],this.$el.empty();var s=this.display_type_order_base,l=this.display_type_order_step;return this.display_types.each(function(n){if(t&&!n.is_compatible_with_source(t)){var a=e("#display_type_tab_content:visible");if(0==a.length)return;if("hidden"==a.css("visibility"))return}var o=new this.DisplayType;o.model=n,o.on("selected",this.selection_changed,this),this.display_types.selected_value()||(n.set("selected",!0),this.selection_changed(n.id));var r=n.get("view_order");r||(r=s);var d=Math.floor(r/l);i>0&&d>i&&this.$el.append('<li class="clear" style="height: 10px" />'),i=d,this.$el.append(o.render().el)},this),this},DisplayType:Backbone.View.extend({className:"display_type_preview",events:{click:"clicked"},clicked:function(e){this.trigger("selected",this.model.get("name"))},render:function(){var t=e('<label style="display: block; cursor: pointer;"/>').addClass("image_container"),i=this.model.get("installed_at_version"),s=photocrati_ajax.wp_plugins_url,l=this.model.get("preview_image_relpath");"undefined"==typeof i&&(s=photocrati_ajax.wp_site_url,s=s.replace(/(.*)\/index\.php$/i,"$1"),0==l.indexOf("/nextgen-gallery")&&(s=photocrati_ajax.wp_plugins_url));var n=e("<img/>").attr({src:s+"/"+l,title:this.model.get("title"),alt:this.model.get("alt")}),a=e("<div/>"),o=e("<input/>").prop({type:"radio",value:this.model.get("name"),title:this.model.get("title"),name:"display_type",checked:this.model.get("selected")});return t.append(a),t.append(n),a.append(o),a.append(this.model.get("title")),this.$el.append(t),this}})}),t.DisplayTab.Views.Preview_Area=Backbone.View.extend({el:"#preview_area",initialize:function(){this.entities=t.DisplayTab.instance.entities,this.sources=t.DisplayTab.instance.sources,this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.entity_list=e("<ul/>").attr("id","entity_list").append('<li class="clear"/>'),this.entities.on("add",this.render_entity,this),this.entities.on("remove",this.remove_entity,this),this.entities.on("reset",this.entities_reset,this),this.entities.on("change:sortorder",function(e){this.entities.remove(e,{silent:!0}),this.entities.add(e,{at:e.changed.sortorder,silent:!0}),this.displayed_gallery.set("sortorder",this.entities.entity_ids()),"undefined"!=typeof console&&"undefined"!=typeof console.log&&console.log(this.entities.entity_ids()),this.displayed_gallery.set("order_by","sortorder")},this),this.sources.on("selected",this.render,this),this.render()},events:{opened:"entities_reset"},entities_reset:function(e){this.entities.reset(null,{silent:!0}),this.entity_list.empty().append('<li class="clear"/>'),this.entities.in_progress||this.entities.fetch()},render_entity:function(e){var t=new this.EntityElement({model:e});this.entity_list.find(".clear").before(t.render().$el),t.$el.css("visibility","hidden"),setTimeout(function(){t.$el.css("visibility","visible")},0),1==this.$el.find(".no_entities").length?this.render():this.entities.length>1&&this.entity_list.sortable("refresh")},remove_entity:function(e){var t=this.id=e.get("id_field")+"_"+e.entity_id();this.entity_list.find("#"+t).remove();this.entity_list.sortable("refresh"),0==this.entities.length&&this.render_no_images_notice()},render_no_images_notice:function(){this.$el.empty(),this.$el.append("<p class='no_entities'>"+igw_data.i18n.no_entities+"</p>")},render:function(){return this.$el.empty(),this.entities.length>0&&this.displayed_gallery.get("container_ids").length>0?(this.$el.append(new this.RefreshButton({entities:this.entities}).render().el),this.$el.append(new this.SortButtons({entities:this.entities,displayed_gallery:this.displayed_gallery,sources:this.sources}).render().el),this.$el.append(new this.ExcludeButtons({entities:this.entities}).render().el),this.$el.append(this.entity_list),this.entity_list.sortable({placeholder:"placeholder",forcePlaceholderSize:!0,containment:"parent",opacity:.7,revert:!0,dropOnEmpty:!0,start:function(e,t){return t.placeholder.css({height:t.item.height()}),!0},stop:function(e,t){t.item.trigger("drop",t.item.index())}}),this.entity_list.disableSelection()):this.render_no_images_notice(),this},RefreshButton:Backbone.View.extend({className:"refresh_button",tagName:"input",label:"Refresh",events:{click:"clicked"},clicked:function(){this.entities.reset()},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},render:function(){return this.$el.attr({value:this.label,type:"button"}),this}}),ExcludeButtons:Backbone.View.extend({className:"header_row",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},render:function(){this.$el.empty(),this.$el.append("<strong>Exclude:</strong>");var e=new this.Button({value:!0,text:"All",entities:this.entities});this.$el.append(e.render().el),this.$el.append('<span class="separator">|</span>');var t=new this.Button({value:!1,text:"None",entities:this.entities});return this.$el.append(t.render().el),this},Button:Backbone.View.extend({tagName:"a",value:1,text:"",events:{click:"clicked"},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},clicked:function(e){e.preventDefault(),this.entities.each(function(e){e.set("exclude",this.value)},this)},render:function(){return this.$el.text(this.text).attr("href","#"),this}})}),SortButtons:Backbone.View.extend({className:"header_row",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.sortorder_options=new t.DisplayTab.Models.SortOrder_Options,this.sortorder_options.on("change:selected",this.sortoption_changed,this),this.sortdirection_options=new t.DisplayTab.Models.SortDirection_Options([{value:"ASC",title:"Ascending",selected:"ASC"==this.displayed_gallery.get("order_direction")},{value:"DESC",title:"Descending",selected:"DESC"==this.displayed_gallery.get("order_direction")}]),this.sortdirection_options.on("change:selected",this.sortdirection_changed,this),this.displayed_gallery.on("change:order_by",this.displayed_gallery_order_changed,this),this.displayed_gallery.on("change.order_direction",this.displayed_gallery_order_dir_changed,this)},populate_sorting_fields:function(){var e=this.sources.selected().pop().get("returns");_.indexOf(e,"image")!==-1?this.fill_image_sortorder_options():this.fill_gallery_sortorder_options()},create_sortorder_option:function(e,i){return new t.DisplayTab.Models.SortOrder({name:e,title:i,value:e,selected:this.displayed_gallery.get("order_by")==e})},fill_image_sortorder_options:function(){this.sortorder_options.reset(),this.sortorder_options.push(this.create_sortorder_option("","None")),this.sortorder_options.push(this.create_sortorder_option("sortorder","Custom")),this.sortorder_options.push(this.create_sortorder_option(t.DisplayTab.instance.image_key,"Image ID")),this.sortorder_options.push(this.create_sortorder_option("filename","Filename")),this.sortorder_options.push(this.create_sortorder_option("alttext","Alt/Title Text")),this.sortorder_options.push(this.create_sortorder_option("imagedate","Date/Time"))},fill_gallery_sortorder_options:function(){this.sortorder_options.reset(),this.sortorder_options.push(this.create_sortorder_option("","None")),this.sortorder_options.push(this.create_sortorder_option("sortorder","Custom")),this.sortorder_options.push(this.create_sortorder_option("name","Name")),this.sortorder_options.push(this.create_sortorder_option("galdesc","Description"))},displayed_gallery_order_changed:function(e){this.sortorder_options.findWhere({value:e.get("order_by")}).set("selected",!0)},displayed_gallery_order_dir_changed:function(e){this.sortdirection_options.findWhere({value:e.get("order_direction")}).set("selected",!0)},sortoption_changed:function(t){this.sortorder_options.each(function(e){e.set("selected",t.get("value")==e.get("value"),{silent:!0})}),this.displayed_gallery.set("sortorder",[]);var i=t.get("value");0==t.get("value").length&&(i="sortorder"),this.displayed_gallery.set("order_by",i),this.entities.reset(),this.$el.find("a.sortorder").each(function(){var i=e(this);i.attr("value")==t.get("value")?i.addClass("selected"):i.removeClass("selected")})},sortdirection_changed:function(t){this.sortdirection_options.each(function(e){e.set("selected",t.get("value")==e.get("value"),{silent:!0})}),this.displayed_gallery.set("order_direction",t.get("value")),this.entities.reset(),this.$el.find("a.sortdirection").each(function(){var i=e(this);i.attr("value")==t.get("value")?i.addClass("selected"):i.removeClass("selected")})},render:function(){return this.$el.empty(),this.populate_sorting_fields(),this.$el.append("<strong>Sort By:</strong>"),this.sortorder_options.each(function(e,t){var i=new this.Button({model:e,className:"sortorder"});this.$el.append(i.render().el),this.sortorder_options.length-1>t&&this.$el.append('<span class="separator">|</span>')},this),this.$el.append('<strong style="margin-left: 30px;">Order By:</strong>'),this.sortdirection_options.each(function(e,t){var i=new this.Button({model:e,className:"sortdirection"});this.$el.append(i.render().el),this.sortdirection_options.length-1>t&&this.$el.append('<span class="separator">|</span>')},this),this},Button:Backbone.View.extend({tagName:"a",initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this)},events:{click:"clicked"},clicked:function(e){e.preventDefault(),this.model.set("selected",!0)},render:function(){return this.$el.prop({value:this.model.get("value"),href:"#"}),this.$el.text(this.model.get("title")),this.model.get("selected")&&this.$el.addClass("selected"),this}})}),EntityElement:Backbone.View.extend({tagName:"li",events:{drop:"item_dropped"},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.initTime=(new Date).getTime(),this.model.on("change",this.render,this),0==this.model.get("sortorder")&&this.model.set("sortorder",-1,{silent:!0}),this.id=this.model.get("id_field")+"_"+this.model.entity_id()},item_dropped:function(e,i){t.DisplayTab.instance.displayed_gallery.set("order_by","sortorder"),this.model.set("sortorder",i)},render:function(){this.$el.empty();var t=e("<div/>").addClass("preview_item"),i=e("<div/>").addClass("image_container"),s=this.model.alttext().replace(/\\&/g,"&").replace(/\\'/g,"'"),l=this.initTime;i.attr({title:s,style:"background-image: url('"+this.model.get("thumb_url")+"?timestamp"+l+"')"}),this.$el.append(t).addClass("ui-state-default"),t.append(i);var n=e("<div/>").addClass("exclude_container"),a=e("<label/>");a.append(igw_data.i18n.exclude_question);var o=new this.ExcludeCheckbox({model:this.model});return a.append(o.render().el),n.append(a),t.append(n),this},ExcludeCheckbox:Backbone.View.extend({tagName:"input",events:{change:"entity_excluded"},type_set:!1,entity_excluded:function(e){this.model.set("exclude",e.target.checked)},initialize:function(e){this.options=e||{},_.each(this.options,function(e,t){this[t]=e},this),this.model.on("change:exclude",this.render,this)},render:function(){return this.type_set||(this.$el.attr("type","checkbox"),this.type_set=!0),this.model.is_excluded()?this.$el.prop("checked",!0):this.$el.prop("checked",!1),this}})})}),t.DisplayTab.Views.GalleriesSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.galleries=t.DisplayTab.instance.galleries},render:function(){var i=new t.Views.Chosen({collection:this.galleries,placeholder:igw_data.i18n.select_gallery,multiple:!0,width:500}),s=e("<tr><td><label>"+igw_data.i18n.galleries+'</label></td><td class="galleries_column"></td></tr>');return this.$el.empty(),this.$el.append(s),this.$el.find(".galleries_column").append(i.render().el),this}}),t.DisplayTab.Views.AlbumsSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.albums=t.DisplayTab.instance.albums},render:function(){var e=new t.Views.Chosen({collection:this.albums,multiple:!0,placeholder:"Select an album",text_field:"name",width:500});return this.$el.empty(),this.$el.append("<tr><td><label>"+igw_data.i18n.albums+'</label></td><td class="albums_column"></td></tr>'),this.$el.find(".albums_column").append(e.render().el),this}}),t.DisplayTab.Views.TagsSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.tags=t.DisplayTab.instance.tags},render:function(){var e=new t.Views.Chosen({collection:this.tags,multiple:!0,placeholder:"Select a tag",text_field:"name",width:500});return this.$el.empty(),this.$el.append('<tr><td><label>Tags</label></td><td class="tags_column"></td></tr>'),this.$el.find(".tags_column").append(e.render().el),this}}),t.DisplayTab.Views.Recent_imagesSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.maximum_entity_count=t.DisplayTab.instance.displayed_gallery.get("maximum_entity_count"),this.displayed_gallery.set("container_ids",[])},render:function(){var t=this,i=e("<input/>").prop({type:"text",value:this.maximum_entity_count,name:"maximum_entity_count"});return i.change(function(){t.displayed_gallery.set("maximum_entity_count",e(this).val())}),this.$el.empty(),this.$el.append('<tr><td><label># of Images To Display</label></td><td class="recent_images_column"></td></tr>'),this.$el.find(".recent_images_column").append(i),this}}),t.DisplayTab.Views.Random_imagesSource=Backbone.View.extend({tagName:"tbody",initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.maximum_entity_count=t.DisplayTab.instance.displayed_gallery.get("maximum_entity_count"),this.displayed_gallery.set("container_ids",[])},render:function(){var t=this,i=e("<input/>").prop({type:"text",value:this.maximum_entity_count,name:"maximum_entity_count"});return i.change(function(){t.displayed_gallery.set("maximum_entity_count",e(this).val())}),this.$el.empty(),this.$el.append('<tr><td><label># of Images To Display</label></td><td class="random_images_column"></td></tr>'),this.$el.find(".random_images_column").append(i),this}}),t.DisplayTab.Views.SaveButton=Backbone.View.extend({el:"#save_displayed_gallery",errors_el:"#errors",displayed_gallery:null,events:{click:"clicked"},initialize:function(){this.displayed_gallery=t.DisplayTab.instance.displayed_gallery,this.entities=t.DisplayTab.instance.entities,this.render()},clicked:function(){this.set_display_settings(),insert_into_editor(this.displayed_gallery.to_shortcode(),this.displayed_gallery.id?this.displayed_gallery.id:igw_data.shortcode_ref),close_attach_to_post_window()},set_display_settings:function(){var t=this.displayed_gallery.get("display_type");if(t){var i=e("form[rel='"+t+"']"),s=function(t){var i={};return e.each(t.serializeArray(),function(e,t){for(var s=t.name.split("["),l=i,n=0;n<s.length;n++){var a=s[n].replace(/\]$/,"");l[a]||(n==s.length-1?l[a]=t.value:l[a]={}),l=l[a]}}),i}(i);this.displayed_gallery.set("display_settings",s[t])}},render:function(){return this.$el.css("z-index",1e3),this}}),t.DisplayTab.App=Backbone.View.extend({initialize:function(){if(this.displayed_gallery=new t.DisplayTab.Models.Displayed_Gallery(igw_data.displayed_gallery),this.original_displayed_gallery=new t.DisplayTab.Models.Displayed_Gallery(igw_data.displayed_gallery),this.galleries=new t.DisplayTab.Models.Gallery_Collection(igw_data.galleries),this.albums=new t.DisplayTab.Models.Album_Collection(igw_data.albums),this.tags=new t.DisplayTab.Models.Tag_Collection(igw_data.tags),this.sources=new t.DisplayTab.Models.Source_Collection(igw_data.sources),this.display_types=new t.DisplayTab.Models.Display_Type_Collection(igw_data.display_types),this.display_type_order_base=igw_data.display_type_priority_base,this.display_type_order_step=igw_data.display_type_priority_step,this.entities=new t.DisplayTab.Models.Entity_Collection,this.entities.extra_data.displayed_gallery=this.displayed_gallery,this.image_key=igw_data.image_primary_key,this.displayed_gallery.get("source")){if(this.displayed_gallery.get("source")){var e=this.sources.find_by_name_or_alias(this.displayed_gallery.get("source"));e&&e.set("selected",!0)}if(this.displayed_gallery.get("container_ids")&&_.each(this.displayed_gallery.get("container_ids"),function(e){var t=this[this.displayed_gallery.get("source")].find(function(t){return t.id==e},this);t&&t.set("selected",!0)},this),this.displayed_gallery.get("display_type")){var i=this.display_types.find_by_name_or_alias(this.displayed_gallery.get("display_type"));i&&(i.set("selected",!0),this.displayed_gallery.set("display_type",i.get("name")))}}if(collections=["galleries","albums","tags"],_.each(collections,function(e){this[e].on("selected",function(){this.update_selected_containers(e)},this)},this),this.display_types.on("change:selected",function(){this.displayed_gallery.set("display_type",this.display_types.selected_value())},this),this.sources.on("selected",function(){this.displayed_gallery.set("source",this.sources.selected_value()),this.sources.selected_value()!=this.original_displayed_gallery.get("source")?this.displayed_gallery.set("exclusions",this.entities.excluded_ids()):this.displayed_gallery.set("exclusions",this.original_displayed_gallery.get("exclusions")),"random_images"!=this.sources.selected_value()&&"recent_images"!=this.sources.selected_value()||this.displayed_gallery.set("maximum_entity_count",20),this.galleries.deselect_all(),this.albums.deselect_all(),this.tags.deselect_all();var e=this.display_types.selected(),t=this.sources.selected();e.length>0&&t.length>0&&(e=e[0],t=t[0],e.is_compatible_with_source(t)||this.display_types.deselect_all(),this.display_type_selector&&this.display_type_selector.render()),this.preview_area&&this.preview_area.render()},this),this.entities.on("change:exclude finished_fetching",function(){this.displayed_gallery.set("exclusions",this.entities.excluded_ids())},this),window.Frame_Event_Publisher){var s=this;Frame_Event_Publisher.listen_for("attach_to_post:new_gallery",function(){s.galleries.reset(),s.galleries.fetch()}),Frame_Event_Publisher.listen_for("attach_to_post:manage_galleries attach_to_post:manage_images",function(e){s.galleries.reset(),s.galleries.fetch();var t=s.sources.selected().pop();t&&(_.indexOf(t.get("returns"),"image")>=0||_.indexOf(t.get("returns"),"gallery"))&&s.entities.reset()}),Frame_Event_Publisher.listen_for("attach_to_post:manage_album",function(e){s.albums.reset(),s.albums.fetch();var t=s.sources.selected().pop();t&&_.indexOf(t.get("returns"),"album")>=0&&s.entities.reset()}),Frame_Event_Publisher.listen_for("attach_to_post:manage_tags attach_to_post:manage_images",function(e){s.tags.reset(),s.tags.fetch();var t=s.sources.selected().pop();t&&(_.indexOf(t.get("returns"),"image")>=0||_.indexOf(t.get("returns"),"gallery"))&&s.entities.reset()}),Frame_Event_Publisher.listen_for("attach_to_post:thumbnail_modified",function(e){var t=s.sources.selected().pop(),i=e.image[e.image.id_field];if(t)if(_.indexOf(t.get("returns"),"image")>=0){var l=s.entities.find(function(e){return parseInt(e.entity_id())==parseInt(i)},this);l&&l.set("thumb_url",e.image.thumb_url)}else{var n=s.entities.find(function(e){return parseInt(e.get("previewpic"))==i},this);n&&n.trigger("change")}})}},update_selected_containers:function(e){this.displayed_gallery.set("container_ids",this[e].selected_ids())},render:function(){this.display_type_selector=new t.DisplayTab.Views.Display_Type_Selector,new t.DisplayTab.Views.Source_Config,new t.DisplayTab.Views.Slug_Config,this.preview_area=new t.DisplayTab.Views.Preview_Area,new t.DisplayTab.Views.SaveButton}}),t.DisplayTab.instance=new t.DisplayTab.App,t.DisplayTab.instance.render(),window.Ngg=t,e("span.tooltip, label.tooltip").tooltip()}); \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/cache/module.cache.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/cache/module.cache.php index 8e094f3a9948ffd6979b4784d87807465c12414d..12be860153fb72c85c0bc202040686ea1f3191d7 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/cache/module.cache.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/cache/module.cache.php @@ -4,16 +4,23 @@ class M_Cache extends C_Base_Module /** * Defines the module name & version */ - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-cache', 'Cache', 'Handles clearing of NextGen caches', '0.2', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/module.datamapper.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/module.datamapper.php index 0864e908c322d12c56f75cc930fa57ef388e8919..de5c025decddf6113d65b991b6e7d90dbdd6e019 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/module.datamapper.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/module.datamapper.php @@ -1,16 +1,23 @@ <?php class M_DataMapper extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-datamapper', 'DataMapper', 'Provides a database abstraction layer following the DataMapper pattern', '0.10', - 'https://www.imagely.com', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); C_Photocrati_Installer::add_handler($this->module_id, 'C_Datamapper_Installer'); @@ -24,10 +31,10 @@ class M_DataMapper extends C_Base_Module function _register_hooks() { - add_filter('posts_request', array(&$this, 'set_custom_wp_query'), 50, 2); - add_filter('posts_fields', array(&$this, 'set_custom_wp_query_fields'), 50, 2); - add_filter('posts_where', array(&$this, 'set_custom_wp_query_where'), 50, 2); - add_filter('posts_groupby', array(&$this, 'set_custom_wp_query_groupby'), 50, 2); + add_filter('posts_request', array($this, 'set_custom_wp_query'), 50, 2); + add_filter('posts_fields', array($this, 'set_custom_wp_query_fields'), 50, 2); + add_filter('posts_where', array($this, 'set_custom_wp_query_where'), 50, 2); + add_filter('posts_groupby', array($this, 'set_custom_wp_query_groupby'), 50, 2); } @@ -38,7 +45,7 @@ class M_DataMapper extends C_Base_Module * @param WP_Query $wp_query * @return string */ - function set_custom_wp_query($sql, &$wp_query) + function set_custom_wp_query($sql, $wp_query) { if ($wp_query->get('datamapper')) { @@ -64,7 +71,7 @@ class M_DataMapper extends C_Base_Module * @param WP_Query $wp_query * @return string */ - function set_custom_wp_query_fields($fields, &$wp_query) + function set_custom_wp_query_fields($fields, $wp_query) { if ($wp_query->get('datamapper')) { if (($custom_fields = $wp_query->get('fields')) && $custom_fields != 'ids') { @@ -82,7 +89,7 @@ class M_DataMapper extends C_Base_Module * @param WP_Query $wp_query * @return string */ - function set_custom_wp_query_where($where, &$wp_query) + function set_custom_wp_query_where($where, $wp_query) { if ($wp_query->get('datamapper')) { $this->add_post_title_where_clauses($where, $wp_query); @@ -99,7 +106,7 @@ class M_DataMapper extends C_Base_Module * @param WP_Query $wp_query * @return string */ - function set_custom_wp_query_groupby($groupby, &$wp_query) + function set_custom_wp_query_groupby($groupby, $wp_query) { $retval = $groupby; $group_by_columns = $wp_query->get('group_by_columns'); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/package.module.datamapper.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/package.module.datamapper.php index 6f61f3e55491648d193bb047e2bcb262d6ce327b..873b6cbc9be74399ff2b3badc1b28cc50f3cfcfe 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/package.module.datamapper.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/datamapper/package.module.datamapper.php @@ -1655,18 +1655,14 @@ class Mixin_DataMapper_Driver_Base extends Mixin $entity->{$key} = strval($value); } } else { - if (preg_match("/decimal|numeric|double/i", $column_type)) { - $entity->{$key} = doubleval($value); + if (preg_match("/decimal|numeric|double|float/i", $column_type)) { + $entity->{$key} = floatval($value); } else { - if (preg_match("/float/i", $column_type)) { - $entity->{$key} = floatval($value); + if (preg_match("/int/i", $column_type)) { + $entity->{$key} = intval($value); } else { - if (preg_match("/int/i", $column_type)) { - $entity->{$key} = intval($value); - } else { - if (preg_match("/bool/i", $column_type)) { - $entity->{$key} = $value ? TRUE : FALSE; - } + if (preg_match("/bool/i", $column_type)) { + $entity->{$key} = $value ? TRUE : FALSE; } } } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_stylesheet/module.dynamic_stylesheet.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_stylesheet/module.dynamic_stylesheet.php index 96dbeeb7b8f337426268e27e816671f0d8dc7015..8eb7cbd9acd03c09ef45621c317485d15e05c22f 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_stylesheet/module.dynamic_stylesheet.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_stylesheet/module.dynamic_stylesheet.php @@ -11,16 +11,23 @@ if (!defined('NGG_INLINE_DYNAMIC_CSS')) define('NGG_INLINE_DYNAMIC_CSS', TRUE); class M_Dynamic_Stylesheet extends C_Base_Module { - function define($context=FALSE) + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-dynamic_stylesheet', 'Dynamic Stylesheet', 'Provides the ability to generate and enqueue a dynamic stylesheet', '0.4', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com', $context ); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_thumbnails/module.dynamic_thumbnails.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_thumbnails/module.dynamic_thumbnails.php index aa710a3f93e632c9877722a8d0c71612f0282eee..e5ceb06ec5d44ee41970e20ab608f94bf7fec284 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_thumbnails/module.dynamic_thumbnails.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/dynamic_thumbnails/module.dynamic_thumbnails.php @@ -7,16 +7,23 @@ ***/ class M_Dynamic_Thumbnails extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-dynamic_thumbnails', 'Dynamic Thumbnails', 'Adds support for dynamic thumbnails', '0.7', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); C_Photocrati_Installer::add_handler($this->module_id, 'C_Dynamic_Thumbnails_Installer'); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/frame_communication/module.frame_communication.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/frame_communication/module.frame_communication.php index c7fff94fc378fd30ae9ecf6a856c2e41abdd6aaa..5a5177c9d91bb7fa37a5ac8652c69b0b34faed0d 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/frame_communication/module.frame_communication.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/frame_communication/module.frame_communication.php @@ -9,16 +9,23 @@ class M_Frame_Communication extends C_Base_Module { - function define($context=FALSE) + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-frame_communication', 'Frame/iFrame Inter-Communication', 'Provides a means for HTML frames to share server-side events with each other', '0.5', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com', $context ); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/module.fs.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/module.fs.php index 1f100817e7a1ca679dd9a53268e36df89f0604f3..487ec1c30d9d94623ceae37231aef3380461c6a7 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/module.fs.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/fs/module.fs.php @@ -6,16 +6,23 @@ */ class M_Fs extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-fs', 'Filesystem', 'Provides a filesystem abstraction layer for Pope modules', '0.6', - 'https://www.imagely.com', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.po b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.po index 4422fd9f15a59e782f8d1441cdb928d541e306ea..c2e03878430459a33be72c885bb711670fd24d66 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.po +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery-sv_SE.po @@ -1832,10 +1832,10 @@ msgstr "och katalogen med miniatyrer" msgid "with permission 777 manually !" msgstr "med rättigheterna 777 manuellt!" -#: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:119 +#: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:121 #, php-format -msgid "Gallery ID %1$s successfully created. You can show this gallery in your post or page with the shortcode %2$s.<br/>" -msgstr "Galleri-id %1$s har skapats. Du kan visa detta galleri i ditt inlägg eller sida med snabbkoden %2$s.<br>" +msgid "Gallery successfully created. <a href=\"%s\" target=\"_blank\">Manage gallery</a>" +msgstr "" #: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:122 #: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:692 @@ -2435,8 +2435,8 @@ msgid "Server Settings" msgstr "Serverinställningar" #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97 -msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 12 million downloads." -msgstr "NextGEN Gallery är en av de mest populära WordPress-tilläggen genom tiderna med över 12 miljoner nedladdningar." +msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 17 million downloads." +msgstr "NextGEN Gallery är en av de mest populära WordPress-tilläggen genom tiderna med över 17 miljoner nedladdningar." # Missed by NextGEN, translated string is displayed. #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97 diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery.po b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery.po index ea202dc4b76c75f9e88585d14f5848c31dbb6ba5..5917edc9dfeccade23c01ce0a9c674bedebc8308 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery.po +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/lang/nggallery.po @@ -1849,9 +1849,9 @@ msgstr "" msgid "with permission 777 manually !" msgstr "" -#: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:119 +#: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:121 #, php-format -msgid "Gallery ID %1$s successfully created. You can show this gallery in your post or page with the shortcode %2$s.<br/>" +msgid "Gallery successfully created. <a href=\"%s\" target=\"_blank\">Manage gallery</a>" msgstr "" #: products/photocrati_nextgen/modules/ngglegacy/admin/functions.php:122 @@ -2450,7 +2450,7 @@ msgid "Server Settings" msgstr "" #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97 -msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 16.5 million downloads." +msgid "NextGEN Gallery is one of the most popular WordPress plugins of all time with over 17 million downloads." msgstr "" #: products/photocrati_nextgen/modules/ngglegacy/admin/overview.php:97 @@ -3235,7 +3235,7 @@ msgid "https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/" msgstr "" #. Description of the plugin/theme -msgid "The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 16.5 million downloads." +msgid "The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 17 million downloads." msgstr "" #. Author of the plugin/theme diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/module.i18n.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/module.i18n.php index 70090345fe58863648eedaae293c3ea85476f418..7fd0bd373ae04be3cc9ae444865d113d81b6b1be 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/module.i18n.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/i18n/module.i18n.php @@ -7,7 +7,14 @@ ***/ class M_I18N extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-i18n', @@ -15,7 +22,7 @@ class M_I18N extends C_Base_Module "Adds I18N resources and methods", '0.3', 'https://www.imagely.com/languages/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/module.lightbox.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/module.lightbox.php index cf7f0c62c32d1890e437392930260dd6acfa7c0a..afb537bdfef26a95d6ad18437dd14b0e92bbfe55 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/module.lightbox.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/lightbox/module.lightbox.php @@ -10,15 +10,22 @@ define('NGG_LIGHTBOX_OPTIONS_SLUG', 'ngg_lightbox_options'); class M_Lightbox extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-lightbox', 'Lightbox', "Provides integration with several JavaScript lightbox effect libraries", '0.17', - 'http://leandrovieira.com/projects/jquery/lightbox/', - 'Photocrati Media', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/mvc/module.mvc.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/mvc/module.mvc.php index d7c3c0c874982a320f47948a6520a180ca142288..576da4324e506b603bf5a9fb905e7e63e40cc3f1 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/mvc/module.mvc.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/mvc/module.mvc.php @@ -14,16 +14,23 @@ class M_MVC extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( - "photocrati-mvc", - "MVC Framework", - "Provides an MVC architecture for the plugin to use", - "0.8", - "https://www.imagely.com", - "Photocrati Media", - "https://www.imagely.com" + 'photocrati-mvc', + 'MVC Framework', + 'Provides an MVC architecture for the plugin to use', + '0.8', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery', + 'Imagely', + 'https://www.imagely.com' ); C_NextGen_Settings::get_instance()->add_option_handler('C_Mvc_Option_Handler', array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_addgallery_page/module.nextgen_addgallery_page.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_addgallery_page/module.nextgen_addgallery_page.php index 871958a4f7841717c3e5eaadeb152ccaf1a76c88..5d7a21b17c7877b30f76bc8b9cc5aced97fda41d 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_addgallery_page/module.nextgen_addgallery_page.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_addgallery_page/module.nextgen_addgallery_page.php @@ -9,7 +9,14 @@ define('NGG_ADD_GALLERY_SLUG', 'ngg_addgallery'); class M_NextGen_AddGallery_Page extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_addgallery_page', @@ -17,7 +24,7 @@ class M_NextGen_AddGallery_Page extends C_Base_Module 'Provides admin page for adding a gallery and uploading images', '0.9', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php index 852ec1cf55a4f4af86f3e2da28bc05b3155db9f0..7374f3595c59a777d87c644def0beb16984b48e2 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php @@ -13,16 +13,23 @@ class M_NextGen_Admin extends C_Base_Module /** * Defines the module */ - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_admin', 'NextGEN Administration', 'Provides a framework for adding Administration pages', '0.16', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Admin_Installer'); @@ -105,24 +112,110 @@ class M_NextGen_Admin extends C_Base_Module $notices = C_Admin_Notification_Manager::get_instance(); add_action('init', array($notices, 'serve_ajax_request')); add_action('admin_footer', array($notices, 'enqueue_scripts')); - add_action('all_admin_notices', array($notices, 'render')); - - $php_id = 0; + add_action('do_ngg_notices', array($notices, 'render')); + add_action('ngg_created_new_gallery', array($this, 'set_review_notice_flag')); + add_action('ngg_created_new_gallery', get_class().'::update_gallery_count_setting'); + add_action('ngg_delete_gallery', get_class().'::update_gallery_count_setting'); + if (!self::is_ngg_legacy_page()) { + add_action('all_admin_notices', get_class().'::emit_do_notices_action'); + } - if (defined('PHP_VERSION_ID')) { - $php_id = PHP_VERSION_ID; - } - else { - $version = explode('.', PHP_VERSION); + $notices = C_Admin_Notification_Manager::get_instance(); - $php_id = ($version[0] * 10000 + $version[1] * 100 + $version[2]); - } - - if ($php_id < 50300) { - $notices->add("ngg_php52_deprecation", array("message" => __('PHP 5.2 will be deprecated in a future version of NextGEN. Please upgrade your PHP installation to 5.3 or above.', 'nggallery'))); - } + $php_id = 0; + + if (defined('PHP_VERSION_ID')) { + $php_id = PHP_VERSION_ID; + } + else { + $version = explode('.', PHP_VERSION); + + $php_id = ($version[0] * 10000 + $version[1] * 100 + $version[2]); + } + + if ($php_id < 50300) { + $notices->add("ngg_php52_deprecation", array("message" => __('PHP 5.2 will be deprecated in a future version of NextGEN. Please upgrade your PHP installation to 5.3 or above.', 'nggallery'))); + } + + // Add review notices + $review_notice_1 = new C_Review_Notice(array( + 'name' => 'review_level_1', + 'range' => array('min' => 3, 'max' => 8), + 'follows' => '') + ); + $review_notice_2 = new C_Review_Notice(array( + 'name' => 'review_level_2', + 'range' => array('min' => 10, 'max' => 18), + 'follows' => &$review_notice_1) + ); + $review_notice_3 = new C_Review_Notice(array( + 'name' => 'review_level_3', + 'range' => array('min' => 20, 'max' => PHP_INT_MAX), + 'follows' => &$review_notice_2) + ); + $notices->add($review_notice_1->get_name(), $review_notice_1); + $notices->add($review_notice_2->get_name(), $review_notice_2); + $notices->add($review_notice_3->get_name(), $review_notice_3); } + /** + * Used to determine if the current request is for a NGG legacy page + * @return bool + */ + static function is_ngg_legacy_page() + { + return ( + is_admin() && + isset($_REQUEST['page']) && + in_array($_REQUEST['page'], array( + 'nggallery-manage-gallery', + 'nggallery-manage-album', + 'nggallery-tags', + 'manage-galleries' + )) + ); + } + + /** + * Emits the 'do_ngg_notices' action + * Used by the notification manager to render all notices + */ + static function emit_do_notices_action() + { + if (!did_action('do_ngg_notices')) { + do_action('do_ngg_notices'); + } + } + + /** + * We do not want to suddenly ask users for a review when they have upgraded. Instead we will wait for a new + * gallery to be created and then will we also consider displaying reviews if the gallery count is within range. + */ + function set_review_notice_flag() + { + $settings = C_NextGen_Settings::get_instance(); + if (!$settings->get('gallery_created_after_reviews_introduced')) + $settings->set('gallery_created_after_reviews_introduced', TRUE); + $settings->save(); + } + + /** + * Review notifications are pegged to run only when the current gallery count is within a certain range. This + * updates the 'gallery_count' setting when galleries have been created or deleted. + */ + static function update_gallery_count_setting() + { + $settings = C_NextGen_Settings::get_instance(); + $mapper = C_Gallery_Mapper::get_instance(); + $original_cache_setting = $mapper->__use_cache; + $mapper->_use_cache = FALSE; + $gallery_count = C_Gallery_Mapper::get_instance()->count(); + $mapper->_use_cache = $original_cache_setting; + $settings->set('gallery_count', $gallery_count); + $settings->save(); + return $gallery_count; + } + function define_routes($router) { // TODO: Why is this in the nextgen-admin module? Shouldn't it be in the other options module? diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php index 574a0366cb2bb39ea2cb6d7a394abfcf479442b3..e1b9895ebf4efe799a24adc89785d0a131f26790 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php @@ -74,10 +74,109 @@ class A_NextGen_Admin_Default_Pages extends Mixin return $this->call_parent('setup'); } } +class C_Review_Notice +{ + function __construct($params = array()) + { + $this->_data['name'] = $params['name']; + $this->_data['range'] = $params['range']; + $this->_data['follows'] = $params['follows']; + } + function get_name() + { + return $this->_data['name']; + } + function get_gallery_count() + { + // Get the total # of galleries if we don't have them + $settings = C_NextGen_Settings::get_instance(); + $count = $settings->get('gallery_count', FALSE); + if (!$count) { + $count = M_NextGen_Admin::update_gallery_count_setting(); + } + return $count; + } + function get_range() + { + return $this->_data['range']; + } + function is_renderable() + { + return ($this->is_on_dashboard() || $this->is_on_ngg_admin_page()) && $this->is_at_gallery_count() && $this->is_previous_notice_dismissed() && $this->gallery_created_flag_check(); + } + function gallery_created_flag_check() + { + $settings = C_NextGen_Settings::get_instance(); + return $settings->get('gallery_created_after_reviews_introduced'); + } + function is_at_gallery_count() + { + $retval = FALSE; + $range = $this->_data['range']; + $count = $this->get_gallery_count(); + $manager = C_Admin_Notification_Manager::get_instance(); + // Determine if we match the current range + if ($count >= $range['min'] && $count <= $range['max']) { + $retval = TRUE; + } + // If the current number of galleries exceeds the parent notice's maximum we should dismiss the parent + if (!empty($this->_data['follows'])) { + $follows = $this->_data['follows']; + $parent_range = $follows->get_range(); + if ($count > $parent_range['max'] && !$manager->is_dismissed($follows->get_name())) { + $manager->dismiss($follows->get_name(), 2); + } + } + return $retval; + } + function is_previous_notice_dismissed($level = FALSE) + { + $retval = FALSE; + $manager = C_Admin_Notification_Manager::get_instance(); + if (empty($level)) { + $level = $this; + } + if (!empty($level->_data['follows'])) { + $parent = $level->_data['follows']; + $retval = $manager->is_dismissed($parent->get_name()); + if (!$retval && !empty($parent->_data['follows'])) { + $retval = $this->is_previous_notice_dismissed($parent); + } + } else { + $retval = TRUE; + } + return $retval; + } + function is_on_dashboard() + { + return preg_match('#/wp-admin/?(index\\.php)?$#', $_SERVER['REQUEST_URI']) == TRUE; + } + function is_on_ngg_admin_page() + { + // Do not show this notification inside of the ATP popup + return (preg_match("/wp-admin.*(ngg|nextgen).*/", $_SERVER['REQUEST_URI']) || isset($_REQUEST['page']) && preg_match("/ngg|nextgen/", $_REQUEST['page'])) && strpos(strtolower($_SERVER['REQUEST_URI']), '&attach_to_post') == false; + } + function render() + { + $view = new C_MVC_View('photocrati-nextgen_admin#review_notice', array('number' => $this->get_gallery_count())); + return $view->render(TRUE); + } + function dismiss($code) + { + $retval = array('dismiss' => TRUE, 'persist' => TRUE, 'success' => TRUE, 'code' => $code, 'dismiss_code' => $code); + $manager = C_Admin_Notification_Manager::get_instance(); + if ($code == 1 || $code == 3) { + $retval['review_level_1'] = $manager->dismiss('review_level_1', 2); + $retval['review_level_2'] = $manager->dismiss('review_level_2', 2); + $retval['review_level_3'] = $manager->dismiss('review_level_3', 2); + } + return $retval; + } +} class C_Admin_Notification_Wrapper { - var $_name; - var $_data; + public $_name; + public $_data; function __construct($name, $data) { $this->_name = $name; @@ -98,9 +197,12 @@ class C_Admin_Notification_Wrapper } class C_Admin_Notification_Manager { - var $_notifications = array(); - var $_displayed_notice = FALSE; - var $_dismiss_url = NULL; + public $_notifications = array(); + public $_displayed_notice = FALSE; + public $_dismiss_url = NULL; + /** + * @var C_Admin_Notification_Manager + */ static $_instance = NULL; static function get_instance() { @@ -154,25 +256,55 @@ class C_Admin_Notification_Manager } return $retval; } - function dismiss($name) + function dismiss($name, $dismiss_code = 1) { - $retval = FALSE; + $response = array(); if ($handler = $this->get_handler_instance($name)) { $has_method = method_exists($handler, 'is_dismissable'); if ($has_method && $handler->is_dismissable() || !$has_method) { - $settings = C_NextGen_Settings::get_instance(); - $dismissed = $settings->get('dismissed_notifications', array()); - if (!isset($dismissed[$name])) { - $dismissed[$name] = array(); + if (method_exists($handler, 'dismiss')) { + $response = $handler->dismiss($dismiss_code); + $response['handled'] = TRUE; + } + if (is_bool($response)) { + $response = array('dismiss' => $response); + } + // Set default key/values + if (!isset($response['handled'])) { + $response['handled'] = FALSE; + } + if (!isset($response['dismiss'])) { + $response['dismiss'] = TRUE; + } + if (!isset($response['persist'])) { + $response['persist'] = $response['dismiss']; } - $user_id = get_current_user_id(); - $dismissed[$name][] = $user_id ? $user_id : 'unknown'; - $settings->set('dismissed_notifications', $dismissed); - $settings->save(); - $retval = TRUE; + if (!isset($response['success'])) { + $response['success'] = $response['dismiss']; + } + if (!isset($response['code'])) { + $response['code'] = $dismiss_code; + } + if ($response['dismiss']) { + $settings = C_NextGen_Settings::get_instance(); + $dismissed = $settings->get('dismissed_notifications', array()); + if (!isset($dismissed[$name])) { + $dismissed[$name] = array(); + } + $user_id = get_current_user_id(); + $dismissed[$name][] = $user_id ? $user_id : 'unknown'; + $settings->set('dismissed_notifications', $dismissed); + if ($response['persist']) { + $settings->save(); + } + } + } else { + $response['error'] = __("Notice is not dismissible", 'nggallery'); } + } else { + $response['error'] = __("No handler defined for this notice", 'nggallery'); } - return $retval; + return $response; } function get_handler_instance($name) { @@ -201,14 +333,19 @@ class C_Admin_Notification_Manager { $retval = array('failure' => TRUE); if (isset($_REQUEST['ngg_dismiss_notice'])) { - header('Content-Type: application/json'); - // ob_start(); - if (isset($_REQUEST['name']) && $this->dismiss($_REQUEST['name'])) { - $retval = array('success' => TRUE); + if (!headers_sent()) { + header('Content-Type: application/json'); + } + ob_start(); + if (!isset($_REQUEST['code'])) { + $_REQUEST['code'] = 1; + } + if (isset($_REQUEST['name'])) { + $retval = $this->dismiss($_REQUEST['name'], intval($_REQUEST['code'])); } else { $retval['msg'] = __('Not a valid notice name', 'nggallery'); } - // ob_end_clean(); + ob_end_clean(); echo json_encode($retval); throw new E_Clean_Exit(); } @@ -220,7 +357,8 @@ class C_Admin_Notification_Manager // Does the handler want to render? $has_method = method_exists($handler, 'is_renderable'); if ($has_method && $handler->is_renderable() || !$has_method) { - $view = new C_MVC_View('photocrati-nextgen_admin#admin_notice', array('css_class' => method_exists($handler, 'get_css_class') ? $handler->get_css_class() : 'updated', 'is_dismissable' => method_exists($handler, 'is_dismissable') ? $handler->is_dismissable() : FALSE, 'html' => method_exists($handler, 'render') ? $handler->render() : '', 'notice_name' => $name)); + $show_dismiss_button = method_exists($handler, 'show_dismiss_button') ? $handler->show_dismiss_button() : method_exists($handler, 'is_dismissable') ? $handler->is_dismissable() : FALSE; + $view = new C_MVC_View('photocrati-nextgen_admin#admin_notice', array('css_class' => method_exists($handler, 'get_css_class') ? $handler->get_css_class() : 'updated', 'is_dismissable' => method_exists($handler, 'is_dismissable') ? $handler->is_dismissable() : FALSE, 'html' => method_exists($handler, 'render') ? $handler->render() : '', 'show_dismiss_button' => $show_dismiss_button, 'notice_name' => $name)); $retval = $view->render(TRUE); $this->_displayed_notice = TRUE; } @@ -351,62 +489,6 @@ class Mixin_Form_Field_Generators extends Mixin { return $this->object->render_partial('photocrati-nextgen_admin#field_generator/nextgen_settings_field_color', array('display_type_name' => $display_type->name, 'name' => $name, 'label' => $label, 'value' => $value, 'text' => $text, 'hidden' => $hidden), True); } - function _render_ajax_pagination_field($display_type) - { - return $this->object->_render_radio_field($display_type, 'ajax_pagination', __('Enable AJAX pagination', 'nggallery'), isset($display_type->settings['ajax_pagination']) ? $display_type->settings['ajax_pagination'] : FALSE); - } - function _render_thumbnail_override_settings_field($display_type) - { - $hidden = !(isset($display_type->settings['override_thumbnail_settings']) ? $display_type->settings['override_thumbnail_settings'] : FALSE); - $override_field = $this->_render_radio_field($display_type, 'override_thumbnail_settings', __('Override thumbnail settings', 'nggallery'), isset($display_type->settings['override_thumbnail_settings']) ? $display_type->settings['override_thumbnail_settings'] : FALSE, __("This does not affect existing thumbnails; overriding the thumbnail settings will create an additional set of thumbnails. To change the size of existing thumbnails please visit 'Manage Galleries' and choose 'Create new thumbnails' for all images in the gallery.", 'nggallery')); - $dimensions_field = $this->object->render_partial('photocrati-nextgen_admin#field_generator/thumbnail_settings', array('display_type_name' => $display_type->name, 'name' => 'thumbnail_dimensions', 'label' => __('Thumbnail dimensions', 'nggallery'), 'thumbnail_width' => isset($display_type->settings['thumbnail_width']) ? intval($display_type->settings['thumbnail_width']) : 0, 'thumbnail_height' => isset($display_type->settings['thumbnail_height']) ? intval($display_type->settings['thumbnail_height']) : 0, 'hidden' => $hidden ? 'hidden' : '', 'text' => ''), TRUE); - /* - $qualities = array(); - for ($i = 100; $i > 40; $i -= 5) { $qualities[$i] = "{$i}%"; } - $quality_field = $this->_render_select_field( - $display_type, - 'thumbnail_quality', - __('Thumbnail quality', 'nggallery'), - $qualities, - isset($display_type->settings['thumbnail_quality']) ? $display_type->settings['thumbnail_quality'] : 100, - '', - $hidden - ); - */ - $crop_field = $this->_render_radio_field($display_type, 'thumbnail_crop', __('Thumbnail crop', 'nggallery'), isset($display_type->settings['thumbnail_crop']) ? $display_type->settings['thumbnail_crop'] : FALSE, '', $hidden); - /* - $watermark_field = $this->_render_radio_field( - $display_type, - 'thumbnail_watermark', - __('Thumbnail watermark', 'nggallery'), - isset($display_type->settings['thumbnail_watermark']) ? $display_type->settings['thumbnail_watermark'] : FALSE, - '', - $hidden - ); - */ - $everything = $override_field . $dimensions_field . $crop_field; - return $everything; - } - /** - * Renders the thumbnail override settings field(s) - * - * @param C_Display_Type $display_type - * @return string - */ - function _render_image_override_settings_field($display_type) - { - $hidden = !(isset($display_type->settings['override_image_settings']) ? $display_type->settings['override_image_settings'] : FALSE); - $override_field = $this->_render_radio_field($display_type, 'override_image_settings', __('Override image settings', 'nggallery'), isset($display_type->settings['override_image_settings']) ? $display_type->settings['override_image_settings'] : 0, __('Overriding the image settings will create an additional set of images', 'nggallery')); - $qualities = array(); - for ($i = 100; $i > 40; $i -= 5) { - $qualities[$i] = "{$i}%"; - } - $quality_field = $this->_render_select_field($display_type, 'image_quality', __('Image quality', 'nggallery'), $qualities, $display_type->settings['image_quality'], '', $hidden); - $crop_field = $this->_render_radio_field($display_type, 'image_crop', __('Image crop', 'nggallery'), $display_type->settings['image_crop'], '', $hidden); - $watermark_field = $this->_render_radio_field($display_type, 'image_watermark', __('Image watermark', 'nggallery'), $display_type->settings['image_watermark'], '', $hidden); - $everything = $override_field . $quality_field . $crop_field . $watermark_field; - return $everything; - } /** * Renders a pair of fields for width and width-units (px, em, etc) * @@ -621,7 +703,7 @@ if (!class_exists('C_NextGen_Admin_Installer')) { class C_NextGen_Admin_Page_Controller extends C_MVC_Controller { static $_instances = array(); - static function &get_instance($context = FALSE) + static function get_instance($context = FALSE) { if (!isset(self::$_instances[$context])) { $klass = get_class(); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.js b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.js index 0abc23e74542cd5136dd32db6c0bca5418bf7a23..8d221d2dd709219e9b7d167071b3cc7169fe5078 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.js +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.js @@ -1,11 +1,14 @@ jQuery(function($){ $('.ngg_admin_notice .dismiss').click(function(e){ - e.preventDefault(); + var $button = $(this); + var code = $button.data('dismiss-code'); + if (!code) code = 1; + if ($button.attr('href') == '#') e.preventDefault(); var $notice = $(this).parents('.ngg_admin_notice'); var $notice_name = $notice.attr('data-notification-name'); if ($notice_name.length > 0) { - var url = ngg_dismiss_url+'&name='+$notice_name; + var url = ngg_dismiss_url+'&name='+$notice_name+'&code='+code; $.post(url, function(response){ if (typeof(response) != 'object') response = JSON.parse(response); if (response.success) { diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.min.js b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.min.js index a5e89a7ea5ac28675ebd79164aa96731ab8539ec..87c0e9364db203b19d89827ee8fb39034e72d1fd 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.min.js +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.min.js @@ -1 +1 @@ -jQuery(function(n){n(".ngg_admin_notice .dismiss").click(function(t){t.preventDefault();var i=n(this).parents(".ngg_admin_notice"),e=i.attr("data-notification-name");if(e.length>0){var a=ngg_dismiss_url+"&name="+e;n.post(a,function(n){"object"!=typeof n&&(n=JSON.parse(n)),n.success?i.fadeOut():alert(n.msg)})}})}); \ No newline at end of file +jQuery(function(t){t(".ngg_admin_notice .dismiss").click(function(i){var n=t(this),a=n.data("dismiss-code");a||(a=1),"#"==n.attr("href")&&i.preventDefault();var e=t(this).parents(".ngg_admin_notice"),s=e.attr("data-notification-name");if(s.length>0){var c=ngg_dismiss_url+"&name="+s+"&code="+a;t.post(c,function(t){"object"!=typeof t&&(t=JSON.parse(t)),t.success?e.fadeOut():alert(t.msg)})}})}); \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/admin_notice.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/admin_notice.php index 4b4f781cf407059258652904d03d9ed2f2c28ce9..1bd8f1ceba597d7158dbf5be3cbad16253ba7fcf 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/admin_notice.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/admin_notice.php @@ -1,6 +1,6 @@ <div data-notification-name="<?php echo esc_attr($notice_name)?>" class="ngg_admin_notice <?php echo esc_attr($css_class)?>"> <p><?php echo $html ?></p> - <?php if ($is_dismissable): ?> + <?php if ($show_dismiss_button): ?> <p><a class='dismiss' href="#"><?php esc_html_e(__('Dismiss', 'nggallery')) ?></a></p> <?php endif ?> </div> \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/review_notice.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/review_notice.php new file mode 100644 index 0000000000000000000000000000000000000000..a1061db65683ea206961338ad181a0f6cffa9680 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/templates/review_notice.php @@ -0,0 +1,17 @@ +<p> + <?php + $review_1_anchor = 'href="https://wordpress.org/support/plugin/nextgen-gallery/reviews/?rate=5#new-post" target="_blank"'; + $user = get_userdata(get_current_user_id()); + echo sprintf(__("Hey <strong>%s</strong>, you've created %d NextGEN galleries! Awesome! Could I ask you to give us a 5-star rating really quickly on <a %s>WordPress.org</a>? It helps other WordPress users and motivates us to keep improving. You can also just send us feedback <a %s>here</a>. Thanks! ~ Erick Danzer (founder of Imagely/NextGEN Gallery", 'nggallery'), + $user->display_name, + $number, + $review_1_anchor, + 'href="https://www.imagely.com/feedback/" target="_blank"' + ); + ?> +</p> +<p> + <a class='dismiss' data-dismiss-code="2" <?php echo $review_1_anchor; ?>><?php esc_html_e(__('Ok, you deserve it', 'nggallery')); ?></a> + | <a class='dismiss' data-dismiss-code="2" href="#"><?php esc_html_e(__('Nope, maybe later', 'nggallery')); ?></a> + | <a class='dismiss' data-dismiss-code="3" href="#"><?php esc_html_e(__('I already did', 'nggallery')); ?></a> +</p> diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php index 04332e2ad41f8d792213c79e54fca08a0b0e4b80..fe7c1c95f79ca2d680fe2f838dc37fcd2b48efc5 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php @@ -12,7 +12,14 @@ define('NGG_BASIC_EXTENDED_ALBUM', 'photocrati-nextgen_basic_extended_album'); class M_NextGen_Basic_Album extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_basic_album', @@ -20,7 +27,7 @@ class M_NextGen_Basic_Album extends C_Base_Module "Provides support for NextGEN's Basic Album", '0.17', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); @@ -74,6 +81,7 @@ class M_NextGen_Basic_Album extends C_Base_Module $this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Breadcrumbs'); $this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Descriptions'); + $this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Child_Entities'); } @@ -168,6 +176,7 @@ class M_NextGen_Basic_Album extends C_Base_Module return array( 'A_NextGen_Album_Breadcrumbs' => 'adapter.nextgen_album_breadcrumbs.php', 'A_NextGen_Album_Descriptions' => 'adapter.nextgen_album_descriptions.php', + 'A_NextGen_Album_Child_Entities' => 'adapter.nextgen_album_child_entities.php', 'A_Nextgen_Basic_Album' => 'adapter.nextgen_basic_album.php', 'A_Nextgen_Basic_Album_Controller' => 'adapter.nextgen_basic_album_controller.php', 'A_Nextgen_Basic_Album_Mapper' => 'adapter.nextgen_basic_album_mapper.php', @@ -182,7 +191,7 @@ class M_NextGen_Basic_Album extends C_Base_Module class C_NextGen_Basic_Album_Installer extends C_Gallery_Display_Installer { - function install() + function install($reset = FALSE) { $this->install_display_type( NGG_BASIC_COMPACT_ALBUM, array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php index dae7f1ddf08fbab6aca35e376c2b8a7a3b766976..3bc0428c1a212a5743234ec7940816f276e2c1b6 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php @@ -189,6 +189,111 @@ class A_NextGen_Album_Breadcrumbs extends Mixin return $view->render(TRUE); } } +/** + * Because enqueueing an albums child entities (for use in lightboxes) is slow to do inside of cache_action() and + * we can't guarantee index_action() will run on every hit (thanks to page caching) we inline those entities into + * our basic albums templates under a window.load listener. + * + * @mixin C_MVC_View + * @adapts I_MVC_View + */ +class A_NextGen_Album_Child_Entities extends Mixin +{ + protected static $_runonce = FALSE; + public static $_entities = array(); + /** + * The album controller will invoke this filter when its _render_album() method is called + */ + function __construct() + { + if (!self::$_runonce) { + add_filter('ngg_album_prepared_child_entity', array($this, 'register_child_gallery'), 10, 2); + } else { + self::$_runonce = TRUE; + } + } + /** + * Register each gallery belonging to the album that has just been rendered, so that when the MVC controller + * system 'catches up' and runs $this->render_object() that method knows what galleries to inline as JS. + * + * @param array $gallery + * @param $displayed_gallery + * @return array mixed + */ + function register_child_gallery($galleries, $displayed_gallery) + { + if (!$this->is_basic_album($displayed_gallery)) { + return $galleries; + } + $id = $displayed_gallery->ID(); + foreach ($galleries as $gallery) { + if ($gallery->is_album) { + continue; + } + self::$_entities[$id][] = $gallery; + } + return $galleries; + } + function is_basic_album($displayed_gallery) + { + return in_array($displayed_gallery->display_type, array(NGG_BASIC_COMPACT_ALBUM, NGG_BASIC_EXTENDED_ALBUM)); + } + /** + * Determine if we need to append the JS to the current template. This method static for the basic album controller to access. + * + * @param $display_settings + * @return bool + */ + static function are_child_entities_enabled($display_settings) + { + $retval = FALSE; + if (empty($display_settings['open_gallery_in_lightbox'])) { + $display_settings['open_gallery_in_lightbox'] = 0; + } + if ($display_settings['open_gallery_in_lightbox'] == 1) { + $retval = TRUE; + } + return $retval; + } + /** + * Search inside the template for the inside of the container and append our inline JS + */ + function render_object() + { + $root_element = $this->call_parent('render_object'); + if ($displayed_gallery = $this->object->get_param('displayed_gallery')) { + if (!$this->is_basic_album($displayed_gallery)) { + return $root_element; + } + $ds = $displayed_gallery->display_settings; + if (self::are_child_entities_enabled($ds)) { + $id = $displayed_gallery->ID(); + foreach ($root_element->find('nextgen_gallery.gallery_container', TRUE) as $container) { + $container->append(self::generate_script(self::$_entities[$id])); + } + } + } + return $root_element; + } + /** + * Generate the JS that will be inserted into the template. This method static for the basic album controller to access. + * + * @param array $galleries + * @return string + */ + static function generate_script($galleries) + { + $retval = '<script type="text/javascript">window.addEventListener("load", function() {'; + foreach ($galleries as $gallery) { + $dg = $gallery->displayed_gallery; + $id = $dg->id(); + $retval .= 'galleries.gallery_' . $id . ' = ' . json_encode($dg->get_entity()) . ';'; + $retval .= 'galleries.gallery_' . $id . '.wordpress_page_root = "' . get_permalink() . '";'; + } + $retval .= '}, false);</script>'; + return $retval; + } +} /** * Class A_NextGen_Album_Descriptions * @mixin C_MVC_View @@ -310,10 +415,6 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination */ function index_action($displayed_gallery, $return = FALSE) { - // Ensure that the open_gallery_in_lightbox setting is present - if (!array_key_exists('open_gallery_in_lightbox', $displayed_gallery->display_settings)) { - $displayed_gallery->display_settings['open_gallery_in_lightbox'] = 0; - } $display_settings = $displayed_gallery->display_settings; // We need to fetch the album containers selected in the Attach // to Post interface. We need to do this, because once we fetch the @@ -376,22 +477,26 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination // If there are entities to be displayed if ($entities) { $pagination_result = $this->object->create_pagination($current_page, $displayed_gallery->get_entity_count(), $display_settings['galleries_per_page'], urldecode($this->object->param('ajax_pagination_referrer'))); + $display_settings['entities'] = $entities; + $display_settings['pagination'] = $pagination_result['output']; + $display_settings['displayed_gallery'] = $displayed_gallery; + $display_settings = $this->prepare_legacy_album_params($displayed_gallery->get_entity(), $display_settings); if (!empty($display_settings['template']) && $display_settings['template'] != 'default') { // Add additional parameters $this->object->remove_param('ajax_pagination_referrer'); $display_settings['current_page'] = $current_page; - $display_settings['entities'] =& $entities; $display_settings['pagination_prev'] = $pagination_result['prev']; $display_settings['pagination_next'] = $pagination_result['next']; - $display_settings['pagination'] = $pagination_result['output']; // Legacy templates lack a good way of injecting content at the right time + $this->object->add_mixin('Mixin_NextGen_Basic_Templates'); $this->object->add_mixin('A_NextGen_Album_Breadcrumbs'); $this->object->add_mixin('A_NextGen_Album_Descriptions'); $breadcrumbs = $this->object->render_legacy_template_breadcrumbs($displayed_gallery, $entities); $description = $this->object->render_legacy_template_description($displayed_gallery); - // Render legacy template - $this->object->add_mixin('Mixin_NextGen_Basic_Templates'); - $display_settings = $this->prepare_legacy_album_params($displayed_gallery->get_entity(), $display_settings); + // If enabled enqueue the child entities as JSON for lightboxes to read + if (A_NextGen_Album_Child_Entities::are_child_entities_enabled($display_settings)) { + $script = A_NextGen_Album_Child_Entities::generate_script($entities); + } $retval = $this->object->legacy_render($display_settings['template'], $display_settings, $return, 'album'); if (!empty($description)) { $retval = $description . $retval; @@ -399,35 +504,12 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination if (!empty($breadcrumbs)) { $retval = $breadcrumbs . $retval; } + if (!empty($script)) { + $retval = $retval . $script; + } return $retval; } else { $params = $display_settings; - $albums = $this->prepare_legacy_album_params($displayed_gallery->get_entity(), array('entities' => $entities)); - $params['pagination'] = $pagination_result['output']; - $params['image_gen_params'] = $albums['image_gen_params']; - $params['galleries'] = $albums['galleries']; - foreach ($params['galleries'] as &$gallery) { - $gallery->entity_type = isset($gallery->is_gallery) && intval($gallery->is_gallery) ? 'gallery' : 'album'; - // If we're to open a gallery in a lightbox, we need to expose it to the lightbox - // as a displayed gallery - if (isset($params['open_gallery_in_lightbox']) && $gallery->entity_type == 'gallery') { - $gallery->displayed_gallery = new C_Displayed_Gallery(); - $gallery->displayed_gallery->container_ids = array($gallery->{$gallery->id_field}); - $gallery->displayed_gallery->display_settings = $displayed_gallery->display_settings; - $gallery->displayed_gallery->returns = 'included'; - $gallery->displayed_gallery->source = 'galleries'; - $gallery->displayed_gallery->images_list_count = $gallery->displayed_gallery->get_entity_count(); - $gallery->displayed_gallery->is_album_gallery = TRUE; - $gallery->displayed_gallery->to_transient(); - if ($this->does_lightbox_support_displayed_gallery($displayed_gallery)) { - $gallery->displayed_gallery->effect_code = $this->object->get_effect_code($gallery->displayed_gallery); - } - // Add "galleries.gallery_1 = {};" - $this->object->_add_script_data('ngg_common', 'galleries.gallery_' . $gallery->displayed_gallery->id(), (array) $gallery->displayed_gallery->get_entity(), FALSE); - $this->object->_add_script_data('ngg_common', 'galleries.gallery_' . $gallery->displayed_gallery->id() . '.wordpress_page_root', get_permalink(), FALSE); - } - } - $params['displayed_gallery'] = $displayed_gallery; $params = $this->object->prepare_display_parameters($displayed_gallery, $params); switch ($displayed_gallery->display_type) { case NGG_BASIC_COMPACT_ALBUM: @@ -443,6 +525,26 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination return $this->object->render_partial('photocrati-nextgen_gallery_display#no_images_found', array(), $return); } } + /** + * Creates a displayed gallery of a gallery belonging to an album. Shared by index_action() and cache_action() to + * allow lightboxes to open album children directly. + * + * @param $gallery + * @param $display_settings + * @return $gallery + */ + function make_child_displayed_gallery($gallery, $display_settings) + { + $gallery->displayed_gallery = new C_Displayed_Gallery(); + $gallery->displayed_gallery->container_ids = array($gallery->{$gallery->id_field}); + $gallery->displayed_gallery->display_settings = $display_settings; + $gallery->displayed_gallery->returns = 'included'; + $gallery->displayed_gallery->source = 'galleries'; + $gallery->displayed_gallery->images_list_count = $gallery->displayed_gallery->get_entity_count(); + $gallery->displayed_gallery->is_album_gallery = TRUE; + $gallery->displayed_gallery->to_transient(); + return $gallery; + } function add_breadcrumbs_to_legacy_templates($html, $displayed_gallery) { $this->object->add_mixin('A_NextGen_Album_Breadcrumbs'); @@ -548,9 +650,19 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination $gallery->pagelink = $this->object->set_param_for($pagelink, 'gallery', $gallery->slug); } } + // Mark the child type + $gallery->entity_type = isset($gallery->is_gallery) && intval($gallery->is_gallery) ? 'gallery' : 'album'; + // If this setting is on we need to inject an effect code + if (!empty($displayed_gallery->display_settings['open_gallery_in_lightbox']) && $gallery->entity_type == 'gallery') { + $gallery = $this->object->make_child_displayed_gallery($gallery, $displayed_gallery->display_settings); + if ($this->does_lightbox_support_displayed_gallery($displayed_gallery)) { + $gallery->displayed_gallery->effect_code = $this->object->get_effect_code($gallery->displayed_gallery); + } + } // Let plugins modify the gallery $gallery = apply_filters('ngg_album_galleryobject', $gallery); } + $params['galleries'] = apply_filters('ngg_album_prepared_child_entity', $params['galleries'], $params['displayed_gallery']); $params['album'] = reset($this->albums); $params['albums'] = $this->albums; // Clean up diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/compact.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/compact.php index 20e5c85d0b3bd86a522844b9feee6cc6ee5ed26f..d9953d7cab228e06bc1ceaf0e2c9b5e3263bd154 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/compact.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/compact.php @@ -1,32 +1,30 @@ <?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?> <div class="ngg-albumoverview"> - <?php foreach ($galleries as $gallery) { ?> + <?php + foreach ($galleries as $gallery) { + if ($open_gallery_in_lightbox && $gallery->entity_type == 'gallery') { + $anchor = $gallery->displayed_gallery->effect_code . " + href='" . nextgen_esc_url($gallery->pagelink) . "' + data-src='" . esc_attr($gallery->previewpic_fullsized_url) . "' + data-fullsize='" . esc_attr($gallery->previewpic_fullsized_url) . "' + data-thumbnail='" . esc_attr($gallery->previewurl) . "' + data-title='" . esc_attr($gallery->previewpic_image->alttext) . "' + data-description='" . esc_attr(stripslashes($gallery->previewpic_image->description)) . "' + data-image-id='" . esc_attr($gallery->previewpic) . "'"; + } else { + $anchor = "title='" . esc_attr($gallery->title) . "' + href='" . nextgen_esc_url($gallery->pagelink) . "'"; + } + ?> <div class="ngg-album-compact"> <div class="ngg-album-compactbox"> <div class="ngg-album-link"> <?php $this->start_element('nextgen_gallery.album_gallery', 'item', $gallery); ?> - <?php if ($open_gallery_in_lightbox AND $gallery->entity_type == 'gallery'): ?> - <a - <?php echo $gallery->displayed_gallery->effect_code ?> - href="<?php echo esc_attr($gallery->previewpic_fullsized_url)?>" - data-fullsize="<?php echo esc_attr($gallery->previewpic_fullsized_url) ?>" - data-src="<?php echo esc_attr($gallery->previewpic_fullsized_url) ?>" - data-thumbnail="<?php echo esc_attr($gallery->previewurl)?>" - data-title="<?php echo esc_attr($gallery->previewpic_image->alttext)?>" - data-description="<?php echo esc_attr(stripslashes($gallery->previewpic_image->description))?>" - data-image-id="<?php echo esc_attr($gallery->previewpic)?>" - > - <img class="Thumb" - alt="<?php echo esc_attr($gallery->title); ?>" - src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/> - </a> - <?php else: ?> - <a class="Link gallery_link" href="<?php echo nextgen_esc_url($gallery->pagelink); ?>"> - <img class="Thumb" - alt="<?php echo esc_attr($gallery->title); ?>" - src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/> - </a> - <?php endif ?> + <a <?php echo $anchor; ?>> + <img class="Thumb" + alt="<?php echo esc_attr($gallery->title); ?>" + src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/> + </a> <?php $this->end_element(); ?> </div> </div> @@ -36,12 +34,7 @@ $max_width = ''; } ?> <h4> - <a class="ngg-album-desc" - title="<?php echo esc_attr($gallery->title); ?>" - href="<?php echo nextgen_esc_url($gallery->pagelink); ?>" - <?php echo $max_width; ?>> - <?php echo_safe_html($gallery->title); ?> - </a> + <a class='ngg-album-desc' <?php echo $anchor; echo $max_width; ?>><?php echo_safe_html($gallery->title); ?></a> </h4> <p class="ngg-album-gallery-image-counter"> <?php if (isset($gallery->counter) && $gallery->counter > 0) { ?> diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/extended.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/extended.php index ea091c5b95cf416dea1a333def7f8364659dcb40..4949e21b60287b5acf7da6a80bb77998462519d4 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/extended.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_album/templates/extended.php @@ -1,39 +1,29 @@ <?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?> <div class="ngg-albumoverview"> - <?php foreach ($galleries as $gallery) { ?> + <?php foreach ($galleries as $gallery) { + if ($open_gallery_in_lightbox && $gallery->entity_type == 'gallery') { + $anchor = $gallery->displayed_gallery->effect_code . " + href='" . nextgen_esc_url($gallery->pagelink) . "' + data-src='" . esc_attr($gallery->previewpic_fullsized_url) . "' + data-fullsize='" . esc_attr($gallery->previewpic_fullsized_url) . "' + data-thumbnail='" . esc_attr($gallery->previewurl) . "' + data-title='" . esc_attr($gallery->previewpic_image->alttext) . "' + data-description='" . esc_attr(stripslashes($gallery->previewpic_image->description)) . "' + data-image-id='" . esc_attr($gallery->previewpic) . "'"; + } else { + $anchor = "class='gallery_link' href='" . nextgen_esc_url($gallery->pagelink) . "'"; + } ?> <div class="ngg-album"> <div class="ngg-albumtitle"> - <a href="<?php echo nextgen_esc_url($gallery->pagelink); ?>"><?php echo_safe_html($gallery->title); ?></a> + <a <?php echo $anchor; ?>><?php echo_safe_html($gallery->title); ?></a> </div> <div class="ngg-albumcontent"> <div class="ngg-thumbnail"> - <?php if ($open_gallery_in_lightbox AND $gallery->entity_type == 'gallery'): ?> - <a - <?php echo $gallery->displayed_gallery->effect_code ?> - href="<?php echo esc_attr($gallery->previewpic_fullsized_url)?>" - data-fullsize="<?php echo esc_attr($gallery->previewpic_fullsized_url) ?>" - data-src="http://sandbox.dev/wp-content/gallery/wood-cutting/DSC_0236.JPG" - data-thumbnail="<?php echo esc_attr($gallery->previewurl)?>" - data-title="<?php echo esc_attr($gallery->previewpic_image->alttext)?>" - data-description="<?php echo esc_attr(stripslashes($gallery->previewpic_image->description))?>" - data-image-id="<?php echo esc_attr($gallery->previewpic)?>" - > + <a <?php echo $anchor; ?>> <img class="Thumb" alt="<?php echo esc_attr($gallery->title); ?>" src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/> </a> - <?php else: ?> - <a - class="gallery_link" - href="<?php echo nextgen_esc_url($gallery->pagelink); ?>" - > - <img - class="Thumb" - alt="<?php echo esc_attr($gallery->title); ?>" - src="<?php echo nextgen_esc_url($gallery->previewurl); ?>" - /> - </a> - <?php endif ?> </div> <div class="ngg-description"> <p><?php echo_safe_html($gallery->galdesc); ?></p> @@ -44,6 +34,6 @@ </div> </div> <?php } ?> - <?php echo $pagination ?> + <?php echo $pagination; ?> </div> <?php $this->end_element(); ?> diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php index 9b1c3ffbd1c8630b219d17eafa2e294ce72a9a61..d1924b606b26c6f93ae0d6ff9cb38b8bc30f2e8d 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php @@ -19,7 +19,14 @@ define( class M_NextGen_Basic_Gallery extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_basic_gallery', @@ -27,7 +34,7 @@ class M_NextGen_Basic_Gallery extends C_Base_Module "Provides NextGEN Gallery's basic thumbnail/slideshow integrated gallery", '0.16', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); @@ -334,7 +341,7 @@ function nggShowSlideshow($galleryID, $width, $height) class C_NextGen_Basic_Gallery_Installer extends C_Gallery_Display_Installer { - function install() + function install($reset = FALSE) { $this->install_display_type(NGG_BASIC_THUMBNAILS, array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php index 3b5c1cc9373cc31de2374925fa3f36f4d7e75d10..62eb33e391a2eab4addffde0939aa0eaea6bff35 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php @@ -370,7 +370,7 @@ class A_NextGen_Basic_Thumbnail_Form extends Mixin_Display_Type_Form */ function _get_field_names() { - return array('thumbnail_override_settings', 'nextgen_basic_thumbnails_images_per_page', 'nextgen_basic_thumbnails_number_of_columns', 'nextgen_basic_thumbnails_ajax_pagination', 'nextgen_basic_thumbnails_hidden', 'nextgen_basic_thumbnails_imagebrowser_effect', 'nextgen_basic_thumbnails_show_slideshow_link', 'nextgen_basic_thumbnails_slideshow_link_text', 'nextgen_basic_templates_template'); + return array('thumbnail_override_settings', 'nextgen_basic_thumbnails_images_per_page', 'nextgen_basic_thumbnails_number_of_columns', 'ajax_pagination', 'nextgen_basic_thumbnails_hidden', 'nextgen_basic_thumbnails_imagebrowser_effect', 'nextgen_basic_thumbnails_show_slideshow_link', 'nextgen_basic_thumbnails_slideshow_link_text', 'nextgen_basic_templates_template'); } /** * Renders the images_per_page settings field @@ -406,16 +406,6 @@ class A_NextGen_Basic_Thumbnail_Form extends Mixin_Display_Type_Form { return $this->_render_radio_field($display_type, 'use_imagebrowser_effect', __('Use imagebrowser effect', 'nggallery'), $display_type->settings['use_imagebrowser_effect'], __('When active each image in the gallery will link to an imagebrowser display and lightbox effects will not be applied.', 'nggallery')); } - /** - * Renders the AJAX pagination settings field - * - * @param C_Display_Type $display_type - * @return string - */ - function _render_nextgen_basic_thumbnails_ajax_pagination_field($display_type) - { - return $this->_render_radio_field($display_type, 'ajax_pagination', __('Enable AJAX pagination', 'nggallery'), $display_type->settings['ajax_pagination'], __('Browse images without reloading the page.', 'nggallery')); - } /** * Renders the show_slideshow_link settings field * diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php index 70214ada224ecb7834bf2355ee4b037b3f0fb28f..f254a416a9ad3016c78eac31fd68ab792228cb1e 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php @@ -13,16 +13,23 @@ define( class M_NextGen_Basic_ImageBrowser extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_basic_imagebrowser', 'NextGEN Basic ImageBrowser', 'Provides the NextGEN Basic ImageBrowser Display Type', - '0.13', - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com' + '0.14', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Basic_ImageBrowser_Installer'); @@ -171,7 +178,7 @@ function nggCreateImageBrowser($picturelist, $template = '') class C_NextGen_Basic_ImageBrowser_Installer extends C_Gallery_Display_Installer { - function install() + function install($reset = FALSE) { $this->install_display_type( NGG_BASIC_IMAGEBROWSER, array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.css b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.css index 89d61cfa4f85b617bf8be981d205fdb47a21a199..a33846ea8c476aa9b439fe52be7a5dc4c45b23d2 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.css +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.css @@ -56,3 +56,145 @@ margin-left: auto !important; margin-right: auto !important; } + + +/* TEMPLATES: Imagebrowser Simple and Dark */ + +.ngg-imagebrowser.ngg-imagebrowser-simple, +.ngg-imagebrowser.ngg-imagebrowser-dark { + padding: 0; + margin: 40px 0 !important; + text-align: center; + max-width: 1200px; + margin: 0 auto; + box-sizing: border-box; +} + +.ngg-imagebrowser.ngg-imagebrowser-dark { + background: #000; + padding: 0 20px; + box-shadow: 0 0 2px 1px rgba(150,150,150,.1); +} + +.ngg-imagebrowser.ngg-imagebrowser-simple h3, +.ngg-imagebrowser.ngg-imagebrowser-dark h3 { + font-size: 18px !important; + margin: 0 !important; + padding: 20px !important; + text-align: center; + font-weight: bold; +} + +.ngg-imagebrowser.ngg-imagebrowser-dark h3 { + color: #fff; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple img, +.ngg-imagebrowser.ngg-imagebrowser-dark img { + max-height: 500px; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .pic, +.ngg-imagebrowser.ngg-imagebrowser-simple .pic a, +.ngg-imagebrowser.ngg-imagebrowser-dark .pic, +.ngg-imagebrowser.ngg-imagebrowser-dark .pic a { + margin: 0; + border: none; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav { + text-align: center; + padding: 20px 20px 5px; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .back, +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .next, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .back, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .next { + float: none; + display: inline-block; + border: none; + background-color: rgba(0,0,0,.5); + border-radius: 15px; + width: 30px; + height: 30px; + padding: 0; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .fa, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .fa { + font-size: 16px; + color: #fff; + padding: 0 !important; + line-height: 30px; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .fa-chevron-right, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .fa-chevron-right { + margin-left: 2px; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .fa-chevron-left, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .fa-chevron-left { + margin-right: 2px; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav a, +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav a:hover, +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav a:focus, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav a, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav a:hover, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav a:focus { + box-shadow: none; + text-decoration: none; + padding: 0; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .counter, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .counter { + margin: 20px 0 22px; + font-size: 12px !important; + color: rgba(150,150,150,.7); +} + +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .counter { + color: #666; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-desc, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc { + text-align: center; + padding: 0 50px; + font-size: 14px; +} + +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc { + color: #999; + padding-bottom: 20px; +} + +.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-desc p:first-of-type, +.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc p:first-of-type { + margin-top: 0; + padding-top: 0; +} + +@media (max-width: 800px) { + + .ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav, + .ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav { + text-align: center; + padding: 20px 10px 5px; + } + + .ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-desc, + .ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc { + padding: 0; + font-size: 12px; + } + + .ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc { + padding-bottom: 20px; + } +} diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.min.css b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.min.css index 3591d5576bc2ffe09f0fc4aa125b645c41c9191d..7d2e080b6795fc15970c3009c5b97f7cecab4f68 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.min.css +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/static/style.min.css @@ -1 +1 @@ -.ngg-imagebrowser h3{text-align:center}.ngg-imagebrowser-desc{clear:both}.ngg-imagebrowser .pic{max-width:100%;margin-top:10px;margin-bottom:10px;border:1px solid #A9A9A9}.ngg-imagebrowser .pic a{display:block!important;font-size:0;margin:5px;text-align:center}.ngg-imagebrowser img{max-width:100%;margin:0 auto;padding:0;border:none}.ngg-imagebrowser-nav{padding:5px}.ngg-imagebrowser-nav .back{float:left;border:1px solid #DDD;padding:3px 7px}.ngg-imagebrowser-nav .next{float:right;border:1px solid #DDD;padding:3px 7px}.ngg-imagebrowser-nav .counter{text-align:center;font-size:.9em!important}.exif-data{margin-left:auto!important;margin-right:auto!important} \ No newline at end of file +.ngg-imagebrowser h3{text-align:center}.ngg-imagebrowser-desc{clear:both}.ngg-imagebrowser .pic{max-width:100%;margin-top:10px;margin-bottom:10px;border:1px solid #A9A9A9}.ngg-imagebrowser .pic a{display:block!important;font-size:0;margin:5px;text-align:center}.ngg-imagebrowser img{max-width:100%;margin:0 auto;padding:0;border:none}.ngg-imagebrowser-nav{padding:5px}.ngg-imagebrowser-nav .back{float:left;border:1px solid #DDD;padding:3px 7px}.ngg-imagebrowser-nav .next{float:right;border:1px solid #DDD;padding:3px 7px}.ngg-imagebrowser-nav .counter{text-align:center;font-size:.9em!important}.exif-data{margin-left:auto!important;margin-right:auto!important}.ngg-imagebrowser.ngg-imagebrowser-dark,.ngg-imagebrowser.ngg-imagebrowser-simple{padding:0;margin:40px 0!important;text-align:center;max-width:1200px;box-sizing:border-box}.ngg-imagebrowser.ngg-imagebrowser-dark{background:#000;padding:0 20px;box-shadow:0 0 2px 1px rgba(150,150,150,.1)}.ngg-imagebrowser.ngg-imagebrowser-dark h3,.ngg-imagebrowser.ngg-imagebrowser-simple h3{font-size:18px!important;margin:0!important;padding:20px!important;text-align:center;font-weight:700}.ngg-imagebrowser.ngg-imagebrowser-dark h3{color:#fff}.ngg-imagebrowser.ngg-imagebrowser-dark img,.ngg-imagebrowser.ngg-imagebrowser-simple img{max-height:500px}.ngg-imagebrowser.ngg-imagebrowser-dark .pic,.ngg-imagebrowser.ngg-imagebrowser-dark .pic a,.ngg-imagebrowser.ngg-imagebrowser-simple .pic,.ngg-imagebrowser.ngg-imagebrowser-simple .pic a{margin:0;border:none}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav{text-align:center;padding:20px 20px 5px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .back,.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .next,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .back,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .next{float:none;display:inline-block;border:none;background-color:rgba(0,0,0,.5);border-radius:15px;width:30px;height:30px;padding:0}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .fa,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .fa{font-size:16px;color:#fff;padding:0!important;line-height:30px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .fa-chevron-right,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .fa-chevron-right{margin-left:2px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .fa-chevron-left,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .fa-chevron-left{margin-right:2px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav a,.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav a:focus,.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav a:hover,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav a,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav a:focus,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav a:hover{box-shadow:none;text-decoration:none;padding:0}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .counter,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav .counter{margin:20px 0 22px;font-size:12px!important;color:rgba(150,150,150,.7)}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav .counter{color:#666}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-desc{text-align:center;padding:0 50px;font-size:14px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc{color:#999;padding-bottom:20px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc p:first-of-type,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-desc p:first-of-type{margin-top:0;padding-top:0}@media (max-width:800px){.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-nav,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-nav{text-align:center;padding:20px 10px 5px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc,.ngg-imagebrowser.ngg-imagebrowser-simple .ngg-imagebrowser-desc{padding:0;font-size:12px}.ngg-imagebrowser.ngg-imagebrowser-dark .ngg-imagebrowser-desc{padding-bottom:20px}} \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/templates/imagebrowser-simple-template.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/templates/imagebrowser-simple-template.php new file mode 100644 index 0000000000000000000000000000000000000000..e6924c7b87155cc2e596682371bc2bbb56dc0ad8 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/templates/imagebrowser-simple-template.php @@ -0,0 +1,71 @@ +<?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?> + <div class='ngg-imagebrowser ngg-imagebrowser-simple' id='<?php echo $anchor; ?>' data-nextgen-gallery-id="<?php echo $displayed_gallery->id(); ?>"> + + <h3><?php echo esc_attr($image->alttext); ?></h3> + + <?php + + $template_params = array( + 'index' => 0, + 'class' => 'pic', + 'image' => $image, + ); + + $this->include_template('photocrati-nextgen_gallery_display#image/before', $template_params); + + ?> + <a href='<?php echo esc_attr($storage->get_image_url($image, 'full', TRUE)); ?>' + title='<?php echo esc_attr($image->description); ?>' + data-src="<?php echo esc_attr($storage->get_image_url($image)); ?>" + data-thumbnail="<?php echo esc_attr($storage->get_image_url($image, 'thumb')); ?>" + data-image-id="<?php echo esc_attr($image->{$image->id_field}); ?>" + data-title="<?php echo esc_attr($image->alttext); ?>" + data-description="<?php echo esc_attr(stripslashes($image->description)); ?>" + <?php echo $effect_code ?>> + <img title='<?php echo esc_attr($image->alttext); ?>' + alt='<?php echo esc_attr($image->alttext); ?>' + src='<?php echo esc_attr($storage->get_image_url($image, 'full', TRUE)); ?>'/> + </a> + <?php + + $this->include_template('photocrati-nextgen_gallery_display#image/after', $template_params); + + ?> + + <div class='ngg-imagebrowser-nav'> + + <div class='back'> + <a class='ngg-browser-prev' + id='ngg-prev-<?php echo $previous_pid; ?>' + href='<?php echo $previous_image_link; ?>'> + <i class="fa fa-chevron-left" aria-hidden="true"></i> + </a> + </div> + + <div class='next'> + <a class='ngg-browser-next' + id='ngg-next-<?php echo $next_pid; ?>' + href='<?php echo $next_image_link; ?>'> + <i class="fa fa-chevron-right" aria-hidden="true"></i> + </a> + </div> + + <div class='counter'> + <?php _e('Image', 'nggallery'); ?> <?php echo $number; ?> <?php _e('of', 'nggallery'); ?> <?php echo $total; ?> + </div> + + <div class='ngg-imagebrowser-desc'> + <p> + <?php echo $image->description; ?> + </p> + </div> + + </div> + +</div> +<?php $this->end_element(); ?> +<script type='text/javascript'> + jQuery(function($) { + new NggPaginatedGallery('<?php echo $displayed_gallery->id() ?>', '.ngg-imagebrowser'); + }); +</script> \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_singlepic/module.nextgen_basic_singlepic.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_singlepic/module.nextgen_basic_singlepic.php index 8d328698ffda4e25cef710518fa5e30da5667d40..5457b0e219c45124bc286b4f818f643ffb4232cb 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_singlepic/module.nextgen_basic_singlepic.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_singlepic/module.nextgen_basic_singlepic.php @@ -11,15 +11,22 @@ define('NGG_BASIC_SINGLEPIC', 'photocrati-nextgen_basic_singlepic'); class M_NextGen_Basic_Singlepic extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( NGG_BASIC_SINGLEPIC, 'NextGen Basic Singlepic', 'Provides a singlepic gallery for NextGEN Gallery', '0.14', - 'https://www.imagely.com', - 'Photocrati Media', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', 'https://www.imagely.com' ); @@ -138,7 +145,7 @@ class M_NextGen_Basic_Singlepic extends C_Base_Module class C_NextGen_Basic_SinglePic_Installer extends C_Gallery_Display_Installer { - function install() + function install($reset = FALSE) { $this->install_display_type( NGG_BASIC_SINGLEPIC, array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_tagcloud/module.nextgen_basic_tagcloud.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_tagcloud/module.nextgen_basic_tagcloud.php index 97a63f70579e33b57075d70d48ae5fc5f2883737..8cf48704ec8551367e449f72fe45ab3a51d1e5d9 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_tagcloud/module.nextgen_basic_tagcloud.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_tagcloud/module.nextgen_basic_tagcloud.php @@ -11,15 +11,22 @@ define('NGG_BASIC_TAGCLOUD', 'photocrati-nextgen_basic_tagcloud'); class M_NextGen_Basic_Tagcloud extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( NGG_BASIC_TAGCLOUD, 'NextGen Basic Tagcloud', 'Provides a tagcloud for NextGEN Gallery', '0.15', - 'https://www.imagely.com', - 'Photocrati Media', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', 'https://www.imagely.com' ); @@ -160,7 +167,7 @@ class C_NextGen_Basic_Tagcloud_Installer extends C_Gallery_Display_Installer /** * Installs the display type for NextGEN Basic Tagcloud */ - function install() + function install($reset = FALSE) { $this->install_display_type( NGG_BASIC_TAGCLOUD, array( diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_templates/module.nextgen_basic_templates.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_templates/module.nextgen_basic_templates.php index 9026042fc61a2b0dfe97c9d90578038e7ca06282..15e6668a22bcd215238245c13e34cc18d13c7343 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_templates/module.nextgen_basic_templates.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_templates/module.nextgen_basic_templates.php @@ -9,16 +9,23 @@ class M_NextGen_Basic_Templates extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_basic_templates', 'NextGen Basic Templates', 'Provides a NextGen-Legacy compatible thumbnail gallery for NextGEN Gallery', '0.7', - 'https://www.imagely.com', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php index 8b60bd29f3e6eda08f0f1973efe36aae7369d36d..941b6d09ef900ae26ff5d272bba21585c09d2748 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php @@ -9,15 +9,22 @@ class M_NextGen_Data extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen-data', 'NextGEN Data Tier', "Provides a data tier for NextGEN gallery based on the DataMapper module", '0.14', - 'https://www.imagely.com', - 'Photocrati Media', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', 'https://www.imagely.com' ); @@ -114,7 +121,7 @@ class M_NextGen_Data extends C_Base_Module $retval = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $retval ); $retval= preg_replace('/[\r\n\t ]+/', ' ', $retval); } - $retval = preg_replace("/\son[^=]+=/", '', $retval); + $retval = preg_replace("/\\son[^\\s=]+=/", '', $retval); return $retval; } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php index 67fe6541122b88c5bd3f21bbb40c1cf5c912319f..9a44ef42fbffde7340e976e4fc27da8082dc0f09 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php @@ -867,6 +867,14 @@ class Mixin_GalleryStorage_Driver_Base extends Mixin { return $this->object->get_image_url($image, 'full', $check_existance); } + function get_image_checksum($image, $size = 'full') + { + $retval = NULL; + if ($image_abspath = $this->get_image_abspath($image, $size, TRUE)) { + $retval = md5_file($image_abspath); + } + return $retval; + } /** * Gets the dimensions for a particular-sized image * @@ -1213,7 +1221,7 @@ class Mixin_GalleryStorage_Driver_Base extends Mixin } // Ensure that fullsize dimensions are added to metadata array $dimensions = getimagesize($abs_filename); - $full_meta = array('width' => $dimensions[0], 'height' => $dimensions[1]); + $full_meta = array('width' => $dimensions[0], 'height' => $dimensions[1], 'md5' => $this->object->get_image_checksum($image, 'full')); if (!isset($image->meta_data) or is_string($image->meta_data) && strlen($image->meta_data) == 0) { $image->meta_data = array(); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php index 8b77d9753133c0211918a2c0ced2b476655a8969..f4c75e51b4899a20ce0cbb90e8a22325eee8e310 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php @@ -10,16 +10,23 @@ if (!defined('NGG_SHOW_DISPLAYED_GALLERY_ERRORS')) define('NGG_SHOW_DISPLAYED_GA class M_Gallery_Display extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_gallery_display', 'Gallery Display', 'Provides the ability to display gallery of images', - '0.16', - 'https://www.imagely.com', - 'Photocrati Media', - 'https://www.imagely.com' + '0.17', + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); C_Photocrati_Installer::add_handler($this->module_id, 'C_Display_Type_Installer'); @@ -492,6 +499,33 @@ class M_Gallery_Display extends C_Base_Module 'Mixin_Display_Type_Form' => 'mixin.display_type_form.php' ); } + + /** + * Gets a list of directories in which display type template might be stored + * + * @param C_Display_Type $display_type + * @return array + */ + static function get_display_type_view_dirs($display_type) + { + if (!is_object($display_type)) $display_type = C_Display_Type_Mapper::get_instance()->find_by_name($display_type); + + /* Create array of directories to scan */ + $dirs = array( + 'default' => C_Component_Registry::get_instance()->get_module_dir($display_type->name) . DIRECTORY_SEPARATOR . 'templates', + 'custom' => WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'ngg' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $display_type->name . DIRECTORY_SEPARATOR . 'templates', + ); + + /* Apply filters so third party devs can add directories for their templates */ + $dirs = apply_filters('ngg_display_type_template_dirs', $dirs, $display_type); + $dirs = apply_filters('ngg_' . $display_type->name . '_template_dirs', $dirs, $display_type); + foreach ($display_type->aliases as $alias) { + $dirs = apply_filters("ngg_{$alias}_template_dirs", $dirs, $display_type); + } + + return $dirs; + } + } class C_Display_Type_Installer diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php index 9b807fb5dccd6ae9448759394a78ce351d075260..9a73a92caaf617b29717cc5380fa0129dcf5da7c 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php @@ -491,6 +491,49 @@ class Mixin_Display_Type_Controller extends Mixin } return array('entities' => $entities, 'longest' => $longest, 'widest' => $widest); } + /** + * Renders a view after checking for templates + */ + function create_view($template, $params = array(), $context = NULL) + { + if (isset($params['displayed_gallery'])) { + if (isset($params['displayed_gallery']->display_settings)) { + if (isset($params['displayed_gallery']->display_settings['display_type_view'])) { + if ('default' !== $params['displayed_gallery']->display_settings['display_type_view']) { + $template = $this->get_display_type_view_abspath($template, $params); + } + } + } + } + return $this->call_parent('create_view', $template, $params, $context); + } + /** + * Finds the abs path of template given file name and list of posssible directories + * @param string $template + * @param array $params + * @return string $template + */ + function get_display_type_view_abspath($template, $params) + { + /* Identify display type and display_type_view */ + $display_type_name = $params['displayed_gallery']->display_type; + $display_type_view = $params['displayed_gallery']->display_settings['display_type_view']; + /* Fetch array of template directories */ + $dirs = M_Gallery_Display::get_display_type_view_dirs($display_type_name); + /* Set abspath for template based on directory placeholder in display_type_view */ + $path = pathinfo($display_type_view); + if ($path['dirname'] == ".") { + $template = $dirs['default'] . DIRECTORY_SEPARATOR . $path['basename']; + } else { + foreach ($dirs as $dir_name => $dir) { + if ($path['dirname'] == $dir_name) { + $template = $dir . DIRECTORY_SEPARATOR . $path['basename']; + } + } + } + /* Return template. If no match is found, returns the original template */ + return $template; + } } /** * Provides a datamapper to perform CRUD operations for Display Types @@ -2286,4 +2329,110 @@ class Mixin_Display_Type_Form extends Mixin { return $this->object->get_model()->save(array('settings' => $attributes)); } + /** + * Renders the AJAX pagination settings field + * + * @param C_Display_Type $display_type + * @return string + */ + function _render_ajax_pagination_field($display_type) + { + return $this->object->_render_radio_field($display_type, 'ajax_pagination', __('Enable AJAX pagination', 'nggallery'), isset($display_type->settings['ajax_pagination']) ? $display_type->settings['ajax_pagination'] : FALSE, __('Browse images without reloading the page.', 'nggallery')); + } + function _render_thumbnail_override_settings_field($display_type) + { + $hidden = !(isset($display_type->settings['override_thumbnail_settings']) ? $display_type->settings['override_thumbnail_settings'] : FALSE); + $override_field = $this->_render_radio_field($display_type, 'override_thumbnail_settings', __('Override thumbnail settings', 'nggallery'), isset($display_type->settings['override_thumbnail_settings']) ? $display_type->settings['override_thumbnail_settings'] : FALSE, __("This does not affect existing thumbnails; overriding the thumbnail settings will create an additional set of thumbnails. To change the size of existing thumbnails please visit 'Manage Galleries' and choose 'Create new thumbnails' for all images in the gallery.", 'nggallery')); + $dimensions_field = $this->object->render_partial('photocrati-nextgen_gallery_display#thumbnail_settings', array('display_type_name' => $display_type->name, 'name' => 'thumbnail_dimensions', 'label' => __('Thumbnail dimensions', 'nggallery'), 'thumbnail_width' => isset($display_type->settings['thumbnail_width']) ? intval($display_type->settings['thumbnail_width']) : 0, 'thumbnail_height' => isset($display_type->settings['thumbnail_height']) ? intval($display_type->settings['thumbnail_height']) : 0, 'hidden' => $hidden ? 'hidden' : '', 'text' => ''), TRUE); + /* + $qualities = array(); + for ($i = 100; $i > 40; $i -= 5) { $qualities[$i] = "{$i}%"; } + $quality_field = $this->_render_select_field( + $display_type, + 'thumbnail_quality', + __('Thumbnail quality', 'nggallery'), + $qualities, + isset($display_type->settings['thumbnail_quality']) ? $display_type->settings['thumbnail_quality'] : 100, + '', + $hidden + ); + */ + $crop_field = $this->_render_radio_field($display_type, 'thumbnail_crop', __('Thumbnail crop', 'nggallery'), isset($display_type->settings['thumbnail_crop']) ? $display_type->settings['thumbnail_crop'] : FALSE, '', $hidden); + /* + $watermark_field = $this->_render_radio_field( + $display_type, + 'thumbnail_watermark', + __('Thumbnail watermark', 'nggallery'), + isset($display_type->settings['thumbnail_watermark']) ? $display_type->settings['thumbnail_watermark'] : FALSE, + '', + $hidden + ); + */ + $everything = $override_field . $dimensions_field . $crop_field; + return $everything; + } + /** + * Renders the thumbnail override settings field(s) + * + * @param C_Display_Type $display_type + * @return string + */ + function _render_image_override_settings_field($display_type) + { + $hidden = !(isset($display_type->settings['override_image_settings']) ? $display_type->settings['override_image_settings'] : FALSE); + $override_field = $this->_render_radio_field($display_type, 'override_image_settings', __('Override image settings', 'nggallery'), isset($display_type->settings['override_image_settings']) ? $display_type->settings['override_image_settings'] : 0, __('Overriding the image settings will create an additional set of images', 'nggallery')); + $qualities = array(); + for ($i = 100; $i > 40; $i -= 5) { + $qualities[$i] = "{$i}%"; + } + $quality_field = $this->_render_select_field($display_type, 'image_quality', __('Image quality', 'nggallery'), $qualities, $display_type->settings['image_quality'], '', $hidden); + $crop_field = $this->_render_radio_field($display_type, 'image_crop', __('Image crop', 'nggallery'), $display_type->settings['image_crop'], '', $hidden); + $watermark_field = $this->_render_radio_field($display_type, 'image_watermark', __('Image watermark', 'nggallery'), $display_type->settings['image_watermark'], '', $hidden); + $everything = $override_field . $quality_field . $crop_field . $watermark_field; + return $everything; + } + /** + * Renders a field for selecting a template + * + * @param C_Display_Type $display_type + * @return string + */ + function _render_display_type_view_field($display_type) + { + $display_type_views = $this->get_available_display_type_views($display_type); + return $this->object->_render_select_field($display_type, 'display_type_view', __('Select Template', 'nggallery'), $display_type_views, $display_type->settings['display_type_view'], '', FALSE); + } + /** + * Gets available templates + * + * @param C_Display_Type $display_type + * @return array + */ + function get_available_display_type_views($display_type) + { + /* Set up templates array */ + $views = array('default' => __('Default Template', 'nggallery')); + /* Fetch array of directories to scan */ + $dirs = M_Gallery_Display::get_display_type_view_dirs($display_type); + /* Populate the views array by scanning each directory for relevant templates */ + foreach ($dirs as $dir_name => $dir) { + /* Confirm directory exists */ + if (!file_exists($dir) || !is_dir($dir)) { + continue; + } + /* Scan for template files and create array */ + $files = scandir($dir); + $template_files = preg_grep('/^.+\\-template.php$/i', $files); + $template_files = $template_files ? array_combine($template_files, $template_files) : array(); + /* For custom templates only, append directory name placeholder */ + foreach ($template_files as $key => $value) { + if ($dir_name !== 'default') { + $template_files[$dir_name . DIRECTORY_SEPARATOR . $key] = $dir_name . DIRECTORY_SEPARATOR . $value; + unset($template_files[$key]); + } + } + $views = array_merge($views, $template_files); + } + return $views; + } } \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js index a68fc90c1f266776e010770dc6fb896356f5c0de..92ae0334b64bc9b3a01a05fff87d5368722a68a4 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js @@ -1,3 +1,35 @@ +/* @preserve + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Petka Antonov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + */ +/** + * bluebird build version 3.4.7 + * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each + */ +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){var t,e,n;return function r(t,e,n){function i(s,a){if(!e[s]){if(!t[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=e[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return i(n?n:e)},u,u.exports,r,t,e,n)}return e[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new u(16),this._normalQueue=new u(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=l}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(c){a=c}var l=t("./schedule"),u=t("./queue"),p=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){p.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(n){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},p.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype["break"]=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),this._enoughBranchesHaveCancelled()?(this._invokeOnCancel(),!0):!1)},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+H.toString(t));r._attachCancellationCallback(t)})}catch(i){return i}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?H.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(N(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);H.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),H.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function m(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function g(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function b(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||q.test(r),o=i&&nt(r);i&&!o&&($&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function C(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||q.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(H.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function k(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(o){I.throwLater(o)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():H.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(i){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function T(){return"function"==typeof it}function P(t){var e=t.match(rt);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=P(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=P(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return e&&e.fileName===n&&s<=e.line&&e.line<=a?!0:!1})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,V=e._getDomain,I=e._async,L=t("./errors").Warning,H=t("./util"),N=H.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==H.env("BLUEBIRD_DEBUG")||!H.env("BLUEBIRD_DEBUG")&&"development"!==H.env("NODE_ENV")),z=!(0==H.env("BLUEBIRD_WARNINGS")||!G&&!H.env("BLUEBIRD_WARNINGS")),X=!(0==H.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!H.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=H.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!H.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=V();A="function"==typeof t?null===e?t:H.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=V();O="function"==typeof t?null===e?t:H.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),I.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!H.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return H.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!H.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),H.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!H.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),Y=function(){return H.isNode?function(){return process.emit.apply(process,arguments)}:H.global?function(t){var e="on"+t.toLowerCase(),n=H.global[e];return n?(n.apply(H.global,[].slice.call(arguments,1)),!0):!1}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(n){I.throwLater(n),e=!0}var r=!1;try{r=J(t,Z[t].apply(null,arguments))}catch(n){I.throwLater(n),r=!0}return r||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,H.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(r){return r}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;H.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),g(r),H.notEnumerableProp(t,"stack",m(n,r)),H.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(o){i="stack"in o}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(D=function(t){console.warn(t)},H.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:H.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype["return"]=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype["throw"]=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(v){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var y="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<y.length;++m)"function"==typeof Array.prototype[y[m]]&&(d.prototype[y[m]]=Array.prototype[y[m]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var b=Error.__BluebirdErrorTypes__;b||(b=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:b,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:b.CancellationError,OperationalError:b.OperationalError,TimeoutError:b.TimeoutError,AggregateError:b.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(e){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(e){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise?(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0):!1}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype["finally"]=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new e(r);l._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n="undefined"!=typeof this._generator["return"];if(n)this._promise._pushContext(),t=f(this._generator["return"]).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=f(this._generator["throw"]).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator["throw"]).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&(o=a(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0), + s}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var m=++this._totalResolved;return m>=o?(null!==a?this._filter(r,a):this._resolve(r),!0):!1},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e["try"]=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if("function"!=typeof e)throw new m("expecting a function but got "+f.classString(e));if(t.constructor!==i)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==b&&(r(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new m(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),m=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var g=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),E=t("./promise_array")(i,b,j,p,n),k=t("./context")(i),F=k.create,x=t("./debuggability")(i,k),T=(x.CapturedTrace,t("./finally")(i,j)),P=t("./catch_filter")(C),R=t("./nodeback"),S=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype["catch"]=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1?!!Object(arguments[1]).multiArgs:!1,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new g("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,e?i:!1),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new m("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,E,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,E,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,x),t("./settle.js")(i,E,x),t("./some.js")(i,E,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");c.isArray;return c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function l(t,n){var o=r(this._values,this._promise);if(o instanceof e){o=o._target();var a=o._bitField;if(this._values=o,0===(50397184&a))return this._promise._setAsyncGuaranteed(),o._then(l,this._reject,void 0,this,n);if(0===(33554432&a))return 0!==(16777216&a)?this._reject(o._reason()):this._cancel();o=o._value()}if(o=c.asArray(o),null===o){var u=i("expecting an array or an iterable object but got "+c.classString(o)).reason();return void this._promise._rejectCallback(u,!1)}return 0===o.length?void(-5===n?this._resolveEmptyArray():this._resolve(s(n))):void this._iterate(o)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!C.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(e){return!1}}function o(t,e,n){var r=f.getDataPropertyOrDefault(t,e+n,b);return r?i(r):!1}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new m("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=f.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],h=r===j?!0:j(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,h)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===h&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=_(o,a);try{s.apply(i,d(arguments,c))}catch(p){o._rejectCallback(v(p),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),f.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(E(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,m=t("./errors").TypeError,g="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new m("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new m("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=g);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&f.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(t=s.asArray(t),null===t)return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length?(this._resolve(this._values),!0):!1},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){ + if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()?(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0):!1},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(e){return l.e=e,l}}function s(t){try{return p.call(t,"_promise0")}catch(e){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(p){return a(p)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,m=_.tryCatch,g={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():g},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==g?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var g=r(d);g instanceof e&&(d=g._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=m(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=P;return P=null,t.apply(this,arguments)}catch(e){return T.e=e,T}}function i(t){return P=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!F.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return F.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=F.names(t.prototype),n=F.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&F.names(t).length>0;if(n||r||i)return!0}return!1}catch(o){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(e){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function m(t){try{u(t,"isOperational",!0)}catch(e){}}function g(t){return null==t?!1:t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0}function b(t){return y(t)&&F.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=F.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{F.defineProperty(e,o,F.getDescriptor(t,o))}catch(s){}}}function j(t){return N?process.env[t]:void 0}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(e){}}function k(t,e){return t.bind(e)}var F=t("./es5"),x="undefined"==typeof navigator,T={e:{}},P,R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(F.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(s){return r}for(var a=0;a<o.length;++a){var c=o[a];if(!i[c]){i[c]=!0;var l=Object.getOwnPropertyDescriptor(t,c);null!=l&&null==l.get&&null==l.set&&r.push(c)}}t=F.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,V=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(e){return e}}}(),I=function(t){return F.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return F.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var H="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),N="undefined"!=typeof process&&"undefined"!=typeof process.env,B={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:F.isArray,asArray:I,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:x,errorObj:T,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:V,originatesFromRejection:g,markAsOriginatingFromRejection:m,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:H,hasEnvVariables:N,env:j,global:R,getNativePromise:E,domainBind:k};B.isRecentNode=B.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(U){B.lastLineError=U}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise); + (function($) { window.NggPaginatedGallery = function(displayed_gallery_id, container) { this.displayed_gallery_id = displayed_gallery_id; @@ -58,15 +90,35 @@ }); if (replacement) { self.container.each(function () { - if ($(this).data('nextgen-gallery-id') != self.displayed_gallery_id) { + var $this = $(this); + + if ($this.data('nextgen-gallery-id') != self.displayed_gallery_id) { return true; } - $(this).html(replacement.html()); + + // If the image gallery makes up the bulk of the post/page content the .html() call + // below will empty the contents causing the browser's scroll position to be reset to + // zero as the browser believes it has been pushed back to the top of the page. Here + // we give the parent container a min-height equal to the gallery's height to prevent + // this flicker and resetting of the scroll position. + var $new_element = $(replacement.html()); + var promises = $new_element.find('img').toArray().map(function(img){ + return new Promise(function(resolve, reject){ + var i = new Image(); + i.src = img.src; + $(i).on('load', resolve); + }); + }); + + Promise.all(promises).then(function(){ + $this.html($new_element); + + // Let the user know that we've refreshed the content + $(document).trigger('refreshed'); + }); + return true; }); - - // Let the user know that we've refreshed the content - $(document).trigger('refreshed'); } } }); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js index a47f5ba3299704dd4f7efa665fe905241e127274..c67a02db042bd3474f99d7b5c08e41c4102186ff 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js @@ -1 +1,3 @@ -!function(n){window.NggPaginatedGallery=function(a,e){this.displayed_gallery_id=a,this.container=n(e),this.container_name=e,this.get_displayed_gallery_obj=function(){var n="gallery_"+this.displayed_gallery_id;return"undefined"!=typeof window.galleries[n]&&window.galleries[n]},this.enable_ajax_pagination=function(){var a=this;n("body").on("click","a.ngg-browser-prev, a.ngg-browser-next",function(i){var t=!0;n(this).parents(e).each(function(){return n(this).data("nextgen-gallery-id")!=a.displayed_gallery_id||void(t=!1)}),t||(i.preventDefault(),window.ngg_ajax_operaton_count++,n("body, a").css("cursor","wait"),n.get(n(this).attr("href"),function(e){if(window.ngg_ajax_operaton_count--,window.ngg_ajax_operaton_count<=0&&(window.ngg_ajax_operaton_count=0,n("body, a").css("cursor","auto")),e){var i=n(e),t=!1;i.find(a.container_name).each(function(){return!!t||(n(this).data("nextgen-gallery-id")!=a.displayed_gallery_id||void(t=n(this)))}),t&&(a.container.each(function(){return n(this).data("nextgen-gallery-id")!=a.displayed_gallery_id||(n(this).html(t.html()),!0)}),n(document).trigger("refreshed"))}}))})};var i=this.get_displayed_gallery_obj();i&&"undefined"!=typeof i.display_settings.ajax_pagination&&parseInt(i.display_settings.ajax_pagination)&&this.enable_ajax_pagination(),"undefined"==typeof window.ngg_ajax_operation_count&&(window.ngg_ajax_operaton_count=0)}}(jQuery); \ No newline at end of file +!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return i(n?n:t)},u,u.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(t){a=t}var c=t("./schedule"),l=t("./queue"),u=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){u.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},u.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){var e=this.pop(),r=n(t,e);return r.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,n="number"==typeof t;if(n)e=o;else if(c){var r=s(t);e=null!==r?r:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+N.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?N.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!==(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);N.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),N.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function g(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function m(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function b(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||q.test(r),o=i&&nt(r);i&&!o&&($&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function C(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||q.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(N.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function k(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){I.throwLater(t)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():N.toString(t);var n=/\[object [a-zA-Z0-9$_]+\]/;if(n.test(e))try{var r=JSON.stringify(t);e=r}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function T(){return"function"==typeof it}function P(t){var e=t.match(rt);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=P(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=P(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,V=e._getDomain,I=e._async,L=t("./errors").Warning,N=t("./util"),H=N.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==N.env("BLUEBIRD_DEBUG")||!N.env("BLUEBIRD_DEBUG")&&"development"!==N.env("NODE_ENV")),z=!(0==N.env("BLUEBIRD_WARNINGS")||!G&&!N.env("BLUEBIRD_WARNINGS")),X=!(0==N.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!N.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=N.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!N.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=V();A="function"==typeof t?null===e?t:N.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=V();O="function"==typeof t?null===e?t:N.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),I.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!N.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!N.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),N.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!N.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),Y=function(){return N.isNode?function(){return process.emit.apply(process,arguments)}:N.global?function(t){var e="on"+t.toLowerCase(),n=N.global[e];return!!n&&(n.apply(N.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(t){I.throwLater(t),e=!0}var n=!1;try{n=J(t,Z[t].apply(null,arguments))}catch(t){I.throwLater(t),n=!0}return n||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,N.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;N.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),m(r),N.notEnumerableProp(t,"stack",g(n,r)),N.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(D=function(t){console.warn(t)},N.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:N.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(t){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<v.length;++y)"function"==typeof Array.prototype[v[y]]&&(d.prototype[v[y]]=Array.prototype[v[y]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(t){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{var l=this._promise=new e(r);l._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,n="undefined"!=typeof this._generator.return;if(n)this._promise._pushContext(),t=f(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),t=f(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&(o=a(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0===(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r((void 0),(void 0),n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){ +if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj,e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0===(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0===(33554432&y))return 0!==(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}var g=++this._totalResolved;return g>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if("function"!=typeof e)throw new g("expecting a function but got "+f.classString(e));if(t.constructor!==i)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==b&&(r(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new g(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),g=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var m=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),E=t("./promise_array")(i,b,j,p,n),k=t("./context")(i),F=k.create,x=t("./debuggability")(i,k),T=(x.CapturedTrace,t("./finally")(i,j)),P=t("./catch_filter")(C),R=t("./nodeback"),S=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){var n=this._then(t,e,void 0,void 0,void 0);n._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!==(2097152&this._bitField)&&(r=0!==(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!==(50397184&u)){var h,_,d=l._settlePromiseCtx;0!==(33554432&u)?(_=l._rejectionHandler0,h=t):0!==(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0===(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!==(33554432&o))this._fulfill(r._value());else if(0!==(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,!!e&&i),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0===(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new g("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();i=r._bitField,0===(65536&i)&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!==(134217728&a);0!==(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!==(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!==(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new i(b);return{promise:t,resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,E,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,E,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,x),t("./settle.js")(i,E,x),t("./some.js")(i,E,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");return c.isArray,c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(n,o){var a=r(this._values,this._promise);if(a instanceof e){a=a._target();var l=a._bitField;if(this._values=a,0===(50397184&l))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0===(33554432&l))return 0!==(16777216&l)?this._reject(a._reason()):this._cancel();a=a._value()}if(a=c.asArray(a),null===a){var u=i("expecting an array or an iterable object but got "+c.classString(a)).reason();return void this._promise._rejectCallback(u,!1)}return 0===a.length?void(-5===o?this._resolveEmptyArray():this._resolve(s(o))):void this._iterate(a)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0===(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!==(33554432&s)?this._promiseFulfilled(c._value(),a):0!==(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!C.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function o(t,e,n){var r=f.getDataPropertyOrDefault(t,e+n,b);return!!r&&i(r)}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new g("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=f.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],h=r===j||j(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,h)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===h&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=_(o,a);try{s.apply(i,d(arguments,c))}catch(t){o._rejectCallback(v(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),f.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(E(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],p=s[c+1],_=u+e;if(r===k)t[_]=k(u,h,u,p,e,i);else{var d=r(p,function(){return k(u,h,u,p,e,i)});f.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return f.toFastProperties(t),t}function u(t,e,n){return k(t,e,void 0,t,null,n)}var p,h={},f=t("./util"),_=t("./nodeback"),d=f.withAppended,v=f.maybeWrapAsError,y=f.canEvaluate,g=t("./errors").TypeError,m="Async",b={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],C=new RegExp("^(?:"+w.join("|")+")$"),j=function(t){return f.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},E=function(t){return t.replace(/([$])/,"\\$")},k=y?p:c;e.promisify=function(t,e){if("function"!=typeof t)throw new g("expecting a function but got "+f.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?h:e.context,o=!!e.multiArgs,s=u(t,n,o);return f.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new g("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r=m);var i=e.filter;"function"!=typeof i&&(i=j);var o=e.promisifier;if("function"!=typeof o&&(o=k),!f.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=f.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&f.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var n=++this._totalResolved;if(n>=this._length){var r;if(this._isMap)r=h(this._values);else{r={};for(var i=this.length(),o=0,s=this.length();s>o;++o)r[this._values[o+i]]=this._values[o]}return this._resolve(r),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var n=this._front+e&this._capacity-1;this[n]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var n=this._front,i=this._length,o=n+i&e-1;r(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(t=s.asArray(t),null===t)return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){if("function"!=typeof e)return r("expecting a function but got "+f.classString(e));var o=new a(t,e,n,i);return o.promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),n=!1});i.observe(r,e);var o=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),o()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection,s=t("./util");s.inherits(i,n),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var n=++this._totalResolved;return n>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]); +this._init$(void 0,-5);var t=l(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return l.e=t,l}}function s(t){try{return p.call(t,"_promise0")}catch(t){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(t){return a(t)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,g=_.tryCatch,m={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==m?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){var n=this.data();return n.call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var m=r(d);m instanceof e&&(d=m._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=g(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=F;return F=null,t.apply(this,arguments)}catch(t){return P.e=t,P}}function i(t){return F=t,r}function o(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!x.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return x.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=x.names(t.prototype),n=x.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&x.names(t).length>0;if(n||r||i)return!0}return!1}catch(t){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(t){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(t){}}function m(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function b(t){return y(t)&&x.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=x.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{x.defineProperty(e,o,x.getDescriptor(t,o))}catch(t){}}}function j(t){return H?process.env[t]:void 0}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function k(t,e){return t.bind(e)}var F,x=t("./es5"),T="undefined"==typeof navigator,P={e:{}},R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(x.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(t){return r}for(var s=0;s<o.length;++s){var a=o[s];if(!i[a]){i[a]=!0;var c=Object.getOwnPropertyDescriptor(t,a);null!=c&&null==c.get&&null==c.set&&r.push(a)}}t=x.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,V=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(t){return t}}}(),I=function(t){return x.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return x.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var N="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),H="undefined"!=typeof process&&"undefined"!=typeof process.env,B={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:x.isArray,asArray:I,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:T,errorObj:P,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:V,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:H,env:j,global:R,getNativePromise:E,domainBind:k};B.isRecentNode=B.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(t){B.lastLineError=t}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(t){window.NggPaginatedGallery=function(e,n){this.displayed_gallery_id=e,this.container=t(n),this.container_name=n,this.get_displayed_gallery_obj=function(){var t="gallery_"+this.displayed_gallery_id;return"undefined"!=typeof window.galleries[t]&&window.galleries[t]},this.enable_ajax_pagination=function(){var e=this;t("body").on("click","a.ngg-browser-prev, a.ngg-browser-next",function(r){var i=!0;t(this).parents(n).each(function(){return t(this).data("nextgen-gallery-id")!=e.displayed_gallery_id||void(i=!1)}),i||(r.preventDefault(),window.ngg_ajax_operaton_count++,t("body, a").css("cursor","wait"),t.get(t(this).attr("href"),function(n){if(window.ngg_ajax_operaton_count--,window.ngg_ajax_operaton_count<=0&&(window.ngg_ajax_operaton_count=0,t("body, a").css("cursor","auto")),n){var r=t(n),i=!1;r.find(e.container_name).each(function(){return!!i||(t(this).data("nextgen-gallery-id")!=e.displayed_gallery_id||void(i=t(this)))}),i&&e.container.each(function(){var n=t(this);if(n.data("nextgen-gallery-id")!=e.displayed_gallery_id)return!0;var r=t(i.html()),o=r.find("img").toArray().map(function(e){return new Promise(function(n,r){var i=new Image;i.src=e.src,t(i).on("load",n)})});return Promise.all(o).then(function(){n.html(r),t(document).trigger("refreshed")}),!0})}}))})};var r=this.get_displayed_gallery_obj();r&&"undefined"!=typeof r.display_settings.ajax_pagination&&parseInt(r.display_settings.ajax_pagination)&&this.enable_ajax_pagination(),"undefined"==typeof window.ngg_ajax_operation_count&&(window.ngg_ajax_operaton_count=0)}}(jQuery); \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/templates/thumbnail_settings.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/templates/thumbnail_settings.php new file mode 100644 index 0000000000000000000000000000000000000000..f6d4e9bbbe656a3c80bc9ca6e02689a697578397 --- /dev/null +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/templates/thumbnail_settings.php @@ -0,0 +1,22 @@ +<tr id='tr_<?php print esc_attr("{$display_type_name}_{$name}"); ?>' class='<?php print !empty($hidden) ? 'hidden' : ''; ?>'> + <td> + <label for="<?php print esc_attr("{$display_type_name}_{$name}"); ?>" + <?php if (!empty($text)) { ?>title='<?php print esc_attr($text); ?>'<?php } ?> + <?php if (!empty($text)) { ?>class='tooltip'<?php } ?>> + <?php print $label; ?> + </label> + </td> + <td> + <?php + $thumbnails_template_width_value = $thumbnail_width; + $thumbnails_template_height_value = $thumbnail_height; + $thumbnails_template_id = $display_type_name . '_thumbnail_dimensions'; + $thumbnails_template_width_id = $display_type_name . '_thumbnail_width'; + $thumbnails_template_height_id = $display_type_name . '_thumbnail_height'; + $thumbnails_template_name = $display_type_name . '_thumbnail_dimensions'; + $thumbnails_template_width_name = $display_type_name . '[thumbnail_width]'; + $thumbnails_template_height_name = $display_type_name . '[thumbnail_height]'; + include(NGGALLERY_ABSPATH . implode(DIRECTORY_SEPARATOR, array('admin', 'thumbnails-template.php'))); + ?> + </td> +</tr> \ No newline at end of file diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_other_options/module.nextgen_other_options.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_other_options/module.nextgen_other_options.php index 9f7423764ea63a033e6b0ef1b09521196128a9af..27ae232f3399cbc897025dd0999d49fff3de3974 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_other_options/module.nextgen_other_options.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_other_options/module.nextgen_other_options.php @@ -10,7 +10,14 @@ define('NGG_OTHER_OPTIONS_SLUG', 'ngg_other_options'); class M_NextGen_Other_Options extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_other_options', @@ -18,7 +25,7 @@ class M_NextGen_Other_Options extends C_Base_Module 'NextGEN Gallery Others Options Page', '0.9', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pagination/module.nextgen_pagination.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pagination/module.nextgen_pagination.php index fa7d2710399781804ed6c0df02f156cb6cb47551..d201dd641035111d41aaf98c1a3007ab7bdb6199 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pagination/module.nextgen_pagination.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pagination/module.nextgen_pagination.php @@ -6,7 +6,14 @@ */ class M_NextGen_Pagination extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_pagination', @@ -14,7 +21,7 @@ class M_NextGen_Pagination extends C_Base_Module "Provides pagination for display types", '0.4', "https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/", - "Photocrati Media", + "Imagely", "https://www.imagely.com" ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pro_upgrade/module.nextgen_pro_upgrade.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pro_upgrade/module.nextgen_pro_upgrade.php index fef37a231f08e01a8893d66b45f5b2f083e6cd9e..3217f9d84f0f56e51f2577be60693b59ba7141b8 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pro_upgrade/module.nextgen_pro_upgrade.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_pro_upgrade/module.nextgen_pro_upgrade.php @@ -8,7 +8,14 @@ class M_NextGen_Pro_Upgrade extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_pro_upgrade', @@ -16,7 +23,7 @@ class M_NextGen_Pro_Upgrade extends C_Base_Module 'NextGEN Gallery Pro Upgrade Page', '0.6', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php index 66d88af6150db587b06b06c471c214e5a40a639b..14fab0d9d4b2abce0e94d2663249b31be1131712 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php @@ -5,15 +5,22 @@ class M_NextGen_Settings extends C_Base_Module /** * Defines the module */ - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_settings', 'NextGEN Gallery Settings', 'Provides central management for NextGEN Gallery settings', - '0.15', + '0.16', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_xmlrpc/module.nextgen_xmlrpc.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_xmlrpc/module.nextgen_xmlrpc.php index eb29b7452a888e7fc4af0cbba1ca7337e9d99d28..0ea62481da87a28b4bcf5e620c5f4cce4a973105 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_xmlrpc/module.nextgen_xmlrpc.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_xmlrpc/module.nextgen_xmlrpc.php @@ -8,7 +8,14 @@ class M_NextGen_XmlRpc extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen_xmlrpc', @@ -16,7 +23,7 @@ class M_NextGen_XmlRpc extends C_Base_Module 'Provides an XML-RPC API for NextGEN Gallery', '0.6', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/functions.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/functions.php index 4bcfe64856b0d3e83ddd2ff51922b4ecfea99adb..e778ed3360c1c3e7ffea33657b9e87a3ac879747 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/functions.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/functions.php @@ -115,14 +115,12 @@ class nggAdmin{ if ($output == false) return $galleryID; - if ($galleryID != false && !isset($_REQUEST['attach_to_post'])) { - $message = __('Gallery ID %1$s successfully created. You can show this gallery in your post or page with the shortcode %2$s.<br/>','nggallery'); - $message = sprintf($message, $galleryID, '<strong>[nggallery id=' . $galleryID . ']</strong>'); - $message .= '<a href="' . admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid=' . $galleryID . '" >'; - $message .= __('Edit gallery','nggallery'); - $message .= '</a>'; - - if ($output) nggGallery::show_message($message, 'gallery_created_msg'); + if ($galleryID != false && !isset($_REQUEST['attach_to_post'])) + { + $url = admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid=' . $galleryID; + $message = sprintf(__('Gallery successfully created. <a href="%s" target="_blank">Manage gallery</a>', 'nggallery'), $url); + if ($output) + nggGallery::show_message($message, 'gallery_created_msg'); } return true; } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage.php index 4f35741e77244ac3f97442fd963b0094aaa1203e..d06a6372f5ed808c3ccf545c10f2389907b1e745 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage.php @@ -39,10 +39,12 @@ class nggManageGallery { // Should be called via a publish dialog if ( isset($_POST['page']) && $_POST['page'] == 'publish-post' ) $this->publish_post(); + //Look for other POST process if ( !empty($_POST) || !empty($_GET) ) $this->processor(); + M_NextGen_Admin::emit_do_notices_action(); } function controller() { diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php index a1b3b23dd14bca99d044915ce22372f8fa6abd56..a954f6edcab4c02733acd8c3d4a8e6c7d2ec6fb6 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php @@ -235,14 +235,11 @@ class nggdb * @id The gallery ID */ function delete_gallery( $id ) { - global $wpdb; - - $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->nggpictures WHERE galleryid = %d", $id) ); - $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->nggallery WHERE gid = %d", $id) ); - + $mapper = C_Gallery_Mapper::get_instance(); + $gallery = $mapper->find($id); + $mapper->destroy($gallery); wp_cache_delete($id, 'ngg_gallery'); - //TODO:Remove all tag relationship return true; } @@ -605,7 +602,7 @@ class nggdb * @param (optional) int $author * @return bool result of the ID of the inserted gallery */ - function add_gallery( $title = '', $path = '', $description = '', $pageid = 0, $previewpic = 0, $author = 0 ) { + static function add_gallery( $title = '', $path = '', $description = '', $pageid = 0, $previewpic = 0, $author = 0 ) { global $wpdb; // slug must be unique, we use the title for that @@ -619,6 +616,9 @@ class nggdb $galleryID = (int) $wpdb->insert_id; + do_action('ngg_created_new_gallery', $galleryID); + C_Photocrati_Transient_Manager::flush('displayed_gallery_rendering'); + //and give me the new id return $galleryID; } @@ -813,7 +813,7 @@ class nggdb $searchand = ' AND '; } - $term = $wpdb->escape($request); + $term = esc_sql($request); if (count($search_terms) > 1 && $search_terms[0] != $request ) $search .= " OR (title LIKE '{$n}{$term}{$n}') OR (name LIKE '{$n}{$term}{$n}')"; @@ -861,7 +861,7 @@ class nggdb $searchand = ' AND '; } - $term = $wpdb->escape($request); + $term = esc_sql($request); if (count($search_terms) > 1 && $search_terms[0] != $request ) $search .= " OR (name LIKE '{$n}{$term}{$n}')"; diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php index 5a71b593f8a000e85a93559cf0caf29351abfce4..5a1409d5327f682bb7ac0de81d0f305997ac1f04 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php @@ -10,15 +10,22 @@ define( class M_NggLegacy extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen-legacy', 'NextGEN Legacy', 'Embeds the original version of NextGEN 1.9.3 by Alex Rabe', - '0.19', + '0.20', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); @@ -76,13 +83,14 @@ class C_NggLegacy_Installer function uninstall($hard=FALSE) { include_once('admin/install.php'); - - delete_option('ngg_init_check'); - delete_option('ngg_update_exists'); - delete_option( 'ngg_options' ); - delete_option( 'ngg_db_version' ); - delete_option( 'ngg_update_exists' ); - delete_option( 'ngg_next_update' ); + if ($hard) { + delete_option('ngg_init_check'); + delete_option('ngg_update_exists'); + delete_option( 'ngg_options' ); + delete_option( 'ngg_db_version' ); + delete_option( 'ngg_update_exists' ); + delete_option( 'ngg_next_update' ); + } // now remove the capability ngg_remove_capability("NextGEN Gallery overview"); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/album-compact.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/album-compact.php index 921c49d16d28cc362105d3cd824a4845d4391eb4..c3d13f36b36d20a86f458d0ceaea94e7981238b3 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/album-compact.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/album-compact.php @@ -23,9 +23,26 @@ Follow variables are useable : <div class="ngg-album-compact"> <div class="ngg-album-compactbox"> <div class="ngg-album-link"> - <a class="Link" href="<?php echo nextgen_esc_url($gallery->pagelink) ?>"> - <img class="Thumb" alt="<?php echo esc_attr($gallery->title) ?>" src="<?php echo nextgen_esc_url($gallery->previewurl) ?>"/> - </a> + <?php if ($open_gallery_in_lightbox && $gallery->entity_type == 'gallery') { ?> + <a <?php echo $gallery->displayed_gallery->effect_code; ?> + href="<?php echo esc_attr($gallery->previewpic_fullsized_url); ?>" + data-fullsize="<?php echo esc_attr($gallery->previewpic_fullsized_url); ?>" + data-src="<?php echo esc_attr($gallery->previewpic_fullsized_url); ?>" + data-thumbnail="<?php echo esc_attr($gallery->previewurl); ?>" + data-title="<?php echo esc_attr($gallery->previewpic_image->alttext); ?>" + data-description="<?php echo esc_attr(stripslashes($gallery->previewpic_image->description)); ?>" + data-image-id="<?php echo esc_attr($gallery->previewpic); ?>"> + <img class="Thumb" + alt="<?php echo esc_attr($gallery->title); ?>" + src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/> + </a> + <?php } else { ?> + <a class="Link" href="<?php echo nextgen_esc_url($gallery->pagelink); ?>"> + <img class="Thumb" + alt="<?php echo esc_attr($gallery->title); ?>" + src="<?php echo nextgen_esc_url($gallery->previewurl); ?>"/> + </a> + <?php } ?> </div> </div> <?php if (!empty($image_gen_params)) { diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/module.router.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/module.router.php index 4906aaea2ee55b81c2e76ff4bc1fd1be1a173cf7..4c1d7d58447984e71fc8802ac36686bd06bfa774 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/module.router.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/module.router.php @@ -2,7 +2,14 @@ class M_Router extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-router', @@ -10,7 +17,7 @@ class M_Router extends C_Base_Module 'Provides routing capabilities for Pope modules', '0.9', 'https://www.imagely.com', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/package.module.router.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/package.module.router.php index ac80a65bc8906f5f015f5a26de4d485a5e25c7e3..3e783ea1e1bac404bdb1ceb6be7234f038d00297 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/package.module.router.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/router/package.module.router.php @@ -27,7 +27,7 @@ class C_Http_Response_Controller extends C_Component } return self::$_instance; } - function define() + function define($context = FALSE) { $this->add_mixin('Mixin_Http_Response_Actions'); $this->implement('I_Http_Response'); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/security/module.security.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/security/module.security.php index 9c2d2de7e44b97993970b51b59014de81dffc45c..490a062c0e37d76ed8d0c01008a5f6ed3343da40 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/security/module.security.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/security/module.security.php @@ -1,7 +1,14 @@ <?php class M_Security extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-security', @@ -9,7 +16,7 @@ class M_Security extends C_Base_Module 'Provides utilities to check for credentials and security', '0.3', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/simplehtmldom/module.simple_html_dom.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/simplehtmldom/module.simple_html_dom.php index 476d4b19fce4d103792ca928e1a08f943fb4d034..76da004903efe26e2792d85c8184252690c2d3b1 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/simplehtmldom/module.simple_html_dom.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/simplehtmldom/module.simple_html_dom.php @@ -10,7 +10,14 @@ if (!function_exists(('file_get_html'))) require_once('simplehtmldom/simple_html class M_Simple_Html_Dom extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-simple_html_dom', @@ -18,7 +25,7 @@ class M_Simple_Html_Dom extends C_Base_Module 'Provides the simple_html_dom utility for other modules to use', '1.5', 'https://www.imagely.com', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php index 3c593869ecb46bac551b9de4e1cc4628b42e5af5..8913b1cbd5d6b6012774a6b95e70033967ac0879 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php @@ -1,7 +1,16 @@ <?php class M_Third_Party_Compat extends C_Base_Module { - function define() + protected $wpseo_images = array(); + + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-third_party_compat', @@ -9,7 +18,7 @@ class M_Third_Party_Compat extends C_Base_Module "Adds Third party compatibility hacks, adjustments, and modifications", '0.6', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); @@ -113,6 +122,7 @@ class M_Third_Party_Compat extends C_Base_Module add_filter('ngg_non_minified_modules', array($this, 'dont_minify_nextgen_pro_cssjs')); add_filter('ngg_atp_show_display_type', array($this, 'atp_check_pro_albums'), 10, 2); add_filter('run_ngg_resource_manager', array($this, 'run_ngg_resource_manager')); + add_filter('wpseo_sitemap_urlimages', array($this, 'add_wpseo_xml_sitemap_images'), 10, 2); // WPML fix if (class_exists('SitePress')) { @@ -123,6 +133,61 @@ class M_Third_Party_Compat extends C_Base_Module // TODO: Only needed for NGG Pro 1.0.10 and lower add_action('the_post', array(&$this, 'add_ngg_pro_page_parameter')); + + } + + /** + * Filter support for WordPress SEO + * + * @param array $images Provided by WPSEO Filter + * @param int $post ID Provided by WPSEO Filter + * @return array $image List of a displayed galleries entities + */ + function add_wpseo_xml_sitemap_images($images, $post_id) + { + $this->wpseo_images = $images; + + $post = get_post($post_id); + + // Assign our own shortcode handler; ngglegacy and ATP do this same routine for their own + // legacy and preview image placeholders. + remove_all_shortcodes(); + C_NextGen_Shortcode_Manager::add('ngg_images', array($this, 'wpseo_shortcode_handler')); + do_shortcode($post->post_content); + + return $this->wpseo_images; + } + + /** + * Processes ngg_images shortcode when WordPress SEO is building sitemaps. Adds images belonging to a + * displayed gallery to $this->wpseo_images for the assigned filter method to return. + * + * @param array $params Array of shortcode parameters + * @param null $inner_content + */ + function wpseo_shortcode_handler($params, $inner_content = NULL) + { + $renderer = C_Displayed_Gallery_Renderer::get_instance(); + $displayed_gallery = $renderer->params_to_displayed_gallery($params); + + if ($displayed_gallery) + { + $gallery_storage = C_Gallery_Storage::get_instance(); + $settings = C_NextGen_Settings::get_instance(); + $source = $displayed_gallery->get_source(); + if (in_array('image', $source->returns)) + { + foreach ($displayed_gallery->get_entities() as $image) { + $named_image_size = $settings->imgAutoResize ? 'full' : 'thumb'; + $sitemap_image = array( + 'src' => $gallery_storage->get_image_url($image, $named_image_size), + 'alt' => $image->alttext, + 'title' => $image->description ? $image->description: $image->alttext + ); + $this->wpseo_images[] = $sitemap_image; + } + } + } } /** @@ -165,12 +230,8 @@ class M_Third_Party_Compat extends C_Base_Module */ function excellent_themes_admin() { - if (is_admin() - && defined('ET_TAXONOMY_META_OPTION_KEY') - && (!empty($_GET['page']) && strpos($_GET['page'], 'et_') == 0)) - { + if (is_admin() && (!empty($_GET['page']) && strpos($_GET['page'], 'et_') == 0)) wp_deregister_style('ngg-jquery-ui'); - } } function atp_check_pro_albums($available, $display_type) diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/validation/module.validation.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/validation/module.validation.php index 784ee27ebeb6a6c71115a670793f61cee6b380a0..2f598a9020e9165328f1eae7e7d8bdfa784d3527 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/validation/module.validation.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/validation/module.validation.php @@ -1,7 +1,14 @@ <?php class M_Validation extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-validation', @@ -9,7 +16,7 @@ class M_Validation extends C_Base_Module 'Provides validation support for objects', '0.2', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/widget/module.widget.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/widget/module.widget.php index 87803491c446c3506cc967f3f2daa3edb9938a18..c73785e4cfb9488765c7aec57afc4a025186740a 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/widget/module.widget.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/widget/module.widget.php @@ -4,7 +4,14 @@ class M_Widget extends C_Base_Module /** * Defines the module name & version */ - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-widget', @@ -12,7 +19,7 @@ class M_Widget extends C_Base_Module 'Handles clearing of NextGen Widgets', '0.6', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wordpress_routing/module.wordpress_routing.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wordpress_routing/module.wordpress_routing.php index 6010d54e71c95fd8f6111264c8cc9793bfb888c5..ea839ed7b7644049786bcad92d61d49496b03d48 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wordpress_routing/module.wordpress_routing.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wordpress_routing/module.wordpress_routing.php @@ -5,7 +5,14 @@ class M_WordPress_Routing extends C_Base_Module static $_use_canonical_redirect = TRUE; static $_use_old_slugs = TRUE; - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-wordpress_routing', @@ -13,7 +20,7 @@ class M_WordPress_Routing extends C_Base_Module "Integrates the MVC module's routing implementation with WordPress", '0.8', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wpcli/module.wpcli.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wpcli/module.wpcli.php index 9d37b0c73b7400696efd5570b67d97f61154a45d..ad56e770eb8e709ec3fcf604e3d94d7d689840e0 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wpcli/module.wpcli.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/wpcli/module.wpcli.php @@ -2,7 +2,14 @@ class M_WPCLI extends C_Base_Module { - function define() + function define($id = 'pope-module', + $name = 'Pope Module', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-wpcli', @@ -10,7 +17,7 @@ class M_WPCLI extends C_Base_Module "Provides additional commands for WP-CLI (https://github.com/wp-cli/wp-cli", '0.2', 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', + 'Imagely', 'https://www.imagely.com' ); } @@ -95,6 +102,19 @@ if (defined('WP_CLI') && WP_CLI && class_exists('WP_CLI_Command', FALSE)) { WP_CLI::error("Gallery not found (with id #{$assoc_args['gallery']}"); } } + + /** + * Clear all dismissed notifications handled by C_Admin_Notification_Manager + * + * @synopsis + */ + function clear_dismissed_notifications($args, $assoc_args) + { + $settings = C_NextGen_Settings::get_instance(); + $settings->set('dismissed_notifications', array()); + $settings->set('gallery_created_after_reviews_introduced', FALSE); + $settings->save(); + } } WP_CLI::add_command('ngg', 'C_NGG_WPCLI' ); diff --git a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/product.photocrati_nextgen.php b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/product.photocrati_nextgen.php index c4fa752bd68aa616f904d7c424f3806783f1b844..3a97ed15ddf6d7195ba6e728ecad1b52fddd3ef9 100644 --- a/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/product.photocrati_nextgen.php +++ b/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/product.photocrati_nextgen.php @@ -85,16 +85,23 @@ class P_Photocrati_NextGen extends C_Base_Product return $retval; } - function define() + function define($id = 'pope-product', + $name = 'Pope Product', + $description = '', + $version = '', + $uri = '', + $author = '', + $author_uri = '', + $context = FALSE) { parent::define( 'photocrati-nextgen', 'NextGen Gallery', 'NextGen Gallery', NGG_PLUGIN_VERSION, - 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', - 'Photocrati Media', - 'https://www.imagely.com' + 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/', + 'Imagely', + 'https://www.imagely.com' ); $module_path = implode(DIRECTORY_SEPARATOR, array(dirname(__FILE__), 'modules')); diff --git a/wp-content/plugins/nextgen-gallery/readme.txt b/wp-content/plugins/nextgen-gallery/readme.txt index e9de307742544d68755cae478ef4fdabd8910de8..cb9b0070dedfddca9b7c5b69cc4d8755d2cbdb4d 100644 --- a/wp-content/plugins/nextgen-gallery/readme.txt +++ b/wp-content/plugins/nextgen-gallery/readme.txt @@ -2,11 +2,11 @@ Contributors: photocrati, imagely Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark Requires at least: 4.0.0 -Stable tag: 2.1.79 -Tested up to: 4.7.2 +Stable tag: 2.2.3 +Tested up to: 4.7.3 License: GPLv2 -The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 16.5 million downloads. +The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 17 million downloads. == Description == @@ -187,8 +187,28 @@ For more information, feel free to visit the official website for the NextGEN Ga == Changelog == += V2.2.3 - 04.05.2017 = +* Fixed: E_WARNING on Gallery Settings page due to improper use of array_combine() on PHP <= 5.3 + += V2.2.2 - 04.04.2017 = +* Fixed: Hyperlinks in image descriptions +* Fixed: WordPress SEO sitemap image count +* Fixed: Removed id parameter in shortcodes +* Fixed: Fatal error in Freemius code + += V2.2.1 - 03.13.2017 = +* NEW: Template mechanism for all display types +* NEW: Review notices +* Changed: Updated branding to Imagely +* Changed: Added the ability to click on a gallery title and have it open direct to Pro Lightbox +* Fixed: Problems with activation after initial installation +* Fixed: Don't display legacy shortcodes after creating new galleries +* Fixed: false positive malware detection notices against 'eval' +* Fixed: Various PHP notices and warnings +* Fixed: Issue with dynamic container height for Imagebrowser display types + = V2.1.79 - 02.23.2017 = -* Changed: Tag display adjustment +* Secured: Resolved vulnerability with tag cloud displays = V2.1.77 - 01.31.2017 = * Changed: Corrected Facebook link