AMP for WP – Accelerated Mobile Pages - Version 1.0.67

Version Description

(4th November 2020) = * Improvement: Optimize Pagespeed score by implimenting AMP video lightbox #4531 * Improvement: Added Paid Memberships PRO for AMP Extension #4737 * Improvement: Added help section for the users in Options panel #4683 * Improvement: Added code improvement in Tag base remover and category base remover #4664 * Improvement: Added UberMenu 3 Compatiblity #4732 * Improvement: Added filter to overwrite the scripts #4642 * Fixed: Style amp-custom unterminated comment Error on AMP #4792 * Fixed: Proper styling of Header right side icons in Design 2 #3935 * Fixed: Revolution Slider not working in AMP #4669 * Fixed: Additional characters at the end of footer text in Design Two #4805 * Fixed: Related thumbnail image title is getting break and leading to the validation error #4804

Download this release

Release Info

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

Code changes from version 1.0.66.3 to 1.0.67

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.5
7
- Stable tag: 1.0.66.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,6 +193,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.66.3 (29th October 2020) =
197
  * Fixed: Content not visible in AMP Takeover #4744
198
 
@@ -203,26 +216,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
203
  * Fixed: Validation error due to amp-web-push AMP component script #4796
204
  * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
205
 
206
- = 1.0.66 (24th October 2020) =
207
- * Improvement: Added filter to modify GDPR popup output #4778
208
- * Improvement: Added Polylang string transaltion support #4784
209
- * Improvement: Added IO Technologies company analytics tracking code. #4753
210
- * Improvement: Added Ultimate Membership Pro Compatibility for AMP Extension #4790
211
- * Improvement: Code improvements #4744
212
- * Fixed: Validation error when the "OMGF | Host Google Fonts Locally" plugin is active #4775
213
- * Fixed: Margin top added in the twitter embed through the Gutenberg editor #4750
214
- * Fixed: Truepush push notification not working in AMP #4644
215
- * Fixed: Wrong amphtml on category and tags when ?amp is selected #4780
216
- * Fixed: Missing the amp-bind script tag #4776
217
- * Fixed: Two H1 tags appears in AMP #4786
218
- * Fixed: Debug warnings #4767
219
- * Fixed: Fallback images removed when Convert AMP to WP theme is enabled #4773
220
-
221
- = 1.0.65.2 (17th October 2020) =
222
- * Fixed: Menu not appearing in AMP #4657
223
- * Fixed: Wrong amphtml on homepage when ?amp is selected #4780
224
-
225
- = 1.0.65.1 (16th October 2020) =
226
- * Fixed: Jquery issue fixed due to Easy select option for category module #4672
227
-
228
  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.5
7
+ Stable tag: 1.0.67
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
193
 
194
  == Changelog ==
195
 
196
+ = 1.0.67 (4th November 2020) =
197
+ * Improvement: Optimize Pagespeed score by implimenting AMP video lightbox #4531
198
+ * Improvement: Added Paid Memberships PRO for AMP Extension #4737
199
+ * Improvement: Added help section for the users in Options panel #4683
200
+ * Improvement: Added code improvement in Tag base remover and category base remover #4664
201
+ * Improvement: Added UberMenu 3 Compatiblity #4732
202
+ * Improvement: Added filter to overwrite the scripts #4642
203
+ * Fixed: Style amp-custom unterminated comment Error on AMP #4792
204
+ * Fixed: Proper styling of Header right side icons in Design 2 #3935
205
+ * Fixed: Revolution Slider not working in AMP #4669
206
+ * Fixed: Additional characters at the end of footer text in Design Two #4805
207
+ * Fixed: Related thumbnail image title is getting break and leading to the validation error #4804
208
+
209
  = 1.0.66.3 (29th October 2020) =
210
  * Fixed: Content not visible in AMP Takeover #4744
211
 
216
  * Fixed: Validation error due to amp-web-push AMP component script #4796
217
  * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  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.66.3
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.66.3');
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.67
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.67');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
base_remover/base_remover.php CHANGED
@@ -50,12 +50,12 @@ function ampforwp_url_base_rewrite_rules(){
50
  add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
51
  add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
52
  add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
53
- add_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
54
  }elseif( $tagBaseRewrite === '0' ) {
55
  remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
56
  remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
57
  remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
58
- remove_filter( 'tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
59
  }
60
  }
61
 
50
  add_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
51
  add_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
52
  add_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
53
+ add_filter( 'post_tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
54
  }elseif( $tagBaseRewrite === '0' ) {
55
  remove_action( 'created_post_tag', 'amp_flush_rewrite_rules' , 999 );
56
  remove_action( 'edited_post_tag', 'amp_flush_rewrite_rules', 999 );
57
  remove_action( 'delete_post_tag', 'amp_flush_rewrite_rules', 999 );
58
+ remove_filter( 'post_tag_rewrite_rules', 'ampforwp_tag_url_rewrite_rules' );
59
  }
60
  }
61
 
changelog.txt CHANGED
@@ -1,5 +1,18 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.66.3 (29th October 2020) =
4
  * Fixed: Content not visible in AMP Takeover #4744
5
 
1
  == Changelog ==
2
 
3
+ = 1.0.67 (4th November 2020) =
4
+ * Improvement: Optimize Pagespeed score by implimenting AMP video lightbox #4531
5
+ * Improvement: Added Paid Memberships PRO for AMP Extension #4737
6
+ * Improvement: Added help section for the users in Options panel #4683
7
+ * Improvement: Added code improvement in Tag base remover and category base remover #4664
8
+ * Improvement: Added UberMenu 3 Compatiblity #4732
9
+ * Improvement: Added filter to overwrite the scripts #4642
10
+ * Fixed: Style amp-custom unterminated comment Error on AMP #4792
11
+ * Fixed: Proper styling of Header right side icons in Design 2 #3935
12
+ * Fixed: Revolution Slider not working in AMP #4669
13
+ * Fixed: Additional characters at the end of footer text in Design Two #4805
14
+ * Fixed: Related thumbnail image title is getting break and leading to the validation error #4804
15
+
16
  = 1.0.66.3 (29th October 2020) =
17
  * Fixed: Content not visible in AMP Takeover #4744
18
 
classes/class-ampforwp-rev-slider.php CHANGED
@@ -156,12 +156,33 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
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(
159
- 'url' => esc_url($youtube_id),
160
  'width' => '480',
161
  'height' => '270',
162
  'bgtype' => esc_attr($bgtype),
163
  'cover_img' => esc_attr($cover_img)
164
  ),$image_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  }
166
  }
167
  }
@@ -256,9 +277,32 @@ class AMP_Rev_Slider_Embed_Handler extends AMPforWP\AMPVendor\AMP_Base_Embed_Han
256
  'layout'=>'responsive',
257
  'class' => 'amp-carousel-img',
258
  'data-param-playlist'=> $image['url'],
259
- 'data-param-modestbranding'=> '1'
 
260
  );
261
  $tag_type = 'amp-youtube';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  }
263
  if( 3 == ampforwp_get_setting('ampforwp-gallery-design-type') || true == ampforwp_get_setting('ampforwp-gallery-lightbox') ){
264
  $design3_additional_attr = array('on'=> 'tap:gallery-lightbox', 'role'=>'button',
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(
159
+ 'url' => esc_attr($youtube_id),
160
  'width' => '480',
161
  'height' => '270',
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(
169
+ 'url' => esc_attr($vimeo_id),
170
+ 'width' => '480',
171
+ 'height' => '270',
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'), '');
179
+ $urls[] = apply_filters('amp_gallery_image_params', array(
180
+ 'url' => esc_url($html5_url),
181
+ 'width' => '480',
182
+ 'height' => '270',
183
+ 'bgtype' => esc_attr($bgtype),
184
+ 'cover_img' => esc_url($cover_img)
185
+ ),$image_id);
186
  }
187
  }
188
  }
277
  'layout'=>'responsive',
278
  'class' => 'amp-carousel-img',
279
  'data-param-playlist'=> $image['url'],
280
+ 'data-param-modestbranding'=> '1',
281
+ 'autoplay' => '',
282
  );
283
  $tag_type = 'amp-youtube';
284
+ }elseif( $image['bgtype'] =="vimeo"){
285
+ $amp_img_arr = array(
286
+ 'data-videoid'=> $image['url'],
287
+ 'width' => $image['width'],
288
+ 'height' => $image['height'],
289
+ 'layout'=>'responsive',
290
+ 'class' => 'amp-carousel-img',
291
+ 'autoplay' => '',
292
+ );
293
+ $tag_type = 'amp-vimeo';
294
+ }elseif( $image['bgtype'] =="html5"){
295
+ $amp_img_arr = array(
296
+ 'src'=> $image['url'],
297
+ 'width' => $image['width'],
298
+ 'height' => $image['height'],
299
+ 'layout'=>'responsive',
300
+ 'class' => 'amp-carousel-img',
301
+ 'poster' => $image['cover_img'],
302
+ 'controls' => '',
303
+ 'autoplay' => '',
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',
classes/class-ampforwp-youtube-embed.php CHANGED
@@ -99,6 +99,9 @@ class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
99
  if(ampforwp_get_setting('ampforwp-amp-video-docking')==true){
100
  $attrs['dock'] = '#dock-slot';
101
  }
 
 
 
102
  $attrs = ampforwp_amp_consent_check( $attrs );
103
  return AMP_HTML_Utils::build_tag('amp-youtube',apply_filters('amp_youtube_params', $attrs) );
104
  }
99
  if(ampforwp_get_setting('ampforwp-amp-video-docking')==true){
100
  $attrs['dock'] = '#dock-slot';
101
  }
102
+ if(ampforwp_get_setting('ampforwp-amp-video-lightbox')==true){
103
+ $attrs['autoplay'] = true;
104
+ }
105
  $attrs = ampforwp_amp_consent_check( $attrs );
106
  return AMP_HTML_Utils::build_tag('amp-youtube',apply_filters('amp_youtube_params', $attrs) );
107
  }
components/menu/menu.php CHANGED
@@ -71,5 +71,53 @@ function amp_menu_styles(){
71
  .amp-menu [id^=drop]:checked + label + ul{ display: block;}
72
  .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 10px 15px 10px 30px;right:0;font-size:18px;color:#ed1c24;top:0px;z-index:10000;line-height:1;cursor:pointer;}
73
  <?php } // designs condition ends here
74
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  } // function ends
71
  .amp-menu [id^=drop]:checked + label + ul{ display: block;}
72
  .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 10px 15px 10px 30px;right:0;font-size:18px;color:#ed1c24;top:0px;z-index:10000;line-height:1;cursor:pointer;}
73
  <?php } // designs condition ends here
74
+ //UberMenu 3 Custom CSS
75
+ if(function_exists('ubermenu_get_nav_menu_args')){
76
+ $menu_element_color = '#ffffff';
77
+ $ubermenu_cont_wth = '80%';
78
+ $cont_padding = '24px';
79
+ $design_selector = ampforwp_get_setting('amp-design-selector');
80
+ if($design_selector == '4'){
81
+ $menu_element_color = ampforwp_get_setting('swift-element-overlay-color-control','rgba');
82
+ $cont_padding = '7px';
83
+
84
+ }elseif($design_selector == '3'){
85
+
86
+ $menu_element_color = ampforwp_get_setting('amp-opt-color-rgba-menu-elements-color','rgba');
87
+ $ubermenu_cont_wth = '70%';
88
+
89
+ }elseif($design_selector == '2'){
90
+
91
+ $menu_element_color = ampforwp_get_setting('amp-d2-menu-color','rgba');
92
+ $ubermenu_cont_wth = '50%';
93
+
94
+ }else{
95
+ $menu_element_color = ampforwp_get_setting('amp-d1-menu-color','rgba');
96
+ $ubermenu_cont_wth = '50%';
97
+ }
98
+ ?>
99
+ .amp-menu li.ubermenu-has-submenu-drop ul {
100
+ display: none;
101
+ }
102
+ .m-menu .amp-menu [id^=drop]:checked + label + ul ul,.amp-menu [id^=drop]:checked + label + ul ul {
103
+ display: block;
104
+ }
105
+
106
+ ul.ubermenu-submenu {
107
+ margin-left: 10px;
108
+ color: <?php echo ampforwp_sanitize_color($menu_element_color); ?>;
109
+ line-height: 3;
110
+ }
111
+ .ubermenu-custom-content amp-img{
112
+ width:240px;
113
+ height:240px;
114
+ }
115
+ .ubermenu-content-block,.ubermenu-custom-content {
116
+ color: <?php echo ampforwp_sanitize_color($menu_element_color); ?>;
117
+ line-height: 2;
118
+ padding: 0px <?php echo esc_html($cont_padding); ?>;
119
+ width: <?php echo esc_html($ubermenu_cont_wth); ?>;
120
+ }
121
+ <?php
122
+ } // ubermenu css ends here.
123
  } // function ends
images/paid-memberships-pro-for-amp.png ADDED
Binary file
includes/options/admin-config.php CHANGED
@@ -687,6 +687,18 @@ $extension_listing_array = array(
687
  'store_url'=>'https://accounts.ampforwp.com',
688
  'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
689
  ),
 
 
 
 
 
 
 
 
 
 
 
 
690
  array(
691
  'name'=>'Polls for AMP',
692
  'class'=>'new-ext',
@@ -6420,6 +6432,14 @@ $single_page_options = array(
6420
  esc_html__('Enable this option to show lightbox for images in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-enable-lightbox-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6421
 
6422
  ),
 
 
 
 
 
 
 
 
6423
  // video-docking
6424
  array(
6425
  'id' => 'ampforwp-amp-video-docking',
@@ -8399,6 +8419,12 @@ if(!function_exists('ampforwp_create_controls_for_plugin_manager')){
8399
  }
8400
  }
8401
  Redux::setExtensions( $opt_name, AMPFORWP_PLUGIN_DIR.'includes/options/extensions/demolink_image_select' );
 
 
 
 
 
 
8402
  /*
8403
  * <--- END SECTIONS
8404
  */
687
  'store_url'=>'https://accounts.ampforwp.com',
688
  'is_activated'=>(is_plugin_active('ultimate-membership-pro-compatibility-for-amp/ultimate-membership-pro-compatibility-for-amp.php')? 1 : 2),
689
  ),
690
+ array(
691
+ 'name'=>'Paid Memberships PRO for AMP',
692
+ 'class'=>'new-ext',
693
+ 'desc'=>'Add Paid Memberships PRO Support in AMP',
694
+ 'img_src'=> AMPFORWP_IMAGE_DIR . '/paid-memberships-pro-for-amp.png',
695
+ 'price'=>'$39',
696
+ 'url_link'=>'https://ampforwp.com/addons/paid-memberships-pro-for-amp/',
697
+ 'plugin_active_path'=> 'paid-memberships-pro-for-amp/paid-memberships-pro-for-amp.php',
698
+ 'item_name'=>'Paid Memberships PRO for AMP',
699
+ 'store_url'=>'https://accounts.ampforwp.com',
700
+ 'is_activated'=>(is_plugin_active('paid-memberships-pro-for-amp/paid-memberships-pro-for-amp.php')? 1 : 2),
701
+ ),
702
  array(
703
  'name'=>'Polls for AMP',
704
  'class'=>'new-ext',
6432
  esc_html__('Enable this option to show lightbox for images in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-enable-lightbox-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6433
 
6434
  ),
6435
+ array(
6436
+ 'id' => 'ampforwp-amp-video-lightbox',
6437
+ 'type' => 'switch',
6438
+ 'default' => '0',
6439
+ 'title' => esc_html__('Lightbox for Youtube Video', 'accelerated-mobile-pages'),
6440
+ 'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6441
+ esc_html__('Enable this option to show lightbox for Youtube in AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-enable-lightbox-for-youtube-in-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6442
+ ),
6443
  // video-docking
6444
  array(
6445
  'id' => 'ampforwp-amp-video-docking',
8419
  }
8420
  }
8421
  Redux::setExtensions( $opt_name, AMPFORWP_PLUGIN_DIR.'includes/options/extensions/demolink_image_select' );
8422
+ // Documentation Section
8423
+ Redux::setSection( $opt_name, array(
8424
+ 'title' => esc_html__( 'Documentation', 'accelerated-mobile-pages' ),
8425
+ 'subsection' => false,
8426
+ 'desc' => '<div class="fp-cnt doc-cnt"><h1>'.esc_html__('Documentation','accelerated-mobile-pages').'</h1><p>'.esc_html__('Without documentation, software is just a black box that aren’t anywhere near as useful as they could be because their inner workings are hidden from those who need them. Documentation turns your software into a glass box by explaining to users as well as developers how it operates.','accelerated-mobile-pages').'</p><a class="buy" href="https://ampforwp.com/tutorials/" target="_blank">'.esc_html__('View Documentation','accelerated-mobile-pages').'</a></div>',
8427
+ ) );
8428
  /*
8429
  * <--- END SECTIONS
8430
  */
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -1517,4 +1517,16 @@ div#section-ampforwp-ads-section, table#section-table-ampforwp-ads-section{
1517
  .list-of-feat > ul {
1518
  grid-template-columns: 1fr 1fr;
1519
  }
 
 
 
 
 
 
 
 
 
 
 
 
1520
  }
1517
  .list-of-feat > ul {
1518
  grid-template-columns: 1fr 1fr;
1519
  }
1520
+ }
1521
+
1522
+ doc-cnt h1 , .doc-cnt p{
1523
+ color: #000;
1524
+ }
1525
+ .doc-cnt p {
1526
+ font-size: 15px;
1527
+ line-height: 25px;
1528
+ padding: 0;
1529
+ }
1530
+ .doc-cnt .buy{
1531
+ background: #000;
1532
  }
includes/vendor/amp/includes/amp-post-template-actions.php CHANGED
@@ -125,6 +125,7 @@ function amp_post_template_add_styles( $amp_template ) {
125
  echo '/* Inline styles */' . PHP_EOL;
126
  foreach ( $styles as $selector => $declarations ) {
127
  $declarations = implode( ';', $declarations ) . ';';
 
128
  printf( '%1$s{%2$s}', $selector, $declarations );
129
  }
130
  }
125
  echo '/* Inline styles */' . PHP_EOL;
126
  foreach ( $styles as $selector => $declarations ) {
127
  $declarations = implode( ';', $declarations ) . ';';
128
+ $declarations = preg_replace('/\/[*]/', '$1$2', $declarations);
129
  printf( '%1$s{%2$s}', $selector, $declarations );
130
  }
131
  }
includes/vendor/amp/includes/class-amp-post-template.php CHANGED
@@ -330,6 +330,11 @@ class AMP_Post_Template {
330
  if(function_exists('ampforwp_add_fallback_element')){
331
  $amp_con = ampforwp_add_fallback_element($amp_con,'amp-img');
332
  }
 
 
 
 
 
333
  $this->add_data_by_key( 'post_amp_content', $amp_con);
334
  $this->merge_data_for_key( 'amp_component_scripts', $amp_content->get_amp_scripts() );
335
  $this->merge_data_for_key( 'post_amp_styles', $amp_content->get_amp_styles() );
330
  if(function_exists('ampforwp_add_fallback_element')){
331
  $amp_con = ampforwp_add_fallback_element($amp_con,'amp-img');
332
  }
333
+ if(ampforwp_get_setting('ampforwp-amp-video-lightbox')==true){
334
+ if(function_exists('ampforwp_video_lightbox')){
335
+ $amp_con = ampforwp_video_lightbox($amp_con);
336
+ }
337
+ }
338
  $this->add_data_by_key( 'post_amp_content', $amp_con);
339
  $this->merge_data_for_key( 'amp_component_scripts', $amp_content->get_amp_scripts() );
340
  $this->merge_data_for_key( 'post_amp_styles', $amp_content->get_amp_styles() );
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.5
7
- Stable tag: 1.0.66.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,6 +190,19 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.66.3 (29th October 2020) =
194
  * Fixed: Content not visible in AMP Takeover #4744
195
 
@@ -200,26 +213,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
200
  * Fixed: Validation error due to amp-web-push AMP component script #4796
201
  * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
202
 
203
- = 1.0.66 (24th October 2020) =
204
- * Improvement: Added filter to modify GDPR popup output #4778
205
- * Improvement: Added Polylang string transaltion support #4784
206
- * Improvement: Added IO Technologies company analytics tracking code. #4753
207
- * Improvement: Added Ultimate Membership Pro Compatibility for AMP Extension #4790
208
- * Improvement: Code improvements #4744
209
- * Fixed: Validation error when the "OMGF | Host Google Fonts Locally" plugin is active #4775
210
- * Fixed: Margin top added in the twitter embed through the Gutenberg editor #4750
211
- * Fixed: Truepush push notification not working in AMP #4644
212
- * Fixed: Wrong amphtml on category and tags when ?amp is selected #4780
213
- * Fixed: Missing the amp-bind script tag #4776
214
- * Fixed: Two H1 tags appears in AMP #4786
215
- * Fixed: Debug warnings #4767
216
- * Fixed: Fallback images removed when Convert AMP to WP theme is enabled #4773
217
-
218
- = 1.0.65.2 (17th October 2020) =
219
- * Fixed: Menu not appearing in AMP #4657
220
- * Fixed: Wrong amphtml on homepage when ?amp is selected #4780
221
-
222
- = 1.0.65.1 (16th October 2020) =
223
- * Fixed: Jquery issue fixed due to Easy select option for category module #4672
224
-
225
  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.5
7
+ Stable tag: 1.0.67
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
190
 
191
  == Changelog ==
192
 
193
+ = 1.0.67 (4th November 2020) =
194
+ * Improvement: Optimize Pagespeed score by implimenting AMP video lightbox #4531
195
+ * Improvement: Added Paid Memberships PRO for AMP Extension #4737
196
+ * Improvement: Added help section for the users in Options panel #4683
197
+ * Improvement: Added code improvement in Tag base remover and category base remover #4664
198
+ * Improvement: Added UberMenu 3 Compatiblity #4732
199
+ * Improvement: Added filter to overwrite the scripts #4642
200
+ * Fixed: Style amp-custom unterminated comment Error on AMP #4792
201
+ * Fixed: Proper styling of Header right side icons in Design 2 #3935
202
+ * Fixed: Revolution Slider not working in AMP #4669
203
+ * Fixed: Additional characters at the end of footer text in Design Two #4805
204
+ * Fixed: Related thumbnail image title is getting break and leading to the validation error #4804
205
+
206
  = 1.0.66.3 (29th October 2020) =
207
  * Fixed: Content not visible in AMP Takeover #4744
208
 
213
  * Fixed: Validation error due to amp-web-push AMP component script #4796
214
  * Fixed: Validation error due to amp-fx-flying-carpet AMP component script #4794
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-2/footer.php CHANGED
@@ -52,7 +52,7 @@ global $redux_builder_amp;
52
  echo strip_tags( pll__(ampforwp_get_setting('amp-translator-footer-text')) ,$allowed_tags );
53
  }else {
54
  echo strip_tags( ampforwp_translation(ampforwp_get_setting('amp-translator-footer-text'), 'All Rights Reserved') ,$allowed_tags );
55
- }?>
56
  ?>
57
  <?php do_action('amp_footer_link'); ?>
58
  </div>
52
  echo strip_tags( pll__(ampforwp_get_setting('amp-translator-footer-text')) ,$allowed_tags );
53
  }else {
54
  echo strip_tags( ampforwp_translation(ampforwp_get_setting('amp-translator-footer-text'), 'All Rights Reserved') ,$allowed_tags );
55
+ }
56
  ?>
57
  <?php do_action('amp_footer_link'); ?>
58
  </div>
templates/design-manager/design-2/style.php CHANGED
@@ -164,8 +164,16 @@ left:191px;
164
  .amp-category-post{ width: 32%;display: inline-block; word-wrap: break-word;float: left;}
165
  .amp-category-post amp-img{ margin-bottom:5px; }
166
  .amp-category-block li:nth-child(3){ margin: 0 1%;}
 
 
 
 
 
 
 
 
 
167
  .searchmenu{
168
- right: 10px;
169
  top: 31%;
170
  position: absolute; }
171
  .searchmenu button{ background:transparent; border:none }
164
  .amp-category-post{ width: 32%;display: inline-block; word-wrap: break-word;float: left;}
165
  .amp-category-post amp-img{ margin-bottom:5px; }
166
  .amp-category-block li:nth-child(3){ margin: 0 1%;}
167
+ <?php if(function_exists('amp_woocommerce_pro_add_woocommerce_support') && ampforwp_get_setting('amp-swift-cart-btn')){?>
168
+ .searchmenu{
169
+ right: 42px;
170
+ }
171
+ <?php }else{?>
172
+ .searchmenu{
173
+ right: 15px;
174
+ }
175
+ <?php }?>
176
  .searchmenu{
 
177
  top: 31%;
178
  position: absolute; }
179
  .searchmenu button{ background:transparent; border:none }
templates/features.php CHANGED
@@ -4918,7 +4918,7 @@ function ampforwp_inline_related_posts(){
4918
  }
4919
  $inline_related_posts .= '<li class="'.esc_attr($title_class).'">';
4920
  if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
4921
- $inline_related_posts .= '<a href="'.esc_url( $related_post_permalink ).'" rel="bookmark" title="'.get_the_title().'">';
4922
 
4923
  $thumb_url_2 = ampforwp_get_post_thumbnail('url');
4924
 
@@ -6080,8 +6080,14 @@ function ampforwp_custom_wpautop(){
6080
  remove_filter('the_content', 'wpautop');
6081
  }
6082
  }
 
 
 
 
 
 
 
6083
  }
6084
-
6085
  // Backward Compatibility for AMP Preview #1529
6086
  if ( ! function_exists('get_preview_post_link') ) {
6087
  function get_preview_post_link( $post = null, $query_args = array(), $preview_link = '' ) {
@@ -8420,10 +8426,10 @@ function ampforwp_include_required_scripts($content){
8420
  }
8421
  }
8422
  }
8423
-
8424
  // Scripts added from Options panel should have higher priority #4064
8425
- if( ampforwp_get_setting('amp-header-text-area-for-html') && ampforwp_get_setting('amp-header-text-area-for-html')!="") {
8426
- $allscripts = ampforwp_get_setting('amp-header-text-area-for-html');
8427
  preg_match_all('/<script(.*?)custom-element=\"(.*?)\"(.*?)src=\"(.*?)\"(.*?)>(.*?)<\/script>/s', $allscripts, $rep);
8428
  if($rep){
8429
  if(isset($rep[2]) && isset($rep[4])){
@@ -8953,4 +8959,53 @@ function ampforwp_amp_story_player_script($data) {
8953
  $data['amp_component_scripts']['amp-story-player'] = 'https://cdn.ampproject.org/v0/amp-story-player-latest.js';
8954
  }
8955
  return $data;
8956
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4918
  }
4919
  $inline_related_posts .= '<li class="'.esc_attr($title_class).'">';
4920
  if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) {
4921
+ $inline_related_posts .= '<a href="'.esc_url( $related_post_permalink ).'" rel="bookmark" title="'.esc_attr(get_the_title()).'">';
4922
 
4923
  $thumb_url_2 = ampforwp_get_post_thumbnail('url');
4924
 
6080
  remove_filter('the_content', 'wpautop');
6081
  }
6082
  }
6083
+ if(function_exists('ubermenu_get_nav_menu_args')){
6084
+ add_filter( 'ubermenu_nav_menu_args' ,'ampforwp_modify_ubermenu_nav_menu_args' , 10,2);
6085
+ }
6086
+ }
6087
+ function ampforwp_modify_ubermenu_nav_menu_args($args , $config_id){
6088
+ $args['menu_class'] = 'amp-menu '.$args['menu_class'];
6089
+ return $args;
6090
  }
 
6091
  // Backward Compatibility for AMP Preview #1529
6092
  if ( ! function_exists('get_preview_post_link') ) {
6093
  function get_preview_post_link( $post = null, $query_args = array(), $preview_link = '' ) {
8426
  }
8427
  }
8428
  }
8429
+ $allscripts = apply_filters( 'ampforwp_modify_scripts', $allscripts);
8430
  // Scripts added from Options panel should have higher priority #4064
8431
+ if( $allscripts || (ampforwp_get_setting('amp-header-text-area-for-html') && ampforwp_get_setting('amp-header-text-area-for-html')!="")) {
8432
+ $allscripts .= ampforwp_get_setting('amp-header-text-area-for-html');
8433
  preg_match_all('/<script(.*?)custom-element=\"(.*?)\"(.*?)src=\"(.*?)\"(.*?)>(.*?)<\/script>/s', $allscripts, $rep);
8434
  if($rep){
8435
  if(isset($rep[2]) && isset($rep[4])){
8959
  $data['amp_component_scripts']['amp-story-player'] = 'https://cdn.ampproject.org/v0/amp-story-player-latest.js';
8960
  }
8961
  return $data;
8962
+ }
8963
+
8964
+ if(!function_exists('ampforwp_video_lightbox')){
8965
+ function ampforwp_video_lightbox($content){
8966
+ $video_tags_arr = array('amp-youtube');
8967
+ add_action('amp_post_template_css','ampforwp_video_lightbox_css',30);
8968
+ for($i=0;$i<count($video_tags_arr);$i++){
8969
+ $tag = $video_tags_arr[$i];
8970
+ preg_match_all('/<'.$tag.' (.*?)<\/'.$tag.'>/', $content, $matches);
8971
+ if(!empty($matches)){
8972
+ if(isset($matches[0])){
8973
+ $con = "";
8974
+ for($i=0;$i<count($matches[0]);$i++){
8975
+ $match = $matches[0][$i];
8976
+ $dom = AMP_DOM_Utils::get_dom_from_content($match);
8977
+ $nodes = $dom->getElementsByTagName( 'amp-youtube' );
8978
+ $video_id ='';
8979
+ $width = 800;
8980
+ $height = 450;
8981
+ foreach ($nodes as $key => $node) {
8982
+ $video_id = $node->getAttribute('data-videoid');
8983
+ $width =$node->getAttribute('width');
8984
+ $height =$node->getAttribute('height');
8985
+ }
8986
+
8987
+ $amp_light_box = '<amp-lightbox id="open-video'.esc_attr($video_id).'" layout="nodisplay">
8988
+ <div class="amp-lightbox-video" on="tap:open-video'.esc_attr($video_id).'.close,btn-play'.esc_attr($video_id).'.show" role="button" tabindex="'.$i.'" aria-label="Close Video">
8989
+ <div class="amp-video-box">'.$match.'</div>
8990
+ </div>
8991
+ </amp-lightbox>
8992
+ <div class="amp-video-img" id="btn-play'.esc_attr($video_id).'" on="tap:video.show, video.play, btn-play'.esc_attr($video_id).'.hide,open-video'.esc_attr($video_id).'" role="button" tabindex="'.$i.'" aria-label="Play Video">
8993
+ <amp-img alt="Video" src="http://i3.ytimg.com/vi/'.esc_attr($video_id).'/hqdefault.jpg" width="'.esc_attr($width).'" height="'.esc_attr($height).'" layout="responsive"></amp-img>
8994
+ <div class="amp-video-play-on-image"></div>
8995
+ </div>';
8996
+ $content = str_replace("$match", $amp_light_box, $content);
8997
+ }
8998
+ }
8999
+ }
9000
+ }
9001
+ return $content;
9002
+ }
9003
+ }
9004
+
9005
+ function ampforwp_video_lightbox_css(){
9006
+ echo '.amp-video-box,.amp-video-img{width:100%;margin:0 auto;text-align:center}
9007
+ .amp-lightbox-video{background:rgba(0,0,0,.8);width:100%;height:100%;position:absolute;display:flex;align-items:center;justify-content:center}
9008
+ .amp-video-box{max-width:800px}
9009
+ .amp-video-img{max-width:600px;position:relative}
9010
+ .amp-video-play-on-image{cursor:pointer;margin:auto;width:56px;height:56px;-webkit-border-radius:50%;border-radius:50%;background-color:rgba(0,0,0,.2);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAAAY1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////80LMUcAAAAIHRSTlMA1d4MSXeg9glf6yEq4hfnnr7Z8qm5U/3Jm1pwFJcmBYTgJ9QAAAIjSURBVGje7VnJdoMwDFSMHVMSQljCklX//5U99NQHGEm22gtz9tPAWNYKsGPHDiou1h3rpvDD4Iumvjp7SWg86yeDM5ipz5KYt53HFfjORn+8KzEI88iizLe4icLlUvtfFZJQ3kXmTzWScTsJPr9FBtovpvn8iExMrJu4jMjGyHh67xIFMOSLOFcoQnUmfr/QPmL1JulfohiGcA/5iBEYt33piFG4br4vjMTGizu1sQRt2FlrjMZNVSBExEBszaoUBOW6JzlMArf6A0XIOzyZoMgkPwDnA5nhsWz/E4wRnBxhVuoTDBMAkGVarma6TQKyTN3iFfttAqJMg1/y1B4JBFSZ+gWCiUZAk+m1QGCIBCSZmoVEhlQCkkxPppP+JiDIZNlxiFmYOXaqnEX2sEwTO9XMq6egTPXsfMMlCMt0mB0v2ARBmYrZYS8gCMjkZ2cHCcG6TMPfE6hLpH7J6m6a+KHN67urdqhQD3bq4Vo94ainTP2kn7RssbqFF7a5buk4dP9T/Ib9KEH5Dg/lBkS/hVJvAiEvU9gPtLFwT0HQh1r9m/IoQX8YEj+t2JwCX+PsT7ojtWH8EIaCJmIo+FQeaxJHs9LBbPkGIt4ilQxjxi8ajj+BgZztra8P8MBcUAi2LCdGXJKsWADgTozeppeuoXJXEPKXfM0FANnDaC7qtlaNbfyq8Uep/rXQYDUvm0M6XKyb6sPPuvdwm5x9wo4dO6j4BoilN6H4pmTiAAAAAElFTkSuQmCC);background-position:center;-webkit-background-size:48px 48px;background-size:48px 48px;position:absolute;top:0;bottom:0;left:0;right:0}';
9011
+ }