Ocean Extra - Version 1.4.1

Version Description

  • Fixed: Scripts & Styles issue on the Theme Panel page.
  • Fixed: Licenses issue on mulsite, now you can enable your premium extensions licenses for all your subsites.
Download this release

Release Info

Developer oceanwp
Plugin Icon 128x128 Ocean Extra
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

includes/metabox/controls/assets/js/wp-color-picker-alpha.js CHANGED
@@ -1,3 +1,4 @@
 
1
  ( function() {
2
 
3
  // Variable for some backgrounds
1
+ /* global Color */
2
  ( function() {
3
 
4
  // Variable for some backgrounds
includes/panel/assets/css/panel.css CHANGED
@@ -80,6 +80,9 @@ body .postbox.oceanwp-doc .hndle { cursor: inherit; }
80
  #oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a:hover { text-decoration: none; }
81
  #oceanwp-license-form p.submit { clear: both; }
82
 
 
 
 
83
  /* Push monkey tab */
84
  .push-monkey-tab { position: relative; }
85
  .push-monkey-tab:before { content: ''; display: block; background: url( '../img/push-monkey.png' ) no-repeat; background-size: 100% auto; position: absolute; right: 10px; top: -36px; width: 96px; height: 38px; }
80
  #oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a:hover { text-decoration: none; }
81
  #oceanwp-license-form p.submit { clear: both; }
82
 
83
+ #oceanwp-license-form .form-table.bundle-block tr { max-width: 500px; }
84
+ #oceanwp-license-form .form-table.bundle-block th { background-color: #13aff0; color: #fff; }
85
+
86
  /* Push monkey tab */
87
  .push-monkey-tab { position: relative; }
88
  .push-monkey-tab:before { content: ''; display: block; background: url( '../img/push-monkey.png' ) no-repeat; background-size: 100% auto; position: absolute; right: 10px; top: -36px; width: 96px; height: 38px; }
includes/panel/assets/css/panel.min.css CHANGED
@@ -1 +1 @@
1
- .clr:after,.push-monkey-tab:before{content:''}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a:hover,#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a:hover,#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-] a:hover,.oceanwp-doc a{text-decoration:none}#oceanwp-license-form p.submit,.clr:after{clear:both}.clr:after{display:block;height:0;visibility:hidden;zoom:1}.button,.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none!important;box-shadow:none!important}body .button.owp-button{background-color:#13aff0;color:#fff;height:auto;font-size:12px;line-height:1;font-weight:600;text-transform:uppercase;margin:0;padding:14px 20px;border:0;cursor:pointer;text-align:center;letter-spacing:.1em;border-radius:3px;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}body .button.owp-button:active,body .button.owp-button:focus,body .button.owp-button:hover{background-color:#0b7cac;color:#fff}body .button.owp-button:active{-webkit-transform:none;-ms-transform:none;transform:none}.wrap.oceanwp-theme-panel{margin-right:40px}.oceanwp-settings .left{float:left;width:75%;margin-top:20px}.oceanwp-settings .right{float:right;width:23%;margin-top:30px}.oceanwp-settings .oceanwp-title{font-size:26px;line-height:1.6;margin:0 0 3px 8px}.oceanwp-settings .oceanwp-desc{margin:0 0 30px 8px;font-size:15px}.oceanwp-settings .divider{display:block;height:1px;margin:40px 0 33px;border-bottom:1px solid #ccc}.oceanwp-panels .column-wrap{float:left;position:relative;width:32.33%;margin:0 .5% 1%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oceanwp-panels .column-name{display:block;background-color:#fff;border:2px solid #eee;padding:25px 25px 20px;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}.oceanwp-panels .column-name:hover{border-color:#ddd}.oceanwp-panels .column-name h3.title{float:left;display:block;position:relative;font-size:18px;color:#333;margin:0;z-index:2}.oceanwp-panels .column-name .desc{display:block;position:relative;font-size:17px;line-height:1.6;font-weight:400;color:#777;z-index:2}.oceanwp-panels input[type=checkbox]{float:right;width:22px;height:22px;min-width:22px;margin:0}.oceanwp-panels input[type=checkbox]:checked:before{width:22px;font-size:27px}.oceanwp-panels p.submit{display:inline-block;width:100%;margin:10px 0 0 .5%;padding:0;clear:both}.oceanwp-options .options-inner{display:-webkit-box;display:-ms-flexbox;display:flex;flex-wrap:wrap;margin-top:30px}.oceanwp-options .column-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;background:#fff;border:1px solid #ccc;width:24%;min-height:150px;margin:0 .5% 1%;padding:25px 25px 20px;overflow:hidden;box-sizing:border-box}.oceanwp-options .column-wrap.hidden{display:none!important}.oceanwp-options .column-inner{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column}.oceanwp-options .title{display:block;position:relative;font-size:17px;color:#333;margin:0 0 20px;padding-bottom:20px;border-bottom:1px solid #eaeaea;text-transform:capitalize}.oceanwp-options .desc{flex:1 0 auto;display:block;margin:0 0 20px;font-size:14px;line-height:1.6;font-weight:400;color:#777}.oceanwp-options .bottom-column{padding:20px 0 0;border-top:1px solid #eaeaea;margin:0}.oceanwp-options .bottom-column .option-link{font-size:12px;font-weight:600;line-height:1.6;text-transform:uppercase;letter-spacing:.6px;text-decoration:none}.oceanwp-bloc{display:inline-block;position:relative;width:100%;background-color:#fff;margin:0 auto 24px;border-radius:3px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.oceanwp-bloc h3{display:block;font-size:14px;font-weight:600;padding:12px 10px;background-color:#13aff0;color:#fff;text-transform:uppercase;letter-spacing:.4px;margin:0 0 22px;text-align:center}.oceanwp-bloc .content-wrap{position:relative;padding:0 30px 25px;z-index:2;text-align:center}.oceanwp-bloc p.content{font-size:14px;color:#5a5a5a;margin:0}body .oceanwp-bloc .button.owp-button{margin:22px 0 10px}.oceanwp-bloc p.bottom-text{color:#5a5a5a;font-size:12px;font-weight:600;font-style:italic;margin:0}.oceanwp-bloc i{position:absolute;bottom:-30px;right:-26px;width:auto;height:auto;font-size:120px;opacity:.07;z-index:1}.oceanwp-youtube .yt-img{padding:30px 30px 0;margin:0 0 25px;text-align:center}.oceanwp-youtube .yt-img img{max-width:110px}body .oceanwp-youtube .button.owp-button{background-color:#e62117}body .oceanwp-youtube .button.owp-button:hover{background-color:#b31217}#wpbody-content .oceanwp-doc{min-width:100%;padding:0}body .postbox.oceanwp-doc .hndle{cursor:inherit}.oceanwp-doc .hndle a{float:right;font-size:13px}.oceanwp-doc .inside{margin:15px 0 3px}.oceanwp-doc .inside ul{list-style:disc;margin:0 0 0 20px}.oceanwp-support p{font-size:14px;line-height:1.7;font-style:italic;margin-top:0}.oceanwp-support .owp-button{float:right;margin:15px 0 0}#oceanwp-license-form .form-table,#oceanwp-license-form caption,#oceanwp-license-form tbody,#oceanwp-license-form td,#oceanwp-license-form tfoot,#oceanwp-license-form th,#oceanwp-license-form thead,#oceanwp-license-form tr{display:block}#oceanwp-license-form .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}#oceanwp-license-form .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}#oceanwp-license-form .form-table td{padding:0}#oceanwp-license-form td input.regular-text{margin:0 0 8px;width:100%}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-] a{color:#444}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg{background-color:#e24e4e;color:#fff;border-color:#e24e4e}#oceanwp-license-form .oceanwp-license-data.oceanwp-license-error-msg{background-color:#ffebcd;border-color:#ffebcd}#oceanwp-license-form .oceanwp-license-data p{font-size:13px;margin-top:0}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a,#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a{color:#fff}.push-monkey-tab{position:relative}.push-monkey-tab:before{display:block;background:url(../img/push-monkey.png) no-repeat;background-size:100% auto;position:absolute;right:10px;top:-36px;width:96px;height:38px}.oceanwp-settings .pm-right{width:42%}.oceanwp-settings .pm-left{width:57%}.oceanwp-settings .push-monkey p{font-size:15px;line-height:1.8;margin:0 0 20px 8px}.oceanwp-settings .push-monkey table{margin:0 0 10px 8px}body.rtl .wrap.oceanwp-theme-panel{margin-left:40px;margin-right:0}body.rtl .oceanwp-settings .left{float:right}body.rtl .oceanwp-settings .right{float:left}body.rtl .oceanwp-settings .oceanwp-title{margin:0 8px 3px 0}body.rtl .oceanwp-settings .oceanwp-desc{margin:0 8px 30px 0}body.rtl .oceanwp-panels .column-name h3.title,body.rtl .oceanwp-panels .column-wrap{float:right}body.rtl .oceanwp-doc .hndle a,body.rtl .oceanwp-panels input[type=checkbox],body.rtl .oceanwp-support .owp-button{float:left}body.rtl .oceanwp-panels p.submit{margin:10px .5% 0 0}body.rtl .oceanwp-bloc i{left:-26px;right:auto}body.rtl .oceanwp-doc .inside ul{margin:0 20px 0 0}body.rtl #oceanwp-license-form .form-table tr{float:right;margin:0 0 15px 15px}@media screen and (max-width:1280px){.wrap.oceanwp-theme-panel{margin-right:20px}.oceanwp-settings .left,.oceanwp-settings .right{float:none;width:100%}.oceanwp-options .column-wrap{width:32.33%}.oceanwp-bloc,.oceanwp-support{width:49%}.oceanwp-review{float:left}.oceanwp-support,.oceanwp-youtube{float:right}#wpbody-content .oceanwp-doc{float:left;min-width:49%;clear:both}body.rtl .wrap.oceanwp-theme-panel{margin-left:20px;margin-right:0}body.rtl .oceanwp-support{float:right}body.rtl #wpbody-content .oceanwp-doc{float:left}}@media screen and (max-width:1100px){.oceanwp-options .column-wrap,.oceanwp-panels .column-wrap{width:49%}#oceanwp-license-form .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:600px){.oceanwp-options .column-wrap,.oceanwp-panels .column-wrap{width:100%}#oceanwp-license-form .form-table tr{width:100%;min-height:230px}}@media screen and (max-width:480px){#wpbody-content .oceanwp-doc,.oceanwp-bloc,.oceanwp-support{float:none!important;width:100%;min-width:100%}}
1
+ .clr:after,.push-monkey-tab:before{content:''}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a:hover,#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a:hover,#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-] a:hover,.oceanwp-doc a{text-decoration:none}#oceanwp-license-form p.submit,.clr:after{clear:both}.clr:after{display:block;height:0;visibility:hidden;zoom:1}.button,.wp-core-ui .button-link:focus,.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus,a:focus{-webkit-box-shadow:none!important;box-shadow:none!important}body .button.owp-button{background-color:#13aff0;color:#fff;height:auto;font-size:12px;line-height:1;font-weight:600;text-transform:uppercase;margin:0;padding:14px 20px;border:0;cursor:pointer;text-align:center;letter-spacing:.1em;border-radius:3px;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}body .button.owp-button:active,body .button.owp-button:focus,body .button.owp-button:hover{background-color:#0b7cac;color:#fff}body .button.owp-button:active{-webkit-transform:none;-ms-transform:none;transform:none}.wrap.oceanwp-theme-panel{margin-right:40px}.oceanwp-settings .left{float:left;width:75%;margin-top:20px}.oceanwp-settings .right{float:right;width:23%;margin-top:30px}.oceanwp-settings .oceanwp-title{font-size:26px;line-height:1.6;margin:0 0 3px 8px}.oceanwp-settings .oceanwp-desc{margin:0 0 30px 8px;font-size:15px}.oceanwp-settings .divider{display:block;height:1px;margin:40px 0 33px;border-bottom:1px solid #ccc}.oceanwp-panels .column-wrap{float:left;position:relative;width:32.33%;margin:0 .5% 1%;overflow:hidden;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.oceanwp-panels .column-name{display:block;background-color:#fff;border:2px solid #eee;padding:25px 25px 20px;-webkit-transition:all .3s ease;-moz-transition:all .3s ease;-o-transition:all .3s ease;-ms-transition:all .3s ease;transition:all .3s ease}.oceanwp-panels .column-name:hover{border-color:#ddd}.oceanwp-panels .column-name h3.title{float:left;display:block;position:relative;font-size:18px;color:#333;margin:0;z-index:2}.oceanwp-panels .column-name .desc{display:block;position:relative;font-size:17px;line-height:1.6;font-weight:400;color:#777;z-index:2}.oceanwp-panels input[type=checkbox]{float:right;width:22px;height:22px;min-width:22px;margin:0}.oceanwp-panels input[type=checkbox]:checked:before{width:22px;font-size:27px}.oceanwp-panels p.submit{display:inline-block;width:100%;margin:10px 0 0 .5%;padding:0;clear:both}.oceanwp-options .options-inner{display:-webkit-box;display:-ms-flexbox;display:flex;flex-wrap:wrap;margin-top:30px}.oceanwp-options .column-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;background:#fff;border:1px solid #ccc;width:24%;min-height:150px;margin:0 .5% 1%;padding:25px 25px 20px;overflow:hidden;box-sizing:border-box}.oceanwp-options .column-wrap.hidden{display:none!important}.oceanwp-options .column-inner{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column}.oceanwp-options .title{display:block;position:relative;font-size:17px;color:#333;margin:0 0 20px;padding-bottom:20px;border-bottom:1px solid #eaeaea;text-transform:capitalize}.oceanwp-options .desc{flex:1 0 auto;display:block;margin:0 0 20px;font-size:14px;line-height:1.6;font-weight:400;color:#777}.oceanwp-options .bottom-column{padding:20px 0 0;border-top:1px solid #eaeaea;margin:0}.oceanwp-options .bottom-column .option-link{font-size:12px;font-weight:600;line-height:1.6;text-transform:uppercase;letter-spacing:.6px;text-decoration:none}.oceanwp-bloc{display:inline-block;position:relative;width:100%;background-color:#fff;margin:0 auto 24px;border-radius:3px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.oceanwp-bloc h3{display:block;font-size:14px;font-weight:600;padding:12px 10px;background-color:#13aff0;color:#fff;text-transform:uppercase;letter-spacing:.4px;margin:0 0 22px;text-align:center}.oceanwp-bloc .content-wrap{position:relative;padding:0 30px 25px;z-index:2;text-align:center}.oceanwp-bloc p.content{font-size:14px;color:#5a5a5a;margin:0}body .oceanwp-bloc .button.owp-button{margin:22px 0 10px}.oceanwp-bloc p.bottom-text{color:#5a5a5a;font-size:12px;font-weight:600;font-style:italic;margin:0}.oceanwp-bloc i{position:absolute;bottom:-30px;right:-26px;width:auto;height:auto;font-size:120px;opacity:.07;z-index:1}.oceanwp-youtube .yt-img{padding:30px 30px 0;margin:0 0 25px;text-align:center}.oceanwp-youtube .yt-img img{max-width:110px}body .oceanwp-youtube .button.owp-button{background-color:#e62117}body .oceanwp-youtube .button.owp-button:hover{background-color:#b31217}#wpbody-content .oceanwp-doc{min-width:100%;padding:0}body .postbox.oceanwp-doc .hndle{cursor:inherit}.oceanwp-doc .hndle a{float:right;font-size:13px}.oceanwp-doc .inside{margin:15px 0 3px}.oceanwp-doc .inside ul{list-style:disc;margin:0 0 0 20px}.oceanwp-support p{font-size:14px;line-height:1.7;font-style:italic;margin-top:0}.oceanwp-support .owp-button{float:right;margin:15px 0 0}#oceanwp-license-form .form-table,#oceanwp-license-form caption,#oceanwp-license-form tbody,#oceanwp-license-form td,#oceanwp-license-form tfoot,#oceanwp-license-form th,#oceanwp-license-form thead,#oceanwp-license-form tr{display:block}#oceanwp-license-form .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}#oceanwp-license-form .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}#oceanwp-license-form .form-table td{padding:0}#oceanwp-license-form td input.regular-text{margin:0 0 8px;width:100%}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}#oceanwp-license-form .oceanwp-license-data[class*=oceanwp-license-] a{color:#444}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg{background-color:#e24e4e;color:#fff;border-color:#e24e4e}#oceanwp-license-form .oceanwp-license-data.oceanwp-license-error-msg{background-color:#ffebcd;border-color:#ffebcd}#oceanwp-license-form .oceanwp-license-data p{font-size:13px;margin-top:0}#oceanwp-license-form .oceanwp-license-data.license-expires-soon-notice a,#oceanwp-license-form .oceanwp-license-data.oceanwp-license-expired-msg a{color:#fff}#oceanwp-license-form .form-table.bundle-block tr{max-width:500px}#oceanwp-license-form .form-table.bundle-block th{background-color:#13aff0;color:#fff}.push-monkey-tab{position:relative}.push-monkey-tab:before{display:block;background:url(../img/push-monkey.png) no-repeat;background-size:100% auto;position:absolute;right:10px;top:-36px;width:96px;height:38px}.oceanwp-settings .pm-right{width:42%}.oceanwp-settings .pm-left{width:57%}.oceanwp-settings .push-monkey p{font-size:15px;line-height:1.8;margin:0 0 20px 8px}.oceanwp-settings .push-monkey table{margin:0 0 10px 8px}body.rtl .wrap.oceanwp-theme-panel{margin-left:40px;margin-right:0}body.rtl .oceanwp-settings .left{float:right}body.rtl .oceanwp-settings .right{float:left}body.rtl .oceanwp-settings .oceanwp-title{margin:0 8px 3px 0}body.rtl .oceanwp-settings .oceanwp-desc{margin:0 8px 30px 0}body.rtl .oceanwp-panels .column-name h3.title,body.rtl .oceanwp-panels .column-wrap{float:right}body.rtl .oceanwp-doc .hndle a,body.rtl .oceanwp-panels input[type=checkbox],body.rtl .oceanwp-support .owp-button{float:left}body.rtl .oceanwp-panels p.submit{margin:10px .5% 0 0}body.rtl .oceanwp-bloc i{left:-26px;right:auto}body.rtl .oceanwp-doc .inside ul{margin:0 20px 0 0}body.rtl #oceanwp-license-form .form-table tr{float:right;margin:0 0 15px 15px}@media screen and (max-width:1280px){.wrap.oceanwp-theme-panel{margin-right:20px}.oceanwp-settings .left,.oceanwp-settings .right{float:none;width:100%}.oceanwp-options .column-wrap{width:32.33%}.oceanwp-bloc,.oceanwp-support{width:49%}.oceanwp-review{float:left}.oceanwp-support,.oceanwp-youtube{float:right}#wpbody-content .oceanwp-doc{float:left;min-width:49%;clear:both}body.rtl .wrap.oceanwp-theme-panel{margin-left:20px;margin-right:0}body.rtl .oceanwp-support{float:right}body.rtl #wpbody-content .oceanwp-doc{float:left}}@media screen and (max-width:1100px){.oceanwp-options .column-wrap,.oceanwp-panels .column-wrap{width:49%}#oceanwp-license-form .form-table tr{width:46%;max-width:none;min-height:230px}}@media screen and (max-width:600px){.oceanwp-options .column-wrap,.oceanwp-panels .column-wrap{width:100%}#oceanwp-license-form .form-table tr{width:100%;min-height:230px}}@media screen and (max-width:480px){#wpbody-content .oceanwp-doc,.oceanwp-bloc,.oceanwp-support{float:none!important;width:100%;min-width:100%}}
includes/panel/scripts.php CHANGED
@@ -33,6 +33,9 @@ class Ocean_Extra_Scripts_Panel {
33
  // Register panel settings
34
  add_action( 'admin_init', array( $this, 'register_settings' ) );
35
 
 
 
 
36
  } else {
37
 
38
  // Enqueue scripts
@@ -43,8 +46,6 @@ class Ocean_Extra_Scripts_Panel {
43
 
44
  }
45
 
46
- add_action( 'admin_init', array( $this, 'update_scripts' ), 10, 2 );
47
-
48
  }
49
 
50
  /**
@@ -600,8 +601,15 @@ class Ocean_Extra_Scripts_Panel {
600
  * @since 1.4.0
601
  */
602
  public function update_scripts() {
 
603
  $scripts = array_intersect_key( get_option( 'oe_scripts_settings' ), $this->get_scripts() );
604
- update_option( 'oe_scripts_settings', apply_filters('oe_scripts_settings_update', $scripts) );
 
 
 
 
 
 
605
  }
606
 
607
  /**
33
  // Register panel settings
34
  add_action( 'admin_init', array( $this, 'register_settings' ) );
35
 
36
+ // Update settings
37
+ add_action( 'admin_init', array( $this, 'update_scripts' ), 10, 2 );
38
+
39
  } else {
40
 
41
  // Enqueue scripts
46
 
47
  }
48
 
 
 
49
  }
50
 
51
  /**
601
  * @since 1.4.0
602
  */
603
  public function update_scripts() {
604
+
605
  $scripts = array_intersect_key( get_option( 'oe_scripts_settings' ), $this->get_scripts() );
606
+
607
+ if ( empty( $scripts ) || ! is_array( $scripts ) ) {
608
+ $scripts = self::get_default_settings();
609
+ }
610
+
611
+ update_option( 'oe_scripts_settings', apply_filters('oe_scripts_settings_update', $scripts ) );
612
+
613
  }
614
 
615
  /**
includes/panel/updater.php CHANGED
@@ -16,6 +16,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
16
  private $item_shortname = '';
17
  private $license_key = '';
18
  private $api_url = 'https://oceanwp.org/';
 
19
 
20
  /**
21
  * Class constructor.
@@ -84,8 +85,270 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
84
 
85
  // Show changelog
86
  add_action( 'admin_init', array( $this, 'oceanwp_show_changelog' ) );
 
 
 
 
 
 
87
  }
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
  /**
91
  * Display help text at the top of the Licenses tag
@@ -103,7 +366,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
103
  }
104
 
105
  echo '<p>' . sprintf(
106
- __( 'Enter your extension license keys here to receive updates for purchased extensions. If your license key has expired, please %1$srenew your license%2$s.', 'oceanwp' ),
107
  '<a href="http://docs.oceanwp.org/article/26-license-renewal" target="_blank" title="License renewal FAQ">',
108
  '</a>'
109
  ) . '</p>';
@@ -134,8 +397,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
134
  /**
135
  * Hide license key
136
  */
137
- private function get_hidden_license_key() {
138
- $input_string = $this->license_key;
139
  $start = 5;
140
  $length = mb_strlen( $input_string ) - $start - 5;
141
 
@@ -172,7 +434,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
172
 
173
  $class = 'expired-msg';
174
  $messages[] = sprintf(
175
- __( 'Your license key expired on %1$s. Please renew your license key for auto updates.', 'oceanwp' ),
176
  date_i18n( get_option( 'date_format' ), strtotime( $expire_date, current_time( 'timestamp' ) ) )
177
  );
178
 
@@ -184,7 +446,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
184
 
185
  $class = 'error-msg';
186
  $messages[] = sprintf(
187
- __( 'Your license key has been disabled. Please <a href="%1$s" target="_blank">contact support</a> for more information.', 'oceanwp' ),
188
  'https://oceanwp.org/support?utm_campaign=admin&utm_source=licenses&utm_medium=revoked'
189
  );
190
 
@@ -196,7 +458,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
196
 
197
  $class = 'error-msg';
198
  $messages[] = sprintf(
199
- __( 'Invalid license. Please <a href="%1$s" target="_blank">visit your account page</a> and verify it.', 'oceanwp' ),
200
  'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
201
  );
202
 
@@ -209,7 +471,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
209
 
210
  $class = 'error-msg';
211
  $messages[] = sprintf(
212
- __( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank">visit your account page</a> to manage your license key URLs.', 'oceanwp' ),
213
  $this->item_name,
214
  'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
215
  );
@@ -221,7 +483,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
221
  case 'item_name_mismatch' :
222
 
223
  $class = 'error-msg';
224
- $messages[] = sprintf( __( 'This appears to be an invalid license key for %1$s.', 'oceanwp' ), $this->item_name );
225
 
226
  $license_status = 'license-' . $class . '-notice';
227
 
@@ -230,7 +492,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
230
  case 'no_activations_left':
231
 
232
  $class = 'error-msg';
233
- $messages[] = sprintf( __( 'Your license key has reached its activation limit. <a href="%1$s">View possible upgrades</a> now.', 'oceanwp' ), 'https://oceanwp.org/your-account/' );
234
 
235
  $license_status = 'license-' . $class . '-notice';
236
 
@@ -239,7 +501,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
239
  case 'license_not_activable':
240
 
241
  $class = 'error-msg';
242
- $messages[] = __( 'The key you entered belongs to a bundle, please use the product specific license key.', 'oceanwp' );
243
 
244
  $license_status = 'license-' . $class . '-notice';
245
  break;
@@ -247,8 +509,8 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
247
  default :
248
 
249
  $class = 'error-msg';
250
- $error = ! empty( $license_details[ $this->item_shortname ]->error ) ? $license_details[ $this->item_shortname ]->error : __( 'unknown_error', 'oceanwp' );
251
- $messages[] = sprintf( __( 'There was an error with this license key: %1$s. Please <a href="%2$s">contact our support team</a>.', 'oceanwp' ), $error, 'https://oceanwp.org/support' );
252
 
253
  $license_status = 'license-' . $class . '-notice';
254
  break;
@@ -268,14 +530,14 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
268
 
269
  if( 'lifetime' === $expire_date ) {
270
 
271
- $messages[] = __( 'License key never expires.', 'oceanwp' );
272
 
273
  $license_status = 'license-lifetime-notice';
274
 
275
  } elseif( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
276
 
277
  $messages[] = sprintf(
278
- __( 'Your license key expires soon! It expires on %1$s. Renew your license key for auto updates.', 'oceanwp' ),
279
  date_i18n( get_option( 'date_format' ), strtotime( $expire_date, current_time( 'timestamp' ) ) )
280
  );
281
 
@@ -284,7 +546,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
284
  } else {
285
 
286
  $messages[] = sprintf(
287
- __( 'Your license key expires on %1$s.', 'oceanwp' ),
288
  date_i18n( get_option( 'date_format' ), strtotime( $expire_date, current_time( 'timestamp' ) ) )
289
  );
290
 
@@ -302,7 +564,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
302
  $class = 'empty-msg';
303
 
304
  $messages[] = sprintf(
305
- __( 'To receive updates, please enter your valid %1$s license key.', 'oceanwp' ),
306
  $this->item_name
307
  );
308
 
@@ -314,7 +576,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
314
  $html = '<tr>';
315
  $html .= '<th>';
316
  $html .= '<label for="'. $this->item_shortname .'_license_key">';
317
- $html .= ''. sprintf( __( '%1$s License Key', 'oceanwp' ), $this->item_name ) .'';
318
  $html .= '</label>';
319
  $html .= '</th>';
320
 
@@ -326,7 +588,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
326
  }
327
 
328
  if ( 'valid' == get_option( $this->item_shortname . '_license_active' ) ) {
329
- $html .= '<input type="submit" class="button-secondary" name="oceanwp_' . $this->item_shortname . '_license_key_deactivate" value="' . __( 'Deactivate License', 'oceanwp' ) . '">';
330
  }
331
 
332
  if ( ! empty( $messages ) ) {
@@ -403,7 +665,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
403
  // Decode license data
404
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
405
 
406
- update_option( $this->item_shortname . '_license_active', $license_data->license );
407
 
408
  //Check license response data exists and update
409
  if( !empty( $license_data ) ) {
@@ -462,7 +724,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
462
  // Decode the license data
463
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
464
 
465
- delete_option( $this->item_shortname . '_license_active' );
466
 
467
  if( ! (bool) $license_data->success ) {
468
  set_transient( 'edd_license_error', $license_data, 1000 );
@@ -650,14 +912,14 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
650
 
651
  if ( empty( $version_info->download_link ) ) {
652
  printf(
653
- __( 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a>.', 'oceanwp' ),
654
  esc_html( $version_info->name ),
655
  esc_url( $changelog_link ),
656
  esc_html( $version_info->new_version )
657
  );
658
  } else {
659
  printf(
660
- __( 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a> or <a href="%4$s">update now</a>.', 'oceanwp' ),
661
  esc_html( $version_info->name ),
662
  esc_url( $changelog_link ),
663
  esc_html( $version_info->new_version ),
@@ -742,7 +1004,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
742
  }
743
 
744
  if( ! current_user_can( 'update_plugins' ) ) {
745
- wp_die( esc_html__( 'You do not have permission to install plugin updates', 'oceanwp' ), esc_html__( 'Error', 'oceanwp' ), array( 'response' => 403 ) );
746
  }
747
 
748
  $response = $this->api_request( 'plugin_latest_version', array( 'slug' => esc_url_raw( wp_unslash( $_REQUEST['slug'] ) ) ) );
@@ -765,7 +1027,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
765
  $license_details = get_option( 'edd_license_details' );
766
  $license_details = !empty( $license_details ) ? $license_details : array();
767
  $license_details[$item_shortname] = $license_data;
768
- update_option( 'edd_license_details', $license_details );
769
  }
770
 
771
  /**
@@ -781,7 +1043,7 @@ if ( ! class_exists( 'OceanWP_Plugin_Updater' ) ) {
781
  $license_details = !empty( $license_details ) ? $license_details : array();
782
  if( !empty( $license_details[$item_shortname] ) ) {
783
  unset( $license_details[$item_shortname] );
784
- update_option( 'edd_license_details', $license_details );
785
  }
786
  }
787
  }
16
  private $item_shortname = '';
17
  private $license_key = '';
18
  private $api_url = 'https://oceanwp.org/';
19
+ private $bundle_error = '';
20
 
21
  /**
22
  * Class constructor.
85
 
86
  // Show changelog
87
  add_action( 'admin_init', array( $this, 'oceanwp_show_changelog' ) );
88
+
89
+ // Add core extensions bundle block
90
+ //add_action('oceanwp_licenses_tab_top', array( $this, 'add_core_extensions_bundle_block') );
91
+
92
+ // Add core extensions bundle validation
93
+ add_action('admin_init', array( $this, 'add_core_extensions_bundle_validation'), 0);
94
  }
95
 
96
+ /**
97
+ * @author rf@objects
98
+ * update options in all sites
99
+ * @return void
100
+ */
101
+ public function update_oceanwp_option($option, $value) {
102
+ if (is_multisite()) {
103
+ $sites = wp_get_sites();
104
+ foreach ($sites as $site) {
105
+ $site_id = $site["blog_id"];
106
+ switch_to_blog($site_id);
107
+ update_option($option, $value);
108
+ restore_current_blog();
109
+ }
110
+ } else {
111
+ update_option($option, $value);
112
+ }
113
+ }
114
+
115
+ /**
116
+ * delete options in all sites
117
+ * @return void
118
+ */
119
+ function delete_oceanwp_option($option) {
120
+ if (is_multisite()) {
121
+ $sites = wp_get_sites();
122
+ foreach ($sites as $site) {
123
+ $site_id = $site["blog_id"];
124
+ switch_to_blog($site_id);
125
+ delete_option($option);
126
+ restore_current_blog();
127
+ }
128
+ } else {
129
+ delete_option($option);
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Add core extensions bundle block
135
+ * @static var boolean $block
136
+ * @return type
137
+ */
138
+ public function add_core_extensions_bundle_block() {
139
+ static $block;
140
+
141
+ if (!empty($block)) {
142
+ return;
143
+ }
144
+
145
+ $oceanwp_bundle_status = get_option("oceanwp_bundle_status");
146
+ $oceanwp_bundle_key = get_option("oceanwp_bundle_key"); ?>
147
+ <table class="form-table bundle-block">
148
+ <tbody>
149
+ <tr>
150
+ <th>
151
+ <label for="core_extensions_bundle_license_key"><?php _e("Core Extensions Bundle License Key", "oceanwp"); ?></label>
152
+ </th>
153
+ <td>
154
+ <input type="text" class="regular-text" id="core_extensions_bundle_license_key" name="core_extensions_bundle_license_key" value="<?php echo $this->get_hidden_license_key($oceanwp_bundle_key); ?>" <?php echo ($oceanwp_bundle_key) ? "readonly" : ""; ?> />
155
+ <?php
156
+ if ($oceanwp_bundle_status == "valid") {
157
+ $expire_date = get_option("oceanwp_bundle_expires");
158
+ ?>
159
+ <input type="submit" class="button-secondary" name="deactivate_all" value="Deactivate License">
160
+ <div class="oceanwp-license-data oceanwp-license-valid-msg valid-msg license-expiration-date-notice">
161
+ <p><?php
162
+ printf(__('Your license key expired on %1$s.', 'ocean-extra'), date_i18n(get_option('date_format'), strtotime($expire_date, current_time('timestamp'))));
163
+ ?></p>
164
+ </div>
165
+ <?php
166
+ }
167
+
168
+ if (empty($oceanwp_bundle_status)) {
169
+ ?>
170
+ <div class="oceanwp-license-data oceanwp-license-empty-msg empty-msg ">
171
+
172
+ <p><?php _e("If you bought the Core Extensions Bundle, add your bundle license key here to get automatic updates for all the extensions.", "ocean-extra"); ?></p>
173
+ </div>
174
+ <?php
175
+ } elseif ($oceanwp_bundle_status != "valid") {
176
+ ?>
177
+ <div class="oceanwp-license-data oceanwp-license-error-msg error-msg license-error-msg-notice ">
178
+
179
+ <?php
180
+ switch ($oceanwp_bundle_status) {
181
+
182
+ case 'expired' :
183
+ _e('Your license key is expited. Please renew your license key for auto updates.', 'ocean-extra');
184
+
185
+ break;
186
+
187
+ case 'revoked' :
188
+
189
+ printf(
190
+ __('Your license key has been disabled. Please <a href="%1$s" target="_blank">contact support</a> for more information.', 'ocean-extra'), 'https://oceanwp.org/support?utm_campaign=admin&utm_source=licenses&utm_medium=revoked'
191
+ );
192
+
193
+ break;
194
+
195
+ case 'missing' :
196
+
197
+ printf(
198
+ __('Invalid license. Please <a href="%1$s" target="_blank">visit your account page</a> and verify it.', 'ocean-extra'), 'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
199
+ );
200
+
201
+
202
+ break;
203
+
204
+ case 'invalid' :
205
+ case 'site_inactive' :
206
+ printf(
207
+ __('Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank">visit your account page</a> to manage your license key URLs.', 'ocean-extra'), "Core Extensions Bundle", 'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
208
+ );
209
+
210
+
211
+ break;
212
+
213
+ case 'item_name_mismatch' :
214
+
215
+ printf(__('This appears to be an invalid license key for %1$s.', 'ocean-extra'), "Core Extensions Bundle");
216
+
217
+ break;
218
+
219
+ case 'no_activations_left':
220
+ sprintf(__('Your license key has reached its activation limit. <a href="%1$s">View possible upgrades</a> now.', 'ocean-extra'), 'https://oceanwp.org/your-account/');
221
+ break;
222
+
223
+ case 'license_not_activable':
224
+
225
+ _e('The key you entered belongs to a bundle, please use the product specific license key.', 'ocean-extra');
226
+
227
+ break;
228
+ }
229
+ ?>
230
+ </div>
231
+ <?php
232
+ }
233
+ ?>
234
+
235
+ </td>
236
+ </tr>
237
+ </tbody>
238
+ </table>
239
+ <?php
240
+ $block = true;
241
+ }
242
+
243
+ /**
244
+ * Add core extensions bundle validation
245
+ * @static var boolean $validation
246
+ * @return type
247
+ */
248
+ public function add_core_extensions_bundle_validation() {
249
+ static $validation;
250
+
251
+ if (!empty($validation)) {
252
+ return;
253
+ }
254
+
255
+
256
+ if (isset($_POST['oceanwp_options']) && isset($_POST['oceanwp_licensekey_activateall']) && isset($_POST['core_extensions_bundle_license_key']) && !empty($_POST['core_extensions_bundle_license_key']) && strpos($_POST['core_extensions_bundle_license_key'], "XXX") === FALSE
257
+ ) {
258
+
259
+
260
+
261
+ /* * ************************************ */
262
+ //Choose any unactive licenses
263
+ $unactive = "";
264
+ foreach ($_POST['oceanwp_options']['licenses'] as $key => $value) {
265
+ if (!$value) //check it not active licenses to activate it
266
+ $unactive = $key;break;
267
+ }
268
+
269
+
270
+ /* * ************************************ */
271
+ $unactive = str_replace("oceanwp_", "", $unactive);
272
+ $unactive = str_replace("_license_key", "", $unactive);
273
+ $unactive = str_replace("_", " ", $unactive);
274
+ $unactive = ucwords($unactive);
275
+
276
+ if ($unactive) {
277
+ $api_params = array(
278
+ 'edd_action' => 'activate_license',
279
+ 'license' => $_POST['core_extensions_bundle_license_key'],
280
+ 'item_name' => $unactive,
281
+ 'url' => home_url()
282
+ );
283
+
284
+ // Call the API
285
+ $response = wp_remote_post(
286
+ $this->api_url, array(
287
+ 'timeout' => 15,
288
+ 'sslverify' => false,
289
+ 'body' => $api_params
290
+ )
291
+ );
292
+
293
+ // Make sure there are no errors
294
+ if (is_wp_error($response)) {
295
+ return;
296
+ }
297
+
298
+ // Decode license data
299
+ $license_data = json_decode(wp_remote_retrieve_body($response));
300
+ $activated_licenses_by_bundle = array();
301
+ if ($license_data->license == "valid") {
302
+
303
+ if (isset($_POST['oceanwp_options']['licenses']) && $_POST['oceanwp_options']['licenses']) {
304
+
305
+ foreach ($_POST['oceanwp_options']['licenses'] as $key => $value) {
306
+ if (!$value) { //check it not active licenses to activate it
307
+ $_POST['oceanwp_options']['licenses'][$key] = $_POST['core_extensions_bundle_license_key'];
308
+ $activated_licenses_by_bundle[] = $key;
309
+ }
310
+ }
311
+ }
312
+ //rf@objects//
313
+ //update_option("oceanwp_bundle_key", $_POST['core_extensions_bundle_license_key']);
314
+ $this->update_oceanwp_option("oceanwp_bundle_key", $_POST['core_extensions_bundle_license_key']);
315
+ //end//
316
+
317
+ $this->update_oceanwp_option("oceanwp_activated_licenses_by_bundle", $activated_licenses_by_bundle);
318
+ }
319
+ //rf@objects//
320
+ // update_option("oceanwp_bundle_status", $license_data->license);
321
+ //update_option("oceanwp_bundle_expires", $license_data->expires);
322
+ $this->update_oceanwp_option("oceanwp_bundle_status", $license_data->license);
323
+ $this->update_oceanwp_option("oceanwp_bundle_expires", $license_data->expires);
324
+ $this->update_oceanwp_option("oceanwp_options", $_POST['oceanwp_options']);
325
+ //end//
326
+ }
327
+ } elseif (isset($_POST['deactivate_all'])) {
328
+ //rf@objects//
329
+ $this->delete_oceanwp_option('oceanwp_bundle_status');
330
+ //delete_option("oceanwp_bundle_status");
331
+ $this->delete_oceanwp_option('oceanwp_bundle_key');
332
+ //delete_option("oceanwp_bundle_key");
333
+ $this->delete_oceanwp_option('oceanwp_bundle_expires');
334
+ //delete_option("oceanwp_bundle_expires");
335
+ //end//
336
+ $this->delete_oceanwp_option('oceanwp_activated_licenses_by_bundle');
337
+
338
+ $license_details = get_option('edd_license_details');
339
+
340
+ if (!empty($license_details)) {
341
+
342
+ // loop over active licenses and deactive
343
+ foreach ($license_details as $key => $value) {
344
+
345
+ $_POST['oceanwp_' . $key . '_license_key_deactivate'] = TRUE;
346
+ }
347
+ }
348
+ }
349
+
350
+ $validation = TRUE;
351
+ }
352
 
353
  /**
354
  * Display help text at the top of the Licenses tag
366
  }
367
 
368
  echo '<p>' . sprintf(
369
+ __( 'Enter your extension license keys here to receive updates for purchased extensions. If your license key has expired, please %1$srenew your license%2$s.', 'ocean-extra' ),
370
  '<a href="http://docs.oceanwp.org/article/26-license-renewal" target="_blank" title="License renewal FAQ">',
371
  '</a>'
372
  ) . '</p>';
397
  /**
398
  * Hide license key
399
  */
400
+ private function get_hidden_license_key($input_string = "") {
 
401
  $start = 5;
402
  $length = mb_strlen( $input_string ) - $start - 5;
403
 
434
 
435
  $class = 'expired-msg';
436
  $messages[] = sprintf(
437
+ __( 'Your license key expired on %1$s. Please renew your license key for auto updates.', 'ocean-extra' ),
438
  date_i18n( get_option( 'date_format' ), strtotime( $expire_date, current_time( 'timestamp' ) ) )
439
  );
440
 
446
 
447
  $class = 'error-msg';
448
  $messages[] = sprintf(
449
+ __( 'Your license key has been disabled. Please <a href="%1$s" target="_blank">contact support</a> for more information.', 'ocean-extra' ),
450
  'https://oceanwp.org/support?utm_campaign=admin&utm_source=licenses&utm_medium=revoked'
451
  );
452
 
458
 
459
  $class = 'error-msg';
460
  $messages[] = sprintf(
461
+ __( 'Invalid license. Please <a href="%1$s" target="_blank">visit your account page</a> and verify it.', 'ocean-extra' ),
462
  'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
463
  );
464
 
471
 
472
  $class = 'error-msg';
473
  $messages[] = sprintf(
474
+ __( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank">visit your account page</a> to manage your license key URLs.', 'ocean-extra' ),
475
  $this->item_name,
476
  'https://oceanwp.org/your-account?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
477
  );
483
  case 'item_name_mismatch' :
484
 
485
  $class = 'error-msg';
486
+ $messages[] = sprintf( __( 'This appears to be an invalid license key for %1$s.', 'ocean-extra' ), $this->item_name );
487
 
488
  $license_status = 'license-' . $class . '-notice';
489
 
492
  case 'no_activations_left':
493
 
494
  $class = 'error-msg';
495
+ $messages[] = sprintf( __( 'Your license key has reached its activation limit. <a href="%1$s">View possible upgrades</a> now.', 'ocean-extra' ), 'https://oceanwp.org/your-account/' );
496
 
497
  $license_status = 'license-' . $class . '-notice';
498
 
501
  case 'license_not_activable':
502
 
503
  $class = 'error-msg';
504
+ $messages[] = __( 'The key you entered belongs to a bundle, please use the product specific license key.', 'ocean-extra' );
505
 
506
  $license_status = 'license-' . $class . '-notice';
507
  break;
509
  default :
510
 
511
  $class = 'error-msg';
512
+ $error = ! empty( $license_details[ $this->item_shortname ]->error ) ? $license_details[ $this->item_shortname ]->error : __( 'unknown_error', 'ocean-extra' );
513
+ $messages[] = sprintf( __( 'There was an error with this license key: %1$s. Please <a href="%2$s">contact our support team</a>.', 'ocean-extra' ), $error, 'https://oceanwp.org/support' );
514
 
515
  $license_status = 'license-' . $class . '-notice';
516
  break;
530
 
531
  if( 'lifetime' === $expire_date ) {
532
 
533
+ $messages[] = __( 'License key never expires.', 'ocean-extra' );
534
 
535
  $license_status = 'license-lifetime-notice';
536
 
537
  } elseif( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
538
 
539
  $messages[] = sprintf(
540
+ __( 'Your license key expires soon! It expires on %1$s. Renew your license key for auto updates.', 'ocean-extra' ),
541
  date_i18n( get_option( 'date_format' ), strtotime( $expire_date, current_time( 'timestamp' ) ) )
542
  );
543
 
546
  } else {
547
 
548
  $messages[] = sprintf(
549
+ __( 'Your license key expires on %1$s.', 'ocean-extra' ),
550
  date_i18n( get_option( 'date_format' ), strtotime( $expire_date, current_time( 'timestamp' ) ) )
551
  );
552
 
564
  $class = 'empty-msg';
565
 
566
  $messages[] = sprintf(
567
+ __( 'To receive updates, please enter your valid %1$s license key.', 'ocean-extra' ),
568
  $this->item_name
569
  );
570
 
576
  $html = '<tr>';
577
  $html .= '<th>';
578
  $html .= '<label for="'. $this->item_shortname .'_license_key">';
579
+ $html .= ''. sprintf( __( '%1$s License Key', 'ocean-extra' ), $this->item_name ) .'';
580
  $html .= '</label>';
581
  $html .= '</th>';
582
 
588
  }
589
 
590
  if ( 'valid' == get_option( $this->item_shortname . '_license_active' ) ) {
591
+ $html .= '<input type="submit" class="button-secondary" name="oceanwp_' . $this->item_shortname . '_license_key_deactivate" value="' . __( 'Deactivate License', 'ocean-extra' ) . '">';
592
  }
593
 
594
  if ( ! empty( $messages ) ) {
665
  // Decode license data
666
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
667
 
668
+ $this->update_oceanwp_option($this->item_shortname . '_license_active', $license_data->license);
669
 
670
  //Check license response data exists and update
671
  if( !empty( $license_data ) ) {
724
  // Decode the license data
725
  $license_data = json_decode( wp_remote_retrieve_body( $response ) );
726
 
727
+ $this->delete_oceanwp_option($this->item_shortname . '_license_active');
728
 
729
  if( ! (bool) $license_data->success ) {
730
  set_transient( 'edd_license_error', $license_data, 1000 );
912
 
913
  if ( empty( $version_info->download_link ) ) {
914
  printf(
915
+ __( 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a>.', 'ocean-extra' ),
916
  esc_html( $version_info->name ),
917
  esc_url( $changelog_link ),
918
  esc_html( $version_info->new_version )
919
  );
920
  } else {
921
  printf(
922
+ __( 'There is a new version of %1$s available. <a target="_blank" class="thickbox" href="%2$s">View version %3$s details</a> or <a href="%4$s">update now</a>.', 'ocean-extra' ),
923
  esc_html( $version_info->name ),
924
  esc_url( $changelog_link ),
925
  esc_html( $version_info->new_version ),
1004
  }
1005
 
1006
  if( ! current_user_can( 'update_plugins' ) ) {
1007
+ wp_die( esc_html__( 'You do not have permission to install plugin updates', 'ocean-extra' ), esc_html__( 'Error', 'ocean-extra' ), array( 'response' => 403 ) );
1008
  }
1009
 
1010
  $response = $this->api_request( 'plugin_latest_version', array( 'slug' => esc_url_raw( wp_unslash( $_REQUEST['slug'] ) ) ) );
1027
  $license_details = get_option( 'edd_license_details' );
1028
  $license_details = !empty( $license_details ) ? $license_details : array();
1029
  $license_details[$item_shortname] = $license_data;
1030
+ $this->update_oceanwp_option('edd_license_details', $license_details);
1031
  }
1032
 
1033
  /**
1043
  $license_details = !empty( $license_details ) ? $license_details : array();
1044
  if( !empty( $license_details[$item_shortname] ) ) {
1045
  unset( $license_details[$item_shortname] );
1046
+ $this->update_oceanwp_option('edd_license_details', $license_details);
1047
  }
1048
  }
1049
  }
ocean-extra.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Ocean Extra
4
  * Plugin URI: https://oceanwp.org/extension/ocean-extra/
5
  * Description: Add extra features like widgets, metaboxes, import/export and a panel to activate the premium extensions.
6
- * Version: 1.4.0
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.5.0
@@ -86,7 +86,7 @@ final class Ocean_Extra {
86
  $this->token = 'ocean-extra';
87
  $this->plugin_url = plugin_dir_url( __FILE__ );
88
  $this->plugin_path = plugin_dir_path( __FILE__ );
89
- $this->version = '1.4.0';
90
 
91
  define( 'OE_URL', $this->plugin_url );
92
  define( 'OE_PATH', $this->plugin_path );
3
  * Plugin Name: Ocean Extra
4
  * Plugin URI: https://oceanwp.org/extension/ocean-extra/
5
  * Description: Add extra features like widgets, metaboxes, import/export and a panel to activate the premium extensions.
6
+ * Version: 1.4.1
7
  * Author: OceanWP
8
  * Author URI: https://oceanwp.org/
9
  * Requires at least: 4.5.0
86
  $this->token = 'ocean-extra';
87
  $this->plugin_url = plugin_dir_url( __FILE__ );
88
  $this->plugin_path = plugin_dir_path( __FILE__ );
89
+ $this->version = '1.4.1';
90
 
91
  define( 'OE_URL', $this->plugin_url );
92
  define( 'OE_PATH', $this->plugin_path );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: oceanwp
3
  Tags: widgets, meta box, metaboxes, metabox, oceanwp
4
  Requires at least: 4.5
5
  Tested up to: 4.9.1
6
- Stable tag: 1.4.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -32,6 +32,10 @@ This plugin will only work with the [OceanWP](https://oceanwp.org/) theme.
32
 
33
  == Changelog ==
34
 
 
 
 
 
35
  = 1.4.0 =
36
  - Added: Integration with Push Monkey, see Theme Panel > Push Notifications.
37
  - Added: Instagram and White Label extensions added in the extensions tab.
3
  Tags: widgets, meta box, metaboxes, metabox, oceanwp
4
  Requires at least: 4.5
5
  Tested up to: 4.9.1
6
+ Stable tag: 1.4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
32
 
33
  == Changelog ==
34
 
35
+ = 1.4.1 =
36
+ - Fixed: Scripts & Styles issue on the Theme Panel page.
37
+ - Fixed: Licenses issue on mulsite, now you can enable your premium extensions licenses for all your subsites.
38
+
39
  = 1.4.0 =
40
  - Added: Integration with Push Monkey, see Theme Panel > Push Notifications.
41
  - Added: Instagram and White Label extensions added in the extensions tab.