AMP for WP – Accelerated Mobile Pages - Version 1.0.24

Version Description

(11th February 2020) = * Improvement: Added filter to modify the breadcrumb homepage url #4077 * Fixed: Image alignment on the left issue #4156 * Fixed: H1 tag not appearing on posts #4121 * Fixed: "Title on static page front page" option not working #4138 * Fixed: AMP Menu option was not showing in WP settings #4129 * Fixed: Blank Events Calendar Months Page when 'Minify' option is enabled #4080 * Fixed: Removed '@' in Twitter Handle #4135 * Fixed: Message improved when "Leverage Browser Caching" option is enable without readable or writable permission of htaccess file #4127 * Fixed: Featured image removed on AMP Pagebuilder pages #4131

Download this release

Release Info

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

Code changes from version 1.0.23 to 1.0.24

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.3.2
7
- Stable tag: 1.0.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -194,6 +194,17 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
194
 
195
  == Changelog ==
196
 
 
 
 
 
 
 
 
 
 
 
 
197
  = 1.0.23 (7th February 2020) =
198
  * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
199
  * Fixed: Iframe error due to Jetpack #4125
@@ -217,14 +228,4 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
217
  * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
218
  * Fixed: FAQ section improved #4119
219
 
220
- = 1.0.21 (4th February 2020) =
221
- * Fixed: Fatal error when AMP theme framework is active #4128
222
-
223
- = 1.0.20 (31st January 2020) =
224
- * Improvement: Filter added to Modify the location of the theme files from plugin older. #4091
225
- * Improvement: Cache Should auto clear when any plugin is activated/deactivated #4046
226
- * Improvement: Need to add nofollow feature in cookie notification option #3612
227
- * Fixed: Pages won't save apostophies in AMP page builder text module. #4074
228
- * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
229
-
230
  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.3.2
7
+ Stable tag: 1.0.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
194
 
195
  == Changelog ==
196
 
197
+ = 1.0.24 (11th February 2020) =
198
+ * Improvement: Added filter to modify the breadcrumb homepage url #4077
199
+ * Fixed: Image alignment on the left issue #4156
200
+ * Fixed: H1 tag not appearing on posts #4121
201
+ * Fixed: "Title on static page front page" option not working #4138
202
+ * Fixed: AMP Menu option was not showing in WP settings #4129
203
+ * Fixed: Blank Events Calendar Months Page when 'Minify' option is enabled #4080
204
+ * Fixed: Removed '@' in Twitter Handle #4135
205
+ * Fixed: Message improved when "Leverage Browser Caching" option is enable without readable or writable permission of htaccess file #4127
206
+ * Fixed: Featured image removed on AMP Pagebuilder pages #4131
207
+
208
  = 1.0.23 (7th February 2020) =
209
  * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
210
  * Fixed: Iframe error due to Jetpack #4125
228
  * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
229
  * Fixed: FAQ section improved #4119
230
 
 
 
 
 
 
 
 
 
 
 
231
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 1.0.23
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.23');
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.24
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.24');
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,16 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 1.0.23 (7th February 2020) =
4
  * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
5
  * Fixed: Iframe error due to Jetpack #4125
1
  == Changelog ==
2
 
3
+ = 1.0.24 (11th February 2020) =
4
+ * Improvement: Added filter to modify the breadcrumb homepage url #4077
5
+ * Fixed: Image alignment on the left issue #4156
6
+ * Fixed: H1 tag not appearing on posts #4121
7
+ * Fixed: "Title on static page front page" option not working #4138
8
+ * Fixed: AMP Menu option was not showing in WP settings #4129
9
+ * Fixed: Blank Events Calendar Months Page when 'Minify' option is enabled #4080
10
+ * Fixed: Removed '@' in Twitter Handle #4135
11
+ * Fixed: Message improved when "Leverage Browser Caching" option is enable without readable or writable permission of htaccess file #4127
12
+ * Fixed: Featured image removed on AMP Pagebuilder pages #4131
13
+
14
  = 1.0.23 (7th February 2020) =
15
  * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
16
  * Fixed: Iframe error due to Jetpack #4125
components/breadcrumb/breadcrumb.php CHANGED
@@ -34,10 +34,10 @@ function amp_breadcrumb_output(){
34
 
35
  // Build the breadcrums
36
  echo '<ul id="' . esc_attr($breadcrums_id) . '" class="' . esc_attr($breadcrums_class) . '">';
37
-
 
38
  // Home page
39
- echo '<li class="item-home"><a class="bread-link bread-home" href="' . ampforwp_url_controller( get_home_url('', '/'), $home_non_amp ) . '" title="' . esc_attr($home_title) . '">' . esc_html($home_title) . '</a></li>';
40
-
41
  if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
42
 
43
 
@@ -135,6 +135,7 @@ function amp_breadcrumb_output(){
135
  if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
136
  $cat_link = ampforwp_url_controller( $cat_link );
137
  }
 
138
  $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
139
  }
140
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
34
 
35
  // Build the breadcrums
36
  echo '<ul id="' . esc_attr($breadcrums_id) . '" class="' . esc_attr($breadcrums_class) . '">';
37
+ $home_url = ampforwp_url_controller( get_home_url('', '/'), $home_non_amp );
38
+ $home_url = apply_filters('ampforwp_breadcrumbs_home_url',$home_url,$post->ID);
39
  // Home page
40
+ echo '<li class="item-home"><a class="bread-link bread-home" href="' . esc_url($home_url) . '" title="' . esc_attr($home_title) . '">' . esc_html($home_title) . '</a></li>';
 
41
  if ( is_archive() && !is_tax() && !is_category() && !is_tag() && !is_author() ) {
42
 
43
 
135
  if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
136
  $cat_link = ampforwp_url_controller( $cat_link );
137
  }
138
+ $cat_link = apply_filters('ampforwp_breadcrumbs_category_url', $cat_link,$post->ID);
139
  $cat_display .= '<li class="item-cat item-cat-' . esc_attr($cat_id) . '"><a class="bread-cat bread-cat-' . esc_attr($cat_id) . ' bread-cat-' . $parents. '" href="'. esc_url($cat_link).'" title="' . esc_attr($parents) . '">' . esc_html($parents) . '</a></li>';
140
  }
141
  if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
components/components-core.php CHANGED
@@ -105,23 +105,19 @@ function amp_logo(){
105
 
106
  // Title
107
  function amp_title(){
108
- global $redux_builder_amp, $post;
109
- $ID = '';
110
- if( ampforwp_is_front_page() && ampforwp_get_frontpage_id() ){
111
- if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
112
- $ID = ampforwp_get_frontpage_id();
113
- }
114
- }
115
- elseif ( ampforwp_polylang_front_page() ) {
116
  $ID = pll_get_post(get_option('page_on_front'));
117
  }
118
- else
119
- $ID = $post->ID;
 
120
  if( $ID!=null ){
121
  do_action('ampforwp_above_the_title');
122
  $ampforwp_title = get_the_title($ID);
123
  $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
124
- if(!empty($ampforwp_title) && ampforwp_default_logo()){
125
  ?>
126
  <h1 class="amp-post-title"><?php echo wp_kses_data( $ampforwp_title ); ?></h1>
127
  <?php
105
 
106
  // Title
107
  function amp_title(){
108
+ global $post;
109
+ $ID = null;
110
+ if ( ampforwp_polylang_front_page() ) {
 
 
 
 
 
111
  $ID = pll_get_post(get_option('page_on_front'));
112
  }
113
+ elseif( ampforwp_get_setting('ampforwp-title-on-front-page') ) {
114
+ $ID = ampforwp_get_the_ID();
115
+ }
116
  if( $ID!=null ){
117
  do_action('ampforwp_above_the_title');
118
  $ampforwp_title = get_the_title($ID);
119
  $ampforwp_title = apply_filters('ampforwp_filter_single_title', $ampforwp_title);
120
+ if(!empty($ampforwp_title) && (ampforwp_default_logo() || !empty(ampforwp_get_setting('opt-media','url')))){
121
  ?>
122
  <h1 class="amp-post-title"><?php echo wp_kses_data( $ampforwp_title ); ?></h1>
123
  <?php
includes/features/performance/performance-functions.php CHANGED
@@ -69,7 +69,17 @@ function ampforwp_minify_html_output($content_buffer){
69
  $asis = '';
70
  }
71
 
72
- $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
 
 
 
 
 
 
 
 
 
 
73
 
74
  if ( $minify_html_comments != 'no' )
75
  $process = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->).)*-->' . $mod, '', $process);
@@ -153,7 +163,7 @@ function ampforwp_leverage_browser_caching(){
153
 
154
  function ampforwp_no_htaccess_access_notice(){
155
  $message = '<div class="error"><p>';
156
- $message .= esc_html__( 'Accelerated Mobile Pages: htaccess file is not readable or writable for Leverage Browser Caching. Please change permission of htaccess file.', 'accelerated-mobile-pages' );
157
  $message .= '</p></div>';
158
  echo wp_kses_post( $message );
159
  }
69
  $asis = '';
70
  }
71
 
72
+ if(function_exists('tec_amp_compatibility_orgs_venues_support')){
73
+ global $wp;
74
+ $current_url = home_url(add_query_arg(array($_GET), $wp->request));
75
+ if(preg_match('/months/', $current_url)){
76
+ $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
77
+ }else{
78
+ $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
79
+ }
80
+ }else{
81
+ $process = preg_replace(array ('/\>[^\S ]+' . $mod, '/[^\S ]+\<' . $mod, '/\s+/' ), array('> ', ' <', ' '), $process);
82
+ }
83
 
84
  if ( $minify_html_comments != 'no' )
85
  $process = preg_replace('/<!--(?!\s*(?:\[if [^\]]+]|<!|>))(?:(?!-->).)*-->' . $mod, '', $process);
163
 
164
  function ampforwp_no_htaccess_access_notice(){
165
  $message = '<div class="error"><p>';
166
+ $message .= sprintf( 'Accelerated Mobile Pages: htaccess file is not readable or writable for Leverage Browser Caching. Please change permission of htaccess file and for more info <a href="https://ampforwp.com/tutorials/article/how-to-fix-leverage-browser-caching-error/" target="_blank">%s</a>',esc_html__('Click Here','accelerated-mobile-pages' ));
167
  $message .= '</p></div>';
168
  echo wp_kses_post( $message );
169
  }
includes/includes.php CHANGED
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  // 1.1 AMP Header menu
16
  if (! function_exists( 'ampforwp_menu') ) {
17
  function ampforwp_menu() {
18
- if(ampforwp_get_setting('ampforwp-amp-menu-swift') == true) {
19
  register_nav_menus(
20
  array(
21
  'amp-menu' => esc_html__( 'AMP Menu','accelerated-mobile-pages' ),
15
  // 1.1 AMP Header menu
16
  if (! function_exists( 'ampforwp_menu') ) {
17
  function ampforwp_menu() {
18
+ if(ampforwp_get_setting('ampforwp-amp-menu-swift') == true || (ampforwp_design_selector()!=4 && true == ampforwp_get_setting('ampforwp-amp-menu'))) {
19
  register_nav_menus(
20
  array(
21
  'amp-menu' => esc_html__( 'AMP Menu','accelerated-mobile-pages' ),
includes/options/admin-config.php CHANGED
@@ -7089,7 +7089,7 @@ else{
7089
  'class' => 'child_opt',
7090
  'title' => esc_html__('Twitter Handle', 'accelerated-mobile-pages'),
7091
  'required' => array('enable-single-twitter-share', '=' , '1'),
7092
- 'placeholder' => esc_html__('Eg: @xyx','accelerated-mobile-pages'),
7093
  'default' => '',
7094
  ),
7095
  array(
7089
  'class' => 'child_opt',
7090
  'title' => esc_html__('Twitter Handle', 'accelerated-mobile-pages'),
7091
  'required' => array('enable-single-twitter-share', '=' , '1'),
7092
+ 'placeholder' => esc_html__('username','accelerated-mobile-pages'),
7093
  'default' => '',
7094
  ),
7095
  array(
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.3.2
7
- Stable tag: 1.0.23
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,6 +191,17 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 1.0.23 (7th February 2020) =
195
  * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
196
  * Fixed: Iframe error due to Jetpack #4125
@@ -214,14 +225,4 @@ You can contact us from [here](https://ampforwp.com/contact/)
214
  * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
215
  * Fixed: FAQ section improved #4119
216
 
217
- = 1.0.21 (4th February 2020) =
218
- * Fixed: Fatal error when AMP theme framework is active #4128
219
-
220
- = 1.0.20 (31st January 2020) =
221
- * Improvement: Filter added to Modify the location of the theme files from plugin older. #4091
222
- * Improvement: Cache Should auto clear when any plugin is activated/deactivated #4046
223
- * Improvement: Need to add nofollow feature in cookie notification option #3612
224
- * Fixed: Pages won't save apostophies in AMP page builder text module. #4074
225
- * Fixed: Warring in console : [DOM] Found 2 elements with non-unique id #amp-search #3946
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.3.2
7
+ Stable tag: 1.0.24
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.24 (11th February 2020) =
195
+ * Improvement: Added filter to modify the breadcrumb homepage url #4077
196
+ * Fixed: Image alignment on the left issue #4156
197
+ * Fixed: H1 tag not appearing on posts #4121
198
+ * Fixed: "Title on static page front page" option not working #4138
199
+ * Fixed: AMP Menu option was not showing in WP settings #4129
200
+ * Fixed: Blank Events Calendar Months Page when 'Minify' option is enabled #4080
201
+ * Fixed: Removed '@' in Twitter Handle #4135
202
+ * Fixed: Message improved when "Leverage Browser Caching" option is enable without readable or writable permission of htaccess file #4127
203
+ * Fixed: Featured image removed on AMP Pagebuilder pages #4131
204
+
205
  = 1.0.23 (7th February 2020) =
206
  * Fixed: Fatal error in amp theme framework if WordPress directory is modified #4145
207
  * Fixed: Iframe error due to Jetpack #4125
225
  * Fixed: Upgrade to Pro option was removing in the setting panel when we activate PWA for WP plugin #4117
226
  * Fixed: FAQ section improved #4119
227
 
 
 
 
 
 
 
 
 
 
 
228
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/design-manager/design-1/elements/social-icons.php CHANGED
@@ -58,8 +58,9 @@ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
58
  </div>
59
  </a>
60
  <?php } ?>
61
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
62
- $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
 
63
  <amp-social-share type="twitter"
64
  width="50"
65
  height="28"
58
  </div>
59
  </a>
60
  <?php } ?>
61
+ <?php if(ampforwp_get_setting('enable-single-twitter-share') == true) {
62
+ $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
63
+ $data_param_data = str_replace('@', '', $data_param_data);?>
64
  <amp-social-share type="twitter"
65
  width="50"
66
  height="28"
templates/design-manager/design-2/elements/social-icons.php CHANGED
@@ -59,8 +59,9 @@ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
59
  </div>
60
  </a>
61
  <?php } ?>
62
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
63
- $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
 
64
  <amp-social-share type="twitter"
65
  width="50"
66
  height="28"
59
  </div>
60
  </a>
61
  <?php } ?>
62
+ <?php if(ampforwp_get_setting('enable-single-twitter-share') == true) {
63
+ $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
64
+ $data_param_data = str_replace('@', '', $data_param_data);?>
65
  <amp-social-share type="twitter"
66
  width="50"
67
  height="28"
templates/design-manager/design-2/style.php CHANGED
@@ -109,7 +109,7 @@ amp-anim { max-width: 100%; }
109
  amp-wistia-player {margin:5px 0px;}
110
  .alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
111
  .alignright{ float:right; margin-left: 12px; margin-bottom:5px; }
112
- .aligncenter{ text-align:center; margin: 0 auto }
113
  #statcounter{width: 1px;height:1px;}
114
  ol, ul {list-style-position: inside;}
115
  .hide{display:none}
109
  amp-wistia-player {margin:5px 0px;}
110
  .alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
111
  .alignright{ float:right; margin-left: 12px; margin-bottom:5px; }
112
+ .aligncenter{display: block; text-align:center; margin: 0 auto }
113
  #statcounter{width: 1px;height:1px;}
114
  ol, ul {list-style-position: inside;}
115
  .hide{display:none}
templates/design-manager/design-3/elements/social-icons.php CHANGED
@@ -69,8 +69,9 @@ if(true == ampforwp_get_setting('ampforwp-social-share') && false == ampforwp_ge
69
  </a>
70
  </div>
71
  <?php } ?>
72
- <?php if ( true == $redux_builder_amp['enable-single-twitter-share'] ) {
73
- $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle']; ?>
 
74
  <div class="ampforwp-custom-social">
75
  <a title="twitter share" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(rawurlencode( get_the_title() )); ?>&via=<?php echo esc_attr($data_param_data); ?>" class="amp-social-icon-rounded amp-social-twitter" aria-label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0LTY2Ljk1NCAzOC41MDUtOTIuNjIgMjUuNjgtMjUuNjY2IDU2LjcwNC0zOC41MDUgOTMuMTUzLTM4LjUwNSAzNy43OSAwIDY5LjcwMiAxMy44OCA5NS43MyA0MS42NCAzMC4xNjgtNi4yNTcgNTcuOTI4LTE3LjAxNSA4My4yNTYtMzIuMjYtOS43MTggMzEuNTU4LTI4LjgxNSA1NS44NDUtNTcuMjM4IDcyLjg0NyAyNS4zMjgtMy4xMSA1MC4zMDQtMTAuMDU2IDc0LjkzLTIwLjgxNC0xNi42NTIgMjYuMDE3LTM4LjMzNyA0OC43NDItNjUuMDU3IDY4LjE1MnYxNy4xOTdjMCAzNC45OTItNS4xMjQgNzAuMTI4LTE1LjM0OCAxMDUuMzU1LTEwLjIxMiAzNS4yMTQtMjUuODUgNjguODUzLTQ2LjgzIDEwMC45NzItMjAuOTk2IDMyLjA2NS00Ni4wNSA2MC42Mi03NS4xOSA4NS41Ny0yOS4xMjYgMjQuOTc2LTY0LjA4IDQ0Ljg1My0xMDQuODUgNTkuNTktNDAuNzU0IDE0Ljc1My04NC41NTMgMjIuMDktMTMxLjM5NyAyMi4wOUMxMjguODYyIDU4OC45NCA2MS43NCA1NjkuMzUgMCA1MzAuMTU0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" />
69
  </a>
70
  </div>
71
  <?php } ?>
72
+ <?php if(ampforwp_get_setting('enable-single-twitter-share') == true) {
73
+ $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
74
+ $data_param_data = str_replace('@', '', $data_param_data);?>
75
  <div class="ampforwp-custom-social">
76
  <a title="twitter share" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(rawurlencode( get_the_title() )); ?>&via=<?php echo esc_attr($data_param_data); ?>" class="amp-social-icon-rounded amp-social-twitter" aria-label="twitter share">
77
  <amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0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IDU2LjcwNC0zOC41MDUgOTMuMTUzLTM4LjUwNSAzNy43OSAwIDY5LjcwMiAxMy44OCA5NS43MyA0MS42NCAzMC4xNjgtNi4yNTcgNTcuOTI4LTE3LjAxNSA4My4yNTYtMzIuMjYtOS43MTggMzEuNTU4LTI4LjgxNSA1NS44NDUtNTcuMjM4IDcyLjg0NyAyNS4zMjgtMy4xMSA1MC4zMDQtMTAuMDU2IDc0LjkzLTIwLjgxNC0xNi42NTIgMjYuMDE3LTM4LjMzNyA0OC43NDItNjUuMDU3IDY4LjE1MnYxNy4xOTdjMCAzNC45OTItNS4xMjQgNzAuMTI4LTE1LjM0OCAxMDUuMzU1LTEwLjIxMiAzNS4yMTQtMjUuODUgNjguODUzLTQ2LjgzIDEwMC45NzItMjAuOTk2IDMyLjA2NS00Ni4wNSA2MC42Mi03NS4xOSA4NS41Ny0yOS4xMjYgMjQuOTc2LTY0LjA4IDQ0Ljg1My0xMDQuODUgNTkuNTktNDAuNzU0IDE0Ljc1My04NC41NTMgMjIuMDktMTMxLjM5NyAyMi4wOUMxMjguODYyIDU4OC45NCA2MS43NCA1NjkuMzUgMCA1MzAuMTU0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" />
templates/design-manager/design-3/style.php CHANGED
@@ -62,7 +62,7 @@ a{ color: #312C7E; text-decoration: none }
62
  .clearfix, .cb{ clear: both }
63
  .alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
64
  .alignright{ float:right; margin-left: 12px; margin-bottom:5px; }
65
- .aligncenter{ text-align:center; margin: 0 auto }
66
  #statcounter{width: 1px;height:1px;}
67
  amp-anim { max-width: 100%; }
68
  amp-wistia-player {margin:5px 0px;}
@@ -317,7 +317,7 @@ a.btt:hover {
317
  .ampforwp-title{ padding: 0px 0px 0px 0px; margin-top: 12px; margin-bottom: 12px; }
318
  .comment-button-wrapper{ margin-bottom: 50px; margin-top: 30px; text-align:center }
319
  .comment-button-wrapper a{ color: #fff; background: #312c7e; font-size: 14px; padding: 12px 22px 12px 22px; border-radius: 2px; text-transform: uppercase; letter-spacing: 1px; }
320
- h1.amp-wp-title{ margin: 0; color: #333333; font-size: 48px; line-height: 58px;}
321
  .post-pagination-meta{ min-height:75px }
322
  .single-post .post-pagination-meta{ font-size:15px; min-height:auto; margin-top:-5px; line-height:26px; }
323
  .single-post .post-pagination-meta span{ font-weight:bold }
62
  .clearfix, .cb{ clear: both }
63
  .alignleft{ margin-right: 12px; margin-bottom:5px; float: left; }
64
  .alignright{ float:right; margin-left: 12px; margin-bottom:5px; }
65
+ .aligncenter{display: block; text-align:center; margin: 0 auto }
66
  #statcounter{width: 1px;height:1px;}
67
  amp-anim { max-width: 100%; }
68
  amp-wistia-player {margin:5px 0px;}
317
  .ampforwp-title{ padding: 0px 0px 0px 0px; margin-top: 12px; margin-bottom: 12px; }
318
  .comment-button-wrapper{ margin-bottom: 50px; margin-top: 30px; text-align:center }
319
  .comment-button-wrapper a{ color: #fff; background: #312c7e; font-size: 14px; padding: 12px 22px 12px 22px; border-radius: 2px; text-transform: uppercase; letter-spacing: 1px; }
320
+ h1.amp-wp-title,h2.amp-wp-title{ margin: 0; color: #333333; font-size: 48px; line-height: 58px;}
321
  .post-pagination-meta{ min-height:75px }
322
  .single-post .post-pagination-meta{ font-size:15px; min-height:auto; margin-top:-5px; line-height:26px; }
323
  .single-post .post-pagination-meta span{ font-weight:bold }
templates/design-manager/swift/footer.php CHANGED
@@ -123,6 +123,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
123
  $data_param = '';
124
  if(ampforwp_get_setting('enable-single-twitter-share')){
125
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
 
126
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
127
  <li>
128
  <a title="twitter share" class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>">
123
  $data_param = '';
124
  if(ampforwp_get_setting('enable-single-twitter-share')){
125
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
126
+ $data_param_data = str_replace('@', '', $data_param_data);
127
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
128
  <li>
129
  <a title="twitter share" class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>">
templates/design-manager/swift/functions.php CHANGED
@@ -114,6 +114,7 @@ function ampforwp_swift_social_icons(){
114
  $data_param = '';
115
  if(ampforwp_get_setting('enable-single-twitter-share')){
116
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
 
117
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
118
  <li>
119
  <a class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>" aria-label="twitter share">
114
  $data_param = '';
115
  if(ampforwp_get_setting('enable-single-twitter-share')){
116
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
117
+ $data_param_data = str_replace('@', '', $data_param_data);
118
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
119
  <li>
120
  <a class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($twitter_amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>" aria-label="twitter share">
templates/design-manager/swift/page.php CHANGED
@@ -14,7 +14,7 @@ amp_header(); ?>
14
  <?php amp_title(); ?>
15
  <?php } ?>
16
  <?php } // Level up Condition ends here?>
17
- <?php if ( true == ampforwp_get_setting('featured_image_swift_page') && ampforwp_has_post_thumbnail() ) { ?>
18
  <div class="sf-img">
19
  <?php amp_featured_image();?>
20
  </div>
14
  <?php amp_title(); ?>
15
  <?php } ?>
16
  <?php } // Level up Condition ends here?>
17
+ <?php if ( true == ampforwp_get_setting('featured_image_swift_page') && ampforwp_has_post_thumbnail() && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) { ?>
18
  <div class="sf-img">
19
  <?php amp_featured_image();?>
20
  </div>
templates/features.php CHANGED
@@ -1227,8 +1227,9 @@ function ampforwp_sticky_social_icons(){
1227
  </div>
1228
  </a>
1229
  <?php } ?>
1230
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) {
1231
- $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle'];?>
 
1232
  <amp-social-share type="twitter"
1233
  width="50"
1234
  height="28"
1227
  </div>
1228
  </a>
1229
  <?php } ?>
1230
+ <?php if(ampforwp_get_setting('enable-single-twitter-share') == true) {
1231
+ $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
1232
+ $data_param_data = str_replace('@', '', $data_param_data);?>
1233
  <amp-social-share type="twitter"
1234
  width="50"
1235
  height="28"
templates/frontpage-elements.php CHANGED
@@ -38,12 +38,12 @@ function ampforwp_design_1_frontpage_content( $template, $post_id ){
38
  $amp_custom_content_enable = get_post_meta($post_id, 'ampforwp_custom_content_editor_checkbox', true);?>
39
  <article class="amp-wp-article">
40
 
41
- <?php if( $redux_builder_amp['ampforwp-title-on-front-page'] && !ampforwp_default_logo()) { ?>
42
  <header class="amp-wp-article-header ampforwp-title">
43
  <h2 class="amp-wp-title"><?php echo get_the_title( $post_id );?></h2>
44
  </header>
45
  <?php }
46
- else{ ?>
47
  <header class="amp-wp-article-header ampforwp-title">
48
  <h1 class="amp-wp-title"><?php echo get_the_title( $post_id );?></h1>
49
  </header>
@@ -297,17 +297,18 @@ function ampforwp_design_3_frontpage_content($template, $post_id){
297
  function ampforwp_design_2_frontpage_title() {
298
  global $redux_builder_amp;
299
  //WPML Static Front Page Support #1111
300
- if( function_exists('wpml_core_loads_first')){
301
- $post_id = get_option('page_on_front');
302
-
303
- }
304
- if( $redux_builder_amp['ampforwp-title-on-front-page'] && !ampforwp_default_logo() ) { ?>
 
305
  <header class="amp-wp-article-header ampforwp-title">
306
- <h2 class="amp-wp-title"><?php if( function_exists('wpml_core_loads_first' )){$ID = get_option('page_on_front');}else{$ID = ampforwp_get_frontpage_id();}echo get_the_title( $ID );?></h2>
307
  </header>
308
- <?php }else{ ?>
309
  <header class="amp-wp-article-header ampforwp-title">
310
- <h1 class="amp-wp-title"><?php if( function_exists('wpml_core_loads_first' )){$ID = get_option('page_on_front');}else{$ID = ampforwp_get_frontpage_id();}echo get_the_title( $ID );?></h1>
311
  </header>
312
  <?php }
313
  }
@@ -315,34 +316,18 @@ function ampforwp_design_2_frontpage_title() {
315
  // Frontpage Title for Design #3
316
  function ampforwp_design_3_frontpage_title() {
317
  //WPML Static Front Page Support #1111
318
- if( function_exists('wpml_core_loads_first')){
319
- $post_id = get_option('page_on_front');
320
-
321
- } ?>
 
 
322
  <header class="amp-wp-article-header ampforwp-title amp-wp-content">
323
  <?php if( true == ampforwp_get_setting('ampforwp-title-on-front-page') && !ampforwp_default_logo() ) { ?>
324
- <h2 class="amp-wp-title"><?php
325
- //WPML Static Front Page Support #1111
326
- if( function_exists('wpml_core_loads_first')){
327
- $ID = get_option('page_on_front');
328
-
329
- }
330
- else{
331
- $ID = ampforwp_get_frontpage_id();
332
- }
333
- echo get_the_title( $ID );?></h2>
334
  <?php
335
- }else{ ?>
336
- <h1 class="amp-wp-title"><?php
337
- //WPML Static Front Page Support #1111
338
- if( function_exists('wpml_core_loads_first')){
339
- $ID = get_option('page_on_front');
340
-
341
- }
342
- else{
343
- $ID = ampforwp_get_frontpage_id();
344
- }
345
- echo get_the_title( $ID );?></h1>
346
  <?php
347
  } ?>
348
  </header>
38
  $amp_custom_content_enable = get_post_meta($post_id, 'ampforwp_custom_content_editor_checkbox', true);?>
39
  <article class="amp-wp-article">
40
 
41
+ <?php if( ampforwp_get_setting('ampforwp-title-on-front-page') && !ampforwp_default_logo()) { ?>
42
  <header class="amp-wp-article-header ampforwp-title">
43
  <h2 class="amp-wp-title"><?php echo get_the_title( $post_id );?></h2>
44
  </header>
45
  <?php }
46
+ elseif(ampforwp_get_setting('ampforwp-title-on-front-page') && ampforwp_default_logo()){?>
47
  <header class="amp-wp-article-header ampforwp-title">
48
  <h1 class="amp-wp-title"><?php echo get_the_title( $post_id );?></h1>
49
  </header>
297
  function ampforwp_design_2_frontpage_title() {
298
  global $redux_builder_amp;
299
  //WPML Static Front Page Support #1111
300
+ if( function_exists('wpml_core_loads_first' )){
301
+ $ID = get_option('page_on_front');
302
+ }else{
303
+ $ID = ampforwp_get_frontpage_id();
304
+ }
305
+ if( ampforwp_get_setting('ampforwp-title-on-front-page') && !ampforwp_default_logo() ) { ?>
306
  <header class="amp-wp-article-header ampforwp-title">
307
+ <h2 class="amp-wp-title"><?php echo get_the_title( $ID );?></h2>
308
  </header>
309
+ <?php }elseif(ampforwp_get_setting('ampforwp-title-on-front-page') && ampforwp_default_logo()){?>
310
  <header class="amp-wp-article-header ampforwp-title">
311
+ <h1 class="amp-wp-title"><?php echo get_the_title( $ID );?></h1>
312
  </header>
313
  <?php }
314
  }
316
  // Frontpage Title for Design #3
317
  function ampforwp_design_3_frontpage_title() {
318
  //WPML Static Front Page Support #1111
319
+ if( function_exists('wpml_core_loads_first' )){
320
+ $ID = get_option('page_on_front');
321
+ }else{
322
+ $ID = ampforwp_get_frontpage_id();
323
+ }
324
+ ?>
325
  <header class="amp-wp-article-header ampforwp-title amp-wp-content">
326
  <?php if( true == ampforwp_get_setting('ampforwp-title-on-front-page') && !ampforwp_default_logo() ) { ?>
327
+ <h2 class="amp-wp-title"><?php echo get_the_title( $ID );?></h2>
 
 
 
 
 
 
 
 
 
328
  <?php
329
+ }elseif(ampforwp_get_setting('ampforwp-title-on-front-page') && ampforwp_default_logo()){?>
330
+ <h1 class="amp-wp-title"><?php echo get_the_title( $ID );?></h1>
 
 
 
 
 
 
 
 
 
331
  <?php
332
  } ?>
333
  </header>