AMP for WP – Accelerated Mobile Pages - Version 1.0.3

Version Description

(23th December 2019) = * Improvement: Filter in search form #3948 * Improvement: Improvement of jetpack social icons #3907 * Improvement: Need to add a Filter in amp tree shaking for adding custom CSS. #3971 * Fixed: Icomoon.ttf is preloaded in Design 1 and Design 2. #3945 * Fixed: Search translate text option is visible in swift but unused #3934 * Fixed: Category module has minor bugs after the update. #3880 * Fixed: Improvements required in RTL support in AMP #3938 * Fixed: Save buttons are not looking good after WP 5.3 update #3985 * Fixed: Video widget support in AMP #3841 * Fixed: Time is not working in published date notice #3956 * Fixed: Recoverable fatal error: Object of class DOM Node List could not be converted to string #3968 * Fixed: In Amp struture data option if we added any schema then description generated in html format #3937 * Fixed: Select Taxonomy and Select Category is getting blank in the category module of AMP page builder #3986 * Fixed: Notice: Undefined offset: 0 in class-amp-post-template.php on line 378 #3992 * Fixed: Undefined variable: designCss #3961

Download this release

Release Info

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

Code changes from version 1.0.2 to 1.0.3

README.md CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.3.1
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,24 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.2 (19th December 2019) =
195
  * Improvement: Need to add wordpress default Gutenburg editor 'Block' settings Compatibility in AMP #3320
196
  * Improvement: Need to make compatibility with the Imagify plugin #3908
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.3.2
7
+ Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 1.0.3 (23th December 2019) =
195
+ * Improvement: Filter in search form #3948
196
+ * Improvement: Improvement of jetpack social icons #3907
197
+ * Improvement: Need to add a Filter in amp tree shaking for adding custom CSS. #3971
198
+ * Fixed: Icomoon.ttf is preloaded in Design 1 and Design 2. #3945
199
+ * Fixed: Search translate text option is visible in swift but unused #3934
200
+ * Fixed: Category module has minor bugs after the update. #3880
201
+ * Fixed: Improvements required in RTL support in AMP #3938
202
+ * Fixed: Save buttons are not looking good after WP 5.3 update #3985
203
+ * Fixed: Video widget support in AMP #3841
204
+ * Fixed: Time is not working in published date notice #3956
205
+ * Fixed: Recoverable fatal error: Object of class DOM Node List could not be converted to string #3968
206
+ * Fixed: In Amp struture data option if we added any schema then description generated in html format #3937
207
+ * Fixed: Select Taxonomy and Select Category is getting blank in the category module of AMP page builder #3986
208
+ * Fixed: Notice: Undefined offset: 0 in class-amp-post-template.php on line 378 #3992
209
+ * Fixed: Undefined variable: designCss #3961
210
+ * Fixed: Open Graph title is not displaying correctly with SEOPress in AMP. #3966
211
+
212
  = 1.0.2 (19th December 2019) =
213
  * Improvement: Need to add wordpress default Gutenburg editor 'Block' settings Compatibility in AMP #3320
214
  * Improvement: Need to make compatibility with the Imagify plugin #3908
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.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.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.3
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.3');
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,23 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.2 (19th December 2019) =
4
  * Improvement: Need to add wordpress default Gutenburg editor 'Block' settings Compatibility in AMP #3320
5
  * Improvement: Need to make compatibility with the Imagify plugin #3908
1
  == Changelog ==
2
 
3
+ = 1.0.3 (23th December 2019) =
4
+ * Improvement: Filter in search form #3948
5
+ * Improvement: Improvement of jetpack social icons #3907
6
+ * Improvement: Need to add a Filter in amp tree shaking for adding custom CSS. #3971
7
+ * Fixed: Icomoon.ttf is preloaded in Design 1 and Design 2. #3945
8
+ * Fixed: Search translate text option is visible in swift but unused #3934
9
+ * Fixed: Category module has minor bugs after the update. #3880
10
+ * Fixed: Improvements required in RTL support in AMP #3938
11
+ * Fixed: Save buttons are not looking good after WP 5.3 update #3985
12
+ * Fixed: Video widget support in AMP #3841
13
+ * Fixed: Time is not working in published date notice #3956
14
+ * Fixed: Recoverable fatal error: Object of class DOM Node List could not be converted to string #3968
15
+ * Fixed: In Amp struture data option if we added any schema then description generated in html format #3937
16
+ * Fixed: Select Taxonomy and Select Category is getting blank in the category module of AMP page builder #3986
17
+ * Fixed: Notice: Undefined offset: 0 in class-amp-post-template.php on line 378 #3992
18
+ * Fixed: Undefined variable: designCss #3961
19
+ * Fixed: Open Graph title is not displaying correctly with SEOPress in AMP. #3966
20
+
21
  = 1.0.2 (19th December 2019) =
22
  * Improvement: Need to add wordpress default Gutenburg editor 'Block' settings Compatibility in AMP #3320
23
  * Improvement: Need to make compatibility with the Imagify plugin #3908
classes/class-ampforwp-youtube-embed.php CHANGED
@@ -37,6 +37,7 @@ class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
37
  function register_embed() {
38
  wp_embed_register_handler( 'amp-youtube', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
39
  add_shortcode( 'youtube', array( $this, 'shortcode' ) );
 
40
  }
41
 
42
  public function unregister_embed() {
@@ -140,4 +141,25 @@ class AMPforWP_YouTube_Embed_Handler extends AMP_Base_Embed_Handler {
140
 
141
  return $value;
142
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
37
  function register_embed() {
38
  wp_embed_register_handler( 'amp-youtube', self::URL_PATTERN, array( $this, 'oembed' ), -1 );
39
  add_shortcode( 'youtube', array( $this, 'shortcode' ) );
40
+ add_filter( 'wp_video_shortcode_override', array( $this, 'video_override') , 10, 2 );
41
  }
42
 
43
  public function unregister_embed() {
141
 
142
  return $value;
143
  }
144
+ /**
145
+ * Override the output of YouTube videos.
146
+ *
147
+ * This overrides the value in wp_video_shortcode().
148
+ * The pattern matching is copied from WP_Widget_Media_Video::render().
149
+ *
150
+ * @param string $html Empty variable to be replaced with shortcode markup.
151
+ * @param array $attr The shortcode attributes.
152
+ * @return string|null $markup The markup to output.
153
+ */
154
+ public function video_override( $html, $attr ) {
155
+ if ( ! isset( $attr['src'] ) ) {
156
+ return $html;
157
+ }
158
+ $src = $attr['src'];
159
+ $youtube_pattern = '#^https?://(?:www\.)?(?:youtube\.com/watch|youtu\.be/)#';
160
+ if ( 1 === preg_match( $youtube_pattern, $src ) ) {
161
+ return $this->shortcode( [ $src ] );
162
+ }
163
+ return $html;
164
+ }
165
  }
components/components-core.php CHANGED
@@ -703,6 +703,9 @@ function amp_author_meta( $args ) {
703
  add_action('amp_post_template_css','ampforwp_backtotop_global_css');
704
  function ampforwp_backtotop_global_css(){?>
705
  amp-img.amp-wp-enforced-sizes[layout=intrinsic] > img, .amp-wp-unknown-size > img { object-fit: contain; }
 
 
 
706
  <?php if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
707
  .btt{
708
  position: fixed;
703
  add_action('amp_post_template_css','ampforwp_backtotop_global_css');
704
  function ampforwp_backtotop_global_css(){?>
705
  amp-img.amp-wp-enforced-sizes[layout=intrinsic] > img, .amp-wp-unknown-size > img { object-fit: contain; }
706
+ .rtl amp-carousel {direction: ltr;}
707
+ .rtl .amp-menu .toggle:after{left:0;right:unset;}
708
+ .sharedaddy li{display:none}
709
  <?php if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
710
  .btt{
711
  position: fixed;
components/search/search.php CHANGED
@@ -28,7 +28,8 @@ function ampforwp_framework_get_search_form() {
28
  </div>
29
  </div>
30
  </form>';
31
- echo $form; // escaped above
 
32
  }
33
  ampforwp_add_scripts();
34
  function ampforwp_add_scripts(){
28
  </div>
29
  </div>
30
  </form>';
31
+ $form = apply_filters( 'ampforwp_search_form_data', $form );
32
+ echo $form; // XSS OK
33
  }
34
  ampforwp_add_scripts();
35
  function ampforwp_add_scripts(){
includes/features/performance/performance-functions.php CHANGED
@@ -191,10 +191,23 @@ function ampforwp_code_to_add_in_htaccess(){
191
  return $htaccess_cntn;
192
  }
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  // Tree shaking feature #2949 --- starts here ---
195
  if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
196
  function ampforwp_tree_shaking_purify_amphtml($completeContent){
197
-
198
  if( function_exists('amp_pagebuilder_compatibility_init') ){
199
  // compatibility with AMP Pagebuilder Compatibility
200
  return $completeContent;
@@ -237,6 +250,7 @@ if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
237
  $sheet .= $styles;
238
  }
239
  $sheet.=$font_css;
 
240
  $sheet = stripcslashes($sheet);
241
  if(strpos($sheet, '-keyframes')!==false){
242
  $sheet = preg_replace("/@(-o-|-moz-|-webkit-|-ms-)*keyframes\s(.*?){([0-9%a-zA-Z,\s.]*{(.*?)})*[\s\n]*}/s", "", $sheet);
@@ -244,11 +258,9 @@ if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
244
  $completeContent = preg_replace("/<style\samp-custom>(.*?)<\/style>/s", "".$comment."<style amp-custom>".$sheet."</style>", $completeContent);
245
  $completeContent = apply_filters("ampforwp_tree_shaking_add_css", $completeContent);
246
  }
247
-
248
  }
249
  //for fonts
250
  $completeContent = str_replace(array('":backSlash:', "':backSlash:"), array('"\\', "'\\"), $completeContent);
251
-
252
  return $completeContent;
253
  }
254
  }
191
  return $htaccess_cntn;
192
  }
193
 
194
+ function ampforwp_white_list_selectors($completeContent){
195
+ $white_list = array();
196
+ $white_list = (array)apply_filters('ampforwp_tree_shaking_white_list_selector',$white_list);
197
+ $w_l_str = '';
198
+ for($i=0;$i<count($white_list);$i++){
199
+ $f = $white_list[$i];
200
+ preg_match_all('/'.$f.'{(.*?)}/s', $completeContent, $matches);
201
+ if(isset($matches[0][0])){
202
+ $w_l_str .= $matches[0][0];
203
+ }
204
+ }
205
+ return $w_l_str;
206
+ }
207
  // Tree shaking feature #2949 --- starts here ---
208
  if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
209
  function ampforwp_tree_shaking_purify_amphtml($completeContent){
210
+ $white_lists = ampforwp_white_list_selectors($completeContent);
211
  if( function_exists('amp_pagebuilder_compatibility_init') ){
212
  // compatibility with AMP Pagebuilder Compatibility
213
  return $completeContent;
250
  $sheet .= $styles;
251
  }
252
  $sheet.=$font_css;
253
+ $sheet.=$white_lists;
254
  $sheet = stripcslashes($sheet);
255
  if(strpos($sheet, '-keyframes')!==false){
256
  $sheet = preg_replace("/@(-o-|-moz-|-webkit-|-ms-)*keyframes\s(.*?){([0-9%a-zA-Z,\s.]*{(.*?)})*[\s\n]*}/s", "", $sheet);
258
  $completeContent = preg_replace("/<style\samp-custom>(.*?)<\/style>/s", "".$comment."<style amp-custom>".$sheet."</style>", $completeContent);
259
  $completeContent = apply_filters("ampforwp_tree_shaking_add_css", $completeContent);
260
  }
 
261
  }
262
  //for fonts
263
  $completeContent = str_replace(array('":backSlash:', "':backSlash:"), array('"\\', "'\\"), $completeContent);
 
264
  return $completeContent;
265
  }
266
  }
includes/includes.php CHANGED
@@ -66,4 +66,14 @@ function ampforwp_add_admin_upgread_script($hook){
66
  wp_enqueue_script( 'ampforwp_admin_module_upgreade', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/module-upgrade.js', array( 'jquery', 'updates' ), AMPFORWP_VERSION, true );
67
  }
68
  }
69
- ?>
 
 
 
 
 
 
 
 
 
 
66
  wp_enqueue_script( 'ampforwp_admin_module_upgreade', untrailingslashit(AMPFORWP_PLUGIN_DIR_URI) . '/includes/module-upgrade.js', array( 'jquery', 'updates' ), AMPFORWP_VERSION, true );
67
  }
68
  }
69
+ /*
70
+ * If WP version is greater then 5.3 then add a custom class in the body
71
+ */
72
+ add_filter('admin_body_class', 'ampforwp_custom_admin_body_class', 11);
73
+ function ampforwp_custom_admin_body_class($classes){
74
+ global $wp_version;
75
+ if (version_compare( $wp_version, '5.3', '>=') ){
76
+ $classes .= ' new-wp-version ';
77
+ }
78
+ return $classes;
79
+ }?>
includes/options/admin-config.php CHANGED
@@ -3281,7 +3281,10 @@ $e_commerce_support[] = array(
3281
  'title' => esc_html__('Search Widget Label', 'accelerated-mobile-pages'),
3282
  'default' => esc_html__('Search for:','accelerated-mobile-pages'),
3283
  'desc' => esc_html__('This is the text that gets shown as Search Box Label','accelerated-mobile-pages'),
3284
- 'required' => array( 'amp-use-pot', '=' , 0 )
 
 
 
3285
  ),
3286
  array(
3287
  'id' => 'ampforwp-search-label',
@@ -3290,7 +3293,10 @@ $e_commerce_support[] = array(
3290
  'desc' => esc_html__('This is the text that gets shown above Search Box','accelerated-mobile-pages'),
3291
  'default' => esc_html__('Type your search query and hit enter: ','accelerated-mobile-pages'),
3292
  'placeholder'=>esc_html__('write here','accelerated-mobile-pages'),
3293
- 'required' => array( 'amp-use-pot', '=' , 0 )
 
 
 
3294
 
3295
  )
3296
  ) ));
3281
  'title' => esc_html__('Search Widget Label', 'accelerated-mobile-pages'),
3282
  'default' => esc_html__('Search for:','accelerated-mobile-pages'),
3283
  'desc' => esc_html__('This is the text that gets shown as Search Box Label','accelerated-mobile-pages'),
3284
+ 'required' => array(
3285
+ array( 'amp-use-pot', '=' , 0 ),
3286
+ array('amp-design-selector', '!=' , '4')
3287
+ )
3288
  ),
3289
  array(
3290
  'id' => 'ampforwp-search-label',
3293
  'desc' => esc_html__('This is the text that gets shown above Search Box','accelerated-mobile-pages'),
3294
  'default' => esc_html__('Type your search query and hit enter: ','accelerated-mobile-pages'),
3295
  'placeholder'=>esc_html__('write here','accelerated-mobile-pages'),
3296
+ 'required' => array(
3297
+ array( 'amp-use-pot', '=' , 0 ),
3298
+ array('amp-design-selector', '!=' , '4')
3299
+ )
3300
 
3301
  )
3302
  ) ));
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -329,9 +329,9 @@ background: rgb(245, 246, 250);
329
  #redux_save:hover{
330
  background: #13a315;
331
  }
332
- .version-5-3 #redux_save,
333
- .version-5-3 #redux-defaults-section,
334
- .version-5-3 #redux-defaults {
335
  padding: 12px 18px 12px 18px;
336
  }
337
  #redux-defaults-section,
329
  #redux_save:hover{
330
  background: #13a315;
331
  }
332
+ body.new-wp-version #redux_save,
333
+ body.new-wp-version #redux-defaults-section,
334
+ body.new-wp-version #redux-defaults {
335
  padding: 12px 18px 12px 18px;
336
  }
337
  #redux-defaults-section,
includes/vendor/amp/includes/amp-post-template-actions.php CHANGED
@@ -28,7 +28,7 @@ function amp_post_template_add_meta_generator() {
28
  add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_cached_link' );
29
  function amp_post_template_add_cached_link($amp_template) {
30
  $design = "swift";
31
- if(ampforwp_get_setting("ampforwp_font_icon")=="swift-icons"){
32
  if(ampforwp_get_setting('amp-design-selector')!=4){
33
  $design = "design-".ampforwp_get_setting('amp-design-selector');
34
  }
@@ -71,6 +71,14 @@ function amp_post_template_add_schemaorg_metadata( $amp_template ) {
71
  if ( empty( $metadata ) ) {
72
  return;
73
  }
 
 
 
 
 
 
 
 
74
  $seo_sel = ampforwp_get_setting('ampforwp-seo-selection');
75
  if( (ampforwp_get_setting('ampforwp-seo-yoast-schema') == false && ampforwp_get_setting('ampforwp-seo-selection') == 'yoast') || empty($seo_sel) ){
76
  ?>
28
  add_action( 'amp_post_template_head', 'AMPforWP\\AMPVendor\\amp_post_template_add_cached_link' );
29
  function amp_post_template_add_cached_link($amp_template) {
30
  $design = "swift";
31
+ if(ampforwp_get_setting("ampforwp_font_icon")=="swift-icons" && (ampforwp_get_setting('amp-design-selector')==3 || ampforwp_get_setting('amp-design-selector')==4)){
32
  if(ampforwp_get_setting('amp-design-selector')!=4){
33
  $design = "design-".ampforwp_get_setting('amp-design-selector');
34
  }
71
  if ( empty( $metadata ) ) {
72
  return;
73
  }
74
+ if ( isset($metadata['description']) ) {
75
+ $metadata['description'] = str_replace("&nbsp;", "", $metadata['description']);
76
+ }
77
+ if ( isset($metadata['articleBody']) ) {
78
+ $metadata['articleBody'] = str_replace("&nbsp;", "", $metadata['articleBody']);
79
+ $metadata['articleBody'] = trim(preg_replace('/\s+/', ' ', $metadata['articleBody']));
80
+ $metadata['articleBody'] = preg_replace('/(&lt;.+?&gt;)/', '', $metadata['articleBody']);
81
+ }
82
  $seo_sel = ampforwp_get_setting('ampforwp-seo-selection');
83
  if( (ampforwp_get_setting('ampforwp-seo-yoast-schema') == false && ampforwp_get_setting('ampforwp-seo-selection') == 'yoast') || empty($seo_sel) ){
84
  ?>
includes/vendor/amp/includes/class-amp-post-template.php CHANGED
@@ -373,11 +373,15 @@ class AMP_Post_Template {
373
  preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
374
  preg_match_all('/height="(.*?)"/', $m1_content,$fimgheight);
375
  preg_match_all('/alt="(.*?)"/', $m1_content,$fimgalt);
376
-
377
  $data['src'] = $fimgsrc[1][0];
378
  $data['width'] = $fimgwidth[1][0];
379
  $data['height'] = $fimgheight[1][0];
380
- $data['alt'] = ($fimgalt[1][0]?:'');
 
 
 
 
381
  $fallback_data = apply_filters('ampforwp_fallback_image_params',$data);
382
  $fsrc = $fallback_data['src'];
383
  $fwidth = $fallback_data['width'];
@@ -386,7 +390,11 @@ class AMP_Post_Template {
386
  $ssrc = $fimgsrc[0][0];
387
  $swidth = $fimgwidth[0][0];
388
  $sheight = $fimgheight[0][0];
389
- $salt = ($fimgalt[0][0]?:'');
 
 
 
 
390
  $src_rep = 'src="'.esc_url($fsrc).'"';
391
  $width_rep = 'width="'.intval($fwidth).'"';
392
  $height_rep = 'height="'.intval($fheight).'"';
@@ -398,6 +406,7 @@ class AMP_Post_Template {
398
  $fallback_img = "<amp-img ".$m_content."<amp-img fallback ".$m1_content."</amp-img></amp-img>";//$m_content, $m1_content escaped above.
399
  $content = str_replace("$match", $fallback_img, $content);
400
  }
 
401
  }
402
  }
403
  return $content;
373
  preg_match_all('/width="(.*?)"/', $m1_content,$fimgwidth);
374
  preg_match_all('/height="(.*?)"/', $m1_content,$fimgheight);
375
  preg_match_all('/alt="(.*?)"/', $m1_content,$fimgalt);
376
+ if(isset($fimgsrc[1][0]) && isset($fimgwidth[1][0]) && isset($fimgheight[1][0])){
377
  $data['src'] = $fimgsrc[1][0];
378
  $data['width'] = $fimgwidth[1][0];
379
  $data['height'] = $fimgheight[1][0];
380
+ if(isset($fimgalt[1][0])){
381
+ $data['alt'] = $fimgalt[1][0];
382
+ }else{
383
+ $data['alt'] = '';
384
+ }
385
  $fallback_data = apply_filters('ampforwp_fallback_image_params',$data);
386
  $fsrc = $fallback_data['src'];
387
  $fwidth = $fallback_data['width'];
390
  $ssrc = $fimgsrc[0][0];
391
  $swidth = $fimgwidth[0][0];
392
  $sheight = $fimgheight[0][0];
393
+ if(isset($fimgalt[0][0])){
394
+ $salt = $fimgalt[0][0];
395
+ }else{
396
+ $salt = '';
397
+ }
398
  $src_rep = 'src="'.esc_url($fsrc).'"';
399
  $width_rep = 'width="'.intval($fwidth).'"';
400
  $height_rep = 'height="'.intval($fheight).'"';
406
  $fallback_img = "<amp-img ".$m_content."<amp-img fallback ".$m1_content."</amp-img></amp-img>";//$m_content, $m1_content escaped above.
407
  $content = str_replace("$match", $fallback_img, $content);
408
  }
409
+ }
410
  }
411
  }
412
  return $content;
includes/vendor/amp/includes/sanitizers/class-amp-allowed-tags-generated.php CHANGED
@@ -9162,14 +9162,37 @@ class AMP_Allowed_Tags_Generated {
9162
  'source' => array(
9163
  array(
9164
  'attr_spec_list' => array(
9165
- '[src]' => array(),
9166
- '[type]' => array(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9167
  'media' => array(),
9168
  'src' => array(
9169
  'blacklisted_value_regex' => '__amp_source_origin',
9170
  'value_url' => array(
9171
  'allow_relative' => true,
9172
- 'allowed_protocol' => array(
9173
  'https',
9174
  ),
9175
  ),
@@ -9179,19 +9202,19 @@ class AMP_Allowed_Tags_Generated {
9179
  'tag_spec' => array(
9180
  'mandatory_parent' => 'amp-video',
9181
  'spec_name' => 'amp-video > source',
9182
- 'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
9183
  ),
9184
  ),
9185
  array(
9186
  'attr_spec_list' => array(
9187
- '[src]' => array(),
9188
- '[type]' => array(),
9189
  'media' => array(),
9190
  'src' => array(
9191
  'blacklisted_value_regex' => '__amp_source_origin',
9192
  'value_url' => array(
9193
  'allow_relative' => true,
9194
- 'allowed_protocol' => array(
9195
  'https',
9196
  ),
9197
  ),
@@ -9201,7 +9224,7 @@ class AMP_Allowed_Tags_Generated {
9201
  'tag_spec' => array(
9202
  'mandatory_parent' => 'amp-audio',
9203
  'spec_name' => 'amp-audio > source',
9204
- 'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
9205
  ),
9206
  ),
9207
  array(
@@ -9212,7 +9235,7 @@ class AMP_Allowed_Tags_Generated {
9212
  'mandatory' => true,
9213
  'value_url' => array(
9214
  'allow_relative' => true,
9215
- 'allowed_protocol' => array(
9216
  'https',
9217
  ),
9218
  ),
@@ -9224,7 +9247,7 @@ class AMP_Allowed_Tags_Generated {
9224
  'tag_spec' => array(
9225
  'mandatory_parent' => 'audio',
9226
  'spec_name' => 'audio > source',
9227
- 'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-audio',
9228
  ),
9229
  ),
9230
  array(
@@ -9235,7 +9258,7 @@ class AMP_Allowed_Tags_Generated {
9235
  'mandatory' => true,
9236
  'value_url' => array(
9237
  'allow_relative' => true,
9238
- 'allowed_protocol' => array(
9239
  'https',
9240
  ),
9241
  ),
@@ -9247,19 +9270,19 @@ class AMP_Allowed_Tags_Generated {
9247
  'tag_spec' => array(
9248
  'mandatory_parent' => 'video',
9249
  'spec_name' => 'video > source',
9250
- 'spec_url' => 'https://www.ampproject.org/docs/reference/components/amp-video',
9251
  ),
9252
  ),
9253
  array(
9254
  'attr_spec_list' => array(
9255
- '[src]' => array(),
9256
- '[type]' => array(),
9257
  'media' => array(),
9258
  'src' => array(
9259
  'blacklisted_value_regex' => '__amp_source_origin',
9260
  'value_url' => array(
9261
  'allow_relative' => true,
9262
- 'allowed_protocol' => array(
9263
  'https',
9264
  ),
9265
  ),
9162
  'source' => array(
9163
  array(
9164
  'attr_spec_list' => array(
9165
+ 'media' => array(),
9166
+ 'sizes' => array(),
9167
+ 'srcset' => array(
9168
+ 'blacklisted_value_regex' => '__amp_source_origin',
9169
+ 'value_url' => array(
9170
+ 'allow_relative' => true,
9171
+ 'protocol' => array(
9172
+ 'data',
9173
+ 'http',
9174
+ 'https',
9175
+ ),
9176
+ ),
9177
+ ),
9178
+ 'type' => array(),
9179
+ ),
9180
+ 'tag_spec' => array(
9181
+ 'mandatory_parent' => 'picture',
9182
+ 'spec_name' => 'picture > source',
9183
+ 'spec_url' => 'https://amp.dev/documentation/components/amp-img',
9184
+ ),
9185
+ ),
9186
+ array(
9187
+ 'attr_spec_list' => array(
9188
+ 'data-amp-bind-src' => array(),
9189
+ 'data-amp-bind-type' => array(),
9190
  'media' => array(),
9191
  'src' => array(
9192
  'blacklisted_value_regex' => '__amp_source_origin',
9193
  'value_url' => array(
9194
  'allow_relative' => true,
9195
+ 'protocol' => array(
9196
  'https',
9197
  ),
9198
  ),
9202
  'tag_spec' => array(
9203
  'mandatory_parent' => 'amp-video',
9204
  'spec_name' => 'amp-video > source',
9205
+ 'spec_url' => 'https://amp.dev/documentation/components/amp-video',
9206
  ),
9207
  ),
9208
  array(
9209
  'attr_spec_list' => array(
9210
+ 'data-amp-bind-src' => array(),
9211
+ 'data-amp-bind-type' => array(),
9212
  'media' => array(),
9213
  'src' => array(
9214
  'blacklisted_value_regex' => '__amp_source_origin',
9215
  'value_url' => array(
9216
  'allow_relative' => true,
9217
+ 'protocol' => array(
9218
  'https',
9219
  ),
9220
  ),
9224
  'tag_spec' => array(
9225
  'mandatory_parent' => 'amp-audio',
9226
  'spec_name' => 'amp-audio > source',
9227
+ 'spec_url' => 'https://amp.dev/documentation/components/amp-audio',
9228
  ),
9229
  ),
9230
  array(
9235
  'mandatory' => true,
9236
  'value_url' => array(
9237
  'allow_relative' => true,
9238
+ 'protocol' => array(
9239
  'https',
9240
  ),
9241
  ),
9247
  'tag_spec' => array(
9248
  'mandatory_parent' => 'audio',
9249
  'spec_name' => 'audio > source',
9250
+ 'spec_url' => 'https://amp.dev/documentation/components/amp-audio',
9251
  ),
9252
  ),
9253
  array(
9258
  'mandatory' => true,
9259
  'value_url' => array(
9260
  'allow_relative' => true,
9261
+ 'protocol' => array(
9262
  'https',
9263
  ),
9264
  ),
9270
  'tag_spec' => array(
9271
  'mandatory_parent' => 'video',
9272
  'spec_name' => 'video > source',
9273
+ 'spec_url' => 'https://amp.dev/documentation/components/amp-video',
9274
  ),
9275
  ),
9276
  array(
9277
  'attr_spec_list' => array(
9278
+ 'data-amp-bind-src' => array(),
9279
+ 'data-amp-bind-type' => array(),
9280
  'media' => array(),
9281
  'src' => array(
9282
  'blacklisted_value_regex' => '__amp_source_origin',
9283
  'value_url' => array(
9284
  'allow_relative' => true,
9285
+ 'protocol' => array(
9286
  'https',
9287
  ),
9288
  ),
includes/vendor/amp/includes/sanitizers/class-amp-gallery-block-sanitizer-5-3.php CHANGED
@@ -375,7 +375,12 @@ class AMP_Gallery_Block_Sanitizer extends AMP_Base_Sanitizer {
375
  $figure_node = AMP_DOM_Utils::create_node($this->dom, 'figure', array('class'=>'ampforwp-gallery-item amp-carousel-containerd3'));
376
  $figure_node->appendChild($amp_image);
377
  $fig_caption = AMP_DOM_Utils::create_node($this->dom, 'figcaption', array());
378
- $fig_caption->nodeValue = $args['images'][$i]['caption'];
 
 
 
 
 
379
  $figure_node->appendChild($fig_caption);
380
  $gal_div->appendChild( $figure_node );
381
  $i++;
375
  $figure_node = AMP_DOM_Utils::create_node($this->dom, 'figure', array('class'=>'ampforwp-gallery-item amp-carousel-containerd3'));
376
  $figure_node->appendChild($amp_image);
377
  $fig_caption = AMP_DOM_Utils::create_node($this->dom, 'figcaption', array());
378
+ if ( isset($image['caption']) && is_object($image['caption']) ) {
379
+ $captionlength = $image['caption']->length;
380
+ for ($i=0 ;$i < $captionlength;$i++){
381
+ $fig_caption->appendChild($image['caption']->item(0));
382
+ }
383
+ }
384
  $figure_node->appendChild($fig_caption);
385
  $gal_div->appendChild( $figure_node );
386
  $i++;
pagebuilder/inc/admin-amp-page-builder.css CHANGED
@@ -290,14 +290,13 @@ amppb-row-fields .amppb-column-2:not(:last-child){
290
  }
291
  .amppb-setting-right span{
292
  display: inline-block;
293
- right: 0px;
294
- /*position: absolute;*/
295
- top: 0px;
296
- padding: 12px 7px 9px 5px;
297
  cursor: pointer;
298
  font-size: 15px;
299
  color: #72777c;
300
  line-height: 1;
 
 
 
301
  }
302
 
303
  #amp-page-builder .ui-state-highlight {
290
  }
291
  .amppb-setting-right span{
292
  display: inline-block;
 
 
 
 
293
  cursor: pointer;
294
  font-size: 15px;
295
  color: #72777c;
296
  line-height: 1;
297
+ width:35px;
298
+ height: 35px;
299
+ line-height: 35px;
300
  }
301
 
302
  #amp-page-builder .ui-state-highlight {
pagebuilder/inc/admin-amp-page-builder.js CHANGED
@@ -740,6 +740,20 @@ Vue.component('fields-data',{
740
  app.modalcontent.fields.forEach(function(modaldata, key){
741
  if(modaldata.name==dataAjaxDep){
742
  modaldata.options_details = response.data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
743
  if(document.getElementById(dataAjaxDep+"1")){
744
  document.getElementById(dataAjaxDep+"1").style.visibility = "hidden";
745
  }
740
  app.modalcontent.fields.forEach(function(modaldata, key){
741
  if(modaldata.name==dataAjaxDep){
742
  modaldata.options_details = response.data;
743
+
744
+ // Add default selection for Taxonomy and Category dropdown in Category Module.
745
+ setTimeout(function(){
746
+ let tval = jQuery("#taxonomy_selection").children().children('select').val();
747
+ let cval = jQuery("#category_selection").children().children('select').val();
748
+ if(tval==""){
749
+ jQuery("#taxonomy_selection").children().children('select').val('recent_option');
750
+ }
751
+ if (cval == ''){
752
+ jQuery("#category_selection").children().children('select').val('recent_option');
753
+ }
754
+
755
+ },250);
756
+
757
  if(document.getElementById(dataAjaxDep+"1")){
758
  document.getElementById(dataAjaxDep+"1").style.visibility = "hidden";
759
  }
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -874,7 +874,14 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
874
  array(
875
  'taxonomy'=>$fieldValues['taxonomy_selection'],
876
  'field'=>'id',
877
- 'terms'=>$fieldValues['category_selection']));
 
 
 
 
 
 
 
878
  }
879
  $args = apply_filters('ampforwp_content_module_args', $args, $fieldValues);
880
  //The Query
874
  array(
875
  'taxonomy'=>$fieldValues['taxonomy_selection'],
876
  'field'=>'id',
877
+ 'terms'=>$fieldValues['category_selection']
878
+ )
879
+ );
880
+ if ( isset($args['tax_query'][0]['taxonomy'] ) ){
881
+ if ( empty($args['tax_query'][0]['taxonomy'])) {
882
+ unset($args['tax_query']);
883
+ }
884
+ }
885
  }
886
  $args = apply_filters('ampforwp_content_module_args', $args, $fieldValues);
887
  //The Query
pagebuilder/modules/contents-module.php CHANGED
@@ -37,7 +37,7 @@ function ampforwp_content_module_pagination($args, $fieldValues){
37
  display:grid;
38
  width:100%;
39
  grid-template-columns:1fr 1fr 1fr;
40
- grid-gap:0px 30px;
41
  }
42
  {{module-class}} .cm ul li {
43
  list-style-type: none;
@@ -49,7 +49,7 @@ function ampforwp_content_module_pagination($args, $fieldValues){
49
  {{module-class}} .cm h4{border-bottom: 2px solid #eee;padding-bottom: 8px;margin-bottom: 5px;font-size:18px;color: #191919;font-weight: 600;}
50
  {{module-class}} .cm .cmr{display:flex;flex-direction: column;margin-top: 6px;}
51
  {{module-class}} .cm .cmr a{font-size: 16px;line-height: 1.3;font-weight: 500;color: #000;margin: 0px 0px 5px 0px;}
52
- {{module-class}} .cm .cmr p{color: {{text_color_picker}};font-size: 13px;line-height: 20px;letter-spacing: 0.10px;margin-bottom:0;}
53
  {{module-class}} .cm .cml{width:100%;}
54
  {{module-class}} .cmp a {
55
  color: black;
@@ -71,6 +71,10 @@ function ampforwp_content_module_pagination($args, $fieldValues){
71
  flex-direction: row;
72
  justify-content: center;
73
  }
 
 
 
 
74
  @media(max-width:768px){
75
  {{module-class}} .cm ul{
76
  grid-template-columns:1fr;
@@ -300,7 +304,7 @@ if ( is_admin() ) {
300
  'name' =>"ampforwp_read_more",
301
  'label' =>esc_html__("Read More Text","accelerated-mobile-pages"),
302
  'tab' =>'customizer',
303
- 'default' =>'',
304
  'content_type'=>'html',
305
  'required' => array('ampforwp_show_excerpt' => 'yes'),
306
  ),
@@ -459,6 +463,7 @@ if ( is_admin() ) {
459
  }
460
 
461
  $excerptContent = "";
 
462
  $readMore = "";
463
  if( $ampforwp_show_excerpt == 'yes' ) {
464
  if( has_excerpt() ) {
@@ -468,8 +473,9 @@ if ( is_admin() ) {
468
  }
469
  if(isset($fieldValues['ampforwp_read_more']) && !empty($fieldValues['ampforwp_read_more']) ){
470
  $readMore = $fieldValues['ampforwp_read_more'];
 
471
  }
472
- $excerptContent = '<p>'.wp_trim_words( strip_tags( strip_shortcodes( $content ) ) , (int) $ampforwp_excerpt_length ).'<a href="'.esc_url($ampforwp_post_url).'" > '.esc_html($readMore).'</a></p>';
473
  }
474
  $loopdate = "";
475
  $loopdate = human_time_diff(
37
  display:grid;
38
  width:100%;
39
  grid-template-columns:1fr 1fr 1fr;
40
+ grid-gap:30px;
41
  }
42
  {{module-class}} .cm ul li {
43
  list-style-type: none;
49
  {{module-class}} .cm h4{border-bottom: 2px solid #eee;padding-bottom: 8px;margin-bottom: 5px;font-size:18px;color: #191919;font-weight: 600;}
50
  {{module-class}} .cm .cmr{display:flex;flex-direction: column;margin-top: 6px;}
51
  {{module-class}} .cm .cmr a{font-size: 16px;line-height: 1.3;font-weight: 500;color: #000;margin: 0px 0px 5px 0px;}
52
+ {{module-class}} .cm .cmr p{color: #555;font-size: 13px;line-height: 20px;letter-spacing: 0.10px;margin-bottom:0;}
53
  {{module-class}} .cm .cml{width:100%;}
54
  {{module-class}} .cmp a {
55
  color: black;
71
  flex-direction: row;
72
  justify-content: center;
73
  }
74
+ {{module-class}} .cm .cmr p a{
75
+ font-size:13px;
76
+ color:#005be2;
77
+ }
78
  @media(max-width:768px){
79
  {{module-class}} .cm ul{
80
  grid-template-columns:1fr;
304
  'name' =>"ampforwp_read_more",
305
  'label' =>esc_html__("Read More Text","accelerated-mobile-pages"),
306
  'tab' =>'customizer',
307
+ 'default' =>'Read More',
308
  'content_type'=>'html',
309
  'required' => array('ampforwp_show_excerpt' => 'yes'),
310
  ),
463
  }
464
 
465
  $excerptContent = "";
466
+ $read_more_link = "";
467
  $readMore = "";
468
  if( $ampforwp_show_excerpt == 'yes' ) {
469
  if( has_excerpt() ) {
473
  }
474
  if(isset($fieldValues['ampforwp_read_more']) && !empty($fieldValues['ampforwp_read_more']) ){
475
  $readMore = $fieldValues['ampforwp_read_more'];
476
+ $read_more_link = '<a href="'.esc_url($ampforwp_post_url).'" > '.esc_html($readMore).'</a>';
477
  }
478
+ $excerptContent = '<p>'.wp_trim_words( strip_tags( strip_shortcodes( $content ) ) , (int) $ampforwp_excerpt_length ).$read_more_link.'</p>';
479
  }
480
  $loopdate = "";
481
  $loopdate = human_time_diff(
pagebuilder/modules/testimonial-mod-module.php CHANGED
@@ -14,6 +14,7 @@ $output = '
14
  </amp-carousel>
15
  {{ifend_condition_testimonial_layout_type_3}}
16
  ';
 
17
  if ( in_array(ampforwp_get_setting('amp-design-selector'), array(1,2,3)) ) {
18
  $designCss = '{{module-class}} amp-carousel.testi3-slider, {{module-class}} .testi-mod-blk blockquote{
19
  background:transparent;
14
  </amp-carousel>
15
  {{ifend_condition_testimonial_layout_type_3}}
16
  ';
17
+ $designCss = '';
18
  if ( in_array(ampforwp_get_setting('amp-design-selector'), array(1,2,3)) ) {
19
  $designCss = '{{module-class}} amp-carousel.testi3-slider, {{module-class}} .testi-mod-blk blockquote{
20
  background:transparent;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
- Tested up to: 5.3.1
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,23 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.2 (19th December 2019) =
195
  * Improvement: Need to add wordpress default Gutenburg editor 'Block' settings Compatibility in AMP #3320
196
  * Improvement: Need to make compatibility with the Imagify plugin #3908
@@ -218,19 +235,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
218
  * Fixed: Debug warnings. #3932
219
  * Fixed: Google Tag manager not firing properly #3826
220
 
221
- = 1.0.0 (11th December 2019) =
222
- * Improvement: Need to clear amp treeshaking css for reset section button. #3916
223
- * Improvement: Need to add easy table of contents in extension list #3922
224
- * Fixed: If hide amp hide on post or pages from anywhere then that needs to redirect to 301 #3767
225
- * Fixed: Need to add filter in "wp_localize_script" #3764
226
- * Fixed: Need to add preload key requests for font icons #3752
227
- * Fixed: Advance footer options should not be hidden by default #3652
228
- * Fixed: Button Rel Attribute #3872
229
- * Fixed: Need to update the PWA for WP extension from the options panel #3888
230
- * Fixed: “View AMP” Button Showing CSS on frontend #3890
231
- * Fixed: Images get streched in new version of the AMP FOR WP Plugin #3914
232
- * Fixed: Need to remove one signal push notification button in pages. #3874
233
- * Fixed: when images are placed along with the anchor tag in gallery module of guntenberg editor the image src is getting unknown in AMP #3923
234
- * Fixed: When RTL is enabled,the menu in header is going to right but the elements in right are not moved to left. #3881
235
-
236
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
+ Tested up to: 5.3.2
7
+ Stable tag: 1.0.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 1.0.3 (23th December 2019) =
195
+ * Improvement: Filter in search form #3948
196
+ * Improvement: Improvement of jetpack social icons #3907
197
+ * Improvement: Need to add a Filter in amp tree shaking for adding custom CSS. #3971
198
+ * Fixed: Icomoon.ttf is preloaded in Design 1 and Design 2. #3945
199
+ * Fixed: Search translate text option is visible in swift but unused #3934
200
+ * Fixed: Category module has minor bugs after the update. #3880
201
+ * Fixed: Improvements required in RTL support in AMP #3938
202
+ * Fixed: Save buttons are not looking good after WP 5.3 update #3985
203
+ * Fixed: Video widget support in AMP #3841
204
+ * Fixed: Time is not working in published date notice #3956
205
+ * Fixed: Recoverable fatal error: Object of class DOM Node List could not be converted to string #3968
206
+ * Fixed: In Amp struture data option if we added any schema then description generated in html format #3937
207
+ * Fixed: Select Taxonomy and Select Category is getting blank in the category module of AMP page builder #3986
208
+ * Fixed: Notice: Undefined offset: 0 in class-amp-post-template.php on line 378 #3992
209
+ * Fixed: Undefined variable: designCss #3961
210
+
211
  = 1.0.2 (19th December 2019) =
212
  * Improvement: Need to add wordpress default Gutenburg editor 'Block' settings Compatibility in AMP #3320
213
  * Improvement: Need to make compatibility with the Imagify plugin #3908
235
  * Fixed: Debug warnings. #3932
236
  * Fixed: Google Tag manager not firing properly #3826
237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/features.php CHANGED
@@ -1761,6 +1761,7 @@ function ampforwp_get_seopress_title(){
1761
  }
1762
  elseif ( isset($seopress_options['seopress_titles_single_titles'][$seopress_get_current_cpt]['title'])) {
1763
  $seopress_title = $seopress_options['seopress_titles_single_titles'][$seopress_get_current_cpt]['title'];
 
1764
  }
1765
  if ( ampforwp_is_home() || ampforwp_is_blog() ) {
1766
  $seopress_titles_template_variables_array = array('%%sitetitle%%','%%tagline%%');
@@ -2660,7 +2661,8 @@ function ampforwp_modified_search_sidebar( $content ) {
2660
  $source = $element->childNodes->item(0);
2661
  $source->setAttribute('src',preg_replace('#^http?:#', '', $source->getAttribute('src') ));
2662
  $source = $element->childNodes->item(1);
2663
- $source->setAttribute('src',preg_replace('#^http?:#', '', $source->getAttribute('src') ));
 
2664
  }
2665
  }
2666
  $audio = $dom->getElementsByTagName( 'amp-audio' );
@@ -3114,7 +3116,7 @@ function ampforwp_add_modified_date($post_object){
3114
  )
3115
  );
3116
  if(true == ampforwp_get_setting('ampforwp-post-date-notice-time')){
3117
- echo get_the_modified_time();
3118
  }
3119
  }
3120
  ?>
1761
  }
1762
  elseif ( isset($seopress_options['seopress_titles_single_titles'][$seopress_get_current_cpt]['title'])) {
1763
  $seopress_title = $seopress_options['seopress_titles_single_titles'][$seopress_get_current_cpt]['title'];
1764
+ $seopress_title = ampforwp_seopress_title_sanitize($seopress_title);
1765
  }
1766
  if ( ampforwp_is_home() || ampforwp_is_blog() ) {
1767
  $seopress_titles_template_variables_array = array('%%sitetitle%%','%%tagline%%');
2661
  $source = $element->childNodes->item(0);
2662
  $source->setAttribute('src',preg_replace('#^http?:#', '', $source->getAttribute('src') ));
2663
  $source = $element->childNodes->item(1);
2664
+ if($source)
2665
+ $source->setAttribute('src',preg_replace('#^http?:#', '', $source->getAttribute('src') ));
2666
  }
2667
  }
2668
  $audio = $dom->getElementsByTagName( 'amp-audio' );
3116
  )
3117
  );
3118
  if(true == ampforwp_get_setting('ampforwp-post-date-notice-time')){
3119
+ echo get_the_time();
3120
  }
3121
  }
3122
  ?>