AMP for WP – Accelerated Mobile Pages - Version 0.9.97.40

Version Description

(9th March 2019) = * Added: Smooth scrolling for anchors links and jumping links within a page #2062 * Added: Option to Enable/Disable Merriweather font in Design-1 * Fixed: External links are getting skipped #2862 * Fixed: Social Share LINE does not show up in swift theme #2641 * Fixed: Checkbox from menu listings in AMP theme framework #2618 * Fixed: PHP Warning undefined index fb-instant-page #2610 * Fixed: Instagram Posts not rendering in AMP #2629 * Fixed: Instant articles Image issue #2929 * Fixed: Default height & width values for amp-img when values are not set #2925

Full changelog available in changelog.txt

Download this release

Release Info

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

Code changes from version 0.9.97.39 to 0.9.97.40

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.1
7
- Stable tag: 0.9.97.39
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -185,6 +185,18 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  = 0.9.97.39 (5th March 2019) =
189
  * Added: Compatibility with the Author Simple Box Plugin #2268
190
  * Added: Compatibility when short codes are added in AMP widgets #2552
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
+ Stable tag: 0.9.97.40
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
185
 
186
  == Changelog ==
187
 
188
+ = 0.9.97.40 (9th March 2019) =
189
+ * Added: Smooth scrolling for anchors links and jumping links within a page #2062
190
+ * Added: Option to Enable/Disable Merriweather font in Design-1
191
+ * Fixed: External links are getting skipped #2862
192
+ * Fixed: Social Share “LINE” does not show up in swift theme #2641
193
+ * Fixed: Checkbox from menu listings in AMP theme framework #2618
194
+ * Fixed: PHP Warning undefined index fb-instant-page #2610
195
+ * Fixed: Instagram Posts not rendering in AMP #2629
196
+ * Fixed: Instant articles Image issue #2929
197
+ * Fixed: Default height & width values for amp-img when values are not set #2925
198
+
199
+
200
  = 0.9.97.39 (5th March 2019) =
201
  * Added: Compatibility with the Author Simple Box Plugin #2268
202
  * Added: Compatibility when short codes are added in AMP widgets #2552
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: 0.9.97.39
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','0.9.97.39');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
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: 0.9.97.40
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','0.9.97.40');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
changelog.txt CHANGED
@@ -1,5 +1,16 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 0.9.97.39 (5th March 2019) =
4
  * Added: Compatibility with the Author Simple Box Plugin #2268
5
  * Added: Compatibility when short codes are added in AMP widgets #2552
1
  == Changelog ==
2
 
3
+ = 0.9.97.40 (9th March 2019) =
4
+ * Added: Smooth scrolling for anchors links and jumping links within a page #2062
5
+ * Added: Option to Enable/Disable Merriweather font in Design-1
6
+ * Fixed: External links are getting skipped #2862
7
+ * Fixed: Social Share “LINE” does not show up in swift theme #2641
8
+ * Fixed: Checkbox from menu listings in AMP theme framework #2618
9
+ * Fixed: PHP Warning undefined index fb-instant-page #2610
10
+ * Fixed: Instagram Posts not rendering in AMP #2629
11
+ * Fixed: Instant articles Image issue #2929
12
+ * Fixed: Default height & width values for amp-img when values are not set #2925
13
+
14
  = 0.9.97.39 (5th March 2019) =
15
  * Added: Compatibility with the Author Simple Box Plugin #2268
16
  * Added: Compatibility when short codes are added in AMP widgets #2552
classes/class-ampforwp-instagram-sanitizer.php CHANGED
@@ -1,16 +1,13 @@
1
  <?php
2
- // Exit if accessed directly
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- }
6
 
7
  /**
8
  * Converts Instagram embeds to <amp-instagram>
9
  */
10
  class AMPFORWP_Instagram_Embed_Sanitizer extends AMP_Base_Sanitizer {
11
  private $instagram_medias = array();
 
12
  private static $script_slug = 'amp-instagram';
13
- private static $script_src = 'https://cdn.ampproject.org/v0/amp-instagram-0.1.js';
14
  public function sanitize() {
15
  $body = $this->get_body_node();
16
  $xpath = new \DOMXPath($this->dom);
@@ -27,9 +24,11 @@ function replace_with_amp_instagram ($instagram_media){
27
  $medias = $instagram_media->getElementsByTagName('a');
28
  if($medias->length > 0){
29
  $media = $medias->item(0);
 
30
  $href = $media->getAttribute('href');
31
- $explode = explode('/', rtrim($href, '/'));
32
- $sourcecode = end($explode);
 
33
  $tag = $this->create_instagram_tag($sourcecode);
34
  $this->instagram_medias[] = $tag; // add it to array
35
  $instagram_media->parentNode->replaceChild( $tag, $instagram_media);
@@ -52,4 +51,14 @@ public function get_scripts() {
52
  }
53
  return array( self::$script_slug => self::$script_src );
54
  }
55
- }
 
 
 
 
 
 
 
 
 
 
1
  <?php
 
 
 
 
2
 
3
  /**
4
  * Converts Instagram embeds to <amp-instagram>
5
  */
6
  class AMPFORWP_Instagram_Embed_Sanitizer extends AMP_Base_Sanitizer {
7
  private $instagram_medias = array();
8
+ const URL_PATTERN = '#http(s?)://(www\.)?instagr(\.am|am\.com)/p/([^/?]+)#i';
9
  private static $script_slug = 'amp-instagram';
10
+ private static $script_src = 'https://cdn.ampproject.org/v0/amp-instagram-0.1.js';
11
  public function sanitize() {
12
  $body = $this->get_body_node();
13
  $xpath = new \DOMXPath($this->dom);
24
  $medias = $instagram_media->getElementsByTagName('a');
25
  if($medias->length > 0){
26
  $media = $medias->item(0);
27
+ // Insta link
28
  $href = $media->getAttribute('href');
29
+ // Get the ID from the link
30
+ $sourcecode = $this->get_instagram_id_from_url($href);
31
+ // Create Instagram tag from the link
32
  $tag = $this->create_instagram_tag($sourcecode);
33
  $this->instagram_medias[] = $tag; // add it to array
34
  $instagram_media->parentNode->replaceChild( $tag, $instagram_media);
51
  }
52
  return array( self::$script_slug => self::$script_src );
53
  }
54
+
55
+ private function get_instagram_id_from_url( $url ) {
56
+ $found = preg_match( self::URL_PATTERN, $url, $matches );
57
+
58
+ if ( ! $found ) {
59
+ return false;
60
+ }
61
+
62
+ return end( $matches );
63
+ }
64
+ }
components/menu/menu.php CHANGED
@@ -20,7 +20,39 @@ function amp_menu_html($echo){
20
 
21
  //Load styling for Menu
22
  add_action('amp_post_template_css','amp_menu_styles',11);
23
- function amp_menu_styles(){ ?>
24
- aside{width:150px}
25
- .amp-menu{list-style-type:none;margin:0;padding:0}.amp-menu li{position:relative;display:block}.amp-menu li.menu-item-has-children ul{display:none}.amp-menu li.menu-item-has-children:hover>ul{display:}.amp-menu li.menu-item-has-children>ul>li{padding-left:10px}.amp-menu li.menu-item-has-children:after{content:" > ";position:absolute;padding:10px;right:0;top:0;z-index:10000;line-height:1;}.amp-menu>li a{padding:7px;display:block;margin-bottom:1px}.amp-menu>li ul{list-style-type:none;margin:0;padding:0;position:relative}
26
- <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  //Load styling for Menu
22
  add_action('amp_post_template_css','amp_menu_styles',11);
23
+ function amp_menu_styles(){
24
+ $atf = '';
25
+ $design = ampforwp_get_setting('amp-design-selector');
26
+ if ( ( $design == ('1') ) || ( $design == ('2') ) || ( $design == ('3') ) || ( $design == ('4') ) ) {}
27
+ else {
28
+ $atf = true;?>
29
+ .amp-menu input{display:none;}
30
+ .amp-menu .toggle:after{content:'\25be';position:absolute;padding: 10px 15px 10px 30px;right:0;font-size:18px;color:#ed1c24;top:0px;z-index:10000;line-height:1;cursor:pointer;}
31
+ <?php
32
+ }
33
+ if ( ! defined('AMPFORWP_LAYOUTS_URL') ) { ?>
34
+ /** Dropdown CSS **/
35
+ amp-sidebar{padding:15px;}
36
+ .amp-sidebar-close{border-radius: 100%;cursor:pointer;}
37
+ .amp-search-wrapper{margin-bottom:15px;}
38
+ .amp-menu li.menu-item-has-children ul{display:none;margin:0;}
39
+ .amp-menu li.menu-item-has-children ul, .amp-menu li.menu-item-has-children ul ul{font-size:14px;}
40
+ .amp-menu input{display:none;}
41
+ .amp-menu [id^=drop]:checked + label + ul{ display: block;}
42
+ <?php
43
+ } elseif( $atf && defined('AMPFORWP_LAYOUTS_URL') ){?>
44
+
45
+ /** Dropdown CSS **/
46
+ amp-sidebar{padding:15px;}
47
+ .amp-sidebar-close{border-radius: 100%;cursor:pointer;}
48
+ .amp-search-wrapper{margin-bottom:15px;}
49
+ .amp-menu li.menu-item-has-children ul{display:none;margin:0;}
50
+ .amp-menu li.menu-item-has-children ul, .amp-menu li.menu-item-has-children ul ul{font-size:14px;}
51
+ .amp-menu input{display:none;}
52
+ .amp-menu [id^=drop]:checked + label + ul{ display: block;}
53
+
54
+ <?php
55
+ }?>
56
+ // AMP theme framework and AMP layouts and this is required
57
+ aside{width:150px}.amp-menu{list-style-type:none;margin:0;padding:0}.amp-menu li{position:relative;display:block}.amp-menu li.menu-item-has-children ul{display:none}.amp-menu li.menu-item-has-children:hover>ul{display:}.amp-menu li.menu-item-has-children>ul>li{padding-left:10px}.amp-menu>li a{padding:7px;display:block;margin-bottom:1px}.amp-menu>li ul{list-style-type:none;margin:0;padding:0;position:relative}.amp-menu input{display:none;}<?php
58
+ }
includes/options/admin-config.php CHANGED
@@ -3619,6 +3619,13 @@ Redux::setSection( $opt_name, array(
3619
  'tooltip-subtitle' => esc_html__('Enable if you want all your links inside the article to go to /amp/. All the outbound links will remain untouched.','accelerated-mobile-pages'),
3620
  'default' => 0,
3621
  ),
 
 
 
 
 
 
 
3622
  // End-point option
3623
  array(
3624
  'id' => 'amp-core-end-point',
@@ -4504,6 +4511,16 @@ Redux::setSection( $opt_name, array(
4504
  $enabledGoogleFonts = true;
4505
  }
4506
  $fonts_settings = array(
 
 
 
 
 
 
 
 
 
 
4507
  array(
4508
  'id' =>'google_font_api_key',
4509
  'type' =>'text',
3619
  'tooltip-subtitle' => esc_html__('Enable if you want all your links inside the article to go to /amp/. All the outbound links will remain untouched.','accelerated-mobile-pages'),
3620
  'default' => 0,
3621
  ),
3622
+ array(
3623
+ 'id' => 'ampforwp-smooth-scrolling-for-links',
3624
+ 'type' => 'switch',
3625
+ 'title' => esc_html__('Smooth Scrolling For Links', 'accelerated-mobile-pages'),
3626
+ 'tooltip-subtitle' => esc_html__('Enable this option if you want smooth scrolling for jumping links','accelerated-mobile-pages'),
3627
+ 'default' => 0,
3628
+ ),
3629
  // End-point option
3630
  array(
3631
  'id' => 'amp-core-end-point',
4511
  $enabledGoogleFonts = true;
4512
  }
4513
  $fonts_settings = array(
4514
+ array(
4515
+ 'id' => 'ampforwp-d1-font',
4516
+ 'type' => 'switch',
4517
+ 'title' => esc_html__('Merriweather Font', 'accelerated-mobile-pages'),
4518
+ 'tooltip-subtitle' => esc_html__('Enable/Disable Merriweather Font','accelerated-mobile-pages'),
4519
+ 'default' => true,
4520
+ 'required' => array(
4521
+ array('amp-design-selector', '=' , '1')
4522
+ )
4523
+ ),
4524
  array(
4525
  'id' =>'google_font_api_key',
4526
  'type' =>'text',
includes/vendor/amp/includes/sanitizers/class-amp-img-sanitizer.php CHANGED
@@ -95,7 +95,7 @@ class AMP_Img_Sanitizer extends AMP_Base_Sanitizer {
95
  if ( ! is_numeric( $node->getAttribute( 'width' ) ) ) {
96
  // Let width have the right aspect ratio based on the height attribute.
97
  if ( is_numeric( $node->getAttribute( 'height' ) ) && isset( $dimensions['height'] ) && isset( $dimensions['width'] ) ) {
98
- $width = ( floatval( $node->getAttribute( 'height' ) ) * $dimensions['width'] ) / $dimensions['height'];
99
  }
100
  $node->setAttribute( 'width', $width );
101
  if ( ! isset( $dimensions['width'] ) ) {
@@ -105,7 +105,7 @@ class AMP_Img_Sanitizer extends AMP_Base_Sanitizer {
105
  if ( ! is_numeric( $node->getAttribute( 'height' ) ) ) {
106
  // Let height have the right aspect ratio based on the width attribute.
107
  if ( is_numeric( $node->getAttribute( 'width' ) ) && isset( $dimensions['width'] ) && isset( $dimensions['height'] ) ) {
108
- $height = ( floatval( $node->getAttribute( 'width' ) ) * $dimensions['height'] ) / $dimensions['width'];
109
  }
110
  $node->setAttribute( 'height', $height );
111
  if ( ! isset( $dimensions['height'] ) ) {
95
  if ( ! is_numeric( $node->getAttribute( 'width' ) ) ) {
96
  // Let width have the right aspect ratio based on the height attribute.
97
  if ( is_numeric( $node->getAttribute( 'height' ) ) && isset( $dimensions['height'] ) && isset( $dimensions['width'] ) ) {
98
+ $width = round( ( floatval( $node->getAttribute( 'height' ) ) * $dimensions['width'] ) / $dimensions['height'] );
99
  }
100
  $node->setAttribute( 'width', $width );
101
  if ( ! isset( $dimensions['width'] ) ) {
105
  if ( ! is_numeric( $node->getAttribute( 'height' ) ) ) {
106
  // Let height have the right aspect ratio based on the width attribute.
107
  if ( is_numeric( $node->getAttribute( 'width' ) ) && isset( $dimensions['width'] ) && isset( $dimensions['height'] ) ) {
108
+ $height = round( ( floatval( $node->getAttribute( 'width' ) ) * $dimensions['height'] ) / $dimensions['width'] );
109
  }
110
  $node->setAttribute( 'height', $height );
111
  if ( ! isset( $dimensions['height'] ) ) {
includes/vendor/amp/includes/sanitizers/class-amp-tag-and-attribute-sanitizer.php CHANGED
@@ -1183,18 +1183,20 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
1183
  private function check_attr_spec_rule_valid_url( $node, $attr_name, $attr_spec_rule ) {
1184
  if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ] ) ) {
1185
  if ( $node->hasAttribute( $attr_name ) ) {
1186
- $urls_to_test = preg_split( '/\s*,\s*/', $node->getAttribute( $attr_name ) );
1187
- foreach ( $urls_to_test as $url ) {
1188
  $url = urldecode( $url );
1189
- // Check if the host contains invalid chars.
1190
- $url_host = wp_parse_url( $url, PHP_URL_HOST );
1191
- if ( $url_host && preg_match( '/[!"#$%&\'()*+,\/:;<=>?@[\]^`{|}~\s]/i', $url_host ) ) {
1192
- return AMP_Rule_Spec::FAIL;
 
 
 
1193
  }
1194
 
1195
- // Check if the protocol contains invalid chars.
1196
- $dots_pos = strpos( $url, ':' );
1197
- if ( false !== $dots_pos && preg_match( '/[!"#$%&\'()*+,\/:;<=>?@[\]^`{|}~\s]/i', substr( $url, 0, $dots_pos ) ) ) {
1198
  return AMP_Rule_Spec::FAIL;
1199
  }
1200
  }
@@ -1205,6 +1207,22 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
1205
 
1206
  return AMP_Rule_Spec::NOT_APPLICABLE;
1207
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1208
 
1209
  /**
1210
  * Check if attribute has a protocol value rule determine if it matches.
@@ -1259,7 +1277,32 @@ class AMP_Tag_And_Attribute_Sanitizer extends AMP_Base_Sanitizer {
1259
  }
1260
  return AMP_Rule_Spec::NOT_APPLICABLE;
1261
  }
1262
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1263
  /**
1264
  * Check if attribute has disallowed relative value rule determine if disallowed relative value matches.
1265
  *
1183
  private function check_attr_spec_rule_valid_url( $node, $attr_name, $attr_spec_rule ) {
1184
  if ( isset( $attr_spec_rule[ AMP_Rule_Spec::VALUE_URL ] ) ) {
1185
  if ( $node->hasAttribute( $attr_name ) ) {
1186
+ foreach ( $this->extract_attribute_urls( $node->getAttributeNode( $attr_name ) ) as $url ) {
 
1187
  $url = urldecode( $url );
1188
+ // Check if the protocol contains invalid chars (protocolCharIsValid: https://github.com/ampproject/amphtml/blob/af1e3a550feeafd732226202b8d1f26dcefefa18/validator/engine/parse-url.js#L31-L39).
1189
+ $protocol = $this->parse_protocol( $url );
1190
+ if ( isset( $protocol ) ) {
1191
+ if ( ! preg_match( '/^[a-zA-Z0-9\+-]+/i', $protocol ) ) {
1192
+ return AMP_Rule_Spec::FAIL;
1193
+ }
1194
+ $url = substr( $url, strlen( $protocol ) + 1 );
1195
  }
1196
 
1197
+ // Check if the host contains invalid chars (hostCharIsValid: https://github.com/ampproject/amphtml/blob/af1e3a550feeafd732226202b8d1f26dcefefa18/validator/engine/parse-url.js#L62-L103).
1198
+ $host = wp_parse_url( $url, PHP_URL_HOST );
1199
+ if ( $host && preg_match( '/[!"#$%&\'()*+,\/:;<=>?@[\]^`{|}~\s]/i', $host ) ) {
1200
  return AMP_Rule_Spec::FAIL;
1201
  }
1202
  }
1207
 
1208
  return AMP_Rule_Spec::NOT_APPLICABLE;
1209
  }
1210
+
1211
+ /**
1212
+ * Parse protocol from URL.
1213
+ *
1214
+ * This may not be a valid protocol (scheme), but it will be where the protocol should be in the URL.
1215
+ *
1216
+ * @link https://github.com/ampproject/amphtml/blob/af1e3a550feeafd732226202b8d1f26dcefefa18/validator/engine/parse-url.js#L235-L282
1217
+ * @param string $url URL.
1218
+ * @return string|null Protocol without colon if matched. Otherwise null.
1219
+ */
1220
+ private function parse_protocol( $url ) {
1221
+ if ( preg_match( '#^[^/]+(?=:)#', $url, $matches ) ) {
1222
+ return $matches[0];
1223
+ }
1224
+ return null;
1225
+ }
1226
 
1227
  /**
1228
  * Check if attribute has a protocol value rule determine if it matches.
1277
  }
1278
  return AMP_Rule_Spec::NOT_APPLICABLE;
1279
  }
1280
+ /**
1281
+ * Extract URLs from attribute.
1282
+ *
1283
+ * @param DOMAttr $attribute_node Attribute node.
1284
+ * @param string|null $spec_attr_name Non-alternative attribute name for the spec.
1285
+ * @return string[] List of URLs.
1286
+ */
1287
+ private function extract_attribute_urls( $attribute_node, $spec_attr_name = null ) {
1288
+ /*
1289
+ * Handle the srcset special case where the attribute value can contain multiple parts, each in the format `URL [WIDTH] [PIXEL_DENSITY]`.
1290
+ * So we split the srcset attribute value by commas and then return the first token of each item, omitting width descriptor and pixel density descriptor.
1291
+ * This splitting cannot be done for other URLs because it a comma can appear in a URL itself generally, but the syntax can break in srcset,
1292
+ * unless the commas are URL-encoded.
1293
+ */
1294
+ if ( 'srcset' === $attribute_node->nodeName || 'srcset' === $spec_attr_name ) {
1295
+ return array_filter( array_map(
1296
+ function ( $srcset_part ) {
1297
+ // Remove descriptors for width and pixel density.
1298
+ return preg_replace( '/\s.*$/', '', trim( $srcset_part ) );
1299
+ },
1300
+ preg_split( '/\s*,\s*/', $attribute_node->nodeValue )
1301
+ ) );
1302
+ } else {
1303
+ return array( $attribute_node->nodeValue );
1304
+ }
1305
+ }
1306
  /**
1307
  * Check if attribute has disallowed relative value rule determine if disallowed relative value matches.
1308
  *
includes/vendor/vendor-changelog.txt CHANGED
@@ -61,4 +61,6 @@ Reason: To extend the functionality of sidebars and Pagebuilder
61
  34. class-amp-style-sanitizer.php updated #2745
62
  35. Class AMP_Blacklist_Sanitizer updated for inernal links #2391
63
  36. Mobile detect library added from https://github.com/serbanghita/Mobile-Detect
64
- 37. Class AMP_Img_Sanitizer Updated #2893
 
 
61
  34. class-amp-style-sanitizer.php updated #2745
62
  35. Class AMP_Blacklist_Sanitizer updated for inernal links #2391
63
  36. Mobile detect library added from https://github.com/serbanghita/Mobile-Detect
64
+ 37. Class AMP_Img_Sanitizer Updated #2893
65
+ 38. Updated check_attr_spec_rule_valid_url function and also added two more functions parse_protocol and extract_attribute_urls #2862
66
+ 39. AMP Image Sanitizer Updated #2925
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.1
7
- Stable tag: 0.9.97.39
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -186,17 +186,15 @@ You can contact us from [here](https://ampforwp.com/contact/)
186
 
187
  == Changelog ==
188
 
189
- = 0.9.97.39 (5th March 2019) =
190
- * Added: Compatibility with the Author Simple Box Plugin #2268
191
- * Added: Compatibility when short codes are added in AMP widgets #2552
192
- * Added: Compatibility with the footnotes plugin #2447
193
- * Added: ID Support on the AMP PageBuilder #2474
194
- * Added: embedly oembed support in wordpress #1160
195
- * Fixed: Dynamic Classes break issue in AMP PageBuilder #2515
196
- * Fixed: Debug Errors #2627
197
- * Fixed: Custom Front page is breaking in 0.9.97.16 #2589
198
- * Fixed: Date Archive not working with Swift Design #2514
199
- * Fixed: Background video and countdown timer is not showing in divi pagebuilder from core > 0.9.97.19 #2727
200
- * Fixed: Issue with pagebuilder when yoast plugin is active. #2933
201
 
202
  Full changelog available in changelog.txt
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
+ Stable tag: 0.9.97.40
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
186
 
187
  == Changelog ==
188
 
189
+ = 0.9.97.40 (9th March 2019) =
190
+ * Added: Smooth scrolling for anchors links and jumping links within a page #2062
191
+ * Added: Option to Enable/Disable Merriweather font in Design-1
192
+ * Fixed: External links are getting skipped #2862
193
+ * Fixed: Social Share “LINE” does not show up in swift theme #2641
194
+ * Fixed: Checkbox from menu listings in AMP theme framework #2618
195
+ * Fixed: PHP Warning undefined index fb-instant-page #2610
196
+ * Fixed: Instagram Posts not rendering in AMP #2629
197
+ * Fixed: Instant articles Image issue #2929
198
+ * Fixed: Default height & width values for amp-img when values are not set #2925
 
 
199
 
200
  Full changelog available in changelog.txt
templates/design-manager/design-1/style.php CHANGED
@@ -16,7 +16,8 @@
16
  $header_color = $get_customizer->get_customizer_setting( 'header_color' );
17
  ?>
18
 
19
- #statcounter{width: 1px;height:1px;}
 
20
  @font-face {
21
  font-family: 'Merriweather';
22
  font-display: auto;
@@ -45,6 +46,7 @@
45
  font-weight: 700;
46
  src: local('Merriweather Bold Italic'), local('Merriweather-BoldItalic'), url('<?php echo esc_url(plugin_dir_url(__FILE__)) ?>fonts/Merriweather-BoldItalic.ttf');
47
  }
 
48
  .clearfix, .cb{clear:both}
49
  .alignright{ float: right; }
50
  .alignleft{ float: left; }
@@ -413,4 +415,9 @@ if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
413
  text-align: center;
414
  line-height: 1.5;
415
  }
416
- <?php } ?>
 
 
 
 
 
16
  $header_color = $get_customizer->get_customizer_setting( 'header_color' );
17
  ?>
18
 
19
+ #statcounter{width: 1px;height:1px;}
20
+ <?php if ( true == ampforwp_get_setting('ampforwp-d1-font') ): ?>
21
  @font-face {
22
  font-family: 'Merriweather';
23
  font-display: auto;
46
  font-weight: 700;
47
  src: local('Merriweather Bold Italic'), local('Merriweather-BoldItalic'), url('<?php echo esc_url(plugin_dir_url(__FILE__)) ?>fonts/Merriweather-BoldItalic.ttf');
48
  }
49
+ <?php endif; ?>
50
  .clearfix, .cb{clear:both}
51
  .alignright{ float: right; }
52
  .alignleft{ float: left; }
415
  text-align: center;
416
  line-height: 1.5;
417
  }
418
+ <?php } ?>
419
+ <?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
420
+ html {
421
+ scroll-behavior: smooth;
422
+ }
423
+ <?php } ?>
templates/design-manager/design-2/style.php CHANGED
@@ -535,4 +535,9 @@ if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
535
  text-align: center;
536
  line-height: 1.4;
537
  }
538
- <?php } ?>
 
 
 
 
 
535
  text-align: center;
536
  line-height: 1.4;
537
  }
538
+ <?php } ?>
539
+ <?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
540
+ html {
541
+ scroll-behavior: smooth;
542
+ }
543
+ <?php } ?>
templates/design-manager/design-3/style.php CHANGED
@@ -727,4 +727,9 @@ if(true == ampforwp_get_setting('ampforwp-footer-top')){?>
727
  text-align: center;
728
  line-height: 1.4;
729
  }
 
 
 
 
 
730
  <?php } ?>
727
  text-align: center;
728
  line-height: 1.4;
729
  }
730
+ <?php } ?>
731
+ <?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
732
+ html {
733
+ scroll-behavior: smooth;
734
+ }
735
  <?php } ?>
templates/design-manager/swift/footer.php CHANGED
@@ -101,6 +101,17 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
101
  <a title="whatsapp share" class="s_wp" target="_blank" href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
102
  </li>
103
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
104
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
105
  <li>
106
  <a title="vkontakte share" class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php echo esc_url($amp_permalink); ?>"></a>
101
  <a title="whatsapp share" class="s_wp" target="_blank" href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
102
  </li>
103
  <?php } ?>
104
+ <?php if(ampforwp_get_setting('enable-single-line-share') == true){
105
+ $line_share = 'http://line.me/R/msg/text/';
106
+ $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
107
+ ?>
108
+ <li>
109
+ <a title="line share" class="s_li" href="<?php echo esc_url($amp_permalink); ?>">
110
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDIt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DcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
111
+
112
+ </a>
113
+ </li>
114
+ <?php } ?>
115
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
116
  <li>
117
  <a title="vkontakte share" class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php echo esc_url($amp_permalink); ?>"></a>
templates/design-manager/swift/functions.php CHANGED
@@ -91,6 +91,17 @@ function ampforwp_swift_social_icons(){
91
  <a class="s_wp" target="_blank" href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
92
  </li>
93
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
94
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
95
  <li>
96
  <a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php echo esc_url($amp_permalink); ?>"></a>
91
  <a class="s_wp" target="_blank" href="whatsapp://send?text=<?php echo esc_url($amp_permalink); ?>" data-action="share/whatsapp/share"></a>
92
  </li>
93
  <?php } ?>
94
+ <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
95
+ $line_share = 'http://line.me/R/msg/text/';
96
+ $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
97
+ ?>
98
+ <li>
99
+ <a title="line share" class="s_li" href="<?php echo esc_url($amp_permalink); ?>">
100
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDItMC4wMjMtMC4wMDQtMC4wMzZjLTAuMDAxLTAuMDExLTAuMDAyLTAuMDIxLTAuMDA0LTAuMDMyICAgbC0wLjM0NC0yLjg1OGMtMC4wNjktMC41NzQtMC4xNDgtMS4yMjgtMC4yMzgtMS45NzRsLTAuMDcyLTAuNTk0bC0wLjE0NywwLjAxOGMtMy42MTctMjAuNTcxLTEzLjU1My00MC4wOTMtMjguOTQyLTU2Ljc2Mi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CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
101
+
102
+ </a>
103
+ </li>
104
+ <?php } ?>
105
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
106
  <li>
107
  <a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php echo esc_url($amp_permalink); ?>"></a>
templates/design-manager/swift/page.php CHANGED
@@ -85,6 +85,18 @@ amp_header(); ?>
85
  <a title="whatsapp share" class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
86
  </li>
87
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
88
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
89
  <li>
90
  <a title="vkontakte share" class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
85
  <a title="whatsapp share" class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
86
  </li>
87
  <?php } ?>
88
+ <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
89
+ $line_share = 'http://line.me/R/msg/text/';
90
+ $amp_permalink = get_the_permalink();
91
+ $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
92
+ ?>
93
+ <li>
94
+ <a title="line share" class="s_li" href="<?php echo esc_url($amp_permalink); ?>">
95
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBT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
+
97
+ </a>
98
+ </li>
99
+ <?php } ?>
100
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
101
  <li>
102
  <a title="vkontakte share" class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
templates/design-manager/swift/single.php CHANGED
@@ -253,6 +253,18 @@ do_action("ampforwp_single_design_type_handle");
253
  <a class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
254
  </li>
255
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
256
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
257
  <li>
258
  <a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
253
  <a class="s_wp" target="_blank" href="whatsapp://send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
254
  </li>
255
  <?php } ?>
256
+ <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
257
+ $line_share = 'http://line.me/R/msg/text/';
258
+ $amp_permalink = get_the_permalink();
259
+ $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
260
+ ?>
261
+ <li>
262
+ <a title="line share" class="s_li" href="http://line.me/R/msg/text/?<?php echo esc_url($amp_permalink); ?>">
263
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3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A1YzAsMy44NjYtMy4xMzQsNy03LDcgICBjLTMuODY2LDAtNy0zLjEzNC03LTd2LTUyLjE2YzAtMy4wMzMsMS45NTMtNS43MjEsNC44MzgtNi42NThjMi44ODYtMC45MzYsNi4wNDUsMC4wOSw3LjgyNywyLjU0NWwyNS4yMDcsMzQuNzE3Vjk5LjY3NSAgIGMwLTMuODY2LDMuMTM0LTcsNy03YzMuODY2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
264
+
265
+ </a>
266
+ </li>
267
+ <?php } ?>
268
  <?php if($redux_builder_amp['enable-single-vk-share']){?>
269
  <li>
270
  <a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
templates/design-manager/swift/style.php CHANGED
@@ -1370,6 +1370,9 @@ if($redux_builder_amp['enable-single-vk-share']){?>
1370
  .s_vk{background:#45668e;}
1371
  .s_vk:after{content: "\e944";}
1372
  <?php }
 
 
 
1373
  if($redux_builder_amp['enable-single-reddit-share']){?>
1374
  .s_rd{background:#ff4500;}
1375
  .s_rd:after{content: "\e938";}
@@ -1581,4 +1584,9 @@ if (ampforwp_get_setting('enable-amp-ads-resp-6')){?>
1581
  <?php } // levelup condition ends here?>
1582
  <?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
1583
  .sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
1584
- <?php } ?>
 
 
 
 
 
1370
  .s_vk{background:#45668e;}
1371
  .s_vk:after{content: "\e944";}
1372
  <?php }
1373
+ if(ampforwp_get_setting('enable-single-line-share') == true) { ?>
1374
+ .s_li{background:#00cc00;}
1375
+ <?php }
1376
  if($redux_builder_amp['enable-single-reddit-share']){?>
1377
  .s_rd{background:#ff4500;}
1378
  .s_rd:after{content: "\e938";}
1584
  <?php } // levelup condition ends here?>
1585
  <?php if (checkAMPforPageBuilderStatus(get_the_ID())){ ?>
1586
  .sp-cnt .cntr {max-width: 100%;margin:0;width:100%;padding:0}
1587
+ <?php } ?>
1588
+ <?php if(true == ampforwp_get_setting('ampforwp-smooth-scrolling-for-links')){?>
1589
+ html {
1590
+ scroll-behavior: smooth;
1591
+ }
1592
+ <?php } ?>
templates/features.php CHANGED
@@ -2192,8 +2192,11 @@ function ampforwp_sticky_social_icons(){
2192
  </div>
2193
  </a>
2194
  <?php } ?>
2195
- <?php if($redux_builder_amp['enable-single-line-share'] == true) { ?>
2196
- <a title="line share" href="http://line.me/R/msg/text/?<?php echo esc_url($amp_permalink); ?>">
 
 
 
2197
  <div class="amp-social-icon custom-amp-socialsharing-line">
2198
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmV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@@ -4491,12 +4494,14 @@ function ampforwp_fb_instant_article_feed_function() {
4491
  if ( ! function_exists('ampforwp_fbia_meta_tags') ) {
4492
  function ampforwp_fbia_meta_tags(){
4493
  global $redux_builder_amp;
 
4494
  $fb_page_id = '';
4495
- $fb_page_id = $redux_builder_amp['fb-instant-page-id'];
4496
  // Page ID meta Tag
4497
- if( isset($redux_builder_amp['fb-instant-page-id']) && $redux_builder_amp['fb-instant-page-id'] ) { ?>
4498
  <meta property="fb:pages" content="<?php echo esc_attr( $fb_page_id ); ?>" />
4499
  <?php }
 
4500
  $post = get_post();
4501
  // If there's no current post, return
4502
  if ( ! $post ) {
@@ -6499,12 +6504,9 @@ function ampforwp_url_controller( $url, $nonamp = '' ) {
6499
  // 99. Merriweather Font Management
6500
  add_filter( 'amp_post_template_data', 'ampforwp_merriweather_font_management' );
6501
  function ampforwp_merriweather_font_management( $data ) {
6502
- global $redux_builder_amp;
6503
-
6504
- if ( isset($redux_builder_amp['amp-design-selector']) && $redux_builder_amp['amp-design-selector'] != 1) {
6505
  unset($data['font_urls']['merriweather']);
6506
  }
6507
-
6508
  return $data;
6509
  }
6510
 
2192
  </div>
2193
  </a>
2194
  <?php } ?>
2195
+ <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
2196
+ $line_share = 'http://line.me/R/msg/text/';
2197
+ $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
2198
+ ?>
2199
+ <a title="line share" href="<?php echo esc_url($amp_permalink); ?>">
2200
  <div class="amp-social-icon custom-amp-socialsharing-line">
2201
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItL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1Myw1LjcyMS00LjgzOCw2LjY1OCAgIGMtMC43MTIsMC4yMzEtMS40NDEsMC4zNDMtMi4xNjEsMC4zNDNjLTIuMTk5LDAtNC4zMjMtMS4wMzktNS42NjYtMi44ODhsLTI1LjIwNy0zNC43MTd2MzAuNjA1YzAsMy44NjYtMy4xMzQsNy03LDcgICBjLTMuODY2LDAtNy0zLjEzNC03LTd2LTUyLjE2YzAtMy4wMzMsMS45NTMtNS43MjEsNC44MzgtNi42NThjMi44ODYtMC45MzYsNi4wNDUsMC4wOSw3LjgyNywyLjU0NWwyNS4yMDcsMzQuNzE3Vjk5LjY3NSAgIGMwLTMuODY2LDMuMTM0LTcsNy03YzMuODY2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="50" height="20" />
2202
  </div>
4494
  if ( ! function_exists('ampforwp_fbia_meta_tags') ) {
4495
  function ampforwp_fbia_meta_tags(){
4496
  global $redux_builder_amp;
4497
+ // undefined index fb-instant-page-id #2610
4498
  $fb_page_id = '';
4499
+ $fb_page_id = ampforwp_get_setting('fb-instant-page-id');
4500
  // Page ID meta Tag
4501
+ if( $fb_page_id ) { ?>
4502
  <meta property="fb:pages" content="<?php echo esc_attr( $fb_page_id ); ?>" />
4503
  <?php }
4504
+ // undefined index fb-instant-page-id ends here #2610
4505
  $post = get_post();
4506
  // If there's no current post, return
4507
  if ( ! $post ) {
6504
  // 99. Merriweather Font Management
6505
  add_filter( 'amp_post_template_data', 'ampforwp_merriweather_font_management' );
6506
  function ampforwp_merriweather_font_management( $data ) {
6507
+ if ( 1 != ampforwp_get_setting('amp-design-selector') || ( false == ampforwp_get_setting('ampforwp-d1-font') && 1 == ampforwp_get_setting('amp-design-selector') ) ) {
 
 
6508
  unset($data['font_urls']['merriweather']);
6509
  }
 
6510
  return $data;
6511
  }
6512
 
templates/instant-articles/instant-article-sanitizer.php CHANGED
@@ -142,10 +142,10 @@ function ampforwp_fbia_validate_images($DOMDocument){
142
 
143
  while($highestParent->parentNode->nodeName != "body"){
144
  $highestParent = $highestParent->parentNode;
 
 
145
  }
146
 
147
- // Insert the figure tag before the highest parent which is not the body tag
148
- $highestParent->parentNode->insertBefore($element, $highestParent);
149
  }
150
  }
151
 
142
 
143
  while($highestParent->parentNode->nodeName != "body"){
144
  $highestParent = $highestParent->parentNode;
145
+ // Insert the figure tag before the highest parent which is not the body tag
146
+ $highestParent->parentNode->insertBefore($element, $highestParent);
147
  }
148
 
 
 
149
  }
150
  }
151