AMP for WP – Accelerated Mobile Pages - Version 0.9.98.4

Version Description

(6th AUGUST 2019) = * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507 * Fixed: Design is breaking in swift theme when RTL option is enabled #3527 * Fixed: Validation error when width and height is empty in the logo #3530 * Fixed: 'Read more' link in excerpt for category module of AMP page builder #3510 * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3459 * Fixed: "Recent Posts below Related Posts" option should show only when it is available for the theme #3528

Download this release

Release Info

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

Code changes from version 0.9.98.3 to 0.9.98.4

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.2.2
7
- Stable tag: 0.9.98.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -189,6 +189,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
189
 
190
  == Changelog ==
191
 
 
 
 
 
 
 
 
 
192
  = 0.9.98.3 (2nd AUGUST 2019) =
193
  * Improvements: OpenGraph Support in AMP #3261
194
  * Improvements: Compatibility integrated with Cloudflare stream. #3230
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.2
7
+ Stable tag: 0.9.98.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
189
 
190
  == Changelog ==
191
 
192
+ = 0.9.98.4 (6th AUGUST 2019) =
193
+ * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
194
+ * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
195
+ * Fixed: Validation error when width and height is empty in the logo #3530
196
+ * Fixed: 'Read more' link in excerpt for category module of AMP page builder #3510
197
+ * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3459
198
+ * Fixed: "Recent Posts below Related Posts" option should show only when it is available for the theme #3528
199
+
200
  = 0.9.98.3 (2nd AUGUST 2019) =
201
  * Improvements: OpenGraph Support in AMP #3261
202
  * Improvements: Compatibility integrated with Cloudflare stream. #3230
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.98.3
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.98.3');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
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.98.4
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.98.4');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  // any changes to AMP_QUERY_VAR should be refelected here
26
  function ampforwp_generate_endpoint(){
changelog.txt CHANGED
@@ -1,5 +1,13 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
3
  = 0.9.98.3 (2nd AUGUST 2019) =
4
  * Improvements: OpenGraph Support in AMP #3261
5
  * Improvements: Compatibility integrated with Cloudflare stream. #3230
1
  == Changelog ==
2
 
3
+ = 0.9.98.4 (6th AUGUST 2019) =
4
+ * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
5
+ * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
6
+ * Fixed: Validation error when width and height is empty in the logo #3530
7
+ * Fixed: 'Read more' link in excerpt for category module of AMP page builder #3510
8
+ * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3459
9
+ * Fixed: "Recent Posts below Related Posts" option should show only when it is available for the theme #3528
10
+
11
  = 0.9.98.3 (2nd AUGUST 2019) =
12
  * Improvements: OpenGraph Support in AMP #3261
13
  * Improvements: Compatibility integrated with Cloudflare stream. #3230
includes/features/pagebuilders-support/pagebuilders_support.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ use ReduxCore\ReduxFramework\Redux;
3
+ function ampforwp_page_builders_support_options($opt_name){
4
+ $wpbakery_for_ampchecker = $divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = array();
5
+ $wpbakery_for_ampchecker = array(
6
+ 'id' => 'wpbakery_pb_for_amp_info_normal',
7
+ 'type' => 'info',
8
+ 'required' => array(
9
+ array('ampforwp-wpbakery-pb-for-amp', '=' , true),
10
+ ),
11
+ 'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
12
+ );
13
+ $divi_pb_for_ampchecker = array(
14
+ 'id' => 'divi_pb_for_amp_info_normal',
15
+ 'type' => 'info',
16
+ 'required' => array(
17
+ array('ampforwp-divi-pb-for-amp', '=' , true),
18
+ ),
19
+ 'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
20
+ );
21
+ $elemntr_pb_for_ampchecker = array(
22
+ 'id' => 'elemntr_pb_for_amp_info_normal',
23
+ 'type' => 'info',
24
+ 'required' => array(
25
+ array('ampforwp-elementor-pb-for-amp', '=' , true),
26
+ ),
27
+ 'desc' => sprintf('<div style="background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -45px -14px -18px -17px;"><b>%s</b> %s <a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a> extension.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/page-builder-compatibility-for-amp/" target="_blank">%s</a>)</div></div>',esc_html__( 'ONE LAST STEP REQUIRED:','accelerated-mobile-pages'),esc_html__( 'This feature requires', 'accelerated-mobile-pages' ),esc_html__( 'Page Builder For AMP', 'accelerated-mobile-pages'),esc_html__( 'Click here for more info', 'accelerated-mobile-pages' )),
28
+ );
29
+ if( !function_exists('amp_activate') ){
30
+ $pb_for_amp[] = array(
31
+ 'id' => 'ampforwp-pagebuilder-accor',
32
+ 'type' => 'section',
33
+ 'title' => esc_html__('AMPforWP PageBuilder', 'accelerated-mobile-pages'),
34
+ 'indent' => true,
35
+ 'layout_type' => 'accordion',
36
+ 'accordion-open'=> 1,
37
+ );
38
+
39
+ $pb_for_amp[] = array(
40
+ 'id' => 'ampforwp-pagebuilder',
41
+ 'type' => 'switch',
42
+ 'title' => esc_html__('AMPforWP PageBuilder', 'accelerated-mobile-pages'),
43
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the AMP PageBuilder', 'accelerated-mobile-pages'),
44
+ 'default' => true
45
+ );
46
+ }
47
+ $pb_for_amp[] = array(
48
+ 'id' => 'ampforwp-wpbakery-pb-for-amp-accor',
49
+ 'type' => 'section',
50
+ 'title' => esc_html__('WPBakery Page Builder Compatibility', 'accelerated-mobile-pages'),
51
+ 'indent' => true,
52
+ 'layout_type' => 'accordion',
53
+ 'accordion-open'=> 1,
54
+ );
55
+ $pb_for_amp[] = array(
56
+ 'id' => 'ampforwp-wpbakery-pb-for-amp',
57
+ 'type' => 'switch',
58
+ 'title' => esc_html__('WPBakery Page Builder Support','accelerated-mobile-pages'),
59
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the WPBakery Page Builder support for AMP', 'accelerated-mobile-pages'),
60
+ 'default' => false
61
+ );
62
+ $pb_for_amp[] = $wpbakery_for_ampchecker;
63
+ $pb_for_amp[] = array(
64
+ 'id' => 'ampforwp-divi-pb-for-amp-accor',
65
+ 'type' => 'section',
66
+ 'title' => esc_html__('Divi Builder Compatibility', 'accelerated-mobile-pages'),
67
+ 'indent' => true,
68
+ 'layout_type' => 'accordion',
69
+ 'accordion-open'=> 1,
70
+ );
71
+ $pb_for_amp[] = array(
72
+ 'id' => 'ampforwp-divi-pb-for-amp',
73
+ 'type' => 'switch',
74
+ 'title' => esc_html__('Divi Builder Support','accelerated-mobile-pages'),
75
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the Divi Builder support for AMP', 'accelerated-mobile-pages'),
76
+ 'default' => false
77
+ );
78
+ $pb_for_amp[] = $divi_pb_for_ampchecker;
79
+ $pb_for_amp[] = array(
80
+ 'id' => 'ampforwp-elementor-pb-for-amp-accor',
81
+ 'type' => 'section',
82
+ 'title' => esc_html__('Elementor Compatibility', 'accelerated-mobile-pages'),
83
+ 'indent' => true,
84
+ 'layout_type' => 'accordion',
85
+ 'accordion-open'=> 1,
86
+ );
87
+ $pb_for_amp[] = array(
88
+ 'id' => 'ampforwp-elementor-pb-for-amp',
89
+ 'type' => 'switch',
90
+ 'title' => esc_html__('Elementor Support','accelerated-mobile-pages'),
91
+ 'tooltip-subtitle' => esc_html__('Enable or Disable the Elementor support for AMP', 'accelerated-mobile-pages'),
92
+ 'default' => false
93
+ );
94
+ $pb_for_amp[] = $elemntr_pb_for_ampchecker;
95
+
96
+ $pb_title = 'Page Builder';
97
+ $theme = wp_get_theme(); // gets the current theme
98
+ if( class_exists('Vc_Manager') || ( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ) || did_action( 'elementor/loaded' ) ){
99
+ if(class_exists('Vc_Manager') ){
100
+ $pb_title = 'WPBakery Page Builder Support';
101
+ }
102
+ if( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ){
103
+ $pb_title = 'Divi Builder Support';
104
+ }
105
+ if(did_action( 'elementor/loaded' ) ){
106
+ $pb_title = 'Elementor Support';
107
+ }
108
+ }
109
+ Redux::setSection( $opt_name, array(
110
+ 'title' => esc_html__( $pb_title, 'accelerated-mobile-pages' ),
111
+ 'id' => 'amp-content-builder',
112
+ 'class' => 'ampforwp_new_features ',
113
+ 'subsection' => true,
114
+ 'fields' => $pb_for_amp,
115
+ )
116
+ );
117
+ }
includes/options/admin-config.php CHANGED
@@ -12,6 +12,7 @@ require_once AMPFORWP_PLUGIN_DIR."includes/features/structure-data/structured-da
12
  require_once AMPFORWP_PLUGIN_DIR."includes/features/notice-bar/notice-bar-options.php";
13
  require_once AMPFORWP_PLUGIN_DIR."includes/features/push-notification/push-notification-options.php";
14
  require_once AMPFORWP_PLUGIN_DIR."includes/features/contact-form/contact-form-options.php";
 
15
 
16
  // Option name where all the Redux data is stored.
17
  $opt_name = "redux_builder_amp";
@@ -24,7 +25,7 @@ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24
  $comment_AD_URL = "http://ampforwp.com/amp-comments/#utm_source=options-panel&utm_medium=comments-tab&utm_campaign=AMP%20Plugin";
25
  $comment_desc = '<a href="'.$comment_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/comments-banner.png" width="560" height="85" /></a>';
26
  }
27
- $wpbakery_for_ampchecker = $divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = array();
28
  if(!is_plugin_active( 'amp-pagebuilder-compatibility/amp-pagebuilder-compatibility.php' )){
29
  $wpbakery_for_ampchecker = array(
30
  'id' => 'wpbakery_pb_for_amp_info_normal',
@@ -113,7 +114,7 @@ if(!is_plugin_active( 'amp-pagebuilder-compatibility/amp-pagebuilder-compatibili
113
  'tooltip-subtitle' => esc_html__('Enable or Disable the Elementor support for AMP', 'accelerated-mobile-pages'),
114
  'default' => false
115
  );
116
- $pb_for_amp[] = $elemntr_pb_for_ampchecker;
117
 
118
  $all_extensions_data = array();
119
  global $all_extensions_data;
@@ -1261,6 +1262,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1261
  )
1262
  );
1263
  ampforwp_admin_advertisement_options($opt_name);
 
1264
  ampforwp_admin_performance_options($opt_name);
1265
  ampforwp_analytics_options($opt_name);
1266
  ampforwp_structure_data_options($opt_name);
@@ -1554,7 +1556,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1554
  ),
1555
  )
1556
  ) );//END
1557
- $pb_title = 'Page Builder';
1558
  $theme = wp_get_theme(); // gets the current theme
1559
  if( class_exists('Vc_Manager') || ( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ) || did_action( 'elementor/loaded' ) ){
1560
  if(class_exists('Vc_Manager') ){
@@ -1576,7 +1578,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1576
  'fields' => $pb_for_amp,
1577
  )
1578
 
1579
- ) ;
1580
 
1581
  // Ads Section
1582
  if ( ! function_exists('amp_activate') ) {
@@ -1822,7 +1824,9 @@ Redux::setArgs( "redux_builder_amp", $args );
1822
  )
1823
  );
1824
 
1825
- if ( ! function_exists('amp_activate') ) {
 
 
1826
  // Performance section
1827
  ampforwp_admin_performance_options($opt_name);
1828
  // Analytics section
@@ -5164,6 +5168,7 @@ $single_page_options = array(
5164
  'title' => esc_html__('Recent Posts below Related', 'accelerated-mobile-pages'),
5165
  'tooltip-subtitle' => esc_html__('To enable & disable recent posts', 'accelerated-mobile-pages'),
5166
  'default' => 1,
 
5167
  ),
5168
  array(
5169
  'id' => 'amforwp-recentpost-date-switch',
12
  require_once AMPFORWP_PLUGIN_DIR."includes/features/notice-bar/notice-bar-options.php";
13
  require_once AMPFORWP_PLUGIN_DIR."includes/features/push-notification/push-notification-options.php";
14
  require_once AMPFORWP_PLUGIN_DIR."includes/features/contact-form/contact-form-options.php";
15
+ require_once AMPFORWP_PLUGIN_DIR."includes/features/pagebuilders-support/pagebuilders_support.php";
16
 
17
  // Option name where all the Redux data is stored.
18
  $opt_name = "redux_builder_amp";
25
  $comment_AD_URL = "http://ampforwp.com/amp-comments/#utm_source=options-panel&utm_medium=comments-tab&utm_campaign=AMP%20Plugin";
26
  $comment_desc = '<a href="'.$comment_AD_URL.'" target="_blank"><img class="ampforwp-ad-img-banner" src="'.AMPFORWP_IMAGE_DIR . '/comments-banner.png" width="560" height="85" /></a>';
27
  }
28
+ /*$wpbakery_for_ampchecker = $divi_pb_for_ampchecker = $elemntr_pb_for_ampchecker = array();
29
  if(!is_plugin_active( 'amp-pagebuilder-compatibility/amp-pagebuilder-compatibility.php' )){
30
  $wpbakery_for_ampchecker = array(
31
  'id' => 'wpbakery_pb_for_amp_info_normal',
114
  'tooltip-subtitle' => esc_html__('Enable or Disable the Elementor support for AMP', 'accelerated-mobile-pages'),
115
  'default' => false
116
  );
117
+ $pb_for_amp[] = $elemntr_pb_for_ampchecker;*/
118
 
119
  $all_extensions_data = array();
120
  global $all_extensions_data;
1262
  )
1263
  );
1264
  ampforwp_admin_advertisement_options($opt_name);
1265
+ ampforwp_page_builders_support_options($opt_name);
1266
  ampforwp_admin_performance_options($opt_name);
1267
  ampforwp_analytics_options($opt_name);
1268
  ampforwp_structure_data_options($opt_name);
1556
  ),
1557
  )
1558
  ) );//END
1559
+ /* $pb_title = 'Page Builder';
1560
  $theme = wp_get_theme(); // gets the current theme
1561
  if( class_exists('Vc_Manager') || ( class_exists('ET_Builder_Plugin') || 'Divi' == $theme->name || 'Divi' == $theme->parent_theme ) || did_action( 'elementor/loaded' ) ){
1562
  if(class_exists('Vc_Manager') ){
1578
  'fields' => $pb_for_amp,
1579
  )
1580
 
1581
+ ) ;*/
1582
 
1583
  // Ads Section
1584
  if ( ! function_exists('amp_activate') ) {
1824
  )
1825
  );
1826
 
1827
+ if ( ! function_exists('amp_activate') ) {
1828
+ // PageBuilders section
1829
+ ampforwp_page_builders_support_options($opt_name);
1830
  // Performance section
1831
  ampforwp_admin_performance_options($opt_name);
1832
  // Analytics section
5168
  'title' => esc_html__('Recent Posts below Related', 'accelerated-mobile-pages'),
5169
  'tooltip-subtitle' => esc_html__('To enable & disable recent posts', 'accelerated-mobile-pages'),
5170
  'default' => 1,
5171
+ 'required' => array('amp-design-selector' , '=' , '4'),
5172
  ),
5173
  array(
5174
  'id' => 'amforwp-recentpost-date-switch',
includes/options/redux-core/templates/panel/content.tpl.php CHANGED
@@ -32,7 +32,7 @@ namespace ReduxCore\ReduxFramework;
32
  //$active = ( ( is_numeric($this->parent->current_tab) && $this->parent->current_tab == $k ) || ( !is_numeric($this->parent->current_tab) && $this->parent->current_tab === $k ) ) ? ' style="display: block;"' : '';
33
  $hide_wrapper = '';
34
  if(function_exists('amp_activate') ){
35
- $enabledOptions = array('basic','amp-e-commerce','disqus-comments','opt-text-subsection','amp-content-builder', 'amp-seo', 'fb-instant-article', 'hide-amp-section','amp-advance', 'amp-translator', 'design', 'amp-theme-settings', 'amp-theme-global-subsection', 'amp-theme-header-settings','amp-theme-homepage-settings', 'amp-single', 'amp-theme-footer-settings', 'amp-theme-page-settings', 'amp-social', 'ampforwp-date-section', 'amp-design');
36
  $enabledOptions = apply_filters( 'ampforwp_standalone_mode_wrapper', $enabledOptions );
37
  if(in_array($section['id'], $enabledOptions)){
38
  $hide_wrapper = '<div class="ampforwp_addon_mode"><div class="hide-wrapper"></div><div class="amp-watermark-wrapper"><a class="amp-watermark" href="https://ampforwp.com/tutorials/article/guide-to-amp-by-automattic-compatibility-in-ampforwp/" target="_blank">
32
  //$active = ( ( is_numeric($this->parent->current_tab) && $this->parent->current_tab == $k ) || ( !is_numeric($this->parent->current_tab) && $this->parent->current_tab === $k ) ) ? ' style="display: block;"' : '';
33
  $hide_wrapper = '';
34
  if(function_exists('amp_activate') ){
35
+ $enabledOptions = array('basic','amp-e-commerce','disqus-comments','opt-text-subsection', 'amp-seo', 'fb-instant-article', 'hide-amp-section','amp-advance', 'amp-translator', 'design', 'amp-theme-settings', 'amp-theme-global-subsection', 'amp-theme-header-settings','amp-theme-homepage-settings', 'amp-single', 'amp-theme-footer-settings', 'amp-theme-page-settings', 'amp-social', 'ampforwp-date-section', 'amp-design');
36
  $enabledOptions = apply_filters( 'ampforwp_standalone_mode_wrapper', $enabledOptions );
37
  if(in_array($section['id'], $enabledOptions)){
38
  $hide_wrapper = '<div class="ampforwp_addon_mode"><div class="hide-wrapper"></div><div class="amp-watermark-wrapper"><a class="amp-watermark" href="https://ampforwp.com/tutorials/article/guide-to-amp-by-automattic-compatibility-in-ampforwp/" target="_blank">
pagebuilder/modules/contents-module.php CHANGED
@@ -40,6 +40,10 @@ function ampforwp_content_module_pagination($args, $fieldValues){
40
  .cat_mod .cat_mod_r a{font-size: 16px;line-height: 1.3;font-weight: 500;color: #000;margin: 0px 0px 5px 0px;}
41
  .cat_mod .cat_mod_r p{color: {{text_color_picker}};font-size: 13px;line-height: 20px;letter-spacing: 0.10px;margin-bottom:0;}
42
  .cat_mod .cat_mod_l{width:100%;}
 
 
 
 
43
  .pagination a {
44
  color: black;
45
  float: left;
@@ -234,6 +238,15 @@ if ( is_admin() ) {
234
  'required' => array('ampforwp_show_excerpt' => 'yes'),
235
  ),
236
  array(
 
 
 
 
 
 
 
 
 
237
  'type' =>'text',
238
  'name' =>"img-width-1",
239
  'label' =>'Image Width',
@@ -388,14 +401,17 @@ if ( is_admin() ) {
388
  }
389
 
390
  $excerptContent = "";
 
391
  if( $ampforwp_show_excerpt == 'yes' ) {
392
  if( has_excerpt() ) {
393
  $content = get_the_excerpt();
394
  } else {
395
  $content = get_the_content();
396
  }
397
- $excerptContent = '
398
- <p>'.wp_trim_words( strip_tags( strip_shortcodes( $content ) ) , (int) $ampforwp_excerpt_length ).'</p>';
 
 
399
  }
400
  $loopdate = "";
401
  $loopdate = human_time_diff(
@@ -420,6 +436,7 @@ if ( is_admin() ) {
420
  "{{height}}",
421
  "{{title}}",
422
  "{{excerptContent}}",
 
423
  "{{loopdate}}",
424
  "{{authorname}}",
425
  "{{postdate}}",
@@ -433,6 +450,7 @@ if ( is_admin() ) {
433
  $height,
434
  $title,
435
  $excerptContent,
 
436
  $loopdate,
437
  $author,
438
  $postdate,
@@ -446,6 +464,7 @@ if ( is_admin() ) {
446
  $rawhtml = ampforwp_replaceIfContentConditional("height", $height, $rawhtml);
447
  $rawhtml = ampforwp_replaceIfContentConditional("title", $title, $rawhtml);
448
  $rawhtml = ampforwp_replaceIfContentConditional("excerptContent", $excerptContent, $rawhtml);
 
449
  $rawhtml = ampforwp_replaceIfContentConditional("loopdate", $loopdate, $rawhtml);
450
  $rawhtml = ampforwp_replaceIfContentConditional("authorname", $author, $rawhtml);
451
  $rawhtml = ampforwp_replaceIfContentConditional("postdate", $postdate, $rawhtml);
40
  .cat_mod .cat_mod_r a{font-size: 16px;line-height: 1.3;font-weight: 500;color: #000;margin: 0px 0px 5px 0px;}
41
  .cat_mod .cat_mod_r p{color: {{text_color_picker}};font-size: 13px;line-height: 20px;letter-spacing: 0.10px;margin-bottom:0;}
42
  .cat_mod .cat_mod_l{width:100%;}
43
+ .cat_mod .cat_mod_r p a{
44
+ font-size:13px;
45
+ color:#005be2;
46
+ }
47
  .pagination a {
48
  color: black;
49
  float: left;
238
  'required' => array('ampforwp_show_excerpt' => 'yes'),
239
  ),
240
  array(
241
+ 'type' =>'text',
242
+ 'name' =>"ampforwp_read_more",
243
+ 'label' =>esc_html__("Read More Text","accelerated-mobile-pages"),
244
+ 'tab' =>'customizer',
245
+ 'default' =>'',
246
+ 'content_type'=>'html',
247
+ 'required' => array('ampforwp_show_excerpt' => 'yes'),
248
+ ),
249
+ array(
250
  'type' =>'text',
251
  'name' =>"img-width-1",
252
  'label' =>'Image Width',
401
  }
402
 
403
  $excerptContent = "";
404
+ $readMore = "";
405
  if( $ampforwp_show_excerpt == 'yes' ) {
406
  if( has_excerpt() ) {
407
  $content = get_the_excerpt();
408
  } else {
409
  $content = get_the_content();
410
  }
411
+ if(isset($fieldValues['ampforwp_read_more']) && !empty($fieldValues['ampforwp_read_more']) ){
412
+ $readMore = $fieldValues['ampforwp_read_more'];
413
+ }
414
+ $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>';
415
  }
416
  $loopdate = "";
417
  $loopdate = human_time_diff(
436
  "{{height}}",
437
  "{{title}}",
438
  "{{excerptContent}}",
439
+ "{{readMore}}",
440
  "{{loopdate}}",
441
  "{{authorname}}",
442
  "{{postdate}}",
450
  $height,
451
  $title,
452
  $excerptContent,
453
+ $readMore,
454
  $loopdate,
455
  $author,
456
  $postdate,
464
  $rawhtml = ampforwp_replaceIfContentConditional("height", $height, $rawhtml);
465
  $rawhtml = ampforwp_replaceIfContentConditional("title", $title, $rawhtml);
466
  $rawhtml = ampforwp_replaceIfContentConditional("excerptContent", $excerptContent, $rawhtml);
467
+ $rawhtml = ampforwp_replaceIfContentConditional("readMore", $readMore, $rawhtml);
468
  $rawhtml = ampforwp_replaceIfContentConditional("loopdate", $loopdate, $rawhtml);
469
  $rawhtml = ampforwp_replaceIfContentConditional("authorname", $author, $rawhtml);
470
  $rawhtml = ampforwp_replaceIfContentConditional("postdate", $postdate, $rawhtml);
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.2.2
7
- Stable tag: 0.9.98.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -189,6 +189,14 @@ You can contact us from [here](https://ampforwp.com/contact/)
189
 
190
  == Changelog ==
191
 
 
 
 
 
 
 
 
 
192
  = 0.9.98.3 (2nd AUGUST 2019) =
193
  * Improvements: OpenGraph Support in AMP #3261
194
  * Improvements: Compatibility integrated with Cloudflare stream. #3230
@@ -215,13 +223,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
215
  * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517
216
  * Fixed: Single design 2 in Swift broken in one specific use case #3532
217
 
218
- = 0.9.98.2 (25ND JULY 2019) =
219
- * Fixed: Menu design issue in Design 3 #3489
220
- * Fixed: Fatal error when latest version of Smush pro plugin activated #3487
221
- * Fixed: After Version 0.9.98 update, Background Type gradient options are not showing in Row module of AMP pagebuilder #3490
222
- * Fixed: Undefined index ampforwp-amp-on-off #3474
223
- * Fixed: Search bar is not showing in design three after enabling the search option in header option panel #3484
224
- * Fixed: Content blank if Color Attribute is in Span tag #3497
225
- * Fixed: Sticky Header has no background color when scrolling. #3498
226
-
227
  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.2.2
7
+ Stable tag: 0.9.98.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
189
 
190
  == Changelog ==
191
 
192
+ = 0.9.98.4 (6th AUGUST 2019) =
193
+ * Improvements: Pagebuilder Compatibility Options in 'AMP By Automattic' Addon Mode Settings #3507
194
+ * Fixed: Design is breaking in swift theme when RTL option is enabled #3527
195
+ * Fixed: Validation error when width and height is empty in the logo #3530
196
+ * Fixed: 'Read more' link in excerpt for category module of AMP page builder #3510
197
+ * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3459
198
+ * Fixed: "Recent Posts below Related Posts" option should show only when it is available for the theme #3528
199
+
200
  = 0.9.98.3 (2nd AUGUST 2019) =
201
  * Improvements: OpenGraph Support in AMP #3261
202
  * Improvements: Compatibility integrated with Cloudflare stream. #3230
223
  * Fixed: Wp editor not loading when Using Page builder (with Gutenberg) #3517
224
  * Fixed: Single design 2 in Swift broken in one specific use case #3532
225
 
 
 
 
 
 
 
 
 
 
226
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/swift/style.php CHANGED
@@ -272,7 +272,17 @@ if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
272
  if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
273
  content:"\f107";font-family: "Font Awesome 5 Free";font-weight:600;font-size:20px;
274
  <?php } ?>
275
- display: inline-block;top: 1px;padding: 5px;transform: rotate(270deg);cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;}
 
 
 
 
 
 
 
 
 
 
276
  .m-menu .amp-menu li.menu-item-has-children:after{display:none;}
277
  .m-menu .amp-menu li ul{font-size:14px;}
278
  .m-menu .amp-menu {list-style-type: none;padding: 0;}
@@ -289,7 +299,11 @@ display: inline-block;top: 1px;padding: 5px;transform: rotate(270deg);cursor: po
289
  .m-menu .amp-menu a {padding: 7px 15px;}
290
  .m-menu > li{font-size:17px;}
291
  /*New Syles*/
 
 
 
292
  .m-menu .toggle {float :right;}
 
293
  .m-menu input{display:none}
294
  .m-menu .amp-menu [id^=drop]:checked + label + ul{ display: block;}
295
  .m-menu .amp-menu [id^=drop]:checked + .toggle:after{transform:rotate(360deg);}
272
  if ( $ampforwp_font_icon == 'fontawesome-icons' ){ ?>
273
  content:"\f107";font-family: "Font Awesome 5 Free";font-weight:600;font-size:20px;
274
  <?php } ?>
275
+ display: inline-block;top: 1px;padding: 5px;
276
+ <?php if( true == ampforwp_get_setting('amp-rtl-select-option') ) { ?>
277
+ transform: rotate(450deg);
278
+ left:0;
279
+ right:auto;
280
+ <?php } else{ ?>
281
+ transform: rotate(270deg);
282
+ right:0;
283
+ left:auto;
284
+ <?php } ?>
285
+ cursor: pointer;border-radius: 35px;color: <?php echo ampforwp_sanitize_color($redux_builder_amp['swift-element-overlay-color-control']['rgba'])?>;}
286
  .m-menu .amp-menu li.menu-item-has-children:after{display:none;}
287
  .m-menu .amp-menu li ul{font-size:14px;}
288
  .m-menu .amp-menu {list-style-type: none;padding: 0;}
299
  .m-menu .amp-menu a {padding: 7px 15px;}
300
  .m-menu > li{font-size:17px;}
301
  /*New Syles*/
302
+ <?php if( true == ampforwp_get_setting('amp-rtl-select-option') ) { ?>
303
+ .m-menu .toggle {float :left;}
304
+ <?php } else{ ?>
305
  .m-menu .toggle {float :right;}
306
+ <?php } ?>
307
  .m-menu input{display:none}
308
  .m-menu .amp-menu [id^=drop]:checked + label + ul{ display: block;}
309
  .m-menu .amp-menu [id^=drop]:checked + .toggle:after{transform:rotate(360deg);}
templates/features.php CHANGED
@@ -352,7 +352,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
352
  if($found == ''){
353
  array_splice( $explode_url, count($explode_url), 0, $append_amp );
354
  $impode_url = implode('/', $explode_url);
355
- $amp_url = untrailingslashit($impode_url);
356
  }
357
  }
358
  if ( is_home() || is_archive() ){
@@ -399,7 +399,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', ampforwp_define_comments_number() );
399
  if($found == ''){
400
  array_splice( $explode_path, count($explode_path), 0, $inserted );
401
  $impode_url = implode('/', $explode_path);
402
- $amp_url = $impode_url;
403
 
404
  }
405
  }
@@ -5144,14 +5144,20 @@ function ampforwp_default_logo($param=""){
5144
  break;
5145
  case 'width':
5146
  if (true == $redux_builder_amp['ampforwp-custom-logo-dimensions'] && 'prescribed' == $redux_builder_amp['ampforwp-custom-logo-dimensions-options']) {
5147
- $value = $redux_builder_amp['opt-media-width'];
 
 
 
5148
  }
5149
  else
5150
  $value = $data['logo_size'][0];
5151
  break;
5152
  case 'height':
5153
  if (true == $redux_builder_amp['ampforwp-custom-logo-dimensions'] && 'prescribed' == $redux_builder_amp['ampforwp-custom-logo-dimensions-options']) {
5154
- $value = $redux_builder_amp['opt-media-height'];
 
 
 
5155
  }
5156
  else
5157
  $value = $data['logo_size'][1];
352
  if($found == ''){
353
  array_splice( $explode_url, count($explode_url), 0, $append_amp );
354
  $impode_url = implode('/', $explode_url);
355
+ $amp_url = trailingslashit($impode_url);
356
  }
357
  }
358
  if ( is_home() || is_archive() ){
399
  if($found == ''){
400
  array_splice( $explode_path, count($explode_path), 0, $inserted );
401
  $impode_url = implode('/', $explode_path);
402
+ $amp_url = trailingslashit($impode_url);
403
 
404
  }
405
  }
5144
  break;
5145
  case 'width':
5146
  if (true == $redux_builder_amp['ampforwp-custom-logo-dimensions'] && 'prescribed' == $redux_builder_amp['ampforwp-custom-logo-dimensions-options']) {
5147
+ $value = trim(ampforwp_get_setting('opt-media-width'));
5148
+ if($value==""){
5149
+ $value = 190;
5150
+ }
5151
  }
5152
  else
5153
  $value = $data['logo_size'][0];
5154
  break;
5155
  case 'height':
5156
  if (true == $redux_builder_amp['ampforwp-custom-logo-dimensions'] && 'prescribed' == $redux_builder_amp['ampforwp-custom-logo-dimensions-options']) {
5157
+ $value = trim(ampforwp_get_setting('opt-media-height'));
5158
+ if($value==""){
5159
+ $value = 36;
5160
+ }
5161
  }
5162
  else
5163
  $value = $data['logo_size'][1];