AMP for WP – Accelerated Mobile Pages - Version 1.0.77.31

Version Description

Download this release

Release Info

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

Code changes from version 1.0.77.30 to 1.0.77.31

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
- Stable tag: 1.0.77.30
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -197,6 +197,11 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
197
 
198
  == Changelog ==
199
 
 
 
 
 
 
200
  1.0.77.30 (25th November 2021) =
201
  * Improvements: Added Filter to modify title in AMP #5170
202
  * Fixed: Whitelisted amp-render tag #5171
@@ -210,12 +215,4 @@ Improvements: Search results opens directly in Google search in AMP #5161
210
  Fixed: Undefined variable - pathExploded debug notice #5160
211
  Fixed: ID has been getting removed from the amp-img tag #5163
212
 
213
- 1.0.77.28 (28TH October 2021) =
214
- Improvements: License code improved #5151
215
- Fixed: Default Gravatar not appearing with FV Gravatar Cache #5149
216
- Fixed: Featured image not appearing with Offload Media Lite #5153
217
- Fixed: Function name updated in the seo framework #5155
218
- Fixed: Lifetime license key is showing as expired in admin panel #5156
219
- Fixed: Video is not loading when created by slider revolution with divi #5159
220
-
221
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 1.0.77.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
197
 
198
  == Changelog ==
199
 
200
+ 1.0.77.31 (7th December 2021) =
201
+ * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
202
+ * Fixed: PHP Notice: Undefined index: rgba #5175
203
+ * Fixed: Optional added for font display in google fonts #5176
204
+
205
  1.0.77.30 (25th November 2021) =
206
  * Improvements: Added Filter to modify title in AMP #5170
207
  * Fixed: Whitelisted amp-render tag #5171
215
  Fixed: Undefined variable - pathExploded debug notice #5160
216
  Fixed: ID has been getting removed from the amp-img tag #5163
217
 
 
 
 
 
 
 
 
 
218
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.77.30
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','1.0.77.30');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 1.0.77.31
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','1.0.77.31');
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,10 @@
1
  == Changelog ==
2
 
 
 
 
 
 
3
  1.0.77.30 (25th November 2021) =
4
  * Improvements: Added Filter to modify title in AMP #5170
5
  * Fixed: Whitelisted amp-render tag #5171
1
  == Changelog ==
2
 
3
+ 1.0.77.31 (7th December 2021) =
4
+ * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
5
+ * Fixed: PHP Notice: Undefined index: rgba #5175
6
+ * Fixed: Optional added for font display in google fonts #5176
7
+
8
  1.0.77.30 (25th November 2021) =
9
  * Improvements: Added Filter to modify title in AMP #5170
10
  * Fixed: Whitelisted amp-render tag #5171
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
- Stable tag: 1.0.77.30
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,11 @@ You can contact us from [here](https://ampforwp.com/contact/)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
197
  1.0.77.30 (25th November 2021) =
198
  * Improvements: Added Filter to modify title in AMP #5170
199
  * Fixed: Whitelisted amp-render tag #5171
@@ -207,12 +212,4 @@ Improvements: Search results opens directly in Google search in AMP #5161
207
  Fixed: Undefined variable - pathExploded debug notice #5160
208
  Fixed: ID has been getting removed from the amp-img tag #5163
209
 
210
- 1.0.77.28 (28TH October 2021) =
211
- Improvements: License code improved #5151
212
- Fixed: Default Gravatar not appearing with FV Gravatar Cache #5149
213
- Fixed: Featured image not appearing with Offload Media Lite #5153
214
- Fixed: Function name updated in the seo framework #5155
215
- Fixed: Lifetime license key is showing as expired in admin panel #5156
216
- Fixed: Video is not loading when created by slider revolution with divi #5159
217
-
218
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.8
7
+ Stable tag: 1.0.77.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ 1.0.77.31 (7th December 2021) =
198
+ * Fixed: Uncaught ValueError - DOMDocument::loadHTML() Error #5174
199
+ * Fixed: PHP Notice: Undefined index: rgba #5175
200
+ * Fixed: Optional added for font display in google fonts #5176
201
+
202
  1.0.77.30 (25th November 2021) =
203
  * Improvements: Added Filter to modify title in AMP #5170
204
  * Fixed: Whitelisted amp-render tag #5171
212
  Fixed: Undefined variable - pathExploded debug notice #5160
213
  Fixed: ID has been getting removed from the amp-img tag #5163
214
 
 
 
 
 
 
 
 
 
215
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/swift/style.php CHANGED
@@ -1535,7 +1535,7 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
1535
  .f-menu ul li a {padding:0;color:#575656;}
1536
  .f-menu ul > li:hover a{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
1537
  .f-menu{font-size:14px;line-height:1.4;margin-bottom:30px;}
1538
- .rr{font-size: 12px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-txt-clr']['rgba']) ?>;}
1539
  .rr span{margin:0 10px 0 0px}
1540
  .f-menu ul li.menu-item-has-children:hover > ul{display:none;}
1541
  .f-menu ul li.menu-item-has-children:after{display:none;}
@@ -1636,8 +1636,8 @@ if( isset($redux_builder_amp['footer-customize-options']) && true == $redux_bui
1636
  <?php } ?>
1637
  font-size: <?php echo esc_html(ampforwp_get_setting('swift-footer1-cntnsize'))?>;
1638
  line-height: 1.5;
1639
- <?php if( $redux_builder_amp['swift-footer-txt-clr']['rgba'] ) {?>
1640
- color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-txt-clr']['rgba']) ?>;
1641
  <?php } ?>
1642
  }
1643
  .w-bl h4{
@@ -1694,7 +1694,7 @@ if( isset($redux_builder_amp['footer-customize-options']) && true == $redux_bui
1694
  .rr{
1695
  display:inline-block;
1696
  float:left;
1697
- color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-txt-clr']['rgba']) ?>;
1698
  }
1699
  @media(max-width:768px){
1700
  .f-menu{
@@ -1713,7 +1713,7 @@ else{ // Default Footer CSS ?>
1713
  .f-menu {font-size: 14px;line-height: 1.4;margin-bottom: 30px;}
1714
  .f-menu ul li {display: inline-block;margin-right: 20px;}
1715
  .f-menu .sub-menu{display:none;}
1716
- .rr{font-size:13px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-footer-txt-clr']['rgba']) ?>;}
1717
  <?php } // If advanced footer is disabled Default Footer CSS will be load ?>
1718
  @media(max-width:768px){
1719
  .footer {margin-top: 60px;}
1535
  .f-menu ul li a {padding:0;color:#575656;}
1536
  .f-menu ul > li:hover a{color: <?php echo ampforwp_sanitize_color($hovercolor); ?>;}
1537
  .f-menu{font-size:14px;line-height:1.4;margin-bottom:30px;}
1538
+ .rr{font-size: 12px;color: <?php echo ampforwp_sanitize_color(ampforwp_get_setting('swift-footer-txt-clr','rgba')) ?>;}
1539
  .rr span{margin:0 10px 0 0px}
1540
  .f-menu ul li.menu-item-has-children:hover > ul{display:none;}
1541
  .f-menu ul li.menu-item-has-children:after{display:none;}
1636
  <?php } ?>
1637
  font-size: <?php echo esc_html(ampforwp_get_setting('swift-footer1-cntnsize'))?>;
1638
  line-height: 1.5;
1639
+ <?php if( ampforwp_get_setting('swift-footer-txt-clr','rgba') ) {?>
1640
+ color: <?php echo ampforwp_sanitize_color(ampforwp_get_setting('swift-footer-txt-clr','rgba')) ?>;
1641
  <?php } ?>
1642
  }
1643
  .w-bl h4{
1694
  .rr{
1695
  display:inline-block;
1696
  float:left;
1697
+ color: <?php echo ampforwp_sanitize_color(ampforwp_get_setting('swift-footer-txt-clr','rgba')) ?>;
1698
  }
1699
  @media(max-width:768px){
1700
  .f-menu{
1713
  .f-menu {font-size: 14px;line-height: 1.4;margin-bottom: 30px;}
1714
  .f-menu ul li {display: inline-block;margin-right: 20px;}
1715
  .f-menu .sub-menu{display:none;}
1716
+ .rr{font-size:13px;color: <?php echo ampforwp_sanitize_color(ampforwp_get_setting('swift-footer-txt-clr','rgba')) ?>;}
1717
  <?php } // If advanced footer is disabled Default Footer CSS will be load ?>
1718
  @media(max-width:768px){
1719
  .footer {margin-top: 60px;}
templates/features.php CHANGED
@@ -6061,7 +6061,7 @@ if ( ! function_exists( 'ampforwp_google_fonts_generator' ) ) {
6061
 
6062
  $font_output .= "@font-face { ";
6063
  $font_output .= "font-family: " . $redux_builder_amp['amp_font_selector']. ';' ;
6064
- $font_output .= "font-display: swap;";
6065
  $font_output .= "font-style: " . $font_style . ';';
6066
  $font_output .= "font-weight: " . $font_weight . ';' ;
6067
  $font_output .= "src: local('". $redux_builder_amp['amp_font_selector']." ".$font_local_weight." ".$font_local_type."'), local('". $redux_builder_amp['amp_font_selector']."-".$font_local_weight.$font_local_type."'), url(" .str_replace("http://", "https://", $font_data->files->$value) . ');' ;
@@ -8279,21 +8279,23 @@ if(class_exists('WPSEO_Options')){
8279
  add_filter('ampforwp_the_content_last_filter','ampforwp_remove_duplicate_canonical',25);
8280
  }
8281
  function ampforwp_remove_duplicate_canonical($content){
8282
- $comp_dom = new DOMDocument();
8283
- @$comp_dom->loadHTML($content);
8284
- $xpath = new DOMXPath( $comp_dom );
8285
- $count = 0;
8286
- $nodes = $xpath->query('//link[@rel="canonical"]');
8287
- $con = '';
8288
- foreach ($nodes as $node) {
8289
- $count++;
8290
- }
8291
- if($count>1){
8292
- if(preg_match("/<link\b[^>]*?\brel=[\'\"]canonical[\'\"][^>]*>/", $content, $matches, PREG_OFFSET_CAPTURE)){
8293
- $content = preg_replace("/<link\b[^>]*?\brel=[\'\"]canonical[\'\"][^>]*>/", "", $content);
8294
- $content = substr_replace($content, $matches[0][0], $matches[0][1], 0);
8295
- }
8296
- }
 
 
8297
  return $content;
8298
  }
8299
  // Font URL controller
6061
 
6062
  $font_output .= "@font-face { ";
6063
  $font_output .= "font-family: " . $redux_builder_amp['amp_font_selector']. ';' ;
6064
+ $font_output .= "font-display: optional;";
6065
  $font_output .= "font-style: " . $font_style . ';';
6066
  $font_output .= "font-weight: " . $font_weight . ';' ;
6067
  $font_output .= "src: local('". $redux_builder_amp['amp_font_selector']." ".$font_local_weight." ".$font_local_type."'), local('". $redux_builder_amp['amp_font_selector']."-".$font_local_weight.$font_local_type."'), url(" .str_replace("http://", "https://", $font_data->files->$value) . ');' ;
8279
  add_filter('ampforwp_the_content_last_filter','ampforwp_remove_duplicate_canonical',25);
8280
  }
8281
  function ampforwp_remove_duplicate_canonical($content){
8282
+ if( class_exists( 'DOMDocument' ) && ! empty( $content ) && is_string( $content ) ){
8283
+ $comp_dom = new DOMDocument();
8284
+ @$comp_dom->loadHTML($content);
8285
+ $xpath = new DOMXPath( $comp_dom );
8286
+ $count = 0;
8287
+ $nodes = $xpath->query('//link[@rel="canonical"]');
8288
+ $con = '';
8289
+ foreach ($nodes as $node) {
8290
+ $count++;
8291
+ }
8292
+ if($count>1){
8293
+ if(preg_match("/<link\b[^>]*?\brel=[\'\"]canonical[\'\"][^>]*>/", $content, $matches, PREG_OFFSET_CAPTURE)){
8294
+ $content = preg_replace("/<link\b[^>]*?\brel=[\'\"]canonical[\'\"][^>]*>/", "", $content);
8295
+ $content = substr_replace($content, $matches[0][0], $matches[0][1], 0);
8296
+ }
8297
+ }
8298
+ }
8299
  return $content;
8300
  }
8301
  // Font URL controller