AMP for WP – Accelerated Mobile Pages - Version 1.0.77.28

Version Description

Download this release

Release Info

Developer mohammed_kaludi
Plugin Icon 128x128 AMP for WP – Accelerated Mobile Pages
Version 1.0.77.28
Comparing to
See all releases

Code changes from version 1.0.77.27 to 1.0.77.28

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
- Stable tag: 1.0.77.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,18 +197,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
200
- 1.0.77.26 (21TH October 2021) =
 
 
 
 
 
 
 
 
201
  Improvements: Added AdPushup Support in AMP #5144
202
 
203
  1.0.77.26 (20TH October 2021) =
204
  Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
205
  Fixed: Images not loading when destination structure is document root in WebP Express #5150
206
 
207
- = 1.0.77.25 (1st October 2021) =
208
- * Improvements: Added Plausible analytics compatible in AMP #5142
209
- * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
210
- * Fixed: Author profile images not loading from Ultimate Member plugin #5141
211
- * Fixed: AMP Page builder content not rendering with Muffin builder #5147
212
- * Fixed: Debug log Errors #5145
213
-
214
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 1.0.77.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+ 1.0.77.28 (28TH October 2021) =
201
+ Improvements: License code improved #5151
202
+ Fixed: Default Gravatar not appearing with FV Gravatar Cache #5149
203
+ Fixed: Featured image not appearing with Offload Media Lite #5153
204
+ Fixed: Function name updated in the seo framework #5155
205
+ Fixed: Lifetime license key is showing as expired in admin panel #5156
206
+ Fixed: Video is not loading when created by slider revolution with divi #5159
207
+
208
+ 1.0.77.27 (21TH October 2021) =
209
  Improvements: Added AdPushup Support in AMP #5144
210
 
211
  1.0.77.26 (20TH October 2021) =
212
  Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
213
  Fixed: Images not loading when destination structure is document root in WebP Express #5150
214
 
 
 
 
 
 
 
 
215
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.77.27
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','1.0.77.27');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 1.0.77.28
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','1.0.77.28');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
changelog.txt CHANGED
@@ -1,6 +1,14 @@
1
  == Changelog ==
2
 
3
- 1.0.77.26 (21TH October 2021) =
 
 
 
 
 
 
 
 
4
  Improvements: Added AdPushup Support in AMP #5144
5
 
6
  1.0.77.26 (20TH October 2021) =
1
  == Changelog ==
2
 
3
+ 1.0.77.28 (28TH October 2021) =
4
+ Improvements: License code improved #5151
5
+ Fixed: Default Gravatar not appearing with FV Gravatar Cache #5149
6
+ Fixed: Featured image not appearing with Offload Media Lite #5153
7
+ Fixed: Function name updated in the seo framework #5155
8
+ Fixed: Lifetime license key is showing as expired in admin panel #5156
9
+ Fixed: Video is not loading when created by slider revolution with divi #5159
10
+
11
+ 1.0.77.27 (21TH October 2021) =
12
  Improvements: Added AdPushup Support in AMP #5144
13
 
14
  1.0.77.26 (20TH October 2021) =
classes/class-ampforwp-rev-slider.php CHANGED
@@ -120,12 +120,13 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
120
  $slides = $slider->get_slides_for_output(true,'',$gallery_ids);
121
  foreach ($slides as $slide) {
122
  $bgtype = $slide->get_param(array('bg', 'type'),'');
 
123
  $image_id = $slide->image_id;
124
  $url = $slide->image_url;
125
  if ( $image_id ) {
126
  $img_data = wp_get_attachment_metadata( $image_id );
127
  }
128
- if($bgtype == 'external'){
129
  $url = esc_url($slide->get_param(array('bg','externalSrc'), ''));
130
  $imgalt = esc_attr($slide->get_param('alt_attr', ''));
131
  $img_title = esc_attr($slide->get_param('title_attr', ''));
@@ -137,7 +138,23 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
137
  'height' => intval($img_h),
138
  'bgtype' => esc_attr($bgtype)
139
  ),$image_id);
140
- }elseif( $bgtype == 'image'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  $width = 480;
142
  $height = 270;
143
  if(isset($img_data['width'])){
@@ -152,7 +169,23 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
152
  'height' => intval($height),
153
  'bgtype' => esc_attr($bgtype)
154
  ),$image_id);
155
- }elseif( $bgtype == 'youtube' ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  $youtube_id = $slide->get_param(array('bg','youtube'), '');
157
  $cover_img = $slide->get_param(array('bg','image'), '');
158
  $urls[] = apply_filters('amp_gallery_image_params', array(
@@ -162,7 +195,23 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
162
  'bgtype' => esc_attr($bgtype),
163
  'cover_img' => esc_attr($cover_img)
164
  ),$image_id);
165
- }elseif($bgtype == 'vimeo'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  $vimeo_id = $slide->get_param(array('bg','vimeo'), '');
167
  $cover_img = $slide->get_param(array('bg','image'), '');
168
  $urls[] = apply_filters('amp_gallery_image_params', array(
@@ -172,7 +221,23 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
172
  'bgtype' => esc_attr($bgtype),
173
  'cover_img' => esc_attr($cover_img)
174
  ),$image_id);
175
- }elseif($bgtype == 'html5'){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  $html5_url = $slide->get_param(array('bg','mpeg'), '');
177
  $html5_url = str_replace('http:','https:',$html5_url);
178
  $cover_img = $slide->get_param(array('bg','image'), '');
@@ -183,6 +248,22 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
183
  'bgtype' => esc_attr($bgtype),
184
  'cover_img' => esc_url($cover_img)
185
  ),$image_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
  }
188
  }
@@ -304,6 +385,19 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
304
  );
305
  $tag_type = 'amp-video';
306
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
308
  $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
309
  'tabindex'=>$key);
120
  $slides = $slider->get_slides_for_output(true,'',$gallery_ids);
121
  foreach ($slides as $slide) {
122
  $bgtype = $slide->get_param(array('bg', 'type'),'');
123
+ $layers = $slide->getLayers();
124
  $image_id = $slide->image_id;
125
  $url = $slide->image_url;
126
  if ( $image_id ) {
127
  $img_data = wp_get_attachment_metadata( $image_id );
128
  }
129
+ if($bgtype == 'external' || !empty($layers)){
130
  $url = esc_url($slide->get_param(array('bg','externalSrc'), ''));
131
  $imgalt = esc_attr($slide->get_param('alt_attr', ''));
132
  $img_title = esc_attr($slide->get_param('title_attr', ''));
138
  'height' => intval($img_h),
139
  'bgtype' => esc_attr($bgtype)
140
  ),$image_id);
141
+ if(!empty($layers)){
142
+ foreach ($layers as $key => $layer) {
143
+ if($layer['type'] == 'video'){
144
+ $video_url = esc_attr($layer['media']['mp4Url']);;
145
+ $video_url = str_replace('http:','https:',$video_url);
146
+ $cover_img = esc_attr($layer['media']['posterUrl']);
147
+ $urls[] = apply_filters('amp_gallery_image_params', array(
148
+ 'url' => esc_url($video_url),
149
+ 'width' => '480',
150
+ 'height' => '270',
151
+ 'bgtype' => esc_attr($layer['type']),
152
+ 'cover_img' => esc_url($cover_img)
153
+ ),$image_id);
154
+ }
155
+ }
156
+ }
157
+ }elseif( $bgtype == 'image' || !empty($layers) ){
158
  $width = 480;
159
  $height = 270;
160
  if(isset($img_data['width'])){
169
  'height' => intval($height),
170
  'bgtype' => esc_attr($bgtype)
171
  ),$image_id);
172
+ if(!empty($layers)){
173
+ foreach ($layers as $key => $layer) {
174
+ if($layer['type'] == 'video'){
175
+ $video_url = esc_attr($layer['media']['mp4Url']);;
176
+ $video_url = str_replace('http:','https:',$video_url);
177
+ $cover_img = esc_attr($layer['media']['posterUrl']);
178
+ $urls[] = apply_filters('amp_gallery_image_params', array(
179
+ 'url' => esc_url($video_url),
180
+ 'width' => '480',
181
+ 'height' => '270',
182
+ 'bgtype' => esc_attr($layer['type']),
183
+ 'cover_img' => esc_url($cover_img)
184
+ ),$image_id);
185
+ }
186
+ }
187
+ }
188
+ }elseif( $bgtype == 'youtube' || !empty($layers) ){
189
  $youtube_id = $slide->get_param(array('bg','youtube'), '');
190
  $cover_img = $slide->get_param(array('bg','image'), '');
191
  $urls[] = apply_filters('amp_gallery_image_params', array(
195
  'bgtype' => esc_attr($bgtype),
196
  'cover_img' => esc_attr($cover_img)
197
  ),$image_id);
198
+ if(!empty($layers)){
199
+ foreach ($layers as $key => $layer) {
200
+ if($layer['type'] == 'video'){
201
+ $video_url = esc_attr($layer['media']['mp4Url']);;
202
+ $video_url = str_replace('http:','https:',$video_url);
203
+ $cover_img = esc_attr($layer['media']['posterUrl']);
204
+ $urls[] = apply_filters('amp_gallery_image_params', array(
205
+ 'url' => esc_url($video_url),
206
+ 'width' => '480',
207
+ 'height' => '270',
208
+ 'bgtype' => esc_attr($layer['type']),
209
+ 'cover_img' => esc_url($cover_img)
210
+ ),$image_id);
211
+ }
212
+ }
213
+ }
214
+ }elseif( $bgtype == 'vimeo' || !empty($layers) ){
215
  $vimeo_id = $slide->get_param(array('bg','vimeo'), '');
216
  $cover_img = $slide->get_param(array('bg','image'), '');
217
  $urls[] = apply_filters('amp_gallery_image_params', array(
221
  'bgtype' => esc_attr($bgtype),
222
  'cover_img' => esc_attr($cover_img)
223
  ),$image_id);
224
+ if(!empty($layers)){
225
+ foreach ($layers as $key => $layer) {
226
+ if($layer['type'] == 'video'){
227
+ $video_url = esc_attr($layer['media']['mp4Url']);;
228
+ $video_url = str_replace('http:','https:',$video_url);
229
+ $cover_img = esc_attr($layer['media']['posterUrl']);
230
+ $urls[] = apply_filters('amp_gallery_image_params', array(
231
+ 'url' => esc_url($video_url),
232
+ 'width' => '480',
233
+ 'height' => '270',
234
+ 'bgtype' => esc_attr($layer['type']),
235
+ 'cover_img' => esc_url($cover_img)
236
+ ),$image_id);
237
+ }
238
+ }
239
+ }
240
+ }elseif($bgtype == 'html5' || !empty($layers)){
241
  $html5_url = $slide->get_param(array('bg','mpeg'), '');
242
  $html5_url = str_replace('http:','https:',$html5_url);
243
  $cover_img = $slide->get_param(array('bg','image'), '');
248
  'bgtype' => esc_attr($bgtype),
249
  'cover_img' => esc_url($cover_img)
250
  ),$image_id);
251
+ if(!empty($layers)){
252
+ foreach ($layers as $key => $layer) {
253
+ if($layer['type'] == 'video'){
254
+ $video_url = esc_attr($layer['media']['mp4Url']);;
255
+ $video_url = str_replace('http:','https:',$video_url);
256
+ $cover_img = esc_attr($layer['media']['posterUrl']);
257
+ $urls[] = apply_filters('amp_gallery_image_params', array(
258
+ 'url' => esc_url($video_url),
259
+ 'width' => '480',
260
+ 'height' => '270',
261
+ 'bgtype' => esc_attr($layer['type']),
262
+ 'cover_img' => esc_url($cover_img)
263
+ ),$image_id);
264
+ }
265
+ }
266
+ }
267
  }
268
  }
269
  }
385
  );
386
  $tag_type = 'amp-video';
387
  }
388
+ elseif( $image['bgtype'] =="video"){
389
+ $amp_img_arr = array(
390
+ 'src'=> $image['url'],
391
+ 'width' => $image['width'],
392
+ 'height' => $image['height'],
393
+ 'layout'=>'responsive',
394
+ 'class' => 'amp-carousel-img',
395
+ 'poster' => $image['cover_img'],
396
+ 'controls' => '',
397
+ 'autoplay' => '',
398
+ );
399
+ $tag_type = 'amp-video';
400
+ }
401
  if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
402
  $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
403
  'tabindex'=>$key);
includes/admin-script.js CHANGED
@@ -868,6 +868,123 @@ function deactivatelicence(){
868
  alert('Please try after '+ lastcheck);
869
  }
870
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
871
  $(".redux-ampforwp-ext-deactivate").on("click", function(){
872
  var currentThis = $(this);
873
  var plugin_id = currentThis.attr("id");
868
  alert('Please try after '+ lastcheck);
869
  }
870
  });
871
+
872
+ // Start Refresh and check if user has done renewal in between 0-7 Days & when Expired
873
+ var ap = document.getElementById("active-plugins-dr");
874
+ if (ap) {
875
+ var remainingdays = ap.getAttribute("data-days");
876
+ }
877
+ if ( remainingdays <= 7 ){
878
+ setTimeout(function () {
879
+ jQuery("#refresh_expired_addon").trigger("click");
880
+ }, 0);
881
+ }
882
+
883
+ $(".days_remain").click(function(){
884
+ var currentThis = $(this);
885
+ var plugin_id = currentThis.attr("id");
886
+ jQuery("#refresh_expired_addon").addClass( 'spin' );
887
+
888
+ var secure_nonce = currentThis.attr('data-nonce');
889
+ $.ajax({
890
+ url: ajaxurl,
891
+ method: 'post',
892
+ data: {action: 'ampforwp_get_licence_activate_update',
893
+ update_check: 'yes',
894
+ ampforwp_license_activate:plugin_id,
895
+ verify_nonce: secure_nonce
896
+ },
897
+ dataType: 'json',
898
+ success: function(response){
899
+ jQuery("#refresh_expired_addon").removeClass( 'spin' );
900
+ if(response.status=='200'){
901
+ var expireData = new Date(response.other.all_data.expires);
902
+ var today = new Date();
903
+ var diffTime = Math.abs( expireData.getTime()-today.getTime() );
904
+ var expireDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
905
+ if (expireDays > 30) {
906
+ $("span.before_msg_active").text('Your License is')
907
+ $("span.lthan_0").text('Your License is')
908
+ $(".lessthan_30,.pro_warning,.dashicons-no,.renewal-license,.ampforwp-addon-alert,.ooy").css("display","none")
909
+ $("span.one_of_expired").text('Active')
910
+ $(".one_of_expired,.expiredinner_span,.lthan_0").css("color","green")
911
+ $("span.expiredinner_span").text('Active')
912
+ }
913
+ }else{
914
+ jQuery("#refresh_expired_addon").removeClass( 'spin' );
915
+ }
916
+ }
917
+ })
918
+
919
+ $.ajax({
920
+ url: ajaxurl,
921
+ method: 'post',
922
+ data: {action: 'ampforwp_set_license_transient',
923
+ update_check: 'yes',
924
+ verify_nonce: secure_nonce
925
+ },
926
+ dataType: 'json',
927
+ success: function (s) {
928
+ JSON.parse(s);
929
+ },
930
+ });
931
+ });
932
+ // End Refresh to check if user has done renewal in between 0-7 Days & when Expired
933
+
934
+ // Start User Refresh when expired
935
+ $(".user_refr").click(function(){
936
+ var currentThis = $(this);
937
+ var plugin_id = currentThis.attr("id");
938
+ jQuery("#user_refr_addon").addClass( 'spin' );
939
+ var secure_nonce = currentThis.attr('data-nonce');
940
+
941
+ $.ajax({
942
+ url: ajaxurl,
943
+ method: 'post',
944
+ data: {action: 'ampforwp_get_licence_activate_update',
945
+ update_check: 'yes',
946
+ ampforwp_license_activate:plugin_id,
947
+ verify_nonce: secure_nonce
948
+ },
949
+ dataType: 'json',
950
+ success: function(response){
951
+ jQuery("#user_refr_addon").removeClass( 'spin' );
952
+ if(response.status=='200'){
953
+ var expireData = new Date(response.other.all_data.expires);
954
+ var today = new Date();
955
+ var diffTime = Math.abs( expireData.getTime()-today.getTime() );
956
+ var expireDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
957
+ if (expireDays > 30) {
958
+ $("span.before_msg_active").text('Your License is')
959
+ $(".lessthan_30,.pro_warning,.dashicons-no,.renewal-license").css("display","none")
960
+ $("span.one_of_expired").text('Active')
961
+ $("span.one_of_expired").css("color","green")
962
+ }
963
+ }else{
964
+ jQuery("#user_refr_addon").removeClass( 'spin' );
965
+ }
966
+ }
967
+ })
968
+ });
969
+ // End User Refresh when Expired
970
+ var extmnger = document.querySelector('a[extmnger_data="1"]');
971
+ if (extmnger) {
972
+ var tamp_options = document.getElementById("toplevel_page_amp_options");
973
+ let collection = tamp_options.querySelectorAll(".wp-submenu a");
974
+ collection.forEach((ele, ind) => {
975
+ let p = ele.parentNode;
976
+ let p_ind = Array.from(document.querySelectorAll('.wp-submenu')).indexOf(p);
977
+ ind++;
978
+ p_ind++;
979
+ ele.addEventListener('click', function(){
980
+ if (ele.innerText == 'Extensions') {
981
+ window.location.href = "admin.php?page=amp-extension-manager"
982
+ }
983
+ }
984
+ )
985
+ })
986
+ }
987
+
988
  $(".redux-ampforwp-ext-deactivate").on("click", function(){
989
  var currentThis = $(this);
990
  var plugin_id = currentThis.attr("id");
includes/admin-style.css CHANGED
@@ -2197,4 +2197,192 @@ a#ampforwp-close-ad-notice {
2197
  background: #fff;
2198
  color: #2271b1;
2199
  border: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2200
  }
2197
  background: #fff;
2198
  color: #2271b1;
2199
  border: none;
2200
+ }.activated-plugins {
2201
+ position: relative;
2202
+ display: inline-block;
2203
+ color: #222;
2204
+ font-size: 14px;
2205
+ letter-spacing: 0;
2206
+ right: 5px
2207
+ }.inner_span {
2208
+ color: green
2209
+ }i.dashicons-before.dashicons-admin-generic {
2210
+ color: #666
2211
+ }#exp {
2212
+ color: red
2213
+ }.dashicons-no {
2214
+ color: #fff;
2215
+ border-radius: 10px;
2216
+ right: 5px;
2217
+ position: relative;
2218
+ font-size: 15px
2219
+ }.dashicons-no:before {
2220
+ content: "\f158";
2221
+ top: 2px;
2222
+ position: relative;
2223
+ left: .5px
2224
+ }.amppro-alert {
2225
+ color: red;
2226
+ font-size: 14px;
2227
+ letter-spacing: 0;
2228
+ margin-right: 3px
2229
+ }.dashicons-alert::before {
2230
+ content: "\f534";
2231
+ background: #ffb900;
2232
+ border-radius: 40px;
2233
+ color: #fff;
2234
+ border-radius: 40px;
2235
+ padding: 4px 3px 4px 4px;
2236
+ top: 0;
2237
+ right: 9px;
2238
+ margin: 0;
2239
+ position: relative
2240
+ }a.renewal-license {
2241
+ margin-left: 5px;
2242
+ font-size: 12px !important;
2243
+ padding: 6px 12px;
2244
+ letter-spacing: .1px;
2245
+ border-radius: 60px;
2246
+ margin-right: 0;
2247
+ background: -webkit-linear-gradient(to right, #eb3349, #f45c43);
2248
+ background: linear-gradient(to right, #eb3349, #f45c43);
2249
+ color: #fff !important;
2250
+ box-shadow: 0 .15em .65em 0 rgb(0 0 0 / 25%)
2251
+ }.renew-lic:hover {
2252
+ color: #eee
2253
+ }span.renew-lic {
2254
+ font-size: 14px
2255
+ }.ampforwp-addon_pro_key_user_name {
2256
+ font-weight: 700
2257
+ }.before_msg_Pro {
2258
+ margin-left: 4px
2259
+ }.before_msg_Pro_active {
2260
+ margin-left: 3px
2261
+ }.Pro_inactive {
2262
+ margin-left: 3px
2263
+ }.pro_warning {
2264
+ color: #ffb229;
2265
+ right: 5px;
2266
+ position: relative;
2267
+ bottom: 1px
2268
+ }.zto30 {
2269
+ color: red
2270
+ }.ampforwp-lifetime-alert {
2271
+ color: green
2272
+ }.ampforwppro_icon:before {
2273
+ content: "\f147";
2274
+ background: #388e3c;
2275
+ border-radius: 40px;
2276
+ color: #fff;
2277
+ position: relative;
2278
+ left: 1px;
2279
+ border-radius: 40px;
2280
+ padding: 1px 1px 0 0;
2281
+ top: 1px;
2282
+ margin: 0;
2283
+ font-size: 14px
2284
+ }span.ampforwppro_icon {
2285
+ font-size: 16px
2286
+ }.pro_icon {
2287
+ margin: 0;
2288
+ right: 0
2289
+ }.expiredinner_span {
2290
+ color: green
2291
+ }#exp {
2292
+ color: red
2293
+ }.dashicons-no:before {
2294
+ content: "\f158";
2295
+ top: 3px;
2296
+ position: relative;
2297
+ left: 0
2298
+ }.ampforwp-addon-alert {
2299
+ color: red;
2300
+ font-size: 14px;
2301
+ letter-spacing: 0;
2302
+ cursor: default
2303
+ }.dashicons-alert::before {
2304
+ content: "\f534";
2305
+ background: #ffb900;
2306
+ border-radius: 40px;
2307
+ color: #fff;
2308
+ border-radius: 40px;
2309
+ padding: 4px 3px 4px 4px;
2310
+ top: 0;
2311
+ right: 9px;
2312
+ margin: 0;
2313
+ position: relative
2314
+ }.ampforwp-addon_key_user_name {
2315
+ font-weight: 700
2316
+ }.before_msg {
2317
+ margin-left: 4px;
2318
+ cursor: default
2319
+ }.before_msg_active {
2320
+ margin-left: 3px
2321
+ }.ampforwp_addon_inactive {
2322
+ margin-left: 3px
2323
+ }.ext_settings_url {
2324
+ margin-left: 8px;
2325
+ text-decoration: unset
2326
+ }.ampforwp-addon-main .activated-plugins {
2327
+ color: #222
2328
+ }a.ext_url {
2329
+ text-decoration: unset
2330
+ }.dashicons.spin {
2331
+ animation: dashicons-spin 2s infinite;
2332
+ animation-timing-function: linear
2333
+ }@keyframes dashicons-spin {
2334
+ 0% {
2335
+ transform: rotate(0)
2336
+ }
2337
+ 100% {
2338
+ transform: rotate(-360deg)
2339
+ }
2340
+ }span#lic_exp {
2341
+ color: red;
2342
+ margin-left: 4px
2343
+ }i#refresh_expired_addon {
2344
+ cursor: pointer;
2345
+ display: none;
2346
+ color: #135e96
2347
+ }i#user_refr_addon {
2348
+ cursor: pointer;
2349
+ color: #135e96
2350
+ }i#user_refresh_expired_addon {
2351
+ cursor: pointer
2352
+ }span.one_of_expired {
2353
+ color: red
2354
+ }.ampforwppro_alert {
2355
+ color: #ffb229;
2356
+ top: 2px;
2357
+ position: relative;
2358
+ right: 1px
2359
+ }#lic_active {
2360
+ color: green;
2361
+ margin-left: 8px
2362
+ }.lic_is_active {
2363
+ color: #000
2364
+ }#lic_inactive {
2365
+ color: #bebfc0;
2366
+ margin-left: 8px
2367
+ }.expire_msg {
2368
+ color: red
2369
+ }.less_than_zero {
2370
+ color: red;
2371
+ cursor: default
2372
+ }.lifetime_ {
2373
+ color: green
2374
+ }.user_refresh_single_addon {
2375
+ cursor: pointer
2376
+ }.ampforwp_pro_alert {
2377
+ color: #ffb229
2378
+ }.ampforwp-license-tenure {
2379
+ display: inline-block;
2380
+ margin-top: 8px
2381
+ }.ampforwp_inactive_key {
2382
+ color: #bebfc0;
2383
+ padding-left: 5px
2384
+ }span.lttn {
2385
+ position: unset
2386
+ }span.ltz {
2387
+ position: unset
2388
  }
includes/options/admin-config.php CHANGED
@@ -870,8 +870,13 @@ foreach ($extension_listing_array as $key => $extension) {
870
  if(isset($selectedOption['amp-license'][$pathExploded]['all_data']) && $selectedOption['amp-license'][$pathExploded]['all_data']!=""){
871
  $allResponseData = $selectedOption['amp-license'][$pathExploded]['all_data'];
872
  $remainingExpiresDays = floor( ( strtotime($allResponseData['expires'] )- time() )/( 60*60*24 ) );
873
- if($remainingExpiresDays>0){
874
- $amp_license_response = "<span class='license-tenure'>".esc_html($remainingExpiresDays)." ".esc_html__('Days Remaining', 'accelerated-mobile-pages')."</span>. <a href='https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($amplicense)."&download_id=".esc_attr($allResponseData['item_name'])."' class='license-renew-a'>".esc_html__('Renew License', 'accelerated-mobile-pages')."</a>";
 
 
 
 
 
875
  }else{ $amp_license_response = "<span class='license-tenure expire'>".esc_html__('Expired', 'accelerated-mobile-pages')."!</span> <a href='https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($amplicense)."&download_id=".esc_attr($allResponseData['item_name'])."' class='license-renew-a'>".esc_html__('Renew your license', 'accelerated-mobile-pages')."</a>"; }
876
  }
877
  }
@@ -1457,8 +1462,8 @@ if(get_theme_support('amp-template-mode')){
1457
  }
1458
  $proDetailsProvide = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Upgrade to PRO</a> ';
1459
  if($ampforwp_nameOfUser!=""){
1460
- if (class_exists('AMPExtensionManager') ) {
1461
- $license_info = get_option( 'ampforwppro_license_info');
1462
  if (defined('AMPFORWPPRO_PLUGIN_DIR') && !empty($license_info)){
1463
  $ampforwp_pro_manager = AMPFORWPPRO_PLUGIN_DIR.'inc/amp-ext-manager-lic-data.php';
1464
  if( file_exists($ampforwp_pro_manager) ){
@@ -1466,14 +1471,230 @@ if($ampforwp_nameOfUser!=""){
1466
  }
1467
  $settings_url = esc_url( admin_url('admin.php?page=amp-extension-manager') );
1468
  }
1469
- }
1470
- else{
1471
- $proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".esc_html($ampforwp_nameOfUser)."</span> <a class='' href='".esc_url(admin_url('admin.php?page=amp_options&tabid=opt-go-premium'))."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1472
  }
1473
- }
1474
- elseif($ampforwp_is_productActivated){
1475
- $proDetailsProvide = "<span class='extension-menu-call'>One more Step <a class='premium_features_btn' href='".esc_url(admin_url('admin.php?tabid=opt-go-premium&page=amp_options'))."'>Enter license here</a></span>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1476
  }
 
 
 
 
1477
  if(function_exists('amp_activate') ){
1478
  $proDetailsProvide = "<a class='premium_features_btn_txt' href=\"#\"> AMP by Automattic compatibility has been activated</a>";
1479
  }
870
  if(isset($selectedOption['amp-license'][$pathExploded]['all_data']) && $selectedOption['amp-license'][$pathExploded]['all_data']!=""){
871
  $allResponseData = $selectedOption['amp-license'][$pathExploded]['all_data'];
872
  $remainingExpiresDays = floor( ( strtotime($allResponseData['expires'] )- time() )/( 60*60*24 ) );
873
+ $lifetime_lic = isset($allResponseData['expires']) ? $allResponseData['expires'] : '' ;
874
+ if($lifetime_lic == 'lifetime' ){
875
+ $remainingExpiresDays = 'Lifetime';
876
+ $amp_license_response = "<span class='license-tenure'>".esc_html__('Your License is valid for', 'accelerated-mobile-pages')." ".esc_html($remainingExpiresDays)."</span>. <a href='https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($amplicense)."&download_id=".esc_attr($allResponseData['item_name'])."' style='display:inline-block;' class='license-renew-a'>".esc_html__('Renew License', 'accelerated-mobile-pages')."</a>";
877
+ }
878
+ else if($remainingExpiresDays>0){
879
+ $amp_license_response = "<span class='license-tenure'>".esc_html($remainingExpiresDays)." ".esc_html__('Days Remaining', 'accelerated-mobile-pages')."</span>. <a href='https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($amplicense)."&download_id=".esc_attr($allResponseData['item_name'])."' class='license-renew-a'>".esc_html__('Renew License', 'accelerated-mobile-pages')."</a>";
880
  }else{ $amp_license_response = "<span class='license-tenure expire'>".esc_html__('Expired', 'accelerated-mobile-pages')."!</span> <a href='https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($amplicense)."&download_id=".esc_attr($allResponseData['item_name'])."' class='license-renew-a'>".esc_html__('Renew your license', 'accelerated-mobile-pages')."</a>"; }
881
  }
882
  }
1462
  }
1463
  $proDetailsProvide = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Upgrade to PRO</a> ';
1464
  if($ampforwp_nameOfUser!=""){
1465
+ if (class_exists('AMPExtensionManager') ) {
1466
+ $license_info = get_option( 'ampforwppro_license_info');
1467
  if (defined('AMPFORWPPRO_PLUGIN_DIR') && !empty($license_info)){
1468
  $ampforwp_pro_manager = AMPFORWPPRO_PLUGIN_DIR.'inc/amp-ext-manager-lic-data.php';
1469
  if( file_exists($ampforwp_pro_manager) ){
1471
  }
1472
  $settings_url = esc_url( admin_url('admin.php?page=amp-extension-manager') );
1473
  }
1474
+ }
1475
+ }
1476
+
1477
+ if ( !class_exists( 'AMPExtensionManager' ) ) {
1478
+ if ( !defined('AMPFORWPPRO_PLUGIN_DIR') ){
1479
+ $expiredLicensedata = array();
1480
+ foreach ($extension_listing_array as $key => $extension) {
1481
+ $currentStatus = "";
1482
+ $license_key = '';
1483
+ $license_status = 'inactive';
1484
+ $license_status_msg = '';
1485
+ $license_user_name = '';
1486
+ $remainingExpiresDays = '';
1487
+
1488
+ if($extension['plugin_active_path'] != "" && is_plugin_active($extension['plugin_active_path']) ){
1489
+ $ampforwp_is_productActivated = true;
1490
+ $currentStatus = "not-active invalid";
1491
+ $pathExploded = explode("/", $extension['plugin_active_path']);
1492
+ $pathExploded = $pathExploded[0];
1493
+
1494
+ $amplicense = '';
1495
+ $allResponseData = '';
1496
+ $allResponseData = array('success'=>'',
1497
+ 'license'=> '',
1498
+ 'item_name'=> '',
1499
+ 'expires'=> '',
1500
+ 'customer_name'=> '',
1501
+ 'customer_email'=> '',
1502
+ );
1503
+ $allResponseData = $selectedOption['amp-license'][$pathExploded]['all_data'];
1504
+ $selectedOption = (array) get_option('redux_builder_amp',true);
1505
+ $expiredLicensedata[$pathExploded] = $selectedOption['amp-license'][$pathExploded]['status'] == 'expired' ? 1 : 0 ;
1506
+ $remainingExpiresDays = date('Y-m-d', strtotime($allResponseData['expires'])) ;
1507
+ $license_info_lifetime = $allResponseData['expires'];
1508
+ $today = date('Y-m-d');
1509
+ $exp_date = $remainingExpiresDays;
1510
+ $date1 = date_create($today);
1511
+ $date2 = date_create($exp_date);
1512
+ $diff = date_diff($date1,$date2);
1513
+ $days = $diff->format("%a");
1514
+ if( $license_info_lifetime == 'lifetime' ){
1515
+ $days = 'Lifetime';
1516
+ if ($days == 'Lifetime') {
1517
+ $expire_msg = " Your License is Valid for Lifetime ";
1518
+ }
1519
+ }
1520
+ elseif($today > $exp_date){
1521
+ $days = -$days;
1522
+ }
1523
+ }
1524
+
1525
+ $license_status = '';
1526
+ if(isset($selectedOption['amp-license'][$pathExploded]['status']) && $selectedOption['amp-license'][$pathExploded]['status']==='valid'){
1527
+ $license_status = $selectedOption['amp-license'][$pathExploded]['status'];
1528
+ $license_user_name = substr($ampforwp_nameOfUser, 0, strpos($ampforwp_nameOfUser, ' '));
1529
+ $check_for_Caps = ctype_upper($license_user_name);
1530
+ if ( $check_for_Caps == 1 ) {
1531
+ $license_user_name = strtolower($license_user_name);
1532
+ $license_user_name = ucwords($license_user_name);
1533
+ }
1534
+ else{
1535
+ $license_user_name = ucwords($license_user_name);
1536
+ }
1537
+ $currentStatus = 'active valid';
1538
+
1539
+ if($ampforwp_nameOfUser=="" && isset($selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'])){
1540
+ $ampforwp_nameOfUser = $selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'];
1541
+ }
1542
+
1543
+ if(isset($selectedOption['amp-license'][$pathExploded]['all_data']) && $selectedOption['amp-license'][$pathExploded]['all_data']!=""){
1544
+ $allResponseData = $selectedOption['amp-license'][$pathExploded]['all_data'];
1545
+ $remainingExpiresDays = date('Y-m-d', strtotime($allResponseData['expires'])) ;
1546
+ $license_info_lifetime = $allResponseData['expires'];
1547
+ $today = date('Y-m-d');
1548
+ $exp_date = $remainingExpiresDays;
1549
+ $date1 = date_create($today);
1550
+ $date2 = date_create($exp_date);
1551
+ $diff = date_diff($date1,$date2);
1552
+ $days = $diff->format("%a");
1553
+ if( $license_info_lifetime == 'lifetime' ){
1554
+ $days = 'Lifetime';
1555
+ if ($days == 'Lifetime') {
1556
+ $expire_msg = " Your License is Valid for Lifetime ";
1557
+ }
1558
+ }
1559
+ elseif($today > $exp_date){
1560
+ $days = -$days;
1561
+ }
1562
+ }
1563
+ }
1564
+ }
1565
+ if(isset($selectedOption['amp-license'][$pathExploded])){
1566
+ while ( strlen($selectedOption['amp-license'][$pathExploded]['license']) > 32 ) {
1567
+ $selectedOption['amp-license'][$pathExploded]['license'] = base64_decode($selectedOption['amp-license'][$pathExploded]['license']);
1568
+ $amplicense = $selectedOption['amp-license'][$pathExploded]['license'];}
1569
+ $license_key = $selectedOption['amp-license'][$pathExploded]['license'];
1570
+ }
1571
+
1572
+ $lic_status = isset($selectedOption['amp-license'][$pathExploded]['status']) ? $selectedOption['amp-license'][$pathExploded]['status'] : '';
1573
+ $lic_uname = isset($selectedOption['amp-license'][$pathExploded]['all_data']['customer_name']) ? $selectedOption['amp-license'][$pathExploded]['all_data']['customer_name'] : '';
1574
+ $license_user_name = substr($lic_uname, 0, strpos($lic_uname, ' '));
1575
+ $check_for_Caps = ctype_upper($license_user_name);
1576
+ if ( $check_for_Caps == 1 ) {
1577
+ $license_user_name = strtolower($license_user_name);
1578
+ $license_user_name = ucwords($license_user_name);}
1579
+ else{ $license_user_name = ucwords($license_user_name); }
1580
+
1581
+ if ( isset( $license_user_name ) && $license_user_name!=="" && isset( $days ) ){
1582
+ if ( $license_status == 'valid' || $lic_status == 'expired' ) {
1583
+ if ($lic_status == 'expired') { $days = -1; }
1584
+
1585
+ $one_of_plugin_expired = 0;
1586
+ if ( in_array( 1, $expiredLicensedata ) ){
1587
+ $one_of_plugin_expired = 1;
1588
+ }
1589
+ if ( !in_array( 0, $expiredLicensedata ) ){
1590
+ $one_of_plugin_expired = 0;
1591
+ }
1592
+ $exp_id = '';
1593
+ $expire_msg = '';
1594
+ $renew_mesg = '';
1595
+ $span_class = '';
1596
+ $expire_msg_before = '';
1597
+ $ZtoS_days = '';
1598
+ $refresh_addon = '';
1599
+ $user_refr = '';
1600
+ $alert_icon = '';
1601
+ $ext_settings_url = 'ext_url';
1602
+ $settings_url = esc_url(admin_url('edit.php?post_type=ampforwp&page=structured_data_options'));
1603
+ if ( $days == 'Lifetime' ) {
1604
+ $expire_msg = " ".esc_html('Valid for Lifetime')." ";
1605
+ // $expire_msg = " Active ";
1606
+ $expire_msg_before = '<span class="before_msg_active">'.esc_html('Your License is').'</span>';
1607
+ $span_class = "ampforwp_addon_icon dashicons dashicons-yes pro_icon ampforwppro_icon";
1608
+ $color = 'color:green';
1609
+ }
1610
+ else if( $days>=0 && $days<=30 ){
1611
+ $renew_url = "https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($license_key)."&download_id=".esc_attr($allResponseData['item_name'])."";
1612
+
1613
+ if ($one_of_plugin_expired == 1) {
1614
+ $expire_msg_before = '<span class="before_msg_active">'.esc_html('One of your').' <span class="lessthan_30" style="color:red;">'.esc_html('license key is').'</span></span>';
1615
+ $spann_class = "<span class='ampforwp_addon_icon dashicons dashicons-no lttn'></span>";
1616
+ $expire_msg = '<span class="one_of_expired">'.esc_html("Expired").'</span> '.$spann_class.' <a target="blank" class="renewal-license" href="'.$renew_url.'"><span class="renew-lic">'.esc_html__('Renew', 'accelerated-mobile-pages').'</span></a>';
1617
+ }
1618
+ else
1619
+ {
1620
+ $expire_msg_before = '<span class="before_msg">'.esc_html('Your License is').'</span> <span class="ampforwp-addon-alert">'.esc_html('expiring in').' '.$days.' '.esc_html('days').'</span><a target="blank" class="renewal-license" href="'.$renew_url.'"><span class="renew-lic">'.esc_html__('Renew', 'accelerated-mobile-pages').'</span></a>';
1621
+ }
1622
+ $color = 'color:red';
1623
+ $alert_icon = '<span class="ampforwp_addon_icon dashicons dashicons-warning pro_warning"></span>';
1624
+ $trans_check = get_transient( 'ampforwp_addon_set_transient' );
1625
+ if ( $trans_check !== 'ampforwp_addon_set_transient_value' ){
1626
+ $refresh_addon = '<a id='.$pathExploded.' data-nonce='.wp_create_nonce('verify_extension').' data-days="'.$days.'" class="days_remain">
1627
+ <i addon-is-expired class="dashicons dashicons-update-alt" id="refresh_expired_addon"></i>
1628
+ </a>';
1629
+ }
1630
+ }
1631
+ elseif($days<0){
1632
+ $ext_settings_url = 'ext_settings_url';
1633
+ $renew_url = "https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($license_key)."&download_id=".esc_attr($allResponseData['item_name'])."";
1634
+ if ($one_of_plugin_expired == 1) {
1635
+ $expire_msg_before = '<span class="ampforwp_addon_inactive"><span class="ooy">'.esc_html('One of your').'</span> <span class="lthan_0" style="color:red;">'.esc_html('license key is').'</span></span>';
1636
+ }else{
1637
+ $expire_msg_before = '<span class="ampforwp_addon_inactive">'.esc_html('Your').' <span class="lthan_0" style="color:red;">'.esc_html('License has been').'</span></span>';
1638
+ $user_refr = '<a class="user_refr" id='.$pathExploded.' data-nonce='.wp_create_nonce('verify_extension').' data-days="'.$days.'" >
1639
+ <i addon-is-expired class="dashicons dashicons-update-alt" id="user_refr_addon"></i>
1640
+ </a>';
1641
+ }
1642
+ $expire_msg = " Expired ";
1643
+ $exp_class = 'expired';
1644
+ $exp_id = 'exp';
1645
+ $exp_class_2 = 'renew_license_key_';
1646
+ $span_class = "ampforwp_addon_icon dashicons dashicons-no ltz";
1647
+ $renew_mesg = '<a target="blank" class="renewal-license" href="'.$renew_url.'"><span class="renew-lic">'.esc_html__('Renew', 'accelerated-mobile-pages').'</span></a>';
1648
+ $color = 'color:red';
1649
+
1650
+ $trans_check = get_transient( 'ampforwp_addon_set_transient' );
1651
+ if ( $trans_check !== 'ampforwp_addon_set_transient_value' ){
1652
+ $refresh_addon = '<a id='.$pathExploded.' data-nonce='.wp_create_nonce('verify_extension').' data-days="'.$days.'" class="days_remain">
1653
+ <i addon-is-expired class="dashicons dashicons-update-alt" id="refresh_expired_addon"></i>
1654
+ </a>';
1655
+ }
1656
  }
1657
+ else{
1658
+ if ($one_of_plugin_expired == 1) {
1659
+ $expire_msg_before = '<span class="before_msg_active">'.esc_html('One of your').' <span class="less_than_30" style="color:red;">'.esc_html('license key is').'</span></span>';
1660
+ }else{
1661
+ $expire_msg_before = '<span class="before_msg_active">'.esc_html('Your License is').'</span>';
1662
+ }
1663
+ if ($one_of_plugin_expired == 1) {
1664
+ $renew_url = "https://accounts.ampforwp.com/order/?edd_license_key=".esc_attr($license_key)."&download_id=".esc_attr($allResponseData['item_name'])."";
1665
+ $expire_msg = " <span class='one_of_expired'>".esc_html('Expired')."</span> ";
1666
+ $renew_mesg = '<a target="blank" class="renewal-license" href="'.$renew_url.'"><span class="renew-lic">'.esc_html__('Renew', 'accelerated-mobile-pages').'</span></a>';
1667
+ }
1668
+ else{
1669
+ $expire_msg = " Active ";
1670
+ }
1671
+ if ($one_of_plugin_expired == 1) {
1672
+ $span_class = "ampforwp_addon_icon dashicons dashicons-no pro_icon";
1673
+ }
1674
+ else{
1675
+ $span_class = "ampforwp_addon_icon dashicons dashicons-yes pro_icon ampforwppro_icon";
1676
+ }
1677
+ if ($one_of_plugin_expired == 1) { $color = 'color:red';}
1678
+ else{ $color = 'color:green'; }
1679
+ }
1680
+ if($days<0){ $exp_id = 'exp'; }
1681
+ $proDetailsProvide = "<div class='ampforwp-addon-main'>
1682
+ <span class='ampforwp-addon-info'>
1683
+ ".$alert_icon."<span class='activated-plugins'>".esc_html('Hi')." <span class='ampforwp-addon_key_user_name'>".esc_html($license_user_name)."</span>".','."
1684
+ <span id='active-plugins-dr' data-days=".$days." class=".$days."> ".$expire_msg_before." </span>
1685
+ <span class='expiredinner_span' data-remain-days=".$days." id=".$exp_id.">".$expire_msg."</span>
1686
+ <span class='".$span_class."'></span>".$renew_mesg.$refresh_addon.$user_refr ;
1687
+ $proDetailsProvide .= $ZtoS_days."
1688
+ </span>
1689
+ </div>";
1690
+ }
1691
+ }
1692
+ }
1693
  }
1694
+ else if( $ampforwp_nameOfUser!="" && !class_exists('AMPExtensionManager') ){
1695
+ $proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".esc_html($ampforwp_nameOfUser)."</span> <a class='' href='".esc_url(admin_url('admin.php?page=amp_options&tabid=opt-go-premium'))."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
1696
+ }
1697
+
1698
  if(function_exists('amp_activate') ){
1699
  $proDetailsProvide = "<a class='premium_features_btn_txt' href=\"#\"> AMP by Automattic compatibility has been activated</a>";
1700
  }
includes/options/redux-core/framework.php CHANGED
@@ -3234,6 +3234,7 @@
3234
 
3235
  $amp_opt = get_option("ampforwp_option_panel_view_type");
3236
  $opt_visible = "";
 
3237
  $opt_visible_class = "amp-full-view-options";
3238
  if(($amp_opt==1 || $amp_opt=="") && !get_theme_support('amp-template-mode')){
3239
  $opt_visible = 'style=display:none';
@@ -3242,8 +3243,12 @@
3242
  $opt_visible = '';
3243
  $opt_visible_class = "";
3244
  }
 
 
 
 
3245
  $string .= '<li '.esc_html($opt_visible).' id="' . esc_attr( $k . $suffix ) . '_section_group_li" class="'.esc_attr($opt_visible_class).' redux-group-tab-link-li '.esc_attr($addClass).'' . esc_attr( $hide_section ) . esc_attr( $section['class'] ) . esc_attr( $subsectionsClass ) . ' ' . strtolower( wp_kses_post( $section['id'] )) . '" '.esc_html($style).'>';
3246
- $string .= '<a href="javascript:void(0);" id="' . esc_attr( $k . $suffix ) . '_section_group_li_a" class="redux-group-tab-link-a" data-key="' . esc_attr( $k ) . '" data-rel="' . esc_attr( $k . $suffix ) . '">' . $extra_icon . $icon . '<span class="group_title">' . wp_kses_post( $section['title'] ) . '</span></a>';
3247
 
3248
  $nextK = $k;
3249
 
3234
 
3235
  $amp_opt = get_option("ampforwp_option_panel_view_type");
3236
  $opt_visible = "";
3237
+ $anchor_href = 'javascript:void(0);';
3238
  $opt_visible_class = "amp-full-view-options";
3239
  if(($amp_opt==1 || $amp_opt=="") && !get_theme_support('amp-template-mode')){
3240
  $opt_visible = 'style=display:none';
3243
  $opt_visible = '';
3244
  $opt_visible_class = "";
3245
  }
3246
+ if($section['title']=="Extensions"){
3247
+ $anchor_href = class_exists('AMPExtensionManager') ?admin_url( 'admin.php?page=amp-extension-manager' ) : 'javascript:void(0);';
3248
+ $extmnger_data = class_exists('AMPExtensionManager') ? 'extmnger_data="1"' : '';
3249
+ }
3250
  $string .= '<li '.esc_html($opt_visible).' id="' . esc_attr( $k . $suffix ) . '_section_group_li" class="'.esc_attr($opt_visible_class).' redux-group-tab-link-li '.esc_attr($addClass).'' . esc_attr( $hide_section ) . esc_attr( $section['class'] ) . esc_attr( $subsectionsClass ) . ' ' . strtolower( wp_kses_post( $section['id'] )) . '" '.esc_html($style).'>';
3251
+ $string .= '<a href="'.$anchor_href.'" '.$extmnger_data.' id="' . esc_attr( $k . $suffix ) . '_section_group_li_a" class="redux-group-tab-link-a" data-key="' . esc_attr( $k ) . '" data-rel="' . esc_attr( $k . $suffix ) . '">' . $extra_icon . $icon . '<span class="group_title">' . wp_kses_post( $section['title'] ) . '</span></a>';
3252
 
3253
  $nextK = $k;
3254
 
includes/updater/update.php CHANGED
@@ -157,6 +157,14 @@ function ampforwp_get_licence_activate_update(){
157
  }
158
  add_action( 'wp_ajax_ampforwp_get_licence_activate_update', 'ampforwp_get_licence_activate_update' );
159
 
 
 
 
 
 
 
 
 
160
 
161
  /***********************************************
162
  * Illustrates how to deactivate a license key.
157
  }
158
  add_action( 'wp_ajax_ampforwp_get_licence_activate_update', 'ampforwp_get_licence_activate_update' );
159
 
160
+ add_action( 'wp_ajax_ampforwp_set_license_transient', 'ampforwp_set_license_transient' );
161
+ function ampforwp_set_license_transient(){
162
+ $transient_load = 'ampforwp_addon_set_transient';
163
+ $value_load = 'ampforwp_addon_set_transient_value';
164
+ $expiration_load = 86400 ;
165
+ set_transient( $transient_load, $value_load, $expiration_load );
166
+ }
167
+
168
 
169
  /***********************************************
170
  * Illustrates how to deactivate a license key.
includes/welcome.php CHANGED
@@ -148,11 +148,10 @@ function ampforwp_add_welcome_styling(){
148
  text-decoration: none;
149
  margin-top: 8px;
150
  display: inline-block;}
151
- .dashicons-warning, .dashicons-yes{
152
  font-family: dashicons;
153
  font-style: normal;
154
  font-size: 32px;
155
- margin-right: 18px;
156
  }
157
  .dashicons-yes{
158
  margin-right: 0px;
148
  text-decoration: none;
149
  margin-top: 8px;
150
  display: inline-block;}
151
+ .dashicons-yes{
152
  font-family: dashicons;
153
  font-style: normal;
154
  font-size: 32px;
 
155
  }
156
  .dashicons-yes{
157
  margin-right: 0px;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
- Stable tag: 1.0.77.27
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
197
  1.0.77.26 (21TH October 2021) =
198
  Improvements: Added AdPushup Support in AMP #5144
199
 
@@ -201,11 +209,4 @@ Improvements: Added AdPushup Support in AMP #5144
201
  Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
202
  Fixed: Images not loading when destination structure is document root in WebP Express #5150
203
 
204
- = 1.0.77.25 (1st October 2021) =
205
- * Improvements: Added Plausible analytics compatible in AMP #5142
206
- * Fixed: The amp-minute-media-player tag is getting stripped from the content #5146
207
- * Fixed: Author profile images not loading from Ultimate Member plugin #5141
208
- * Fixed: AMP Page builder content not rendering with Muffin builder #5147
209
- * Fixed: Debug log Errors #5145
210
-
211
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 1.0.77.28
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ 1.0.77.28 (28TH October 2021) =
198
+ Improvements: License code improved #5151
199
+ Fixed: Default Gravatar not appearing with FV Gravatar Cache #5149
200
+ Fixed: Featured image not appearing with Offload Media Lite #5153
201
+ Fixed: Function name updated in the seo framework #5155
202
+ Fixed: Lifetime license key is showing as expired in admin panel #5156
203
+ Fixed: Video is not loading when created by slider revolution with divi #5159
204
+
205
  1.0.77.26 (21TH October 2021) =
206
  Improvements: Added AdPushup Support in AMP #5144
207
 
209
  Improvements: Added FV Gravatar Cache Compatibility in AMP #5149
210
  Fixed: Images not loading when destination structure is document root in WebP Express #5150
211
 
 
 
 
 
 
 
 
212
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -5460,10 +5460,21 @@ if( ! function_exists('ampforwp_get_comments_gravatar') ){
5460
  return '';
5461
  }
5462
  if (class_exists('FV_Gravatar_Cache')) {
 
 
 
 
 
5463
  $avatar_url = get_avatar_url($comment);
5464
  $upload_dir = wp_upload_dir();
5465
  $upload_dir = $upload_dir['baseurl'] . '/fv-gravatar-cache/';
5466
  $avatar_url = preg_replace('/(.*?)avatar\/(.*?)\?s=(.*?)&(.*?)g/', ''.$upload_dir.'$2x$3.png', $avatar_url);
 
 
 
 
 
 
5467
  return $avatar_url;
5468
  }
5469
  $gravatar_exists = '';
@@ -7535,7 +7546,7 @@ function ampforwp_fontawesome_canonical_link(){
7535
  add_action('amp_post_template_head', 'ampforwp_set_dns_preload_urls');
7536
  function ampforwp_set_dns_preload_urls(){
7537
  // Open graph tag is not loading from the SEO framework #4399
7538
- if (function_exists('the_seo_framework_boot') && 'seo_framework' == ampforwp_get_setting('ampforwp-seo-selection')) {
7539
  $og_tsf = \the_seo_framework();
7540
  if($og_tsf){
7541
  echo $og_tsf->og_image();
@@ -9604,6 +9615,9 @@ function ampforwp_year_shortcode() {
9604
  add_shortcode('ampforwp_current_year', 'ampforwp_year_shortcode');
9605
 
9606
  function ampforwp_litespeed_webp_compatibility($content){
 
 
 
9607
  if(function_exists( 'run_litespeed_cache' )){
9608
  preg_match_all('/src="(.*?)"/', $content,$src);
9609
  if(isset($src[1][0])){
5460
  return '';
5461
  }
5462
  if (class_exists('FV_Gravatar_Cache')) {
5463
+ $options = get_option('fv_gravatar_cache');
5464
+ $size = $options['size'];
5465
+ if (empty($size)) {
5466
+ $size = '96';
5467
+ }
5468
  $avatar_url = get_avatar_url($comment);
5469
  $upload_dir = wp_upload_dir();
5470
  $upload_dir = $upload_dir['baseurl'] . '/fv-gravatar-cache/';
5471
  $avatar_url = preg_replace('/(.*?)avatar\/(.*?)\?s=(.*?)&(.*?)g/', ''.$upload_dir.'$2x$3.png', $avatar_url);
5472
+ preg_match_all('/(.*?)wp-content\/uploads\/fv-gravatar-cache\/(.*?)/U', $avatar_url, $match);
5473
+ $url = $match[0][0];
5474
+ $headers = get_headers($url, 1);
5475
+ if(isset($headers[0]) && !stripos($headers[0], "200 OK")){
5476
+ $avatar_url = $upload_dir.'mystery'. esc_html($size) .'.png';
5477
+ }
5478
  return $avatar_url;
5479
  }
5480
  $gravatar_exists = '';
7546
  add_action('amp_post_template_head', 'ampforwp_set_dns_preload_urls');
7547
  function ampforwp_set_dns_preload_urls(){
7548
  // Open graph tag is not loading from the SEO framework #4399
7549
+ if (function_exists('the_seo_framework') && 'seo_framework' == ampforwp_get_setting('ampforwp-seo-selection')) {
7550
  $og_tsf = \the_seo_framework();
7551
  if($og_tsf){
7552
  echo $og_tsf->og_image();
9615
  add_shortcode('ampforwp_current_year', 'ampforwp_year_shortcode');
9616
 
9617
  function ampforwp_litespeed_webp_compatibility($content){
9618
+ if(class_exists( 'WP_Offload_Media_Autoloader')){
9619
+ return $content;
9620
+ }
9621
  if(function_exists( 'run_litespeed_cache' )){
9622
  preg_match_all('/src="(.*?)"/', $content,$src);
9623
  if(isset($src[1][0])){