AMP for WP – Accelerated Mobile Pages - Version 1.0.72

Version Description

(17th December 2020) = * Improvement: Added i2Pros and cons plugin compatibility #4837 * Improvement: Added WP-PageNavi plugin compatibility #4831 * Improvement: Added Categories Images plugin compatibility #3973 * Improvement: Added webp images on the homepage and Archives with Imagify plugin #4725 * Improvement: Added Recipe Compatibility for AMP Extension #4868 * Fixed: Amp option panel breaks when AECC Global Theme is activated. #4863 * Fixed: Facebook page embed fails #4871 * Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873

Download this release

Release Info

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

Code changes from version 1.0.71.2 to 1.0.72

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.6
7
- Stable tag: 1.0.71.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -193,44 +193,20 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
193
 
194
  == Changelog ==
195
 
 
 
 
 
 
 
 
 
 
 
196
  = 1.0.71.2 (12th December 2020) =
197
  * Fixed: Incorrect AMPHTML on homepage with ?amp #4865
198
 
199
  = 1.0.71.1 (10th December 2020) =
200
  * Fixed: Validation error in author bio alt attribute #4864
201
 
202
- = 1.0.71 (10th December 2020) =
203
- * Fixed: AMP Page builder accordion not working in 1.0.70 #4862
204
- * Fixed: Category name in the dropdown not redirecting and AMP Sidebar alignment #4861
205
- * Fixed: AMP Sidebar Menu Remains Open After Browser Back in Firefox and Safari #4840
206
- * Fixed: amp-auto-ads was found on this page, but is unused error #4851
207
- * Fixed: Amp option panel breaks in Product Filter For WooCommerce Product Plugin #4853
208
- * Fixed: ID attribute added inside the analytics section #4852
209
- * Fixed: Updated Facebook Messanger Icon #4859
210
- * Fixed: Heading elements added in blurb module of AMP page builder #4856
211
- * Fixed: Special characters are showing for post titles after sharing tweets #4850
212
-
213
- = 1.0.70 (7th December 2020) =
214
- * Improvement: Added filter to modify author bio description #4849
215
- * Improvement: Added LGDP (Brazil's GDPR) #4854
216
- * Fixed: Ads are displaying even GDPR popup is rejected #4843
217
- * Fixed: Role Based Access not working for SEO manager role in Yoast #4830
218
- * Fixed: Homepage url not redirecting to non-amp url with AMP takeover and ?amp #4826
219
- * Fixed: The amphtml not generating with the Hide By Default option in AMP Takeover #4824
220
- * Fixed: Undefined variable: allscripts #4846
221
- * Fixed: Breadcrumb bug in amp homepage #4827
222
- * Fixed: When the minify option is disabled then the WhatsApp share link has a space #4848
223
- * Fixed: Validation error when using web stories plugin #4847
224
- * Fixed: The background color of feature module of layout2 is not getting applied #4835
225
- * Fixed: Canonical and meta description errors in All in one SEO PRO #4829
226
- * Fixed: Avatar image doesn't have alt attribute #4836
227
- * Fixed: AMP posts are redirecting to the 404 page when post id is added in permalink #4842
228
- * Fixed: The amphtml not generating on the custom taxonomy and the custom post types #4841
229
-
230
- = 1.0.69.2 (27th November 2020) =
231
- * Fixed: Improvements in offer banner #4833
232
-
233
- = 1.0.69.1 (25th November 2020) =
234
- * Fixed: amp-story-player was found on this page, but is unused. #4839
235
-
236
  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.6
7
+ Stable tag: 1.0.72
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.72 (17th December 2020) =
197
+ * Improvement: Added i2Pros and cons plugin compatibility #4837
198
+ * Improvement: Added WP-PageNavi plugin compatibility #4831
199
+ * Improvement: Added Categories Images plugin compatibility #3973
200
+ * Improvement: Added webp images on the homepage and Archives with Imagify plugin #4725
201
+ * Improvement: Added Recipe Compatibility for AMP Extension #4868
202
+ * Fixed: Amp option panel breaks when AECC Global Theme is activated. #4863
203
+ * Fixed: Facebook page embed fails #4871
204
+ * Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
205
+
206
  = 1.0.71.2 (12th December 2020) =
207
  * Fixed: Incorrect AMPHTML on homepage with ?amp #4865
208
 
209
  = 1.0.71.1 (10th December 2020) =
210
  * Fixed: Validation error in author bio alt attribute #4864
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  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.71.2
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.71.2');
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.72
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.72');
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,15 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.71.2 (12th December 2020) =
4
  * Fixed: Incorrect AMPHTML on homepage with ?amp #4865
5
 
1
  == Changelog ==
2
 
3
+ = 1.0.72 (17th December 2020) =
4
+ * Improvement: Added i2Pros and cons plugin compatibility #4837
5
+ * Improvement: Added WP-PageNavi plugin compatibility #4831
6
+ * Improvement: Added Categories Images plugin compatibility #3973
7
+ * Improvement: Added webp images on the homepage and Archives with Imagify plugin #4725
8
+ * Improvement: Added Recipe Compatibility for AMP Extension #4868
9
+ * Fixed: Amp option panel breaks when AECC Global Theme is activated. #4863
10
+ * Fixed: Facebook page embed fails #4871
11
+ * Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
12
+
13
  = 1.0.71.2 (12th December 2020) =
14
  * Fixed: Incorrect AMPHTML on homepage with ?amp #4865
15
 
components/components-core.php CHANGED
@@ -708,6 +708,28 @@ function ampforwp_backtotop_global_css(){?>
708
  sub {vertical-align: sub;font-size: small;}
709
  sup {vertical-align: super;font-size: small;}
710
  amp-call-tracking a {display: none;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
711
  <?php if (class_exists('UAGB_Admin')) {?>
712
  .wp-block-uagb-faq svg {display: none;}
713
  <?php } ?>
708
  sub {vertical-align: sub;font-size: small;}
709
  sup {vertical-align: super;font-size: small;}
710
  amp-call-tracking a {display: none;}
711
+ <?php if (function_exists('wp_pagenavi')) {?>
712
+ .wp-pagenavi {
713
+ border: 1px solid #BFBFBF;
714
+ padding: 10px;
715
+ }
716
+ .wp-pagenavi span.pages {
717
+ margin-right: 10px;
718
+ }
719
+ .wp-pagenavi a.previouspostslink {
720
+ margin-left: 20px;
721
+ }
722
+ .wp-pagenavi a.page.smaller, .wp-pagenavi a.page.larger, .wp-pagenavi span.current
723
+ {
724
+ padding: 0 5px;
725
+ }
726
+ .wp-pagenavi span.extend {
727
+ display: none;
728
+ }
729
+ .wp-pagenavi a.last , .amp-archive a.first {
730
+ margin-left: 10px;
731
+ }
732
+ <?php } ?>
733
  <?php if (class_exists('UAGB_Admin')) {?>
734
  .wp-block-uagb-faq svg {display: none;}
735
  <?php } ?>
components/loop/loop.php CHANGED
@@ -24,6 +24,9 @@ function amp_archive_title(){
24
  }else{
25
  the_archive_title( '<h2 class="amp-archive-title">', '</h2>' );
26
  }
 
 
 
27
  $description = get_the_archive_description();
28
  $sanitizer = new AMPFORWP_Content( $description, array(),
29
  apply_filters( 'ampforwp_content_sanitizers',
@@ -49,9 +52,9 @@ function amp_archive_title(){
49
  if($paged <= '1' && ampforwp_get_setting('ampforwp-cat-description')) {?>
50
  <div class="amp-archive-desc">
51
  <?php echo do_shortcode($arch_desc);// amphtml content, no kses ?>
52
- </div> <?php
53
- }
54
  }
 
55
  }
56
  if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
57
  $parent_cat_id = '';
@@ -297,6 +300,9 @@ function amp_pagination($args =array()) {
297
  }?>
298
 
299
  <div class="loop-pagination"><?php
 
 
 
300
  if ( get_next_posts_link( $args['next_text'], $amp_q->max_num_pages ) ) {
301
  $next_link = '<div class="right">'. apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ), $paged) .'</div>';
302
  echo $next_link; // escaped above
@@ -306,7 +312,7 @@ function amp_pagination($args =array()) {
306
  echo $pre_link; // escaped above
307
  } ?>
308
  <div class="clearfix"></div>
309
- </div><?php
310
 
311
  }
312
 
24
  }else{
25
  the_archive_title( '<h2 class="amp-archive-title">', '</h2>' );
26
  }
27
+ if(function_exists('ampforwp_category_image_compatibility')){
28
+ ampforwp_category_image_compatibility('echo','amp-archive-image');
29
+ }
30
  $description = get_the_archive_description();
31
  $sanitizer = new AMPFORWP_Content( $description, array(),
32
  apply_filters( 'ampforwp_content_sanitizers',
52
  if($paged <= '1' && ampforwp_get_setting('ampforwp-cat-description')) {?>
53
  <div class="amp-archive-desc">
54
  <?php echo do_shortcode($arch_desc);// amphtml content, no kses ?>
55
+ </div> <?php
 
56
  }
57
+ }
58
  }
59
  if( is_category() && 1 == $redux_builder_amp['ampforwp-sub-categories-support'] ){
60
  $parent_cat_id = '';
300
  }?>
301
 
302
  <div class="loop-pagination"><?php
303
+ if (function_exists('wp_pagenavi')) {
304
+ wp_pagenavi();
305
+ }else{
306
  if ( get_next_posts_link( $args['next_text'], $amp_q->max_num_pages ) ) {
307
  $next_link = '<div class="right">'. apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-show-more-posts-text'] , $args['next_text']), $amp_q->max_num_pages ), $paged) .'</div>';
308
  echo $next_link; // escaped above
312
  echo $pre_link; // escaped above
313
  } ?>
314
  <div class="clearfix"></div>
315
+ </div><?php }
316
 
317
  }
318
 
images/recipe-compatibility-for-amp.png ADDED
Binary file
includes/features/functions.php CHANGED
@@ -53,6 +53,9 @@ function ampforwp_add_admin_styling($hook_suffix){
53
  if (function_exists('wps_pf_pr_filter_register')) {
54
  wp_dequeue_script('wpspf-main-js-3');
55
  }
 
 
 
56
  add_action('admin_notices', 'ampforwp_dev_mode_notice');
57
  add_action('admin_notices', 'ampforwp_plugins_manager_notice');
58
  add_action('admin_notices', 'ampforwp_ampwptheme_notice');
53
  if (function_exists('wps_pf_pr_filter_register')) {
54
  wp_dequeue_script('wpspf-main-js-3');
55
  }
56
+ if (function_exists('aeccglobal_setup')) {
57
+ remove_action( 'admin_footer', 'js_update_show_in_slider' );
58
+ }
59
  add_action('admin_notices', 'ampforwp_dev_mode_notice');
60
  add_action('admin_notices', 'ampforwp_plugins_manager_notice');
61
  add_action('admin_notices', 'ampforwp_ampwptheme_notice');
includes/features/performance/performance-functions.php CHANGED
@@ -46,6 +46,9 @@ function ampforwp_minify_html_output($content_buffer){
46
  if(preg_match('/<form(.*?)for="categories-dropdown-(.*?)"(.*?)class="postform(.*?)>/', $content_buffer)){
47
  $content_buffer = preg_replace('/<form(.*?)for="categories-dropdown-(.*?)"(.*?)class="postform(.*?)>/', '<form id="amp-wp-widget-categories-1" on="change:amp-wp-widget-categories-1.submit" $1for="categories-dropdown-$2"$3class="postform$4>', $content_buffer);
48
  }
 
 
 
49
  global $redux_builder_amp;
50
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
51
  return $content_buffer;
46
  if(preg_match('/<form(.*?)for="categories-dropdown-(.*?)"(.*?)class="postform(.*?)>/', $content_buffer)){
47
  $content_buffer = preg_replace('/<form(.*?)for="categories-dropdown-(.*?)"(.*?)class="postform(.*?)>/', '<form id="amp-wp-widget-categories-1" on="change:amp-wp-widget-categories-1.submit" $1for="categories-dropdown-$2"$3class="postform$4>', $content_buffer);
48
  }
49
+ if (function_exists('aioseo_pro_just_activated') && preg_match('/<link rel="canonical" href="([^>]*)\/amp\/" \/>/', $content_buffer)) {
50
+ $content_buffer = preg_replace('/<link rel="canonical" href="([^>]*)\/amp\/" \/>/','<link rel="canonical" href="$1/" />', $content_buffer);
51
+ }
52
  global $redux_builder_amp;
53
  if(!$redux_builder_amp['ampforwp_cache_minimize_mode']){
54
  return $content_buffer;
includes/options/admin-config.php CHANGED
@@ -699,6 +699,18 @@ $extension_listing_array = array(
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',
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'=>'Recipe Compatibility for AMP',
704
+ 'class'=>'new-ext',
705
+ 'desc'=>'Add Recipes Support in AMP',
706
+ 'img_src'=>AMPFORWP_IMAGE_DIR . '/recipe-compatibility-for-amp.png',
707
+ 'price'=>'$39',
708
+ 'url_link'=>'https://ampforwp.com/addons/recipe-compatibility-for-amp/',
709
+ 'plugin_active_path'=> 'recipe-compatibility-for-amp/recipe-compatibility-for-amp.php',
710
+ 'item_name'=>'Recipe Compatibility for AMP',
711
+ 'store_url'=>'https://accounts.ampforwp.com',
712
+ 'is_activated'=>(is_plugin_active('recipe-compatibility-for-amp/recipe-compatibility-for-amp.php')? 1 : 2),
713
+ ),
714
  array(
715
  'name'=>'Polls for AMP',
716
  'class'=>'new-ext',
includes/thirdparty-compatibility.php CHANGED
@@ -1253,4 +1253,30 @@ function ampforwp_show_yoast_seo_local_map($content){
1253
  function ampforwp_final_tiles_grid_gallery($mobile){
1254
  $mobile = false;
1255
  return $mobile;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1256
  }
1253
  function ampforwp_final_tiles_grid_gallery($mobile){
1254
  $mobile = false;
1255
  return $mobile;
1256
+ }
1257
+ if(!function_exists('ampforwp_category_image_compatibility')){
1258
+ function ampforwp_category_image_compatibility($type='',$class=''){
1259
+ $cat_image = '';
1260
+ if(function_exists('z_taxonomy_image_url')){
1261
+ $cat_url = z_taxonomy_image_url();
1262
+ $r_width = 220;
1263
+ $r_height = 134;
1264
+ if(function_exists('ampforwp_get_retina_image_settings')){
1265
+ $ret_config = ampforwp_get_retina_image_settings(intval($r_width),intval($r_height));
1266
+ $r_width = intval($ret_config['width']);
1267
+ $r_height = intval($ret_config['height']);
1268
+ }
1269
+ if (!empty($cat_url)) {
1270
+ $cat_image = '<div class="'.esc_attr($class).'"><amp-img src="'.esc_url($cat_url).'" width="'.intval($r_width).'" height="'.intval($r_height).'" layout="fixed"></amp-img></div>';
1271
+ }
1272
+ }
1273
+ if($type==''){
1274
+ $type='echo';
1275
+ }
1276
+ if($type=='return'){
1277
+ return $cat_image;
1278
+ }else if($type=='echo'){
1279
+ echo $cat_image;
1280
+ }
1281
+ }
1282
  }
includes/vendor/amp/includes/embeds/class-amp-facebook-embed.php CHANGED
@@ -11,15 +11,15 @@ class AMP_Facebook_Embed_Handler extends AMP_Base_Embed_Handler {
11
  protected $DEFAULT_WIDTH = 600;
12
  protected $DEFAULT_HEIGHT = 400;
13
 
14
- private static $script_slug = 'amp-facebook';
15
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-facebook-0.1.js';
16
 
17
  public function register_embed() {
18
- wp_embed_register_handler( 'amp-facebook', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
19
  }
20
 
21
  public function unregister_embed() {
22
- wp_embed_unregister_handler( 'amp-facebook', -1 );
23
  }
24
 
25
  public function get_scripts() {
@@ -52,6 +52,6 @@ class AMP_Facebook_Embed_Handler extends AMP_Base_Embed_Handler {
52
  );
53
  $attrs = ampforwp_amp_consent_check( $attrs );
54
 
55
- return AMP_HTML_Utils::build_tag('amp-facebook',$attrs);
56
  }
57
  }
11
  protected $DEFAULT_WIDTH = 600;
12
  protected $DEFAULT_HEIGHT = 400;
13
 
14
+ private static $script_slug = 'amp-facebook-page';
15
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-facebook-page-0.1.js';
16
 
17
  public function register_embed() {
18
+ wp_embed_register_handler( 'amp-facebook-page', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
19
  }
20
 
21
  public function unregister_embed() {
22
+ wp_embed_unregister_handler( 'amp-facebook-page', -1 );
23
  }
24
 
25
  public function get_scripts() {
52
  );
53
  $attrs = ampforwp_amp_consent_check( $attrs );
54
 
55
+ return AMP_HTML_Utils::build_tag('amp-facebook-page',$attrs);
56
  }
57
  }
includes/vendor/aq_resizer.php CHANGED
@@ -289,6 +289,9 @@ if(!function_exists('ampforwp_aq_resize')) {
289
  // Disable ampforwp_aq_resize and return images without compressing.
290
  // Useful for some who wants to disable when using CDN images
291
  $disable_aq_resize = false;
 
 
 
292
  $disable_aq_resize = apply_filters('ampforwp_disable_aq_resize', $disable_aq_resize, $url);
293
  if (true === $disable_aq_resize ){
294
  return $image = array(
289
  // Disable ampforwp_aq_resize and return images without compressing.
290
  // Useful for some who wants to disable when using CDN images
291
  $disable_aq_resize = false;
292
+ if (function_exists('imagify_set_activation')) {
293
+ $disable_aq_resize = true;
294
+ }
295
  $disable_aq_resize = apply_filters('ampforwp_disable_aq_resize', $disable_aq_resize, $url);
296
  if (true === $disable_aq_resize ){
297
  return $image = array(
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.6
7
- Stable tag: 1.0.71.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -190,44 +190,20 @@ You can contact us from [here](https://ampforwp.com/contact/)
190
 
191
  == Changelog ==
192
 
 
 
 
 
 
 
 
 
 
 
193
  = 1.0.71.2 (12th December 2020) =
194
  * Fixed: Incorrect AMPHTML on homepage with ?amp #4865
195
 
196
  = 1.0.71.1 (10th December 2020) =
197
  * Fixed: Validation error in author bio alt attribute #4864
198
 
199
- = 1.0.71 (10th December 2020) =
200
- * Fixed: AMP Page builder accordion not working in 1.0.70 #4862
201
- * Fixed: Category name in the dropdown not redirecting and AMP Sidebar alignment #4861
202
- * Fixed: AMP Sidebar Menu Remains Open After Browser Back in Firefox and Safari #4840
203
- * Fixed: amp-auto-ads was found on this page, but is unused error #4851
204
- * Fixed: Amp option panel breaks in Product Filter For WooCommerce Product Plugin #4853
205
- * Fixed: ID attribute added inside the analytics section #4852
206
- * Fixed: Updated Facebook Messanger Icon #4859
207
- * Fixed: Heading elements added in blurb module of AMP page builder #4856
208
- * Fixed: Special characters are showing for post titles after sharing tweets #4850
209
-
210
- = 1.0.70 (7th December 2020) =
211
- * Improvement: Added filter to modify author bio description #4849
212
- * Improvement: Added LGDP (Brazil's GDPR) #4854
213
- * Fixed: Ads are displaying even GDPR popup is rejected #4843
214
- * Fixed: Role Based Access not working for SEO manager role in Yoast #4830
215
- * Fixed: Homepage url not redirecting to non-amp url with AMP takeover and ?amp #4826
216
- * Fixed: The amphtml not generating with the Hide By Default option in AMP Takeover #4824
217
- * Fixed: Undefined variable: allscripts #4846
218
- * Fixed: Breadcrumb bug in amp homepage #4827
219
- * Fixed: When the minify option is disabled then the WhatsApp share link has a space #4848
220
- * Fixed: Validation error when using web stories plugin #4847
221
- * Fixed: The background color of feature module of layout2 is not getting applied #4835
222
- * Fixed: Canonical and meta description errors in All in one SEO PRO #4829
223
- * Fixed: Avatar image doesn't have alt attribute #4836
224
- * Fixed: AMP posts are redirecting to the 404 page when post id is added in permalink #4842
225
- * Fixed: The amphtml not generating on the custom taxonomy and the custom post types #4841
226
-
227
- = 1.0.69.2 (27th November 2020) =
228
- * Fixed: Improvements in offer banner #4833
229
-
230
- = 1.0.69.1 (25th November 2020) =
231
- * Fixed: amp-story-player was found on this page, but is unused. #4839
232
-
233
  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.6
7
+ Stable tag: 1.0.72
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.72 (17th December 2020) =
194
+ * Improvement: Added i2Pros and cons plugin compatibility #4837
195
+ * Improvement: Added WP-PageNavi plugin compatibility #4831
196
+ * Improvement: Added Categories Images plugin compatibility #3973
197
+ * Improvement: Added webp images on the homepage and Archives with Imagify plugin #4725
198
+ * Improvement: Added Recipe Compatibility for AMP Extension #4868
199
+ * Fixed: Amp option panel breaks when AECC Global Theme is activated. #4863
200
+ * Fixed: Facebook page embed fails #4871
201
+ * Fixed: Referenced AMP URL is self-canonical AMP while using All in One Seo #4873
202
+
203
  = 1.0.71.2 (12th December 2020) =
204
  * Fixed: Incorrect AMPHTML on homepage with ?amp #4865
205
 
206
  = 1.0.71.1 (10th December 2020) =
207
  * Fixed: Validation error in author bio alt attribute #4864
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-1/archive.php CHANGED
@@ -68,7 +68,9 @@ global $redux_builder_amp, $wp; ?>
68
  }else{
69
  the_archive_title( '<h2 class="page-title">', '</h2>' );
70
  }
71
-
 
 
72
  $arch_desc = $sanitizer->get_amp_content();
73
  if( $arch_desc ) {
74
  if ( get_query_var( 'paged' ) ) {
68
  }else{
69
  the_archive_title( '<h2 class="page-title">', '</h2>' );
70
  }
71
+ if(function_exists('ampforwp_category_image_compatibility')){
72
+ ampforwp_category_image_compatibility('echo','amp-wp-content taxonomy-image');
73
+ }
74
  $arch_desc = $sanitizer->get_amp_content();
75
  if( $arch_desc ) {
76
  if ( get_query_var( 'paged' ) ) {
templates/design-manager/design-1/index.php CHANGED
@@ -103,11 +103,16 @@ if ( ! defined( 'ABSPATH' ) ) {
103
  endwhile; ?>
104
  <?php do_action('ampforwp_loop_before_pagination') ?>
105
  <div class="amp-wp-content pagination-holder">
 
 
 
 
106
  <div id="pagination">
107
  <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link', get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ).'&raquo;', 0), $paged ) ?></div><?php }?>
108
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )), $paged ); ?></div><?php }?>
109
  <div class="clearfix"></div>
110
  </div>
 
111
  </div>
112
 
113
  <?php endif; ?>
103
  endwhile; ?>
104
  <?php do_action('ampforwp_loop_before_pagination') ?>
105
  <div class="amp-wp-content pagination-holder">
106
+ <?php
107
+ if (function_exists('wp_pagenavi')) {
108
+ wp_pagenavi();
109
+ }else{?>
110
  <div id="pagination">
111
  <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link', get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ).'&raquo;', 0), $paged ) ?></div><?php }?>
112
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )), $paged ); ?></div><?php }?>
113
  <div class="clearfix"></div>
114
  </div>
115
+ <?php } ?>
116
  </div>
117
 
118
  <?php endif; ?>
templates/design-manager/design-1/style.php CHANGED
@@ -172,6 +172,7 @@ echo sanitize_text_field($fontFamily); // secondary font family ends here ?>
172
  .amp-disqus-comments { text-align:center } .amp-disqus-comments {padding: 15px;}.amp-disqus-comments amp-iframe{background: none;} <?php
173
  } ?>
174
  .wp-caption {padding: 0;}.wp-caption.alignleft {margin-right: 16px;}.wp-caption.alignright { margin-left: 16px;}figcaption ,.wp-caption-text {border-bottom: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;} amp-carousel {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em;} amp-iframe,amp-youtube,amp-instagram,amp-vine {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em; } .amp-wp-article-content amp-carousel amp-img {border: none;} amp-carousel > amp-img > img {object-fit: contain; } .amp-wp-iframe-placeholder { background: <?php echo sanitize_hex_color( $border_color ); ?> url( <?php echo esc_url( $get_customizer->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;background-size: 48px 48px;min-height: 48px;} .amp-wp-article-footer .amp-wp-meta {display: block;} .amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; } .amp-wp-tags li{display:inline; padding-left: 5px; } .amp-wp-tax-category span{margin-right:5px;} .amp-wp-tax-category, .amp-wp-tax-tag { color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 1.5em 16px;}.ampforwp-comment-button {margin-bottom:20px;} .amp-wp-comments-link {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;text-align: center;margin: 2.25em 0 1.5em;} .amp-wp-comments-link a { border-style: solid;border-color: <?php echo sanitize_hex_color( $border_color ); ?>;border-width: 1px 1px 2px;border-radius: 4px;background-color: transparent;color: <?php echo sanitize_hex_color( $link_color ); ?>;cursor: pointer; display: block;font-size: 14px;font-weight: 600;line-height: 18px;margin: 0 auto;max-width: 200px;padding: 11px 16px;text-decoration: none;width: 50%;-webkit-transition: background-color 0.2s ease;transition: background-color 0.2s ease;} .page-title {margin: 0 15px; font-size: 1.17em; }.amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 1.5em 10px 1.5em;} .author-archive amp-img{border-radius: 50%;margin: 0px 8px 10px;display: block;}.author-archive{float: left;} .amp-wp-content.taxonomy-description{margin: 0 15px;}
 
175
  <?php } // AMP Woocommerce CSS Ends ?>
176
 
177
  /** Footer CSS **/
172
  .amp-disqus-comments { text-align:center } .amp-disqus-comments {padding: 15px;}.amp-disqus-comments amp-iframe{background: none;} <?php
173
  } ?>
174
  .wp-caption {padding: 0;}.wp-caption.alignleft {margin-right: 16px;}.wp-caption.alignright { margin-left: 16px;}figcaption ,.wp-caption-text {border-bottom: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 0;padding: .66em 10px .75em;text-align: center;} amp-carousel {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em;} amp-iframe,amp-youtube,amp-instagram,amp-vine {background: <?php echo sanitize_hex_color( $border_color ); ?>;margin: 0 -16px 1.5em; } .amp-wp-article-content amp-carousel amp-img {border: none;} amp-carousel > amp-img > img {object-fit: contain; } .amp-wp-iframe-placeholder { background: <?php echo sanitize_hex_color( $border_color ); ?> url( <?php echo esc_url( $get_customizer->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;background-size: 48px 48px;min-height: 48px;} .amp-wp-article-footer .amp-wp-meta {display: block;} .amp-wp-tags{ list-style-type: none; padding: 0; margin: 0 0 9px 0; display: inline-flex; } .amp-wp-tags li{display:inline; padding-left: 5px; } .amp-wp-tax-category span{margin-right:5px;} .amp-wp-tax-category, .amp-wp-tax-tag { color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;margin: 1.5em 16px;}.ampforwp-comment-button {margin-bottom:20px;} .amp-wp-comments-link {color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;font-size: .875em;line-height: 1.5em;text-align: center;margin: 2.25em 0 1.5em;} .amp-wp-comments-link a { border-style: solid;border-color: <?php echo sanitize_hex_color( $border_color ); ?>;border-width: 1px 1px 2px;border-radius: 4px;background-color: transparent;color: <?php echo sanitize_hex_color( $link_color ); ?>;cursor: pointer; display: block;font-size: 14px;font-weight: 600;line-height: 18px;margin: 0 auto;max-width: 200px;padding: 11px 16px;text-decoration: none;width: 50%;-webkit-transition: background-color 0.2s ease;transition: background-color 0.2s ease;} .page-title {margin: 0 15px; font-size: 1.17em; }.amp-sub-archives li{width: 50%;} .amp-sub-archives ul{padding: 0;list-style: none;display: flex;font-size: 12px;line-height: 1.2;margin: 5px 1.5em 10px 1.5em;} .author-archive amp-img{border-radius: 50%;margin: 0px 8px 10px;display: block;}.author-archive{float: left;} .amp-wp-content.taxonomy-description{margin: 0 15px;}
175
+ .amp-wp-content.taxonomy-image{margin: 15px 15px 0px 15px;}
176
  <?php } // AMP Woocommerce CSS Ends ?>
177
 
178
  /** Footer CSS **/
templates/design-manager/design-2/archive.php CHANGED
@@ -72,6 +72,9 @@ if ( ! defined( 'ABSPATH' ) ) {
72
  }else{
73
  the_archive_title( '<h2 class="page-title">', '</h2>' );
74
  }
 
 
 
75
  $arch_desc = $sanitizer->get_amp_content();
76
  if( $arch_desc ) {
77
  if ( get_query_var( 'paged' ) ) {
72
  }else{
73
  the_archive_title( '<h2 class="page-title">', '</h2>' );
74
  }
75
+ if(function_exists('ampforwp_category_image_compatibility')){
76
+ ampforwp_category_image_compatibility('echo','amp-wp-content taxonomy-image');
77
+ }
78
  $arch_desc = $sanitizer->get_amp_content();
79
  if( $arch_desc ) {
80
  if ( get_query_var( 'paged' ) ) {
templates/design-manager/design-2/index.php CHANGED
@@ -106,11 +106,16 @@ if ( ! defined( 'ABSPATH' ) ) {
106
  endwhile; ?>
107
  <?php do_action('ampforwp_loop_before_pagination') ?>
108
  <div class="amp-wp-content pagination-holder">
 
 
 
 
109
  <div id="pagination">
110
  <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ).'&raquo;', 0), $paged);?></div><?php }?>
111
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )), $paged ); ?></div><?php }?>
112
  <div class="clearfix"></div>
113
  </div>
 
114
  </div>
115
 
116
  <?php endif; ?>
106
  endwhile; ?>
107
  <?php do_action('ampforwp_loop_before_pagination') ?>
108
  <div class="amp-wp-content pagination-holder">
109
+ <?php
110
+ if (function_exists('wp_pagenavi')) {
111
+ wp_pagenavi();
112
+ }else{?>
113
  <div id="pagination">
114
  <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Next' ).'&raquo;', 0), $paged);?></div><?php }?>
115
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Previous' )), $paged ); ?></div><?php }?>
116
  <div class="clearfix"></div>
117
  </div>
118
+ <?php } ?>
119
  </div>
120
 
121
  <?php endif; ?>
templates/design-manager/design-2/style.php CHANGED
@@ -277,7 +277,7 @@ main { padding: 30px 15% 10px 15%; }
277
  <?php } ?>
278
  .amp-wp-content.widget-wrapper{padding:12px 10px 10px 10px;}
279
  main .amp-wp-content{ margin-bottom: 12px; padding: 15px; }
280
- .amp-loop-list, .featured-image-content, .the_content, .taxonomy-description{background: #fff; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05);}
281
  .home-post_image{ float: right; margin-left: 15px; margin-bottom: -6px; }
282
  .amp-wp-title{ margin-top: 0px; }
283
  h2.amp-wp-title , h3.amp-wp-title{ line-height: 30px; }
277
  <?php } ?>
278
  .amp-wp-content.widget-wrapper{padding:12px 10px 10px 10px;}
279
  main .amp-wp-content{ margin-bottom: 12px; padding: 15px; }
280
+ .amp-loop-list, .featured-image-content, .the_content, .taxonomy-description, .taxonomy-image{background: #fff; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05);}
281
  .home-post_image{ float: right; margin-left: 15px; margin-bottom: -6px; }
282
  .amp-wp-title{ margin-top: 0px; }
283
  h2.amp-wp-title , h3.amp-wp-title{ line-height: 30px; }
templates/design-manager/design-3/archive.php CHANGED
@@ -96,6 +96,9 @@ if ( get_query_var( 'paged' ) ) {
96
  }else{
97
  the_archive_title( '<h2 class="amp-wp-content page-title archive-heading">', '</h2>' );
98
  }
 
 
 
99
  $arch_desc = $sanitizer->get_amp_content();
100
  if( $arch_desc ) {
101
  if($paged <= '1' && ampforwp_get_setting('ampforwp-cat-description')) {?>
96
  }else{
97
  the_archive_title( '<h2 class="amp-wp-content page-title archive-heading">', '</h2>' );
98
  }
99
+ if(function_exists('ampforwp_category_image_compatibility')){
100
+ ampforwp_category_image_compatibility('echo','taxonomy-image');
101
+ }
102
  $arch_desc = $sanitizer->get_amp_content();
103
  if( $arch_desc ) {
104
  if($paged <= '1' && ampforwp_get_setting('ampforwp-cat-description')) {?>
templates/design-manager/design-3/index.php CHANGED
@@ -218,12 +218,16 @@ if ( get_query_var( 'paged' ) ) {
218
  endwhile; ?>
219
  <?php do_action('ampforwp_loop_before_pagination') ?>
220
  <div class="amp-wp-content pagination-holder">
221
-
 
 
 
222
  <div id="pagination">
223
  <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Show more Posts' ).'&raquo;', 0), $paged);?></div><?php }?>
224
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Show Previous Posts' )), $paged ); ?></div><?php }?>
225
  <div class="clearfix"></div>
226
  </div>
 
227
  </div>
228
 
229
  <?php endif; ?>
218
  endwhile; ?>
219
  <?php do_action('ampforwp_loop_before_pagination') ?>
220
  <div class="amp-wp-content pagination-holder">
221
+ <?php
222
+ if (function_exists('wp_pagenavi')) {
223
+ wp_pagenavi();
224
+ }else{?>
225
  <div id="pagination">
226
  <?php if ( get_next_posts_link('next', $q->max_num_pages) ){ ?><div class="next"><?php echo apply_filters('ampforwp_next_posts_link',get_next_posts_link( ampforwp_translation($redux_builder_amp['amp-translator-next-text'], 'Show more Posts' ).'&raquo;', 0), $paged);?></div><?php }?>
227
  <?php if ( get_previous_posts_link() ){ ?><div class="prev"><?php echo apply_filters( 'ampforwp_previous_posts_link', get_previous_posts_link( '&laquo; '. ampforwp_translation($redux_builder_amp['amp-translator-previous-text'], 'Show Previous Posts' )), $paged ); ?></div><?php }?>
228
  <div class="clearfix"></div>
229
  </div>
230
+ <?php } ?>
231
  </div>
232
 
233
  <?php endif; ?>
templates/design-manager/design-3/style.php CHANGED
@@ -605,7 +605,7 @@ amp-user-notification button{ padding: 8px 10px; background: #000; color: #fff;
605
  amp-user-notification button:hover{ cursor: pointer }
606
  .amp-not-privacy{color:<?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;text-decoration: none;font-size: 15px;margin-left: 2px;}
607
  <?php } ?>
608
- .archive-heading,.taxonomy-description{padding: 10px 15px 0 15px;}
609
  /* Responsive */
610
  @media screen and (min-width: 650px) { table {display: inline-table;} }
611
  @media screen and (max-width: 768px){ .amp-wp-meta{ margin:10px 0px 15px 0px } .home-post_image{ width: 40%; } .amp-loop-list .amp-wp-post-content{ width: 58%; } .amp-loop-list .featured_time{line-height:1} .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;} }
605
  amp-user-notification button:hover{ cursor: pointer }
606
  .amp-not-privacy{color:<?php echo ampforwp_get_setting('amp-opt-color-rgba-colorscheme','color','ampforwp_sanitize_color'); ?>;text-decoration: none;font-size: 15px;margin-left: 2px;}
607
  <?php } ?>
608
+ .archive-heading,.taxonomy-description,.taxonomy-image{padding: 10px 15px 0 15px;}
609
  /* Responsive */
610
  @media screen and (min-width: 650px) { table {display: inline-table;} }
611
  @media screen and (max-width: 768px){ .amp-wp-meta{ margin:10px 0px 15px 0px } .home-post_image{ width: 40%; } .amp-loop-list .amp-wp-post-content{ width: 58%; } .amp-loop-list .featured_time{line-height:1} .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;} }
templates/design-manager/swift/style.php CHANGED
@@ -473,7 +473,7 @@ height:<?php echo esc_html($fimg_height).'px';?>;width:<?php echo esc_html($fimg
473
  .pt-dt{font-size:11px;color:#757575;margin: 8px 0px 0px 0px;display: inline-flex;}
474
  .arch-tlt{margin:30px 0px 30px;display:inline-block;width:100%;}
475
  .amp-archive-title, .amp-loop-label{font-weight:600;}
476
- .amp-archive-desc{font-size: 14px;margin:8px 0px 0px 0px;color: #333;line-height:20px;}
477
  .author-img amp-img {border-radius: 50%;margin: 0px 12px 10px 0px;display: block; width:50px;}
478
  .author-img{float: left;}
479
  .amp-sub-archives{margin:10px 0px 0px 10px;}
473
  .pt-dt{font-size:11px;color:#757575;margin: 8px 0px 0px 0px;display: inline-flex;}
474
  .arch-tlt{margin:30px 0px 30px;display:inline-block;width:100%;}
475
  .amp-archive-title, .amp-loop-label{font-weight:600;}
476
+ .amp-archive-desc , .amp-archive-image{font-size: 14px;margin:8px 0px 0px 0px;color: #333;line-height:20px;}
477
  .author-img amp-img {border-radius: 50%;margin: 0px 12px 10px 0px;display: block; width:50px;}
478
  .author-img{float: left;}
479
  .amp-sub-archives{margin:10px 0px 0px 10px;}
templates/features.php CHANGED
@@ -9159,4 +9159,69 @@ function ampforwp_sanitize_twitter_title($post_title){
9159
  $post_title = rawurlencode( $post_title );
9160
  $post_title = esc_html( $post_title );
9161
  return $post_title;
9162
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9159
  $post_title = rawurlencode( $post_title );
9160
  $post_title = esc_html( $post_title );
9161
  return $post_title;
9162
+ }
9163
+ if (function_exists('i2_pros_cons_setup')) {
9164
+ add_action('amp_post_template_css','ampforwp_i2prosandcons');
9165
+ }
9166
+ function ampforwp_i2prosandcons(){
9167
+ $options = get_option( 'i2_pros_and_cons');
9168
+ $prosHeadingBackground = $options['pros_heading_background'];
9169
+ $consHeadingBackground = $options['cons_heading_background'];
9170
+ $prosBackground = $options['pros_background'];
9171
+ $consBackground = $options['cons_background'];
9172
+ $headingFontSize = $options['heading_font_size'];
9173
+ $sectionFontSize = $options['body_font_size'];
9174
+ $headingColor = $options['heading_color'];
9175
+ $sectionColor = $options['body_color'];?>
9176
+ .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper {
9177
+ display: table;
9178
+ width: 100%;
9179
+ }
9180
+ .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper .i2-pros, .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper .i2-cons {
9181
+ display: table-cell;
9182
+ width: 50%;
9183
+ margin-bottom: 15px;
9184
+ position: relative;
9185
+ }
9186
+ .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper .i2-pros .i2-pros-title, .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper .i2-pros .i2-cons-title, .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper .i2-cons .i2-pros-title, .i2-pros-cons-main-wrapper .i2-pros-cons-wrapper .i2-cons .i2-cons-title {
9187
+ padding: 5px 15px 5px;
9188
+ margin: 0px;
9189
+ display: block;
9190
+ }
9191
+ .i2-pros-cons-wrapper .i2-pros-title {
9192
+ background-color:<?php echo ampforwp_sanitize_color($prosHeadingBackground); ?>;
9193
+ font-size:<?php echo esc_html($headingFontSize); ?>px;
9194
+ }
9195
+ .i2-pros-cons-wrapper .i2-cons-title, .i2-pros-cons-wrapper .i2-pros-title {
9196
+ color: #ffffff!important;
9197
+ font-size:<?php echo esc_html($headingFontSize); ?>px;
9198
+ }
9199
+ .i2-pros {
9200
+ background-color: <?php echo ampforwp_sanitize_color($prosBackground); ?>;
9201
+ }
9202
+ .i2-cons{
9203
+ background-color: <?php echo ampforwp_sanitize_color($consBackground); ?>;
9204
+ }
9205
+ .i2-pros-cons-wrapper ul li{
9206
+ font-size:<?php echo esc_html($sectionFontSize); ?>px;
9207
+ }
9208
+ .artl-cnt ul li:before {
9209
+ content: "\e315";
9210
+ display: inline-block;
9211
+ width: 0;
9212
+ background: #333;
9213
+ position: absolute;
9214
+ top: 0px;
9215
+ left: 0px;
9216
+ font-family: 'icomoon';
9217
+ }
9218
+ .i2-pros-cons-wrapper .i2-cons-title {
9219
+ background-color: <?php echo ampforwp_sanitize_color($consHeadingBackground); ?>;
9220
+ }
9221
+ .i2-pros-cons-wrapper .i2-pros, .i2-pros-cons-wrapper .i2-cons{
9222
+ color: <?php echo ampforwp_sanitize_color($sectionColor); ?>;
9223
+ }
9224
+ .i2-pros-cons-wrapper .i2-cons-title, .i2-pros-cons-wrapper .i2-pros-title {
9225
+ color: <?php echo ampforwp_sanitize_color($headingColor); ?>;
9226
+ }
9227
+ <?php }