AMP for WP – Accelerated Mobile Pages - Version 1.0.38

Version Description

(1st April 2020) = * Improvement: Added Title for facebook comments section #3716 * Improvement: Added iZooto support for AMP #4312 * Fixed: Alignment issue in Advertisement Section #4325 * Fixed: Slow Queries on Homepage in D3 #4319 * Fixed: Category module links in AMP pagebuilder doesn't change to ?amp #4314 * Fixed: Debug Warnings #4324 #4321 #4299

Download this release

Release Info

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

Code changes from version 1.0.37 to 1.0.38

README.md CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.3.2
7
- Stable tag: 1.0.37
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,14 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
197
  = 1.0.37 (28th March 2020) =
198
  * Improvement: Added filter to change Author name #4238
199
  * Improvement: Added option to show/hide jetpack related post in AMP #4272
@@ -218,159 +226,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
218
  * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
219
  * Fixed: Social Icons are out of alignment in Design 2 #4305
220
 
221
- = 1.0.35 (23th March 2020) =
222
- * Fixed: Related post images not having alt attribute #4282
223
- * Fixed: iframes are not working with WP optimize premium #4290
224
- * Fixed: input type file error #4289
225
- * Fixed: next and prev alignment issue in design 2 #4211
226
- * Fixed: 404 PHP File is not getting overried from the child theme #4284
227
- * Fixed: Error in "Optimize loading of Google font" in SG Optimizer #4287
228
- * Fixed: amp-vimeo Validation error of invalid value 'ondemand' #4294
229
- * Fixed: AMP Option panel improvements #4277 #4288
230
-
231
- = 1.0.34 (19th March 2020) =
232
- * Improvement: Matomo (Piwik) analytics improvements #4271 #4280
233
- * Improvement: Custom page template improvements #4244
234
- * Improvement: Option to add/remove "nofollow" in the comment button #4266
235
- * Fixed: Spaces issue fixed in image carousel #4141
236
- * Fixed: Reusable blocks not working in the Custom AMP Editor #4187
237
- * Fixed: Comments pagination was not working in amp takeover beta #4251
238
- * Fixed: lightbox issue fixed #4222
239
- * Fixed: When AMP Dev mode and Mobile redirection both kept on then the website displays AMP on the mobile device #4276
240
- * Fixed: debug warnings on Fresh WP installation #4270
241
- * Fixed: Treeshaking was not working with "Product Review Lite Plugin" #4256
242
- * Fixed: Tables was not responsive in Mobile view design one #4278
243
- * Fixed: Have to make compatible with wordpress4.4.2 version #4262
244
- * Fixed: Click here link not working in mobile view of Subscribe to Comments Reloaded plugin #4225
245
- * Fixed: Post pagination not working in custom AMP Editor #4255
246
- * Fixed: Depreciated categories widget #4274
247
- * Fixed: Weekday removed from parameter 'published at' in the analytice code #4281
248
-
249
- = 1.0.33 (11th March 2020) =
250
- * Fixed: Categories not Hiding in Instant Articles #4254
251
- * Fixed: Error when activating imagify plugin #4260
252
- * Fixed: Start attribute not working in ol tags #4243
253
- * Fixed: Search form not working in template mode #4227 #4224
254
- * Fixed: Save button was disappearing when theme build on Redux framework #4259
255
- * Fixed: SVG tag was removing in anchor tag #4252
256
- * Fixed: Filter added to modify font face URL's #4258
257
- * Fixed: Elementor CSS not loading on frontpage in ALL in One SEO #4253
258
- * Fixed: Undefined variable: get_amp_custom_frontpage_id #4265
259
- * Fixed: Images are not showing in AMP with Neva Child Theme #4261
260
- * Fixed: AMP Option panel improvements #4245 #4269
261
-
262
- = 1.0.32 (6th March 2020) =
263
- * Fixed: Syntax breaking in advanced google analytics section #4228
264
- * Fixed: Optimize CSS (Tree shaking) not clearing on post update #4234
265
- * Fixed: Compatibility with the CIARO theme #4220
266
- * Fixed: Custom JavaScript are not allowed issue #4233
267
- * Fixed: Need to remove search option when header type 2 is selected #4214
268
- * Fixed: CSS of the CTA button in AMP page builder is disturbed in the mobile view #4215
269
- * Fixed: image broken in light speed cache plugin #4231
270
- * Fixed: Youtube video is not working in " The issue" Theme #4223
271
- * Fixed: Removed '/amp' in menu with custom link #4221
272
- * Fixed: Wrong Yoast Canonical when amp link added #4229
273
- * Fixed: Call to undefined function session_start() in redirect.php:67 #4236
274
- * Fixed: Content Sneak Peek issue with below the content ads in Mozilla browser. #4178
275
- * Fixed: The mandatory attribute 'target' is missing in tag form #4239
276
- * Fixed: Query Monitor queries should be visible in amp pages too when logged in. #4250
277
- * Fixed: The input should be cleared When search button is clicked in AMP options Panel#4247
278
- * Fixed: Multiple debug warnings. #4242
279
-
280
- = 1.0.31 (28th February 2020) =
281
- * Improvement: Added option to hide vukkle comments emoji #4194
282
- * Improvement: Added alt for images in Slider module of AMP page builder #4193
283
- * Improvement: Updated sabberworm folder #4142
284
- * Fixed: Fatal Error fixed with zombify plugin #4184
285
- * Fixed: Validation error due to Mediavine Plugin #4206
286
- * Fixed: Instant article bug #4150
287
- * Fixed: AMP Search Not Working with Betheme #4195
288
- * Fixed: StackPath CDN not working #4123
289
- * Fixed: Extra 301 redirect after enabling ?amp #4167
290
- * Fixed: Table CSS improved #4185
291
- * Fixed: Debug Warnings #4226
292
- * Fixed: AMP Option panel improvements #4202 #4219
293
-
294
- = 1.0.30 (24th February 2020) =
295
- * Improvement: Added Autoplay in Image Gallery #3705
296
- * Fixed: Jetpack lazy loading not working due to our AMPforWP plugin #4183
297
- * Fixed: Amp comments Bug with update 1.0.28 #4209
298
- * Fixed: Removed Table styles when AMP Pagebuilder compatibility plugin is active #4185
299
- * Fixed: Debug warning fixed #4204 #4212
300
-
301
- = 1.0.29 (21th February 2020) =
302
- * Improvement: Created an option for entering URLs to prefetch. #3997
303
- * Fixed: Admin bar css is not loaded on amp pages #4130
304
- * Fixed: Optimize amp pages and CSS #3579 #4174
305
- * Fixed: When the tree shaking is enabled then the CSS of the layouts break #4113
306
- * Fixed: Extra 301 redirect after enabling ?amp #4167
307
- * Fixed: Break in layout when AMP takeout and conver to wp is enabled together #4176
308
- * Fixed: There should be no notices or messages from other third party plugins on the AMP option panel. #4166
309
- * Fixed: Incorrect time showing on AMP if we select Timezone as UTC-3 #4160
310
- * Fixed: WPappbox images are not loading on the amp pages #4161
311
- * Fixed: CSS of CTA button is over-riding while using more than one CTA in AMP pagebuilder. #4173
312
- * Fixed: Notice Errors - Trying to get property 'title' #4196
313
- * Fixed: Warning issue on AMP option panel. #4172
314
- * Fixed: Display the Search button in AMP option panel. #4165
315
- * Fixed: Warning Errors #4200
316
- * Fixed: amp-access script is not being appended via Enter HTML in Head #4199
317
- * Fixed: Issues related to category support on the AMP Pages #4151
318
- * Fixed: AMP Options panel UI bugs #4180 #4179 #4105
319
-
320
- = 1.0.28 (18th February 2020) =
321
- * Improvement: Scripts added from Options panel should have higher priority in the frontend #4064
322
-
323
- = 1.0.27 (16th February 2020) =
324
- * Fixed: Bugs in Imagify plugin #3908
325
- * Fixed: GDPR popup not blocking header #4155
326
- * Fixed: Save button dissappers when clicked on setup settings #4169
327
- * Fixed: Alignment issue when there is no caption on featured image #4171
328
- * Fixed: Whitelisted Picture tag #4051
329
- * Fixed: Show/Hide Slider or Icon module in AMP Pagebuilder is not clickable #4153
330
- * Fixed: Debug warning when empty item added in Slider module in AMP pagebuilder #4152
331
- * Fixed: Empty link in facebook share in sticky bar #4154
332
- * Fixed: AMP Options panel UI bugs #4122 #4162
333
-
334
- = 1.0.26 (13th February 2020) =
335
- * Improvement: import/export option improved #4089
336
- * Fixed: Added option to show/hide featured image on AMP pagebuilder #4131
337
- * Fixed: AMP Options panel UI bug #4122
338
-
339
- = 1.0.25 (12th February 2020) =
340
- * Fixed: Title issue #4138
341
-
342
- = 1.0.24 (11th February 2020) =
343
- * Improvement: Added filter to modify the breadcrumb homepage url #4077
344
- * Fixed: Image alignment on the left issue #4156
345
- * Fixed: H1 tag not appearing on posts #4121
346
- * Fixed: "Title on static page front page" option not working #4138
347
- * Fixed: AMP Menu option was not showing in WP settings #4129
348
- * Fixed: Blank Events Calendar Months Page when 'Minify' option is enabled #4080
349
- * Fixed: Removed '@' in Twitter Handle #4135
350
- * Fixed: Message improved when "Leverage Browser Caching" option is enable without readable or writable permission of htaccess file #4127
351
- * Fixed: Featured image removed on AMP Pagebuilder pages #4131
352
-
353
- = 1.0.23 (7th February 2020) =
354
- * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
355
- * Fixed: Iframe error due to Jetpack #4125
356
- * Fixed: Menu transient increased to avoid deadlock error #4133
357
- * Fixed: Moved "Breadcrumbs From Yoast" to SEO option Panel section. #3600
358
- * Fixed: Featured Image from the content is not fetching the image when height and width is not present in the image code in Classic editor. #4096
359
- * Improvement: Sorting option for Pagebuilder slider/gallery #2014
360
- * Improvement: Option for showing no. of words in the excerpt of Recent Posts and Related Posts #3640
361
- * Improvement: Link Comments section with comments order #3740
362
- * Improvement: Default fallback images Added #3719
363
- * Improvement: subscript<sub> and superscript<sup> support #4137
364
- * Improvement: Message added if no seo option is selected but seo plugin is active #4124
365
-
366
- = 1.0.22 (6th February 2020) =
367
- * Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
368
- * Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
369
- * Fixed: Search console error fixed on WooCommerce wishlist page #4097
370
- * Fixed: GTM Added in Basic Setup and code improvements #4108
371
- * Fixed: The meta tags was not working in Head section #4116
372
- * Fixed: Upgrade to Pro button was missing in the AMP setting panel #4118
373
- * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
374
- * Fixed: FAQ section improved #4119
375
-
376
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.4
7
+ Stable tag: 1.0.38
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.38 (1st April 2020) =
198
+ * Improvement: Added Title for facebook comments section #3716
199
+ * Improvement: Added iZooto support for AMP #4312
200
+ * Fixed: Alignment issue in Advertisement Section #4325
201
+ * Fixed: Slow Queries on Homepage in D3 #4319
202
+ * Fixed: Category module links in AMP pagebuilder doesn't change to ?amp #4314
203
+ * Fixed: Debug Warnings #4324 #4321 #4299
204
+
205
  = 1.0.37 (28th March 2020) =
206
  * Improvement: Added filter to change Author name #4238
207
  * Improvement: Added option to show/hide jetpack related post in AMP #4272
226
  * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
227
  * Fixed: Social Icons are out of alignment in Design 2 #4305
228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
229
  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.37
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.37');
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.38
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.38');
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,5 +1,13 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
3
  = 1.0.37 (28th March 2020) =
4
  * Improvement: Added filter to change Author name #4238
5
  * Improvement: Added option to show/hide jetpack related post in AMP #4272
1
  == Changelog ==
2
 
3
+ = 1.0.38 (1st April 2020) =
4
+ * Improvement: Added Title for facebook comments section #3716
5
+ * Improvement: Added iZooto support for AMP #4312
6
+ * Fixed: Alignment issue in Advertisement Section #4325
7
+ * Fixed: Slow Queries on Homepage in D3 #4319
8
+ * Fixed: Category module links in AMP pagebuilder doesn't change to ?amp #4314
9
+ * Fixed: Debug Warnings #4324 #4321 #4299
10
+
11
  = 1.0.37 (28th March 2020) =
12
  * Improvement: Added filter to change Author name #4238
13
  * Improvement: Added option to show/hide jetpack related post in AMP #4272
components/comments/comments.php CHANGED
@@ -146,6 +146,9 @@ global $redux_builder_amp;
146
  }
147
  else {
148
  $facebook_comments_markup = '<section class="amp-facebook-comments">';
 
 
 
149
  $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
150
  layout="responsive" '.'data-locale = "'.esc_attr($lang).'"'.' data-numposts=';
151
  $facebook_comments_markup .= '"'. esc_attr($redux_builder_amp['ampforwp-number-of-fb-no-of-comments']). '"';
146
  }
147
  else {
148
  $facebook_comments_markup = '<section class="amp-facebook-comments">';
149
+ if(true == ampforwp_get_setting('ampforwp-facebook-comments-title')){
150
+ $facebook_comments_markup .= '<h5>'. esc_html__(ampforwp_translation(ampforwp_get_setting('ampforwp-facebook-comments-title'), 'Leave a Comment'),'accelerated-mobile-pages') .'</h5>';
151
+ }
152
  $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
153
  layout="responsive" '.'data-locale = "'.esc_attr($lang).'"'.' data-numposts=';
154
  $facebook_comments_markup .= '"'. esc_attr($redux_builder_amp['ampforwp-number-of-fb-no-of-comments']). '"';
components/related-posts/related-posts.php CHANGED
@@ -18,12 +18,10 @@ function ampforwp_framework_get_related_posts($argsdata=array()){
18
  <ul class="clearfix">
19
  <?php ampforwp_related_post(); ?>
20
  <?php
21
- $current_id = ampforwp_get_the_ID();
22
  while( $my_query->have_posts() ) {
23
  $my_query->the_post();
24
- if(ampforwp_get_the_ID()==$current_id){
25
- continue;
26
- }
27
  ?>
28
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
29
  <?php
@@ -61,6 +59,7 @@ function ampforwp_related_post_loop_query(){
61
  $args=array(
62
  'post_type' => get_post_type($post),
63
  'posts_per_page'=> $int_number_of_related_posts,
 
64
  'orderby' => $orderby,
65
  'ignore_sticky_posts'=>1,
66
  'has_password' => false ,
18
  <ul class="clearfix">
19
  <?php ampforwp_related_post(); ?>
20
  <?php
21
+
22
  while( $my_query->have_posts() ) {
23
  $my_query->the_post();
24
+
 
 
25
  ?>
26
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
27
  <?php
59
  $args=array(
60
  'post_type' => get_post_type($post),
61
  'posts_per_page'=> $int_number_of_related_posts,
62
+ 'post__not_in' => array($post->ID),
63
  'orderby' => $orderby,
64
  'ignore_sticky_posts'=>1,
65
  'has_password' => false ,
feeds/instant-article-feed.php CHANGED
@@ -33,16 +33,10 @@ header('Content-Type: ' . esc_attr(feed_content_type('rss2')) . '; charset=' . e
33
  'posts_per_page' => esc_attr($number_of_articles),
34
  'no_found_rows' => true,
35
  'meta_query' => array(
36
- 'relation' => 'OR',
37
- array(
38
- 'key' => 'ampforwp-ia-on-off',
39
- 'compare' => "NOT EXISTS"
40
- ),
41
  array(
42
- 'key' => 'ampforwp-ia-on-off',
43
  'value' => 'hide-ia',
44
  'compare' => "!="
45
- ),
46
  )
47
  );
48
  if ( ampforwp_get_setting('hide-amp-ia-categories') ) {
33
  'posts_per_page' => esc_attr($number_of_articles),
34
  'no_found_rows' => true,
35
  'meta_query' => array(
 
 
 
 
 
36
  array(
 
37
  'value' => 'hide-ia',
38
  'compare' => "!="
39
+ ),
40
  )
41
  );
42
  if ( ampforwp_get_setting('hide-amp-ia-categories') ) {
images/izooto-for-amp.png ADDED
Binary file
includes/admin-style.css CHANGED
@@ -1148,10 +1148,10 @@ div#section-ampforwp-ads-section h3:before{
1148
  }
1149
  }
1150
  div#section-amp-ads_1, table#section-table-amp-ads_1{
1151
- max-width: 75%;
1152
  }
1153
  div#section-ampforwp-ads-section, table#section-table-ampforwp-ads-section{
1154
- max-width: 24%;
1155
  float: right;
1156
  position: relative;
1157
  margin-top: -37px;
1148
  }
1149
  }
1150
  div#section-amp-ads_1, table#section-table-amp-ads_1{
1151
+ max-width: 73%;
1152
  }
1153
  div#section-ampforwp-ads-section, table#section-table-ampforwp-ads-section{
1154
+ max-width: 26%;
1155
  float: right;
1156
  position: relative;
1157
  margin-top: -37px;
includes/features/push-notification/push-notification-options.php CHANGED
@@ -13,10 +13,9 @@ function ampforwp_push_notification_default() {
13
  return $default;
14
  }
15
 
16
- $izt_opt1 = $izt_opt2 = $izt_opt3 = $izt_opt4 = '';
17
  function ampforwp_push_notification_options($opt_name){
18
  // Push Notifications section
19
-
20
  if( function_exists('izoto_html')) {
21
  $izt_opt1 = array(
22
  'id' => 'ampforwp-izooto-for-amp-below-content',
13
  return $default;
14
  }
15
 
 
16
  function ampforwp_push_notification_options($opt_name){
17
  // Push Notifications section
18
+ $izt_opt1 = $izt_opt2 = $izt_opt3 = $izt_opt4 = '';
19
  if( function_exists('izoto_html')) {
20
  $izt_opt1 = array(
21
  'id' => 'ampforwp-izooto-for-amp-below-content',
includes/options/admin-config.php CHANGED
@@ -615,6 +615,18 @@ $extension_listing_array = array(
615
  'store_url'=>'https://accounts.ampforwp.com',
616
  'is_activated'=>(is_plugin_active('luckywp-table-of-contents-for-amp/luckywp-table-of-contents-for-amp.php')? 1 : 2),
617
  ),
 
 
 
 
 
 
 
 
 
 
 
 
618
  );
619
  $viewAllExtensions = array(
620
  'name'=>'View All Extensions',
@@ -2330,6 +2342,15 @@ function ampforwp_get_all_tags($id){
2330
  'tooltip-subtitle' => esc_html__('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
2331
  'default' => 0,
2332
  ),
 
 
 
 
 
 
 
 
 
2333
  array(
2334
  'class' => 'child_opt child_opt_arrow',
2335
  'id' => 'ampforwp-number-of-fb-no-of-comments',
615
  'store_url'=>'https://accounts.ampforwp.com',
616
  'is_activated'=>(is_plugin_active('luckywp-table-of-contents-for-amp/luckywp-table-of-contents-for-amp.php')? 1 : 2),
617
  ),
618
+ array(
619
+ 'name'=>'iZooto for AMP',
620
+ 'class'=>'new-ext',
621
+ 'desc'=>'iZooto integration for amp',
622
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/izooto-for-amp.png',
623
+ 'price'=>'$29',
624
+ 'url_link'=>'https://ampforwp.com/addons/izooto-for-amp/',
625
+ 'plugin_active_path'=> 'izooto-for-amp/izooto-for-amp.php',
626
+ 'item_name'=>'iZooto for AMP',
627
+ 'store_url'=>'https://accounts.ampforwp.com',
628
+ 'is_activated'=>(is_plugin_active('izooto-for-amp/izooto-for-amp.php')? 1 : 2)
629
+ ),
630
  );
631
  $viewAllExtensions = array(
632
  'name'=>'View All Extensions',
2342
  'tooltip-subtitle' => esc_html__('Enable/Disable Facebook comments using this switch.', 'accelerated-mobile-pages'),
2343
  'default' => 0,
2344
  ),
2345
+ array(
2346
+ 'class' => 'child_opt child_opt_arrow',
2347
+ 'id' => 'ampforwp-facebook-comments-title',
2348
+ 'type' => 'text',
2349
+ 'title' => esc_html__('Title', 'accelerated-mobile-pages'),
2350
+ 'default' => 'Leave a Comment',
2351
+ 'required' =>
2352
+ array('ampforwp-facebook-comments-support', '=' , 1),
2353
+ ),
2354
  array(
2355
  'class' => 'child_opt child_opt_arrow',
2356
  'id' => 'ampforwp-number-of-fb-no-of-comments',
includes/redirect.php CHANGED
@@ -63,7 +63,7 @@ if(is_search() && 0 == ampforwp_get_setting('amp-redirection-search')){
63
  }
64
  }
65
  // Redirect ?nonamp=1 to normal url #3269
66
- if (( isset($_GET['nonamp']) && 1 == $_GET['nonamp'] ) && function_exists('session_start')){
67
  session_start();
68
  $_SESSION['ampforwp_mobile'] = 'exit';
69
  $current_url = str_replace("?nonamp=1", '',$current_url);
63
  }
64
  }
65
  // Redirect ?nonamp=1 to normal url #3269
66
+ if (( isset($_GET['nonamp']) && 1 == $_GET['nonamp'] ) && function_exists('session_start') && !isset($_SESSION)){
67
  session_start();
68
  $_SESSION['ampforwp_mobile'] = 'exit';
69
  $current_url = str_replace("?nonamp=1", '',$current_url);
pagebuilder/modules/contents-module.php CHANGED
@@ -384,9 +384,12 @@ if ( is_admin() ) {
384
  $the_query->the_post();
385
  $ampforwp_post_url = get_permalink();
386
  if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
387
- $ampforwp_post_url = trailingslashit($ampforwp_post_url);
388
- }else{
389
- $ampforwp_post_url = trailingslashit($ampforwp_post_url) . AMPFORWP_AMP_QUERY_VAR;
 
 
 
390
  }
391
  $image = $height = $width = $image_alt = "";
392
  if ( has_post_thumbnail() ) {
384
  $the_query->the_post();
385
  $ampforwp_post_url = get_permalink();
386
  if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
387
+ $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
388
+ }else if(true == ampforwp_get_setting('amp-core-end-point')){
389
+ $ampforwp_post_url = user_trailingslashit($ampforwp_post_url);
390
+ $ampforwp_post_url = add_query_arg( 'amp', '', $ampforwp_post_url);
391
+ }else{
392
+ $ampforwp_post_url = user_trailingslashit($ampforwp_post_url) . AMPFORWP_AMP_QUERY_VAR;
393
  }
394
  $image = $height = $width = $image_alt = "";
395
  if ( has_post_thumbnail() ) {
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.3.2
7
- Stable tag: 1.0.37
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
194
  = 1.0.37 (28th March 2020) =
195
  * Improvement: Added filter to change Author name #4238
196
  * Improvement: Added option to show/hide jetpack related post in AMP #4272
@@ -215,159 +223,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
215
  * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
216
  * Fixed: Social Icons are out of alignment in Design 2 #4305
217
 
218
- = 1.0.35 (23th March 2020) =
219
- * Fixed: Related post images not having alt attribute #4282
220
- * Fixed: iframes are not working with WP optimize premium #4290
221
- * Fixed: input type file error #4289
222
- * Fixed: next and prev alignment issue in design 2 #4211
223
- * Fixed: 404 PHP File is not getting overried from the child theme #4284
224
- * Fixed: Error in "Optimize loading of Google font" in SG Optimizer #4287
225
- * Fixed: amp-vimeo Validation error of invalid value 'ondemand' #4294
226
- * Fixed: AMP Option panel improvements #4277 #4288
227
-
228
- = 1.0.34 (19th March 2020) =
229
- * Improvement: Matomo (Piwik) analytics improvements #4271 #4280
230
- * Improvement: Custom page template improvements #4244
231
- * Improvement: Option to add/remove "nofollow" in the comment button #4266
232
- * Fixed: Spaces issue fixed in image carousel #4141
233
- * Fixed: Reusable blocks not working in the Custom AMP Editor #4187
234
- * Fixed: Comments pagination was not working in amp takeover beta #4251
235
- * Fixed: lightbox issue fixed #4222
236
- * Fixed: When AMP Dev mode and Mobile redirection both kept on then the website displays AMP on the mobile device #4276
237
- * Fixed: debug warnings on Fresh WP installation #4270
238
- * Fixed: Treeshaking was not working with "Product Review Lite Plugin" #4256
239
- * Fixed: Tables was not responsive in Mobile view design one #4278
240
- * Fixed: Have to make compatible with wordpress4.4.2 version #4262
241
- * Fixed: Click here link not working in mobile view of Subscribe to Comments Reloaded plugin #4225
242
- * Fixed: Post pagination not working in custom AMP Editor #4255
243
- * Fixed: Depreciated categories widget #4274
244
- * Fixed: Weekday removed from parameter 'published at' in the analytice code #4281
245
-
246
- = 1.0.33 (11th March 2020) =
247
- * Fixed: Categories not Hiding in Instant Articles #4254
248
- * Fixed: Error when activating imagify plugin #4260
249
- * Fixed: Start attribute not working in ol tags #4243
250
- * Fixed: Search form not working in template mode #4227 #4224
251
- * Fixed: Save button was disappearing when theme build on Redux framework #4259
252
- * Fixed: SVG tag was removing in anchor tag #4252
253
- * Fixed: Filter added to modify font face URL's #4258
254
- * Fixed: Elementor CSS not loading on frontpage in ALL in One SEO #4253
255
- * Fixed: Undefined variable: get_amp_custom_frontpage_id #4265
256
- * Fixed: Images are not showing in AMP with Neva Child Theme #4261
257
- * Fixed: AMP Option panel improvements #4245 #4269
258
-
259
- = 1.0.32 (6th March 2020) =
260
- * Fixed: Syntax breaking in advanced google analytics section #4228
261
- * Fixed: Optimize CSS (Tree shaking) not clearing on post update #4234
262
- * Fixed: Compatibility with the CIARO theme #4220
263
- * Fixed: Custom JavaScript are not allowed issue #4233
264
- * Fixed: Need to remove search option when header type 2 is selected #4214
265
- * Fixed: CSS of the CTA button in AMP page builder is disturbed in the mobile view #4215
266
- * Fixed: image broken in light speed cache plugin #4231
267
- * Fixed: Youtube video is not working in " The issue" Theme #4223
268
- * Fixed: Removed '/amp' in menu with custom link #4221
269
- * Fixed: Wrong Yoast Canonical when amp link added #4229
270
- * Fixed: Call to undefined function session_start() in redirect.php:67 #4236
271
- * Fixed: Content Sneak Peek issue with below the content ads in Mozilla browser. #4178
272
- * Fixed: The mandatory attribute 'target' is missing in tag form #4239
273
- * Fixed: Query Monitor queries should be visible in amp pages too when logged in. #4250
274
- * Fixed: The input should be cleared When search button is clicked in AMP options Panel#4247
275
- * Fixed: Multiple debug warnings. #4242
276
-
277
- = 1.0.31 (28th February 2020) =
278
- * Improvement: Added option to hide vukkle comments emoji #4194
279
- * Improvement: Added alt for images in Slider module of AMP page builder #4193
280
- * Improvement: Updated sabberworm folder #4142
281
- * Fixed: Fatal Error fixed with zombify plugin #4184
282
- * Fixed: Validation error due to Mediavine Plugin #4206
283
- * Fixed: Instant article bug #4150
284
- * Fixed: AMP Search Not Working with Betheme #4195
285
- * Fixed: StackPath CDN not working #4123
286
- * Fixed: Extra 301 redirect after enabling ?amp #4167
287
- * Fixed: Table CSS improved #4185
288
- * Fixed: Debug Warnings #4226
289
- * Fixed: AMP Option panel improvements #4202 #4219
290
-
291
- = 1.0.30 (24th February 2020) =
292
- * Improvement: Added Autoplay in Image Gallery #3705
293
- * Fixed: Jetpack lazy loading not working due to our AMPforWP plugin #4183
294
- * Fixed: Amp comments Bug with update 1.0.28 #4209
295
- * Fixed: Removed Table styles when AMP Pagebuilder compatibility plugin is active #4185
296
- * Fixed: Debug warning fixed #4204 #4212
297
-
298
- = 1.0.29 (21th February 2020) =
299
- * Improvement: Created an option for entering URLs to prefetch. #3997
300
- * Fixed: Admin bar css is not loaded on amp pages #4130
301
- * Fixed: Optimize amp pages and CSS #3579 #4174
302
- * Fixed: When the tree shaking is enabled then the CSS of the layouts break #4113
303
- * Fixed: Extra 301 redirect after enabling ?amp #4167
304
- * Fixed: Break in layout when AMP takeout and conver to wp is enabled together #4176
305
- * Fixed: There should be no notices or messages from other third party plugins on the AMP option panel. #4166
306
- * Fixed: Incorrect time showing on AMP if we select Timezone as UTC-3 #4160
307
- * Fixed: WPappbox images are not loading on the amp pages #4161
308
- * Fixed: CSS of CTA button is over-riding while using more than one CTA in AMP pagebuilder. #4173
309
- * Fixed: Notice Errors - Trying to get property 'title' #4196
310
- * Fixed: Warning issue on AMP option panel. #4172
311
- * Fixed: Display the Search button in AMP option panel. #4165
312
- * Fixed: Warning Errors #4200
313
- * Fixed: amp-access script is not being appended via Enter HTML in Head #4199
314
- * Fixed: Issues related to category support on the AMP Pages #4151
315
- * Fixed: AMP Options panel UI bugs #4180 #4179 #4105
316
-
317
- = 1.0.28 (18th February 2020) =
318
- * Improvement: Scripts added from Options panel should have higher priority in the frontend #4064
319
-
320
- = 1.0.27 (16th February 2020) =
321
- * Fixed: Bugs in Imagify plugin #3908
322
- * Fixed: GDPR popup not blocking header #4155
323
- * Fixed: Save button dissappers when clicked on setup settings #4169
324
- * Fixed: Alignment issue when there is no caption on featured image #4171
325
- * Fixed: Whitelisted Picture tag #4051
326
- * Fixed: Show/Hide Slider or Icon module in AMP Pagebuilder is not clickable #4153
327
- * Fixed: Debug warning when empty item added in Slider module in AMP pagebuilder #4152
328
- * Fixed: Empty link in facebook share in sticky bar #4154
329
- * Fixed: AMP Options panel UI bugs #4122 #4162
330
-
331
- = 1.0.26 (13th February 2020) =
332
- * Improvement: import/export option improved #4089
333
- * Fixed: Added option to show/hide featured image on AMP pagebuilder #4131
334
- * Fixed: AMP Options panel UI bug #4122
335
-
336
- = 1.0.25 (12th February 2020) =
337
- * Fixed: Title issue #4138
338
-
339
- = 1.0.24 (11th February 2020) =
340
- * Improvement: Added filter to modify the breadcrumb homepage url #4077
341
- * Fixed: Image alignment on the left issue #4156
342
- * Fixed: H1 tag not appearing on posts #4121
343
- * Fixed: "Title on static page front page" option not working #4138
344
- * Fixed: AMP Menu option was not showing in WP settings #4129
345
- * Fixed: Blank Events Calendar Months Page when 'Minify' option is enabled #4080
346
- * Fixed: Removed '@' in Twitter Handle #4135
347
- * Fixed: Message improved when "Leverage Browser Caching" option is enable without readable or writable permission of htaccess file #4127
348
- * Fixed: Featured image removed on AMP Pagebuilder pages #4131
349
-
350
- = 1.0.23 (7th February 2020) =
351
- * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
352
- * Fixed: Iframe error due to Jetpack #4125
353
- * Fixed: Menu transient increased to avoid deadlock error #4133
354
- * Fixed: Moved "Breadcrumbs From Yoast" to SEO option Panel section. #3600
355
- * Fixed: Featured Image from the content is not fetching the image when height and width is not present in the image code in Classic editor. #4096
356
- * Improvement: Sorting option for Pagebuilder slider/gallery #2014
357
- * Improvement: Option for showing no. of words in the excerpt of Recent Posts and Related Posts #3640
358
- * Improvement: Link Comments section with comments order #3740
359
- * Improvement: Default fallback images Added #3719
360
- * Improvement: subscript<sub> and superscript<sup> support #4137
361
- * Improvement: Message added if no seo option is selected but seo plugin is active #4124
362
-
363
- = 1.0.22 (6th February 2020) =
364
- * Fixed: Console error - Uncaught TypeError: Cannot read property 'on' of null #4102
365
- * Fixed: When Insert post ads plugin is enable then AMP settings panel is not showing. #4107
366
- * Fixed: Search console error fixed on WooCommerce wishlist page #4097
367
- * Fixed: GTM Added in Basic Setup and code improvements #4108
368
- * Fixed: The meta tags was not working in Head section #4116
369
- * Fixed: Upgrade to Pro button was missing in the AMP setting panel #4118
370
- * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
371
- * Fixed: FAQ section improved #4119
372
-
373
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.4
7
+ Stable tag: 1.0.38
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 1.0.38 (1st April 2020) =
195
+ * Improvement: Added Title for facebook comments section #3716
196
+ * Improvement: Added iZooto support for AMP #4312
197
+ * Fixed: Alignment issue in Advertisement Section #4325
198
+ * Fixed: Slow Queries on Homepage in D3 #4319
199
+ * Fixed: Category module links in AMP pagebuilder doesn't change to ?amp #4314
200
+ * Fixed: Debug Warnings #4324 #4321 #4299
201
+
202
  = 1.0.37 (28th March 2020) =
203
  * Improvement: Added filter to change Author name #4238
204
  * Improvement: Added option to show/hide jetpack related post in AMP #4272
223
  * Fixed: Incorrect alignment of Edit in twenty twenty WP theme #4246
224
  * Fixed: Social Icons are out of alignment in Design 2 #4305
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-1/elements/related-posts.php CHANGED
@@ -22,6 +22,7 @@ if( $current_post_type = get_post_type( $post )) {
22
  if($current_post_type != 'page'){
23
  $args = array(
24
  'posts_per_page'=> $int_number_of_related_posts,
 
25
  'order' => 'DESC',
26
  'orderby' => $orderby,
27
  'post_type' => $current_post_type,
@@ -44,6 +45,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
44
  $args=array(
45
  'category__in' => $category_ids,
46
  'posts_per_page' => $int_number_of_related_posts,
 
47
  'ignore_sticky_posts'=> 1,
48
  'has_password' => false ,
49
  'post_status' => 'publish',
@@ -68,6 +70,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
68
  $args=array(
69
  'tag__in' => $tag_ids,
70
  'posts_per_page' => $int_number_of_related_posts,
 
71
  'ignore_sticky_posts'=> 1,
72
  'has_password' => false ,
73
  'post_status' => 'publish',
@@ -104,12 +107,10 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
104
  <span><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></span>
105
  <ol class="clearfix">
106
  <?php
107
- $current_id = ampforwp_get_the_ID();
108
  while( $my_query->have_posts() ) {
109
  $my_query->the_post();
110
- if(ampforwp_get_the_ID()==$current_id){
111
- continue;
112
- }
113
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
114
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
115
  $related_post_permalink = get_permalink();
22
  if($current_post_type != 'page'){
23
  $args = array(
24
  'posts_per_page'=> $int_number_of_related_posts,
25
+ 'post__not_in' => array($post->ID),
26
  'order' => 'DESC',
27
  'orderby' => $orderby,
28
  'post_type' => $current_post_type,
45
  $args=array(
46
  'category__in' => $category_ids,
47
  'posts_per_page' => $int_number_of_related_posts,
48
+ 'post__not_in' => array($post->ID),
49
  'ignore_sticky_posts'=> 1,
50
  'has_password' => false ,
51
  'post_status' => 'publish',
70
  $args=array(
71
  'tag__in' => $tag_ids,
72
  'posts_per_page' => $int_number_of_related_posts,
73
+ 'post__not_in' => array($post->ID),
74
  'ignore_sticky_posts'=> 1,
75
  'has_password' => false ,
76
  'post_status' => 'publish',
107
  <span><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></span>
108
  <ol class="clearfix">
109
  <?php
110
+
111
  while( $my_query->have_posts() ) {
112
  $my_query->the_post();
113
+
 
 
114
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
115
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
116
  $related_post_permalink = get_permalink();
templates/design-manager/design-2/elements/related-posts.php CHANGED
@@ -22,6 +22,7 @@ if( $current_post_type = get_post_type( $post )) {
22
  if($current_post_type != 'page'){
23
  $args = array(
24
  'posts_per_page'=> $int_number_of_related_posts,
 
25
  'order' => 'DESC',
26
  'orderby' => $orderby,
27
  'post_type' => $current_post_type,
@@ -44,6 +45,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
44
  $args=array(
45
  'category__in' => $category_ids,
46
  'posts_per_page' => $int_number_of_related_posts,
 
47
  'ignore_sticky_posts'=> 1,
48
  'has_password' => false ,
49
  'post_status' => 'publish',
@@ -67,6 +69,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
67
  $args=array(
68
  'tag__in' => $tag_ids,
69
  'posts_per_page' => $int_number_of_related_posts,
 
70
  'ignore_sticky_posts'=> 1,
71
  'has_password' => false ,
72
  'post_status' => 'publish',
@@ -104,12 +107,10 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
104
  <span class="related-title"><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></span>
105
  <ol class="clearfix">
106
  <?php
107
- $current_id = ampforwp_get_the_ID();
108
  while( $my_query->have_posts() ) {
109
  $my_query->the_post();
110
- if(ampforwp_get_the_ID()==$current_id){
111
- continue;
112
- }
113
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
114
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
115
  $related_post_permalink = get_permalink();
22
  if($current_post_type != 'page'){
23
  $args = array(
24
  'posts_per_page'=> $int_number_of_related_posts,
25
+ 'post__not_in' => array($post->ID),
26
  'order' => 'DESC',
27
  'orderby' => $orderby,
28
  'post_type' => $current_post_type,
45
  $args=array(
46
  'category__in' => $category_ids,
47
  'posts_per_page' => $int_number_of_related_posts,
48
+ 'post__not_in' => array($post->ID),
49
  'ignore_sticky_posts'=> 1,
50
  'has_password' => false ,
51
  'post_status' => 'publish',
69
  $args=array(
70
  'tag__in' => $tag_ids,
71
  'posts_per_page' => $int_number_of_related_posts,
72
+ 'post__not_in' => array($post->ID),
73
  'ignore_sticky_posts'=> 1,
74
  'has_password' => false ,
75
  'post_status' => 'publish',
107
  <span class="related-title"><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></span>
108
  <ol class="clearfix">
109
  <?php
110
+
111
  while( $my_query->have_posts() ) {
112
  $my_query->the_post();
113
+
 
 
114
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
115
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
116
  $related_post_permalink = get_permalink();
templates/design-manager/design-3/elements/related-posts.php CHANGED
@@ -22,6 +22,7 @@ if( $current_post_type = get_post_type( $post )) {
22
  if($current_post_type != 'page'){
23
  $args = array(
24
  'posts_per_page'=> $int_number_of_related_posts,
 
25
  'order' => 'DESC',
26
  'orderby' => $orderby,
27
  'post_type' => $current_post_type,
@@ -45,6 +46,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
45
  $args=array(
46
  'category__in' => $category_ids,
47
  'posts_per_page' => $int_number_of_related_posts,
 
48
  'ignore_sticky_posts'=> 1,
49
  'has_password' => false ,
50
  'post_status' => 'publish',
@@ -69,6 +71,7 @@ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
69
  'tag__in' => $tag_ids,
70
 
71
  'posts_per_page' => $int_number_of_related_posts,
 
72
  'ignore_sticky_posts'=> 1,
73
  'has_password' => false ,
74
  'post_status' => 'publish',
@@ -106,12 +109,10 @@ if( isset($redux_builder_amp['ampforwp-single-related-posts-switch']) && $redux_
106
  <span class="related-title"><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></span>
107
  <ol class="clearfix">
108
  <?php
109
- $current_id = ampforwp_get_the_ID();
110
  while( $my_query->have_posts() ) {
111
  $my_query->the_post();
112
- if(ampforwp_get_the_ID()==$current_id){
113
- continue;
114
- }
115
  $related_post_permalink = "";
116
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
117
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
22
  if($current_post_type != 'page'){
23
  $args = array(
24
  'posts_per_page'=> $int_number_of_related_posts,
25
+ 'post__not_in' => array($post->ID),
26
  'order' => 'DESC',
27
  'orderby' => $orderby,
28
  'post_type' => $current_post_type,
46
  $args=array(
47
  'category__in' => $category_ids,
48
  'posts_per_page' => $int_number_of_related_posts,
49
+ 'post__not_in' => array($post->ID),
50
  'ignore_sticky_posts'=> 1,
51
  'has_password' => false ,
52
  'post_status' => 'publish',
71
  'tag__in' => $tag_ids,
72
 
73
  'posts_per_page' => $int_number_of_related_posts,
74
+ 'post__not_in' => array($post->ID),
75
  'ignore_sticky_posts'=> 1,
76
  'has_password' => false ,
77
  'post_status' => 'publish',
109
  <span class="related-title"><?php echo esc_attr(ampforwp_translation( $redux_builder_amp['amp-translator-related-text'], 'Related Post' )); ?></span>
110
  <ol class="clearfix">
111
  <?php
112
+
113
  while( $my_query->have_posts() ) {
114
  $my_query->the_post();
115
+
 
 
116
  $related_post_permalink = "";
117
  $related_post_permalink = ampforwp_url_controller( get_permalink() );
118
  if ( ampforwp_get_setting('ampforwp-single-related-posts-link') ) {
templates/design-manager/swift/single.php CHANGED
@@ -111,12 +111,10 @@ global $redux_builder_amp; ?>
111
  <ul class="clearfix">
112
  <?php ampforwp_related_post(); ?>
113
  <?php
114
- $current_id = ampforwp_get_the_ID();
115
  while( $my_query->have_posts() ) {
116
  $my_query->the_post();
117
- if(ampforwp_get_the_ID()==$current_id){
118
- continue;
119
- }
120
  ?>
121
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
122
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
@@ -167,12 +165,10 @@ do_action("ampforwp_single_design_type_handle_d1");
167
  <?php ampforwp_related_post(); ?>
168
  <ul class="clearfix">
169
  <?php
170
- $current_id = ampforwp_get_the_ID();
171
  while( $my_query->have_posts() ) {
172
  $my_query->the_post();
173
- if(ampforwp_get_the_ID()==$current_id){
174
- continue;
175
- }
176
  ?>
177
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
178
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
@@ -215,12 +211,10 @@ do_action("ampforwp_single_design_type_handle_d1");
215
  <?php ampforwp_related_post(); ?>
216
  <amp-carousel height="310" layout="fixed-height" type="carousel">
217
  <?php
218
- $current_id = ampforwp_get_the_ID();
219
  while( $my_query->have_posts() ) {
220
  $my_query->the_post();
221
- if(ampforwp_get_the_ID()==$current_id){
222
- continue;
223
- }
224
  ?>
225
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
226
  <div class="rp-slide">
@@ -395,12 +389,10 @@ do_action("ampforwp_single_design_type_handle_d1");
395
  <?php ampforwp_related_post(); ?>
396
  <ul class="clearfix">
397
  <?php
398
- $current_id = ampforwp_get_the_ID();
399
  while( $my_query->have_posts() ) {
400
  $my_query->the_post();
401
- if(ampforwp_get_the_ID()==$current_id){
402
- continue;
403
- }
404
  ?>
405
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
406
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { ?>
111
  <ul class="clearfix">
112
  <?php ampforwp_related_post(); ?>
113
  <?php
114
+
115
  while( $my_query->have_posts() ) {
116
  $my_query->the_post();
117
+
 
 
118
  ?>
119
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
120
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
165
  <?php ampforwp_related_post(); ?>
166
  <ul class="clearfix">
167
  <?php
168
+
169
  while( $my_query->have_posts() ) {
170
  $my_query->the_post();
171
+
 
 
172
  ?>
173
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
174
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { if(ampforwp_has_post_thumbnail()){?>
211
  <?php ampforwp_related_post(); ?>
212
  <amp-carousel height="310" layout="fixed-height" type="carousel">
213
  <?php
214
+
215
  while( $my_query->have_posts() ) {
216
  $my_query->the_post();
217
+
 
 
218
  ?>
219
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
220
  <div class="rp-slide">
389
  <?php ampforwp_related_post(); ?>
390
  <ul class="clearfix">
391
  <?php
392
+
393
  while( $my_query->have_posts() ) {
394
  $my_query->the_post();
395
+
 
 
396
  ?>
397
  <li class="<?php if ( has_post_thumbnail() ) { echo'has_thumbnail'; } else { echo 'no_thumbnail'; } ?>">
398
  <?php if ( true == $redux_builder_amp['ampforwp-single-related-posts-image'] ) { ?>
templates/design-manager/swift/style.php CHANGED
@@ -2346,4 +2346,14 @@ figure.amp-featured-image {
2346
  .post-meta-edit-link-wrapper ul.post-meta li .meta-text{
2347
  margin-left:5px;
2348
  }
2349
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
2346
  .post-meta-edit-link-wrapper ul.post-meta li .meta-text{
2347
  margin-left:5px;
2348
  }
2349
+ <?php }
2350
+ if(true == ampforwp_get_setting('ampforwp-facebook-comments-support')){?>
2351
+ section.amp-facebook-comments h5{
2352
+ font-size: 14px;
2353
+ padding-bottom: 4px;
2354
+ font-weight: 500;
2355
+ letter-spacing: 0.5px;
2356
+ text-transform: uppercase;
2357
+ border-bottom: 1px dotted #ccc;
2358
+ }
2359
+ <?php }
templates/features.php CHANGED
@@ -1533,10 +1533,18 @@ function ampforwp_custom_og_image_homepage() {
1533
  $image_url = WPSEO_Meta::get_value( 'opengraph-image', $post_id );
1534
  $image_id = WPSEO_Meta::get_value( 'opengraph-image-id', $post_id );
1535
  $image = wp_get_attachment_image_src($image_id,'full');
1536
- $image_tags = array(
1537
- 'width' => esc_attr($image[1]),
1538
- 'height' => esc_attr($image[2]),
1539
- );
 
 
 
 
 
 
 
 
1540
  $wpseo_og->og_tag( 'og:image', esc_url( $image_url ) );
1541
  foreach ( $image_tags as $key => $value ) {
1542
  if ( ! empty( $value ) ) {
@@ -2171,6 +2179,9 @@ function ampforwp_facebook_comments_markup() {
2171
  if ( $redux_builder_amp['ampforwp-facebook-comments-support'] && $display_comments_on ) {
2172
 
2173
  $facebook_comments_markup = '<section class="amp-wp-content post-comments amp-wp-article-content amp-facebook-comments" id="comments">';
 
 
 
2174
  $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
2175
  layout="responsive" '.'data-locale = "'.esc_attr($lang).'"'.' data-numposts=';
2176
  $facebook_comments_markup .= '"'. esc_attr($redux_builder_amp['ampforwp-number-of-fb-no-of-comments']). '"';
@@ -2957,7 +2968,7 @@ function ampforwp_add_sidebar_data( $data ) {
2957
  // 44. auto adding /amp for the menu
2958
  add_action('amp_init','ampforwp_auto_add_amp_menu_link_insert');
2959
  function ampforwp_auto_add_amp_menu_link_insert() {
2960
- add_action( 'wp', 'ampforwp_auto_add_amp_in_link_check' );
2961
  }
2962
 
2963
  function ampforwp_auto_add_amp_in_link_check() {
@@ -7035,10 +7046,14 @@ function ampforwp_set_dns_preload_urls(){
7035
  $val_count = count($data_arr[0]['value']);
7036
  for($i=0;$i<$val_count;$i++){
7037
  for($j=0;$j<count($data_arr);$j++){
7038
- $key = $data_arr[$j]['value'][$i];
 
 
7039
  if(isset($data_arr[$j+1])){
7040
  $key = $data_arr[$j]['value'][$i];
 
7041
  $value = $data_arr[$j+1]['value'][$i];
 
7042
  if($value!=""){
7043
  ?>
7044
  <link rel="<?php echo esc_attr($key)?>" href="<?php echo esc_url($value);?>" crossorigin>
1533
  $image_url = WPSEO_Meta::get_value( 'opengraph-image', $post_id );
1534
  $image_id = WPSEO_Meta::get_value( 'opengraph-image-id', $post_id );
1535
  $image = wp_get_attachment_image_src($image_id,'full');
1536
+ $image_tags = array();
1537
+ if(is_array($image)){
1538
+ $image_tags = array(
1539
+ 'width' => esc_attr(isset($image[1]) ? $image[1] : '750'),
1540
+ 'height' => esc_attr(isset($image[2]) ? $image[2] : '500'),
1541
+ );
1542
+ }else{
1543
+ $image_tags = array(
1544
+ 'width' => '750',
1545
+ 'height' => '500',
1546
+ );
1547
+ }
1548
  $wpseo_og->og_tag( 'og:image', esc_url( $image_url ) );
1549
  foreach ( $image_tags as $key => $value ) {
1550
  if ( ! empty( $value ) ) {
2179
  if ( $redux_builder_amp['ampforwp-facebook-comments-support'] && $display_comments_on ) {
2180
 
2181
  $facebook_comments_markup = '<section class="amp-wp-content post-comments amp-wp-article-content amp-facebook-comments" id="comments">';
2182
+ if(true == ampforwp_get_setting('ampforwp-facebook-comments-title')){
2183
+ $facebook_comments_markup .= '<h5>'. esc_html__(ampforwp_translation(ampforwp_get_setting('ampforwp-facebook-comments-title'), 'Leave a Comment'),'accelerated-mobile-pages') .'</h5>';
2184
+ }
2185
  $facebook_comments_markup .= '<amp-facebook-comments width=486 height=357
2186
  layout="responsive" '.'data-locale = "'.esc_attr($lang).'"'.' data-numposts=';
2187
  $facebook_comments_markup .= '"'. esc_attr($redux_builder_amp['ampforwp-number-of-fb-no-of-comments']). '"';
2968
  // 44. auto adding /amp for the menu
2969
  add_action('amp_init','ampforwp_auto_add_amp_menu_link_insert');
2970
  function ampforwp_auto_add_amp_menu_link_insert() {
2971
+ add_action( 'wp', 'ampforwp_auto_add_amp_in_link_check', 99 );
2972
  }
2973
 
2974
  function ampforwp_auto_add_amp_in_link_check() {
7046
  $val_count = count($data_arr[0]['value']);
7047
  for($i=0;$i<$val_count;$i++){
7048
  for($j=0;$j<count($data_arr);$j++){
7049
+ if(isset($data_arr[$j]['value'][$i])){
7050
+ $key = $data_arr[$j]['value'][$i];
7051
+ }
7052
  if(isset($data_arr[$j+1])){
7053
  $key = $data_arr[$j]['value'][$i];
7054
+ if(isset($data_arr[$j]['value'][$i])){
7055
  $value = $data_arr[$j+1]['value'][$i];
7056
+ }
7057
  if($value!=""){
7058
  ?>
7059
  <link rel="<?php echo esc_attr($key)?>" href="<?php echo esc_url($value);?>" crossorigin>