AMP for WP – Accelerated Mobile Pages - Version 0.9.98.12

Version Description

(25th SEPTEMBER 2019) = * Improvements: User wants Wordpress admin toolbar in the AMP area #3450 * Improvements: we want the amp menu showing from left or right side both. #3095 * Improvements: Add feature to increase width for facebook like button and also add feature of data-action="recommend" #3241 * Improvements: Improvements in Design 1 2 and 3 option panel in Header section #3642 * Fixed: Update Stops Google Analytics tracking #3690 * Fixed: Lightbox not working for single images #3683 * Fixed: Language of Menu not changing when changing website language #3522 * Fixed: We need to allow people to turn off the social section fully #3613 * Fixed: Ui Design issues #3616 * Fixed: Dropcap option should only be enabled on the posts, not from pages. #3614 * Fixed: Social share position is not working in single design 2#3627 * Fixed: AMP text module is not working in Widget area #3644 * Fixed: Social media icons and comments should be below the post content on pages #3647 * Fixed: Breadcrumbs are breaking after enabling ""Post title on Breadcrumb" option #3648 * Fixed: line share link is getting added when sharing on telegram#3666 * Fixed: In social sharing Twitter Handle and Pretty Permalinks for Twitter Share? need to display child option of Twitter#3656 * Fixed: Extension license dashboard improvements #3654 * Fixed: Make the chat bubble into a email box for faster input #405 * Fixed: Option to specify certain taxonomy only in Instant Article Feeds #1489 * Fixed: Need to remove Legacy Pagebuilder option Safely #3609 * Fixed: Default heading tag should load if no option is selected in Header Module #3651 * Fixed: Pretty Permalinks for Twitter Share? option is not working #3662

Download this release

Release Info

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

Code changes from version 0.9.98.11 to 0.9.98.12

Files changed (32) hide show
  1. README.md +25 -3
  2. accelerated-moblie-pages.php +3 -3
  3. changelog.txt +24 -2
  4. components/breadcrumb/breadcrumb.php +4 -4
  5. components/menu/menu.php +10 -1
  6. components/social-icons/social-icons.php +1 -1
  7. feeds/instant-article-feed.php +7 -1
  8. includes/admin-style.css +7 -0
  9. includes/features/analytics/analytics-functions.php +7 -2
  10. includes/features/performance/performance-functions.php +13 -0
  11. includes/options/admin-config.php +305 -209
  12. includes/options/redux-core/framework.php +3 -2
  13. includes/vendor/tinymce-widget/includes/class-widget.php +1 -1
  14. pagebuilder/modules/heading-module.php +19 -18
  15. readme.txt +25 -49
  16. templates/custom-amp-content.php +1 -1
  17. templates/design-manager/design-1/elements/social-icons.php +21 -7
  18. templates/design-manager/design-1/header-bar.php +2 -1
  19. templates/design-manager/design-1/style.php +11 -1
  20. templates/design-manager/design-2/elements/social-icons.php +21 -7
  21. templates/design-manager/design-2/header-bar.php +3 -2
  22. templates/design-manager/design-2/style.php +10 -2
  23. templates/design-manager/design-3/elements/social-icons.php +20 -6
  24. templates/design-manager/design-3/header-bar.php +9 -2
  25. templates/design-manager/design-3/style.php +37 -4
  26. templates/design-manager/swift/footer.php +21 -5
  27. templates/design-manager/swift/functions.php +23 -6
  28. templates/design-manager/swift/header.php +1 -0
  29. templates/design-manager/swift/page.php +8 -151
  30. templates/design-manager/swift/single.php +6 -130
  31. templates/design-manager/swift/style.php +4 -1
  32. templates/features.php +173 -13
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.3
7
- Stable tag: 0.9.98.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,13 +191,36 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 0.9.98.11 (20th SEPTEMBER 2019) =
195
  * Improvements: Improved AMP Advertisement option panel
196
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3660
197
  * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
198
 
199
  = 0.9.98.10 (18th SEPTEMBER 2019) =
200
-
201
  * Improvements: Upgrade the analtyics integration with gtag.js #3538
202
  * Improvements: Need to optimize css classes #3650
203
  * Fixed: Small sized images are getting stretched in the lightbox. #3602
@@ -212,7 +235,6 @@ You can contact us from [here](https://ampforwp.com/contact/)
212
  * Fixed: Incorrect placeholder "Select the SEO Plugin" in drop-down in AMP option Panel #3663
213
 
214
  = 0.9.98.9 (16th SEPTEMBER 2019) =
215
-
216
  * Improvements: Need to implement Tree Shaking feature to remove access css from the AMP pages #2949
217
  * Improvements: Need to save Post Meta Field Revisions in WordPress #3548
218
  * Improvements: Add Role based Access to all the options #3480
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.2.3
7
+ Stable tag: 0.9.98.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 0.9.98.12 (25th SEPTEMBER 2019) =
195
+ * Improvements: User wants Wordpress admin toolbar in the AMP area #3450
196
+ * Improvements: we want the amp menu showing from left or right side both. #3095
197
+ * Improvements: Add feature to increase width for facebook like button and also add feature of data-action="recommend" #3241
198
+ * Improvements: Improvements in Design 1 2 and 3 option panel in Header section #3642
199
+ * Fixed: Update Stops Google Analytics tracking #3690
200
+ * Fixed: Lightbox not working for single images #3683
201
+ * Fixed: Language of Menu not changing when changing website language #3522
202
+ * Fixed: We need to allow people to turn off the social section fully #3613
203
+ * Fixed: Ui Design issues #3616
204
+ * Fixed: Dropcap option should only be enabled on the posts, not from pages. #3614
205
+ * Fixed: Social share position is not working in single design 2#3627
206
+ * Fixed: AMP text module is not working in Widget area #3644
207
+ * Fixed: Social media icons and comments should be below the post content on pages #3647
208
+ * Fixed: Breadcrumbs are breaking after enabling ""Post title on Breadcrumb" option #3648
209
+ * Fixed: line share link is getting added when sharing on telegram#3666
210
+ * Fixed: In social sharing Twitter Handle and Pretty Permalinks for Twitter Share? need to display child option of Twitter#3656
211
+ * Fixed: Extension license dashboard improvements #3654
212
+ * Fixed: Make the chat bubble into a email box for faster input #405
213
+ * Fixed: Option to specify certain taxonomy only in Instant Article Feeds #1489
214
+ * Fixed: Need to remove Legacy Pagebuilder option Safely #3609
215
+ * Fixed: Default heading tag should load if no option is selected in Header Module #3651
216
+ * Fixed: Pretty Permalinks for Twitter Share? option is not working #3662
217
+
218
  = 0.9.98.11 (20th SEPTEMBER 2019) =
219
  * Improvements: Improved AMP Advertisement option panel
220
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3660
221
  * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
222
 
223
  = 0.9.98.10 (18th SEPTEMBER 2019) =
 
224
  * Improvements: Upgrade the analtyics integration with gtag.js #3538
225
  * Improvements: Need to optimize css classes #3650
226
  * Fixed: Small sized images are getting stretched in the lightbox. #3602
235
  * Fixed: Incorrect placeholder "Select the SEO Plugin" in drop-down in AMP option Panel #3663
236
 
237
  = 0.9.98.9 (16th SEPTEMBER 2019) =
 
238
  * Improvements: Need to implement Tree Shaking feature to remove access css from the AMP pages #2949
239
  * Improvements: Need to save Post Meta Field Revisions in WordPress #3548
240
  * Improvements: Add Role based Access to all the options #3480
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.11
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.11');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
@@ -516,7 +516,7 @@ add_action('after_setup_theme','ampforwp_add_module_files');
516
  function ampforwp_add_module_files() {
517
 
518
  global $redux_builder_amp;
519
- if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
520
  if ( ! function_exists( 'bstw' ) ) {
521
  require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
522
  }
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.12
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.12');
24
  define('AMPFORWP_EXTENSION_DIR',plugin_dir_path(__FILE__).'includes/options/extensions');
25
  if(!defined('AMPFROWP_HOST_NAME')){
26
  $urlinfo = get_bloginfo('url');
516
  function ampforwp_add_module_files() {
517
 
518
  global $redux_builder_amp;
519
+ if ( function_exists('ampforwp_custom_theme_files_register') ) {
520
  if ( ! function_exists( 'bstw' ) ) {
521
  require_once AMPFORWP_PLUGIN_DIR .'/includes/vendor/tinymce-widget/tinymce-widget.php';
522
  }
changelog.txt CHANGED
@@ -1,12 +1,35 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 0.9.98.11 (20th SEPTEMBER 2019) =
4
  * Improvements: Improved AMP Advertisement option panel
5
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3660
6
  * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
7
 
8
  = 0.9.98.10 (18th SEPTEMBER 2019) =
9
-
10
  * Improvements: Upgrade the analtyics integration with gtag.js #3538
11
  * Improvements: Need to optimize css classes #3650
12
  * Fixed: Small sized images are getting stretched in the lightbox. #3602
@@ -21,7 +44,6 @@
21
  * Fixed: Incorrect placeholder "Select the SEO Plugin" in drop-down in AMP option Panel #3663
22
 
23
  = 0.9.98.9 (16th SEPTEMBER 2019) =
24
-
25
  * Improvements: Need to implement Tree Shaking feature to remove access css from the AMP pages #2949
26
  * Improvements: Need to save Post Meta Field Revisions in WordPress #3548
27
  * Improvements: Add Role based Access to all the options #3480
1
  == Changelog ==
2
 
3
+ = 0.9.98.12 (25th SEPTEMBER 2019) =
4
+ * Improvements: User wants Wordpress admin toolbar in the AMP area #3450
5
+ * Improvements: we want the amp menu showing from left or right side both. #3095
6
+ * Improvements: Add feature to increase width for facebook like button and also add feature of data-action="recommend" #3241
7
+ * Improvements: Improvements in Design 1 2 and 3 option panel in Header section #3642
8
+ * Fixed: Update Stops Google Analytics tracking #3690
9
+ * Fixed: Lightbox not working for single images #3683
10
+ * Fixed: Language of Menu not changing when changing website language #3522
11
+ * Fixed: We need to allow people to turn off the social section fully #3613
12
+ * Fixed: Ui Design issues #3616
13
+ * Fixed: Dropcap option should only be enabled on the posts, not from pages. #3614
14
+ * Fixed: Social share position is not working in single design 2#3627
15
+ * Fixed: AMP text module is not working in Widget area #3644
16
+ * Fixed: Social media icons and comments should be below the post content on pages #3647
17
+ * Fixed: Breadcrumbs are breaking after enabling ""Post title on Breadcrumb" option #3648
18
+ * Fixed: line share link is getting added when sharing on telegram#3666
19
+ * Fixed: In social sharing Twitter Handle and Pretty Permalinks for Twitter Share? need to display child option of Twitter#3656
20
+ * Fixed: Extension license dashboard improvements #3654
21
+ * Fixed: Make the chat bubble into a email box for faster input #405
22
+ * Fixed: Option to specify certain taxonomy only in Instant Article Feeds #1489
23
+ * Fixed: Need to remove Legacy Pagebuilder option Safely #3609
24
+ * Fixed: Default heading tag should load if no option is selected in Header Module #3651
25
+ * Fixed: Pretty Permalinks for Twitter Share? option is not working #3662
26
+
27
  = 0.9.98.11 (20th SEPTEMBER 2019) =
28
  * Improvements: Improved AMP Advertisement option panel
29
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3660
30
  * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
31
 
32
  = 0.9.98.10 (18th SEPTEMBER 2019) =
 
33
  * Improvements: Upgrade the analtyics integration with gtag.js #3538
34
  * Improvements: Need to optimize css classes #3650
35
  * Fixed: Small sized images are getting stretched in the lightbox. #3602
44
  * Fixed: Incorrect placeholder "Select the SEO Plugin" in drop-down in AMP option Panel #3663
45
 
46
  = 0.9.98.9 (16th SEPTEMBER 2019) =
 
47
  * Improvements: Need to implement Tree Shaking feature to remove access css from the AMP pages #2949
48
  * Improvements: Need to save Post Meta Field Revisions in WordPress #3548
49
  * Improvements: Add Role based Access to all the options #3480
components/breadcrumb/breadcrumb.php CHANGED
@@ -134,10 +134,10 @@
134
  if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
135
  $cat_link = ampforwp_url_controller( $cat_link );
136
  }
137
- $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>';
138
- if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
139
- $cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
140
- }
141
  }
142
  }
143
  }
134
  if(ampforwp_get_setting('ampforwp-archive-support-cat') == true && ampforwp_get_setting('ampforwp-archive-support') == true){
135
  $cat_link = ampforwp_url_controller( $cat_link );
136
  }
137
+ $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>';
138
+ }
139
+ if(ampforwp_get_setting('ampforwp-bread-crumb-post')){
140
+ $cat_display .='<li class="item-post item-post-' . esc_attr(ampforwp_get_the_ID()) . '"><span class="bread-post">'.wp_kses_data( get_the_title(ampforwp_get_the_ID()) ). '</span></li>';
141
  }
142
  }
143
  }
components/menu/menu.php CHANGED
@@ -24,7 +24,16 @@ function amp_menu_html($echo, $menu_args, $type){
24
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
25
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
26
  $sanitized_menu = $sanitizer_obj->get_amp_content();
27
- if ( !class_exists('Sitepress') ) {
 
 
 
 
 
 
 
 
 
28
  if ( 'header' == $type ) {
29
  set_transient('ampforwp_header_menu', $sanitized_menu, 24*HOUR_IN_SECONDS );
30
  }
24
  $menu_html_content = apply_filters('ampforwp_menu_content', $menu_html_content);
25
  $sanitizer_obj = new AMPFORWP_Content( $menu_html_content, array(), apply_filters( 'ampforwp_content_sanitizers', array( 'AMP_Img_Sanitizer' => array(), 'AMP_Style_Sanitizer' => array(), ) ) );
26
  $sanitized_menu = $sanitizer_obj->get_amp_content();
27
+
28
+ $menu_cache = true;
29
+ if ( class_exists('Sitepress') ) {
30
+ $menu_cache = false;
31
+ }
32
+ if(defined('QTX_VERSION')){ // FOR qTranslate-X
33
+ $menu_cache = false;
34
+ }
35
+ $menu_cache = apply_filters('ampforwp_menu_cache',$menu_cache);
36
+ if ($menu_cache) {
37
  if ( 'header' == $type ) {
38
  set_transient('ampforwp_header_menu', $sanitized_menu, 24*HOUR_IN_SECONDS );
39
  }
components/social-icons/social-icons.php CHANGED
@@ -27,7 +27,7 @@ function ampforwp_framework_get_social_icons($selected_social_icons){
27
  $social_icons_names = array();
28
  $url = get_the_permalink();
29
  $title = esc_attr( rawurlencode( get_the_title() ) );
30
- if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){
31
  $twitter_url = get_the_permalink();
32
  }
33
  else
27
  $social_icons_names = array();
28
  $url = get_the_permalink();
29
  $title = esc_attr( rawurlencode( get_the_title() ) );
30
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
31
  $twitter_url = get_the_permalink();
32
  }
33
  else
feeds/instant-article-feed.php CHANGED
@@ -14,13 +14,19 @@
14
  <?php
15
  global $redux_builder_amp;
16
  $number_of_articles = $exclude_ids = '';
 
17
  if( isset( $redux_builder_amp['ampforwp-fb-instant-article-posts'] ) && $redux_builder_amp['ampforwp-fb-instant-article-posts'] ){
18
  $number_of_articles = $redux_builder_amp['ampforwp-fb-instant-article-posts'];
19
- $number_of_articles = round( abs( floatval( $number_of_articles ) ) );
20
  }
21
  else{
22
  $number_of_articles = 500;
23
  }
 
 
 
 
 
24
  $exclude_ids = get_option('ampforwp_ia_exclude_post');
25
  $ia_args = array(
26
  'post__not_in' => (array) $exclude_ids,
14
  <?php
15
  global $redux_builder_amp;
16
  $number_of_articles = $exclude_ids = '';
17
+ $exclude_cats = array();
18
  if( isset( $redux_builder_amp['ampforwp-fb-instant-article-posts'] ) && $redux_builder_amp['ampforwp-fb-instant-article-posts'] ){
19
  $number_of_articles = $redux_builder_amp['ampforwp-fb-instant-article-posts'];
20
+ $number_of_articles = intval( $number_of_articles );
21
  }
22
  else{
23
  $number_of_articles = 500;
24
  }
25
+ if ( ampforwp_get_setting('hide-amp-ia-categories') ) {
26
+ $exclude_cats = array_values(array_filter(ampforwp_get_setting('hide-amp-ia-categories')));
27
+ $ia_args['category__not_in'] = $exclude_cats;
28
+ }
29
+
30
  $exclude_ids = get_option('ampforwp_ia_exclude_post');
31
  $ia_args = array(
32
  'post__not_in' => (array) $exclude_ids,
includes/admin-style.css CHANGED
@@ -352,6 +352,7 @@ right:0; z-index: 99999;
352
  /*** Layout Screenshot-Image CSS ***/
353
  #redux_builder_amp-ampforwp_layouts_core .amppb_ad-layout-layout {
354
  margin-bottom: 30px;
 
355
  }
356
 
357
  /*** Layout Screenshot-Image CSS End ***/
@@ -974,4 +975,10 @@ font-weight: normal;
974
  }
975
  #ampforwp-adsforwp-activation-call {
976
  max-width:170px;
 
 
 
 
 
 
977
  }
352
  /*** Layout Screenshot-Image CSS ***/
353
  #redux_builder_amp-ampforwp_layouts_core .amppb_ad-layout-layout {
354
  margin-bottom: 30px;
355
+ width: 29%;
356
  }
357
 
358
  /*** Layout Screenshot-Image CSS End ***/
975
  }
976
  #ampforwp-adsforwp-activation-call {
977
  max-width:170px;
978
+ }
979
+ #beacon-container .BeaconContainer{
980
+ max-height: 520px !important;
981
+ }
982
+ .redux-main .select2-container {
983
+ max-width: 40%;
984
  }
includes/features/analytics/analytics-functions.php CHANGED
@@ -39,14 +39,19 @@ function ampforwp_analytics() {
39
  $ampforwp_ga_fields = apply_filters('ampforwp_advance_google_analytics', $ampforwp_ga_fields );
40
  $ampforwp_ga_fields = preg_replace('!/\*.*?\*/!s', '', $ampforwp_ga_fields);
41
  $ampforwp_ga_fields = preg_replace('/\n\s*\n/', '', $ampforwp_ga_fields);
42
- }
43
  ?>
 
 
 
 
 
 
44
  <amp-analytics <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> type="gtag" id="analytics1" data-credentials="include" >
45
  <script type="application/json">
46
  <?php echo $ampforwp_ga_fields; ?>
47
  </script>
48
  </amp-analytics>
49
- <?php
50
  }//code ends for supporting Google Analytics
51
 
52
  // 10.2 Analytics Support added for clicky.com
39
  $ampforwp_ga_fields = apply_filters('ampforwp_advance_google_analytics', $ampforwp_ga_fields );
40
  $ampforwp_ga_fields = preg_replace('!/\*.*?\*/!s', '', $ampforwp_ga_fields);
41
  $ampforwp_ga_fields = preg_replace('/\n\s*\n/', '', $ampforwp_ga_fields);
 
42
  ?>
43
+ <amp-analytics <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> type="googleanalytics" id="analytics1">
44
+ <script type="application/json">
45
+ <?php echo $ampforwp_ga_fields; ?>
46
+ </script>
47
+ </amp-analytics>
48
+ <?php } else { ?>
49
  <amp-analytics <?php if(ampforwp_get_data_consent()){?>data-block-on-consent <?php } ?> type="gtag" id="analytics1" data-credentials="include" >
50
  <script type="application/json">
51
  <?php echo $ampforwp_ga_fields; ?>
52
  </script>
53
  </amp-analytics>
54
+ <?php }
55
  }//code ends for supporting Google Analytics
56
 
57
  // 10.2 Analytics Support added for clicky.com
includes/features/performance/performance-functions.php CHANGED
@@ -196,6 +196,18 @@ if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
196
  $tmpDoc = new DOMDocument();
197
  libxml_use_internal_errors(true);
198
  $tmpDoc->loadHTML($completeContent);
 
 
 
 
 
 
 
 
 
 
 
 
199
  // AMP_treeshaking_Style_Sanitizer class is added in the vendor/amp/includes/sanitizers
200
  if( AMPforWP\AMPVendor\AMP_treeshaking_Style_Sanitizer::has_required_php_css_parser()){
201
  $sheet = '';
@@ -214,6 +226,7 @@ if( !function_exists("ampforwp_tree_shaking_purify_amphtml") ){
214
  foreach($data as $styles){
215
  $sheet .= $styles;
216
  }
 
217
  $sheet = stripcslashes($sheet);
218
  if(strpos($sheet, '-keyframes')!==false){
219
  $sheet = preg_replace("/@(-o-|-moz-|-webkit-|-ms-)*keyframes\s(.*?){([0-9%a-zA-Z,\s.]*{(.*?)})*[\s\n]*}/s", "", $sheet);
196
  $tmpDoc = new DOMDocument();
197
  libxml_use_internal_errors(true);
198
  $tmpDoc->loadHTML($completeContent);
199
+ $font_css = '';
200
+ if('swift-icons'==ampforwp_get_setting('ampforwp_font_icon')){
201
+ preg_match_all("/@font-face\s\{(.*?)\}/i", $completeContent, $matches);
202
+ foreach ($matches[0] as $key => $value) {
203
+ $font_css .= $value;
204
+ }
205
+ }
206
+ preg_match_all("/@font-face{(.*?)\}/i", $completeContent, $matches1);
207
+ foreach ($matches1[0] as $key => $value) {
208
+ $font_css .= $value;
209
+ }
210
+
211
  // AMP_treeshaking_Style_Sanitizer class is added in the vendor/amp/includes/sanitizers
212
  if( AMPforWP\AMPVendor\AMP_treeshaking_Style_Sanitizer::has_required_php_css_parser()){
213
  $sheet = '';
226
  foreach($data as $styles){
227
  $sheet .= $styles;
228
  }
229
+ $sheet.=$font_css;
230
  $sheet = stripcslashes($sheet);
231
  if(strpos($sheet, '-keyframes')!==false){
232
  $sheet = preg_replace("/@(-o-|-moz-|-webkit-|-ms-)*keyframes\s(.*?){([0-9%a-zA-Z,\s.]*{(.*?)})*[\s\n]*}/s", "", $sheet);
includes/options/admin-config.php CHANGED
@@ -581,8 +581,10 @@ foreach ($extension_listing_array as $key => $extension) {
581
 
582
  $onclickUrl = '<a href="'.$extension['url_link'].'" target="_blank">';
583
  $onclickUrlclose = '</a>';
584
- $settingPageUrl = '';
585
- $pluginReview = '<div class="extension_btn">From: '.$extension['price'].'</div>';
 
 
586
  if($extension['plugin_active_path'] != "" && is_plugin_active($extension['plugin_active_path']) ){
587
  $ampforwp_is_productActivated = true;
588
  $currentStatus = "not-active invalid";
@@ -2288,6 +2290,17 @@ Redux::setSection( $opt_name, array(
2288
  'tooltip-subtitle' => esc_html__('Allow like and comment for media', 'accelerated-mobile-pages'),
2289
  'required' => array('fb-instant-article-switch', '=', 1)
2290
  ),
 
 
 
 
 
 
 
 
 
 
 
2291
  array(
2292
  'id' => 'fbia-header-text-area',
2293
  'type' => 'textarea',
@@ -2588,15 +2601,6 @@ Redux::setSection( $opt_name, array(
2588
  'false' => 'false',
2589
  'default' => 0,
2590
  ),
2591
- array(
2592
- 'id' => 'ampforwp-content-builder',
2593
- 'type' => 'switch',
2594
- 'title' => esc_html__('Legacy Page Builder (widgets)', 'accelerated-mobile-pages'),
2595
- 'tooltip-subtitle' => esc_html__('Build AMP Landing pages in minutes.', 'accelerated-mobile-pages'),
2596
- 'true' => 'true',
2597
- 'false' => 'false',
2598
- 'default' => 0
2599
- ),
2600
  array(
2601
  'id' => 'ampforwp-role-based-access',
2602
  'type' => 'select',
@@ -3929,7 +3933,259 @@ Redux::setSection( $opt_name, array(
3929
  'required' => array(array('amp-design-selector', '!=' , '4')),
3930
 
3931
  ),
3932
- // Design1 Menu Options
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3933
  array(
3934
  'id' => 'amp-d1-sidebar-color',
3935
  'type' => 'color_rgba',
@@ -4047,7 +4303,7 @@ Redux::setSection( $opt_name, array(
4047
  array('ampforwp-amp-menu', '=' , '1')
4048
  )
4049
  ),
4050
- // Design 2 Menu Options
4051
  array(
4052
  'id' => 'amp-d2-sidebar-color',
4053
  'type' => 'color_rgba',
@@ -4165,7 +4421,7 @@ Redux::setSection( $opt_name, array(
4165
  array('ampforwp-amp-menu', '=' , '1')
4166
  )
4167
  ),
4168
- // Design 3 Menu Options
4169
  array(
4170
  'id' => 'amp-opt-color-rgba-menu-bg-color',
4171
  'type' => 'color_rgba',
@@ -4245,199 +4501,6 @@ Redux::setSection( $opt_name, array(
4245
  )
4246
  ),
4247
 
4248
-
4249
- array(
4250
- 'id' => 'header_section_3',
4251
- 'type' => 'section',
4252
- 'title' => esc_html__('Header Settings', 'accelerated-mobile-pages'),
4253
- 'indent' => true,
4254
- 'layout_type' => 'accordion',
4255
- 'accordion-open'=> 1,
4256
- ),
4257
- // Call Now button
4258
- array(
4259
- 'id' => 'ampforwp-callnow-button',
4260
- 'type' => 'switch',
4261
- 'title' => esc_html__('Call Now Button', 'accelerated-mobile-pages'),
4262
- 'true' => 'true',
4263
- 'false' => 'false',
4264
- 'required' => array(
4265
- array('amp-design-selector', '!=' , '1')
4266
- ),
4267
- 'default' => 0
4268
- ),
4269
- array(
4270
- 'id' =>'enable-amp-call-numberfield',
4271
- 'class' => 'child_opt child_opt_arrow',
4272
- 'type' => 'text',
4273
- 'required' => array(
4274
- array('ampforwp-callnow-button', '=' , '1'),
4275
- array('amp-design-selector', '!=' , '1')
4276
- ),
4277
- 'title' => esc_html__('Enter Phone Number', 'accelerated-mobile-pages'),
4278
- 'default' => '',
4279
- ),
4280
- array(
4281
- 'id' =>'amp-on-off-support-for-non-amp-home-page',
4282
- 'type' => 'switch',
4283
- 'title' => esc_html__('Non-AMP link in Header', 'accelerated-mobile-pages'),
4284
- 'tooltip-subtitle' => esc_html__('If you want users in header to go to non-AMP website from the Header', 'accelerated-mobile-pages'),
4285
- 'default' => 0,
4286
- ),
4287
- array(
4288
- 'id' => 'amp-opt-sticky-head',
4289
- 'type' => 'switch',
4290
- 'title' => esc_html__('Make Header UnSticky','accelerated-mobile-pages'),
4291
- 'required' => array(
4292
- array('amp-design-selector', '=' , '3')
4293
- ),
4294
- 'tooltip-subtitle' => esc_html__('Turning it ON will remove the sticky head from the design.', 'accelerated-mobile-pages' ),
4295
- 'default' => '0'
4296
- ),
4297
- array(
4298
- 'id' => 'amp-design-3-search-feature',
4299
- 'type' => 'switch',
4300
- 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4301
- 'required' => array(
4302
- array('amp-design-selector', '=' , '3')
4303
- ),
4304
- 'default' => '1'
4305
- ),
4306
-
4307
- array(
4308
- 'id' => 'amp-design-2-search-feature',
4309
- 'type' => 'switch',
4310
- 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4311
- 'required' => array(
4312
- array('amp-design-selector', '=' , '2')
4313
- ),
4314
- 'default' => '0'
4315
- ),
4316
-
4317
- array(
4318
- 'id' => 'amp-design-1-search-feature',
4319
- 'type' => 'switch',
4320
- 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4321
- 'required' => array(
4322
- array('amp-design-selector', '=' , '1')
4323
- ),
4324
- 'default' => '0'
4325
- ),
4326
- array(
4327
- 'id' => 'amp-swift-search-feature',
4328
- 'type' => 'switch',
4329
- 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4330
- 'required' => array(
4331
- array('amp-design-selector', '=' , '4')
4332
- ),
4333
- 'default' => '1'
4334
- ),
4335
- array(
4336
- 'id' => 'amp-sticky-header',
4337
- "type" =>"switch",
4338
- 'title' =>"Sticky Header ",
4339
- 'default' => 0,
4340
- 'required' => array(
4341
- array('amp-design-selector', '=' , '4')
4342
- )
4343
- ),
4344
- array(
4345
- 'id' => 'header_design_section',
4346
- 'type' => 'section',
4347
- 'title' => esc_html__('Header Design Options', 'accelerated-mobile-pages'),
4348
- 'indent' => true,
4349
- 'layout_type' => 'accordion',
4350
- 'accordion-open'=> 1,
4351
- ),
4352
- // Design 1 Fields
4353
- array(
4354
- 'id' => 'amp-d1-background-color',
4355
- 'type' => 'color_rgba',
4356
- 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
4357
- 'default' => array(
4358
- 'color' => '#0a89c0',
4359
- ),
4360
- 'required' => array(
4361
- array('amp-design-selector', '=' , '1')
4362
- )
4363
- ),
4364
- array(
4365
- 'id' => 'amp-d1-elements-color',
4366
- 'type' => 'color_rgba',
4367
- 'title' => esc_html__('Header Elements Color','accelerated-mobile-pages'),
4368
- 'default' => array(
4369
- 'color' => '#ffffff',
4370
- ),
4371
- 'required' => array(
4372
- array('amp-design-selector', '=' , '1')
4373
- )
4374
- ),
4375
- // Design 2 Fields
4376
- array(
4377
- 'id' => 'amp-d2-background-color',
4378
- 'type' => 'color_rgba',
4379
- 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
4380
- 'default' => array(
4381
- 'color' => '#0a89c0',
4382
- ),
4383
- 'required' => array(
4384
- array('amp-design-selector', '=' , '2')
4385
- )
4386
- ),
4387
- array(
4388
- 'id' => 'amp-d2-elements-color',
4389
- 'type' => 'color_rgba',
4390
- 'title' => esc_html__('Header Elements Color','accelerated-mobile-pages'),
4391
- 'default' => array(
4392
- 'color' => '#ffffff',
4393
- ),
4394
- 'required' => array(
4395
- array('amp-design-selector', '=' , '2')
4396
- )
4397
- ),
4398
- // Design 3 Fields
4399
- array(
4400
- 'id' => 'amp-opt-color-rgba-headercolor',
4401
- 'type' => 'color_rgba',
4402
- 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
4403
- 'default' => array(
4404
- 'color' => '#FFFFFF',
4405
- ),
4406
- 'required' => array(
4407
- array('amp-design-selector', '=' , '3')
4408
- )
4409
- ),
4410
- array(
4411
- 'id' => 'amp-opt-color-rgba-headerelements',
4412
- 'type' => 'color_rgba',
4413
- 'title' => esc_html__('Header Elements','accelerated-mobile-pages'),
4414
- 'default' => array(
4415
- 'color' => ampforwp_get_element_default_color(),
4416
- ),
4417
- 'required' => array(
4418
- array('amp-design-selector', '=' , '3')
4419
- )
4420
- ),
4421
- // Design 4 Fields
4422
- array(
4423
- 'id' => 'swift-background-scheme',
4424
- 'title' => esc_html__('Header Background', 'accelerated-mobile-pages'),
4425
- 'type' => 'color_rgba',
4426
- 'default' => array(
4427
- 'color' => '#fff',
4428
- ),
4429
- 'required' => array('header-type', '<' , '8')
4430
- ),
4431
- array(
4432
- 'id' => 'swift-element-color-control',
4433
- 'title' => esc_html__('Header Elements', 'accelerated-mobile-pages'),
4434
- 'tooltip-subtitle' => esc_html__('Color of the Text and Icons on top of Header','accelerated-mobile-pages'),
4435
- 'type' => 'color_rgba',
4436
- 'default' => array(
4437
- 'color' => '#333',
4438
- ),
4439
- 'required' => array('header-type', '<' , '8')
4440
- ),
4441
  // Tab 1 end
4442
  // Tab 2
4443
  array(
@@ -5610,7 +5673,7 @@ $single_page_options = array(
5610
  'title' => esc_html__('General', 'accelerated-mobile-pages'),
5611
  'indent' => true,
5612
  'layout_type' => 'accordion',
5613
- 'accordion-open'=> 0,
5614
  ),
5615
  // Lightbox
5616
  array(
@@ -6480,9 +6543,17 @@ else{
6480
  'layout_type' => 'accordion',
6481
  'accordion-open'=> 1,
6482
  ),
 
 
 
 
 
 
 
6483
  // Social Icons Position [Swift] #1722
6484
  array(
6485
  'id' => 'swift-social-position',
 
6486
  'type' => 'select',
6487
  'title' => esc_html__( 'Position', 'accelerated-mobile-pages' ),
6488
  'options' => array(
@@ -6491,25 +6562,29 @@ else{
6491
  'below-content' => 'Below Content'
6492
  ),
6493
  'default' => 'default',
6494
- 'required' => array(array('amp-design-selector', '=', '4') )
6495
  ),
6496
  // Social Share links to AMP
6497
  array(
6498
  'id' => 'ampforwp-social-share-amp',
6499
  'type' => 'switch',
 
6500
  'title' => esc_html__('Social Share links to AMP', 'accelerated-mobile-pages'),
6501
  'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6502
  esc_html__('Enable this option to share all your social links to AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-share-social-links-to-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6503
  'default' => 0,
 
6504
  ),
6505
  // Social No Follow links
6506
  array(
6507
  'id' => 'ampforwp-social-no-follow',
6508
  'type' => 'switch',
 
6509
  'title' => esc_html__('No Follow All Your Social Links', 'accelerated-mobile-pages'),
6510
  'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6511
  esc_html__('Enable this option to add no-follow to all your social links and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-no-follow-to-all-your-social-share-links/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6512
  'default' => 0,
 
6513
  ),
6514
  // AddThis Support
6515
  array(
@@ -6654,6 +6729,7 @@ else{
6654
  'indent' => true,
6655
  'layout_type' => 'accordion',
6656
  'accordion-open'=> 1,
 
6657
  ),
6658
  // Facebook Like
6659
  array(
@@ -6662,6 +6738,24 @@ else{
6662
  'title' => esc_html__('Facebook Like Button', 'accelerated-mobile-pages'),
6663
  'default' => 0,
6664
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6665
  // Facebook ON/OFF
6666
  array(
6667
  'id' => 'enable-single-facebook-share',
@@ -6709,6 +6803,7 @@ else{
6709
  array(
6710
  'id' => 'enable-single-twitter-share-handle',
6711
  'type' => 'text',
 
6712
  'title' => esc_html__('Twitter Handle', 'accelerated-mobile-pages'),
6713
  'required' => array('enable-single-twitter-share', '=' , '1'),
6714
  'placeholder' => esc_html__('Eg: @xyx','accelerated-mobile-pages'),
@@ -6717,6 +6812,7 @@ else{
6717
  array(
6718
  'id' => 'enable-single-twitter-share-link',
6719
  'type' => 'switch',
 
6720
  'title' => esc_html__('Pretty Permalinks for Twitter Share?', 'accelerated-mobile-pages'),
6721
  'tooltip-subtitle' => esc_html__('Enable this to have pretty links for twitter sharing'),
6722
  'default' => 0,
581
 
582
  $onclickUrl = '<a href="'.$extension['url_link'].'" target="_blank">';
583
  $onclickUrlclose = '</a>';
584
+ $settingPageUrl = $pluginReview = '';
585
+ if(isset($extension['is_activated']) && $extension['is_activated']!=1){
586
+ $pluginReview = '<div class="extension_btn">From: '.esc_html($extension['price']).'</div>';
587
+ }
588
  if($extension['plugin_active_path'] != "" && is_plugin_active($extension['plugin_active_path']) ){
589
  $ampforwp_is_productActivated = true;
590
  $currentStatus = "not-active invalid";
2290
  'tooltip-subtitle' => esc_html__('Allow like and comment for media', 'accelerated-mobile-pages'),
2291
  'required' => array('fb-instant-article-switch', '=', 1)
2292
  ),
2293
+ array(
2294
+ 'id' =>'hide-amp-ia-categories',
2295
+ 'type' => 'select',
2296
+ 'title' => esc_html__('Select Categories to Hide in IA'),
2297
+ 'tooltip-subtitle' => esc_html__( 'Hide IA from all the posts of a selected category.', 'accelerated-mobile-pages' ),
2298
+ 'multi' => true,
2299
+ 'ajax' => true,
2300
+ 'data-action' => 'ampforwp_categories',
2301
+ 'data' => 'categories',
2302
+ 'required' => array('fb-instant-article-switch', '=', 1)
2303
+ ),
2304
  array(
2305
  'id' => 'fbia-header-text-area',
2306
  'type' => 'textarea',
2601
  'false' => 'false',
2602
  'default' => 0,
2603
  ),
 
 
 
 
 
 
 
 
 
2604
  array(
2605
  'id' => 'ampforwp-role-based-access',
2606
  'type' => 'select',
3933
  'required' => array(array('amp-design-selector', '!=' , '4')),
3934
 
3935
  ),
3936
+ // Design 1 Menu slider position option
3937
+ array(
3938
+ 'id' => 'header-overlay-position-d1',
3939
+ 'title' => esc_html__('Menu Overlay Position', 'accelerated-mobile-pages'),
3940
+ 'type' => 'select',
3941
+ 'options'=> array(
3942
+ '1' => 'Right',
3943
+ '2' => 'Left'
3944
+ ),
3945
+ 'default'=> '1',
3946
+ 'required' => array(
3947
+ array('amp-design-selector', '=' , '1'),
3948
+ array('ampforwp-amp-menu', '=' , '1')
3949
+ )
3950
+ ),
3951
+ // Design 2 Menu slide poistion option
3952
+ array(
3953
+ 'id' => 'header-overlay-position-d2',
3954
+ 'title' => esc_html__('Menu Overlay Position', 'accelerated-mobile-pages'),
3955
+ 'type' => 'select',
3956
+ 'options'=> array(
3957
+ '1' => 'Right',
3958
+ '2' => 'Left'
3959
+ ),
3960
+ 'default'=> '1',
3961
+ 'required' => array(
3962
+ array('amp-design-selector', '=' , '2'),
3963
+ array('ampforwp-amp-menu', '=' , '1')
3964
+ )
3965
+ ),
3966
+ // Design 3 Menu slider position option
3967
+ array(
3968
+ 'id' => 'header-overlay-position-d3',
3969
+ 'title' => esc_html__('Menu Overlay Position', 'accelerated-mobile-pages'),
3970
+ 'type' => 'select',
3971
+ 'options'=> array(
3972
+ '1' => 'Left',
3973
+ '2' => 'Right'
3974
+ ),
3975
+ 'default'=> '1',
3976
+ 'required' => array(
3977
+ array('amp-design-selector', '=' , '3'),
3978
+ array('ampforwp-amp-menu', '=' , '1')
3979
+ )
3980
+ ),
3981
+
3982
+ array(
3983
+ 'id' => 'header_section_3',
3984
+ 'type' => 'section',
3985
+ 'title' => esc_html__('Header Settings', 'accelerated-mobile-pages'),
3986
+ 'indent' => true,
3987
+ 'layout_type' => 'accordion',
3988
+ 'accordion-open'=> 1,
3989
+ ),
3990
+ // Call Now button
3991
+ array(
3992
+ 'id' => 'ampforwp-callnow-button',
3993
+ 'type' => 'switch',
3994
+ 'title' => esc_html__('Call Now Button', 'accelerated-mobile-pages'),
3995
+ 'true' => 'true',
3996
+ 'false' => 'false',
3997
+ 'required' => array(
3998
+ array('amp-design-selector', '!=' , '1')
3999
+ ),
4000
+ 'default' => 0
4001
+ ),
4002
+ array(
4003
+ 'id' =>'enable-amp-call-numberfield',
4004
+ 'class' => 'child_opt child_opt_arrow',
4005
+ 'type' => 'text',
4006
+ 'required' => array(
4007
+ array('ampforwp-callnow-button', '=' , '1'),
4008
+ array('amp-design-selector', '!=' , '1')
4009
+ ),
4010
+ 'title' => esc_html__('Enter Phone Number', 'accelerated-mobile-pages'),
4011
+ 'default' => '',
4012
+ ),
4013
+ array(
4014
+ 'id' =>'amp-on-off-support-for-non-amp-home-page',
4015
+ 'type' => 'switch',
4016
+ 'title' => esc_html__('Non-AMP link in Header', 'accelerated-mobile-pages'),
4017
+ 'tooltip-subtitle' => esc_html__('If you want users in header to go to non-AMP website from the Header', 'accelerated-mobile-pages'),
4018
+ 'default' => 0,
4019
+ ),
4020
+ array(
4021
+ 'id' => 'amp-opt-sticky-head',
4022
+ 'type' => 'switch',
4023
+ 'title' => esc_html__('Make Header UnSticky','accelerated-mobile-pages'),
4024
+ 'required' => array(
4025
+ array('amp-design-selector', '=' , '3')
4026
+ ),
4027
+ 'tooltip-subtitle' => esc_html__('Turning it ON will remove the sticky head from the design.', 'accelerated-mobile-pages' ),
4028
+ 'default' => '0'
4029
+ ),
4030
+ array(
4031
+ 'id' => 'amp-design-3-search-feature',
4032
+ 'type' => 'switch',
4033
+ 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4034
+ 'required' => array(
4035
+ array('amp-design-selector', '=' , '3')
4036
+ ),
4037
+ 'default' => '1'
4038
+ ),
4039
+
4040
+ array(
4041
+ 'id' => 'amp-design-2-search-feature',
4042
+ 'type' => 'switch',
4043
+ 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4044
+ 'required' => array(
4045
+ array('amp-design-selector', '=' , '2')
4046
+ ),
4047
+ 'default' => '0'
4048
+ ),
4049
+
4050
+ array(
4051
+ 'id' => 'amp-design-1-search-feature',
4052
+ 'type' => 'switch',
4053
+ 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4054
+ 'required' => array(
4055
+ array('amp-design-selector', '=' , '1')
4056
+ ),
4057
+ 'default' => '0'
4058
+ ),
4059
+ array(
4060
+ 'id' => 'amp-swift-search-feature',
4061
+ 'type' => 'switch',
4062
+ 'title' => esc_html__( 'Search', 'accelerated-mobile-pages' ),
4063
+ 'required' => array(
4064
+ array('amp-design-selector', '=' , '4')
4065
+ ),
4066
+ 'default' => '1'
4067
+ ),
4068
+ array(
4069
+ 'id' => 'amp-sticky-header',
4070
+ "type" =>"switch",
4071
+ 'title' => esc_html__( 'Sticky Header', 'accelerated-mobile-pages' ),
4072
+ 'default' => 0,
4073
+ 'required' => array(
4074
+ array('amp-design-selector', '=' , '4')
4075
+ )
4076
+ ),
4077
+ array(
4078
+ 'id' => 'header_design_section',
4079
+ 'type' => 'section',
4080
+ 'title' => esc_html__('Header Design Options', 'accelerated-mobile-pages'),
4081
+ 'indent' => true,
4082
+ 'layout_type' => 'accordion',
4083
+ 'accordion-open'=> 1,
4084
+ ),
4085
+ // Design 1 Fields
4086
+ array(
4087
+ 'id' => 'amp-d1-background-color',
4088
+ 'type' => 'color_rgba',
4089
+ 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
4090
+ 'default' => array(
4091
+ 'color' => '#0a89c0',
4092
+ ),
4093
+ 'required' => array(
4094
+ array('amp-design-selector', '=' , '1')
4095
+ )
4096
+ ),
4097
+ array(
4098
+ 'id' => 'amp-d1-elements-color',
4099
+ 'type' => 'color_rgba',
4100
+ 'title' => esc_html__('Header Elements Color','accelerated-mobile-pages'),
4101
+ 'default' => array(
4102
+ 'color' => '#ffffff',
4103
+ ),
4104
+ 'required' => array(
4105
+ array('amp-design-selector', '=' , '1')
4106
+ )
4107
+ ),
4108
+ // Design 2 Fields
4109
+ array(
4110
+ 'id' => 'amp-d2-background-color',
4111
+ 'type' => 'color_rgba',
4112
+ 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
4113
+ 'default' => array(
4114
+ 'color' => '#0a89c0',
4115
+ ),
4116
+ 'required' => array(
4117
+ array('amp-design-selector', '=' , '2')
4118
+ )
4119
+ ),
4120
+ array(
4121
+ 'id' => 'amp-d2-elements-color',
4122
+ 'type' => 'color_rgba',
4123
+ 'title' => esc_html__('Header Elements Color','accelerated-mobile-pages'),
4124
+ 'default' => array(
4125
+ 'color' => '#ffffff',
4126
+ ),
4127
+ 'required' => array(
4128
+ array('amp-design-selector', '=' , '2')
4129
+ )
4130
+ ),
4131
+ // Design 3 Fields
4132
+ array(
4133
+ 'id' => 'amp-opt-color-rgba-headercolor',
4134
+ 'type' => 'color_rgba',
4135
+ 'title' => esc_html__('Header Background','accelerated-mobile-pages'),
4136
+ 'default' => array(
4137
+ 'color' => '#FFFFFF',
4138
+ ),
4139
+ 'required' => array(
4140
+ array('amp-design-selector', '=' , '3')
4141
+ )
4142
+ ),
4143
+ array(
4144
+ 'id' => 'amp-opt-color-rgba-headerelements',
4145
+ 'type' => 'color_rgba',
4146
+ 'title' => esc_html__('Header Elements','accelerated-mobile-pages'),
4147
+ 'default' => array(
4148
+ 'color' => ampforwp_get_element_default_color(),
4149
+ ),
4150
+ 'required' => array(
4151
+ array('amp-design-selector', '=' , '3')
4152
+ )
4153
+ ),
4154
+ // Design 4 Fields
4155
+ array(
4156
+ 'id' => 'swift-background-scheme',
4157
+ 'title' => esc_html__('Header Background', 'accelerated-mobile-pages'),
4158
+ 'type' => 'color_rgba',
4159
+ 'default' => array(
4160
+ 'color' => '#fff',
4161
+ ),
4162
+ 'required' => array('header-type', '<' , '8')
4163
+ ),
4164
+ array(
4165
+ 'id' => 'swift-element-color-control',
4166
+ 'title' => esc_html__('Header Elements', 'accelerated-mobile-pages'),
4167
+ 'tooltip-subtitle' => esc_html__('Color of the Text and Icons on top of Header','accelerated-mobile-pages'),
4168
+ 'type' => 'color_rgba',
4169
+ 'default' => array(
4170
+ 'color' => '#333',
4171
+ ),
4172
+ 'required' => array('header-type', '<' , '8')
4173
+ ),
4174
+
4175
+ // Navigation Menu Designs Options for Design 1, 2 and 3
4176
+ array(
4177
+ 'id' => 'navigation_design_section',
4178
+ 'type' => 'section',
4179
+ 'title' => esc_html__('Navigation Menu Design Options', 'accelerated-mobile-pages'),
4180
+ 'indent' => true,
4181
+ 'layout_type' => 'accordion',
4182
+ 'accordion-open'=> 1,
4183
+ 'required' => array(
4184
+ array('amp-design-selector', '!=' , '4'),
4185
+ array('ampforwp-amp-menu', '=' , '1'),
4186
+ )
4187
+ ),
4188
+ // Design1 Menu Color Options
4189
  array(
4190
  'id' => 'amp-d1-sidebar-color',
4191
  'type' => 'color_rgba',
4303
  array('ampforwp-amp-menu', '=' , '1')
4304
  )
4305
  ),
4306
+ // Design 2 Menu Color Options
4307
  array(
4308
  'id' => 'amp-d2-sidebar-color',
4309
  'type' => 'color_rgba',
4421
  array('ampforwp-amp-menu', '=' , '1')
4422
  )
4423
  ),
4424
+ // Design 3 Menu color options
4425
  array(
4426
  'id' => 'amp-opt-color-rgba-menu-bg-color',
4427
  'type' => 'color_rgba',
4501
  )
4502
  ),
4503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4504
  // Tab 1 end
4505
  // Tab 2
4506
  array(
5673
  'title' => esc_html__('General', 'accelerated-mobile-pages'),
5674
  'indent' => true,
5675
  'layout_type' => 'accordion',
5676
+ 'accordion-open'=> 1,
5677
  ),
5678
  // Lightbox
5679
  array(
6543
  'layout_type' => 'accordion',
6544
  'accordion-open'=> 1,
6545
  ),
6546
+ // Social Icons Option #3613
6547
+ array(
6548
+ 'id' => 'ampforwp-social-share',
6549
+ 'type' => 'switch',
6550
+ 'title' => esc_html__('Social Share', 'accelerated-mobile-pages'),
6551
+ 'default' => 1,
6552
+ ),
6553
  // Social Icons Position [Swift] #1722
6554
  array(
6555
  'id' => 'swift-social-position',
6556
+ 'class' => 'child_opt child_opt_arrow',
6557
  'type' => 'select',
6558
  'title' => esc_html__( 'Position', 'accelerated-mobile-pages' ),
6559
  'options' => array(
6562
  'below-content' => 'Below Content'
6563
  ),
6564
  'default' => 'default',
6565
+ 'required' => array(array('amp-design-selector', '=', '4'),array('ampforwp-social-share', '=', '1') )
6566
  ),
6567
  // Social Share links to AMP
6568
  array(
6569
  'id' => 'ampforwp-social-share-amp',
6570
  'type' => 'switch',
6571
+ 'class' => 'child_opt child_opt_arrow',
6572
  'title' => esc_html__('Social Share links to AMP', 'accelerated-mobile-pages'),
6573
  'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6574
  esc_html__('Enable this option to share all your social links to AMP and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-share-social-links-to-amp/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6575
  'default' => 0,
6576
+ 'required' => array(array('ampforwp-social-share', '=', '1'))
6577
  ),
6578
  // Social No Follow links
6579
  array(
6580
  'id' => 'ampforwp-social-no-follow',
6581
  'type' => 'switch',
6582
+ 'class' => 'child_opt child_opt_arrow',
6583
  'title' => esc_html__('No Follow All Your Social Links', 'accelerated-mobile-pages'),
6584
  'tooltip-subtitle' => sprintf('%s <a href="%s" target="_blank">%s</a> %s',
6585
  esc_html__('Enable this option to add no-follow to all your social links and', 'accelerated-mobile-pages'), esc_url('https://ampforwp.com/tutorials/article/how-to-add-no-follow-to-all-your-social-share-links/'),esc_html__('Click Here','accelerated-mobile-pages'), esc_html__('for more info','accelerated-mobile-pages')),
6586
  'default' => 0,
6587
+ 'required' => array(array('ampforwp-social-share', '=', '1'))
6588
  ),
6589
  // AddThis Support
6590
  array(
6729
  'indent' => true,
6730
  'layout_type' => 'accordion',
6731
  'accordion-open'=> 1,
6732
+ 'required' => array(array('ampforwp-social-share', '=', '1'))
6733
  ),
6734
  // Facebook Like
6735
  array(
6738
  'title' => esc_html__('Facebook Like Button', 'accelerated-mobile-pages'),
6739
  'default' => 0,
6740
  ),
6741
+ array(
6742
+ 'id' => 'ampforwp-facebook-like-data-action',
6743
+ 'type' => 'switch',
6744
+ 'class' => 'child_opt child_opt_arrow',
6745
+ 'title' => esc_html__('Add Recommend Label', 'accelerated-mobile-pages'),
6746
+ 'tooltip-subtitle' => esc_html__('Button text will be replaced from \'Like\' to \'Recommend\'', 'accelerated-mobile-pages'),
6747
+ 'default' => 0,
6748
+ 'required' => array('ampforwp-facebook-like-button', '=' , '1'),
6749
+ ),
6750
+ array(
6751
+ 'id' => 'ampforwp-facebook-like-width',
6752
+ 'type' => 'text',
6753
+ 'class' => 'child_opt child_opt_arrow',
6754
+ 'title' => esc_html__('Width for Facebook like button', 'accelerated-mobile-pages'),
6755
+ 'required' => array('ampforwp-facebook-like-data-action', '=' , '1'),
6756
+ 'tooltip-subtitle' => esc_html__('Enter the width of Facebook like button in px, default value is 140.', 'accelerated-mobile-pages'),
6757
+ 'default' => '140',
6758
+ ),
6759
  // Facebook ON/OFF
6760
  array(
6761
  'id' => 'enable-single-facebook-share',
6803
  array(
6804
  'id' => 'enable-single-twitter-share-handle',
6805
  'type' => 'text',
6806
+ 'class' => 'child_opt',
6807
  'title' => esc_html__('Twitter Handle', 'accelerated-mobile-pages'),
6808
  'required' => array('enable-single-twitter-share', '=' , '1'),
6809
  'placeholder' => esc_html__('Eg: @xyx','accelerated-mobile-pages'),
6812
  array(
6813
  'id' => 'enable-single-twitter-share-link',
6814
  'type' => 'switch',
6815
+ 'class' => 'child_opt',
6816
  'title' => esc_html__('Pretty Permalinks for Twitter Share?', 'accelerated-mobile-pages'),
6817
  'tooltip-subtitle' => esc_html__('Enable this to have pretty links for twitter sharing'),
6818
  'default' => 0,
includes/options/redux-core/framework.php CHANGED
@@ -3330,12 +3330,13 @@
3330
  public function generate_panel() {
3331
  require_once 'core/panel.php';
3332
  if(is_admin()){
3333
- echo '<div class="a-f-wp-help"><div class="a-f-wp-help-message">
3334
  <a target="_blank" href="http://ampforwp.com/support/?utm_source=options-panel&utm_medium=contact_link_btn&utm_campaign=AMP%20Plugin"> <img src="'.AMPFORWP_IMAGE_DIR . '/amp-img-conv.png'.'" /></a>
3335
 
3336
  </div>
3337
  <div class="a-f-wp-help-container">
3338
- <div class="a-f-wp-help-tear "><span> <i class="dashicons-admin-comments"></i></span></div>
 
3339
  </div></div>';
3340
  }
3341
  $panel = new reduxCorePanel ( $this );
3330
  public function generate_panel() {
3331
  require_once 'core/panel.php';
3332
  if(is_admin()){
3333
+ echo '<div class="a-f-wp-help"><div class="a-f-wp-help-message">
3334
  <a target="_blank" href="http://ampforwp.com/support/?utm_source=options-panel&utm_medium=contact_link_btn&utm_campaign=AMP%20Plugin"> <img src="'.AMPFORWP_IMAGE_DIR . '/amp-img-conv.png'.'" /></a>
3335
 
3336
  </div>
3337
  <div class="a-f-wp-help-container">
3338
+ <script type="text/javascript">!function(e,t,n){function a(){var e=t.getElementsByTagName("script")[0],n=t.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://beacon-v2.helpscout.net",e.parentNode.insertBefore(n,e)}if(e.Beacon=n=function(t,n,a){e.Beacon.readyQueue.push({method:t,options:n,data:a})},n.readyQueue=[],"complete"===t.readyState)return a();e.attachEvent?e.attachEvent("onload",a):e.addEventListener("load",a,!1)}(window,document,window.Beacon||function(){});</script>
3339
+ <script type="text/javascript">window.Beacon("init", "15cc2e40-aa70-4571-8e62-09906c77d535")</script>
3340
  </div></div>';
3341
  }
3342
  $panel = new reduxCorePanel ( $this );
includes/vendor/tinymce-widget/includes/class-widget.php CHANGED
@@ -61,7 +61,7 @@ if ( ! class_exists( 'WP_Widget_Black_Studio_TinyMCE' ) ) {
61
  $output = $before_widget;
62
  $output .= $before_text . $markup_title . $markup_text . $after_text;
63
  $output .= $after_widget;
64
- echo $output; // xss ok, escaped above
65
  }
66
  do_action( 'black_studio_tinymce_after_widget', $args, $instance );
67
  }
61
  $output = $before_widget;
62
  $output .= $before_text . $markup_title . $markup_text . $after_text;
63
  $output .= $after_widget;
64
+ echo wp_specialchars_decode($output); // xss ok, escaped above
65
  }
66
  do_action( 'black_studio_tinymce_after_widget', $args, $instance );
67
  }
pagebuilder/modules/heading-module.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  // Exit if accessed directly.
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
- $output = '<{{header_type}} {{if_id}}id="{{id}}"{{ifend_id}} class="h-txt {{user_class}}">{{content_title}}</{{header_type}}>';
5
  $css = '
6
  {{module-class}}{width:100%;text-align:{{align_type}};margin:{{margin_css}};padding:{{padding_css}};}
7
  {{module-class}} .h-txt{font-size:{{text-size}};color:{{font_color_picker}};letter-spacing:{{letter-spacing}};font-weight:{{font_type}};line-height:{{line-height}};}
@@ -16,6 +16,23 @@ return array(
16
  'advanced' => 'Advanced'
17
  ),
18
  'fields' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  array(
20
  'type' =>'text',
21
  'name' =>"content_title",
@@ -23,6 +40,7 @@ return array(
23
  'tab' =>'customizer',
24
  'default' =>'Heading',
25
  'content_type'=>'html',
 
26
  ),
27
  array(
28
  'type' =>'text',
@@ -48,23 +66,6 @@ return array(
48
  'default' =>'0px',
49
  'content_type'=>'css',
50
  ),
51
- array(
52
- 'type' =>'select',
53
- 'name' =>"header_type",
54
- 'label' =>"Heading Type",
55
- 'tab' =>'customizer',
56
- 'default' =>'h1',
57
- 'options_details'=>array(
58
- 'h1'=>'H1',
59
- 'h2'=>'H2',
60
- 'h3'=>'H3',
61
- 'h4'=>'H4',
62
- 'h5'=>'H5',
63
- 'h6'=>'H6'
64
- ),
65
- 'content_type'=>'html',
66
- 'output_format'=>''
67
- ),
68
  array(
69
  'type' =>'select',
70
  'name' =>'font_type',
1
  <?php
2
  // Exit if accessed directly.
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
+ $output = '{{if_header_type}}<{{header_type}} {{if_id}}id="{{id}}"{{ifend_id}} class="h-txt {{user_class}}">{{content_title}}</{{header_type}}>{{ifend_header_type}}';
5
  $css = '
6
  {{module-class}}{width:100%;text-align:{{align_type}};margin:{{margin_css}};padding:{{padding_css}};}
7
  {{module-class}} .h-txt{font-size:{{text-size}};color:{{font_color_picker}};letter-spacing:{{letter-spacing}};font-weight:{{font_type}};line-height:{{line-height}};}
16
  'advanced' => 'Advanced'
17
  ),
18
  'fields' => array(
19
+ array(
20
+ 'type' =>'select',
21
+ 'name' =>"header_type",
22
+ 'label' =>"Heading Type",
23
+ 'tab' =>'customizer',
24
+ 'default' =>'h1',
25
+ 'options_details'=>array(
26
+ 'h1'=>'H1',
27
+ 'h2'=>'H2',
28
+ 'h3'=>'H3',
29
+ 'h4'=>'H4',
30
+ 'h5'=>'H5',
31
+ 'h6'=>'H6'
32
+ ),
33
+ 'content_type'=>'html',
34
+ 'output_format'=>''
35
+ ),
36
  array(
37
  'type' =>'text',
38
  'name' =>"content_title",
40
  'tab' =>'customizer',
41
  'default' =>'Heading',
42
  'content_type'=>'html',
43
+ 'required' => array('header_type'=> array('h1','h2','h3','h4','h5','h6'))
44
  ),
45
  array(
46
  'type' =>'text',
66
  'default' =>'0px',
67
  'content_type'=>'css',
68
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  array(
70
  'type' =>'select',
71
  'name' =>'font_type',
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.3
7
- Stable tag: 0.9.98.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -191,58 +191,34 @@ You can contact us from [here](https://ampforwp.com/contact/)
191
 
192
  == Changelog ==
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  = 0.9.98.11 (20th SEPTEMBER 2019) =
195
  * Improvements: Improved AMP Advertisement option panel
196
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3660
197
  * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
198
 
199
- = 0.9.98.10 (18th SEPTEMBER 2019) =
200
-
201
- * Improvements: Upgrade the analtyics integration with gtag.js #3538
202
- * Improvements: Need to optimize css classes #3650
203
- * Fixed: Small sized images are getting stretched in the lightbox. #3602
204
- * Fixed: Gutenberg Audio Module not working #3597
205
- * Fixed: Table (thead-th) styling issue after update #3661
206
- * Fixed: Issue with the post titles in single page (two H2 tags if logo is not inserted) #3641
207
- * Fixed: search results pages are showing up as 'no index' #3646
208
- * Fixed: Need to add support of shortcode in category pages #3653
209
- * Fixed: Custom post description migrates to image description #3606
210
- * Fixed: AMP for WP conflict with the CDN Enabler plugin #3631
211
- * Fixed: Warning in Error Log #3655
212
- * Fixed: Incorrect placeholder "Select the SEO Plugin" in drop-down in AMP option Panel #3663
213
-
214
- = 0.9.98.9 (16th SEPTEMBER 2019) =
215
-
216
- * Improvements: Need to implement Tree Shaking feature to remove access css from the AMP pages #2949
217
- * Improvements: Need to save Post Meta Field Revisions in WordPress #3548
218
- * Improvements: Add Role based Access to all the options #3480
219
- * Improvements: Need to improve import/export option. #3364
220
- * Improvements: Need to make compatibility with amp-connatix-player component #3524
221
- * Improvements: "Recent Posts below related posts" feature need to implement for the design three #3531
222
- * Improvements: Need to improve color picker library in AMP FOR WP Plugin #3461
223
- * Improvements: Recent Posts below Related needs new options #3518
224
- * Improvements: Excerpt length feature request for related post #2908
225
- * Improvements: Need to add the option date below the content #3445
226
- * Improvements: Need to hide time in traditional view option. #3453
227
- * Improvements: Add feature to go to non AMP page on next and previous links #3253
228
- * Improvements: Create a filter to Exclude Posts from Related Posts #3582
229
- * Improvements: Need to add a filter to remove options in sidebar in AMP #3416
230
- * Improvements: allow option to change the heading tag of Featured module #3560
231
- * Improvements: AAWP plugin for AMP compatibility in Extension list #3591
232
- * Fixed: Individual AMP Page (Bulk Edit) "hide by default" option not working #3610
233
- * Fixed: In Recent Posts below Related need to add which present in below below related post #3596
234
- * Fixed: Need to shift the Header Background Option and Header Elements option on top in Swift theme #3462
235
- * Fixed: Need to add 'By Last X Days' option for "In-Content Related Posts" #3219
236
- * Fixed: Need to add unique class name custom post type #3539
237
- * Fixed: Need to add Convert AMP to WP theme (Beta) tutorial link in tooltip of this option #3552
238
- * Fixed: Need to connect with Collapse references by default option of the footnotes plugin. #3586
239
- * Fixed: Do not generate the AMPhtml for Woocommerce Account Page #3619
240
- * Fixed: Need to place page builder in custom homepage even amp support is off on pages. #2914
241
- * Fixed: Need to allow the user to navigate if user is using iframe #3601
242
- * Fixed: Template mode: Need to changes/fixes #3590
243
- * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
244
- * Fixed: Improper amphtml on HomePage when WPML is activate #3341
245
- * Fixed: The GDPR consent not working due to passed as string. #3658
246
-
247
 
248
  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.3
7
+ Stable tag: 0.9.98.12
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
191
 
192
  == Changelog ==
193
 
194
+ = 0.9.98.12 (25th SEPTEMBER 2019) =
195
+ * Improvements: User wants Wordpress admin toolbar in the AMP area #3450
196
+ * Improvements: we want the amp menu showing from left or right side both. #3095
197
+ * Improvements: Add feature to increase width for facebook like button and also add feature of data-action="recommend" #3241
198
+ * Improvements: Improvements in Design 1 2 and 3 option panel in Header section #3642
199
+ * Fixed: Update Stops Google Analytics tracking #3690
200
+ * Fixed: Lightbox not working for single images #3683
201
+ * Fixed: Language of Menu not changing when changing website language #3522
202
+ * Fixed: We need to allow people to turn off the social section fully #3613
203
+ * Fixed: Ui Design issues #3616
204
+ * Fixed: Dropcap option should only be enabled on the posts, not from pages. #3614
205
+ * Fixed: Social share position is not working in single design 2#3627
206
+ * Fixed: AMP text module is not working in Widget area #3644
207
+ * Fixed: Social media icons and comments should be below the post content on pages #3647
208
+ * Fixed: Breadcrumbs are breaking after enabling ""Post title on Breadcrumb" option #3648
209
+ * Fixed: line share link is getting added when sharing on telegram#3666
210
+ * Fixed: In social sharing Twitter Handle and Pretty Permalinks for Twitter Share? need to display child option of Twitter#3656
211
+ * Fixed: Extension license dashboard improvements #3654
212
+ * Fixed: Make the chat bubble into a email box for faster input #405
213
+ * Fixed: Option to specify certain taxonomy only in Instant Article Feeds #1489
214
+ * Fixed: Need to remove Legacy Pagebuilder option Safely #3609
215
+ * Fixed: Default heading tag should load if no option is selected in Header Module #3651
216
+ * Fixed: Pretty Permalinks for Twitter Share? option is not working #3662
217
+
218
  = 0.9.98.11 (20th SEPTEMBER 2019) =
219
  * Improvements: Improved AMP Advertisement option panel
220
  * Fixed: Mobile redirection causing extra redirects from /amp to /amp/ #3660
221
  * Fixed: The lightbox should not work for the image if any external link is added in its anchor tag. #3599
222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
 
224
  Full changelog available [ at changelog.txt](https://plugins.svn.wordpress.org/accelerated-mobile-pages/trunk/changelog.txt)
templates/custom-amp-content.php CHANGED
@@ -103,7 +103,7 @@ function ampforwp_custom_content_meta_register() {
103
  }
104
 
105
  // Assign Pagebuilder Meta Box // Legecy pagebuilder
106
- if ( $redux_builder_amp['ampforwp-content-builder'] ) {
107
  add_meta_box( 'custom_content_sidebar', esc_html__( 'AMP Page Builder', 'accelerated-mobile-pages' ), 'amp_content_sidebar_callback', 'page','side', 'default' );
108
  }
109
  }
103
  }
104
 
105
  // Assign Pagebuilder Meta Box // Legecy pagebuilder
106
+ if ( function_exists('ampforwp_custom_theme_files_register') ) {
107
  add_meta_box( 'custom_content_sidebar', esc_html__( 'AMP Page Builder', 'accelerated-mobile-pages' ), 'amp_content_sidebar_callback', 'page','side', 'default' );
108
  }
109
  }
templates/design-manager/design-1/elements/social-icons.php CHANGED
@@ -12,13 +12,15 @@ if($facebook_app_id){
12
  }
13
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
14
  $permalink = '';
15
- if(ampforwp_get_setting('enable-single-twitter-share-link')){
16
- $amp_permalink = wp_get_shortlink();
 
17
  }
18
  ?>
19
- <?php do_action('ampforwp_before_social_icons_hook',$this); ?>
 
20
  <div class="ampforwp-social-icons">
21
- <?php if( true == ampforwp_get_setting('ampforwp-facebook-like-button') ) {
22
  $facebook_like_url = '';
23
  $facebook_like_url = $amp_permalink;
24
  if( $facebook_like_url ){ ?>
@@ -29,7 +31,19 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
29
  data-href="<?php echo esc_url($facebook_like_url); ?>" <?php ampforwp_nofollow_social_links(); ?>>
30
  </amp-facebook-like>
31
  <?php }
32
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
33
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
34
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
35
  <?php } ?>
@@ -47,7 +61,7 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
47
  height="28"
48
  <?php ampforwp_nofollow_social_links(); ?>
49
  data-param-url=""
50
- data-param-text="TITLE <?php echo esc_url($amp_permalink).' '.ampforwp_translation( $redux_builder_amp['amp-translator-via-text'], 'via' ).' '.esc_attr($data_param_data) ?>"
51
  ></amp-social-share>
52
  <?php } ?>
53
  <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
@@ -168,6 +182,6 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
168
  </a>
169
  <?php } ?>
170
  </div>
171
- <?php } ?>
172
 
173
  <?php do_action('ampforwp_after_social_icons_hook',$this);
12
  }
13
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
14
  $permalink = '';
15
+ $twitter_amp_permalink = $amp_permalink;
16
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
17
+ $twitter_amp_permalink = wp_get_shortlink();
18
  }
19
  ?>
20
+ <?php do_action('ampforwp_before_social_icons_hook',$this);
21
+ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
22
  <div class="ampforwp-social-icons">
23
+ <?php if( true == ampforwp_get_setting('ampforwp-facebook-like-button') && false == ampforwp_get_setting('ampforwp-facebook-like-data-action') ) {
24
  $facebook_like_url = '';
25
  $facebook_like_url = $amp_permalink;
26
  if( $facebook_like_url ){ ?>
31
  data-href="<?php echo esc_url($facebook_like_url); ?>" <?php ampforwp_nofollow_social_links(); ?>>
32
  </amp-facebook-like>
33
  <?php }
34
+ }else{
35
+ $fblikewidth = ampforwp_get_setting('ampforwp-facebook-like-width');
36
+ if(empty($fblikewidth)){
37
+ $fblikewidth = "140";
38
+ }
39
+ ?>
40
+ <amp-facebook-like <?php echo "width=". esc_attr($fblikewidth) ."" ?> height=28
41
+ layout="fixed"
42
+ data-size="large"
43
+ data-action="recommend"
44
+ data-layout="button_count" <?php ampforwp_nofollow_social_links(); ?>
45
+ data-href="<?php echo esc_url(get_the_permalink());?>">
46
+ </amp-facebook-like><?php } ?>
47
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
48
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
49
  <?php } ?>
61
  height="28"
62
  <?php ampforwp_nofollow_social_links(); ?>
63
  data-param-url=""
64
+ data-param-text="TITLE <?php echo esc_url($twitter_amp_permalink).' '.ampforwp_translation( $redux_builder_amp['amp-translator-via-text'], 'via' ).' '.esc_attr($data_param_data) ?>"
65
  ></amp-social-share>
66
  <?php } ?>
67
  <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
182
  </a>
183
  <?php } ?>
184
  </div>
185
+ <?php } } ?>
186
 
187
  <?php do_action('ampforwp_after_social_icons_hook',$this);
templates/design-manager/design-1/header-bar.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php global $redux_builder_amp; ?>
 
2
  <header id="#top" class="amp-wp-header">
3
  <div class="ampforwp-logo-area" >
4
  <?php do_action('ampforwp_header_top_design1'); ?>
@@ -27,7 +28,7 @@
27
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
28
  <amp-sidebar id='sidebar'
29
  layout="nodisplay"
30
- side="right">
31
  <div class="toggle-navigationv2">
32
  <div role="button" tabindex="0" on='tap:sidebar.close' class="close-nav">X</div>
33
  <nav id ="primary-amp-menu">
1
  <?php global $redux_builder_amp; ?>
2
+ <?php do_action('ampforwp_admin_menu_bar_front'); ?>
3
  <header id="#top" class="amp-wp-header">
4
  <div class="ampforwp-logo-area" >
5
  <?php do_action('ampforwp_header_top_design1'); ?>
28
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
29
  <amp-sidebar id='sidebar'
30
  layout="nodisplay"
31
+ side="<?php echo (ampforwp_get_setting('header-overlay-position-d1') == 1 )? 'right':'left'; ?>">
32
  <div class="toggle-navigationv2">
33
  <div role="button" tabindex="0" on='tap:sidebar.close' class="close-nav">X</div>
34
  <nav id ="primary-amp-menu">
templates/design-manager/design-1/style.php CHANGED
@@ -205,7 +205,17 @@ amp-social-share[type="facebookmessenger"] {
205
  amp-sidebar{width:250px}
206
  amp-sidebar{background:<?php echo ampforwp_sanitize_color($menu_sidebar_clr); ?>;}
207
  .amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:<?php echo ampforwp_sanitize_color($submenu_bg_clr); ?>;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:100%;text-decoration:none;background: <?php echo ampforwp_sanitize_color($menu_bg_clr); ?>;font-size:13px;border-bottom:1px solid <?php echo ampforwp_sanitize_color($menu_bdr_clr); ?>;display:inline-block;color: <?php echo ampforwp_sanitize_color($menu_elements_clr); ?>;}
208
- .close-nav{font-size:12px;font-family:sans-serif;background: <?php echo ampforwp_sanitize_color($cross_btn_bg_clr); ?>;letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;left:191px;color: <?php echo ampforwp_sanitize_color($cross_btn_clr); ?>;display:inline-block;}.close-nav:hover{ background: <?php echo ampforwp_sanitize_color($cross_btn_hvr_clr); ?>;}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}.amp-not-privacy{color:<?php echo sanitize_hex_color( $header_background_color ); ?>;text-decoration: none;font-size: 15px;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( ampforwp_get_setting('enable-single-social-icons') == true && is_single() ) { ?>
 
 
 
 
 
 
 
 
 
 
209
  body {padding-bottom: 43px;}
210
  .body.single-post .sticky_social{z-index:99999;}
211
  .body.single-post .adsforwp-stick-ad, .body.single-post amp-sticky-ad{padding-top:4px;padding-bottom:52px;}
205
  amp-sidebar{width:250px}
206
  amp-sidebar{background:<?php echo ampforwp_sanitize_color($menu_sidebar_clr); ?>;}
207
  .amp-sidebar-image{line-height:100px;vertical-align:middle}.amp-close-image{top:15px;left:225px;cursor:pointer}.toggle-navigationv2 ul{list-style-type:none;margin:0;font-family:sans-serif;padding:0}.toggle-navigationv2 ul ul li a{padding-left:35px;background:<?php echo ampforwp_sanitize_color($submenu_bg_clr); ?>;display:inline-block}.toggle-navigationv2 ul li a{padding:10px 15px 10px 25px;width:100%;text-decoration:none;background: <?php echo ampforwp_sanitize_color($menu_bg_clr); ?>;font-size:13px;border-bottom:1px solid <?php echo ampforwp_sanitize_color($menu_bdr_clr); ?>;display:inline-block;color: <?php echo ampforwp_sanitize_color($menu_elements_clr); ?>;}
208
+ .close-nav{font-size:12px;font-family:sans-serif;background: <?php echo ampforwp_sanitize_color($cross_btn_bg_clr); ?>;letter-spacing:1px;padding:10px;border-radius:100px;line-height:8px;margin:14px;
209
+ color: <?php echo ampforwp_sanitize_color($cross_btn_clr); ?>;display:inline-block;
210
+ position:relative;
211
+ <?php if (ampforwp_get_setting('header-overlay-position-d1') == 1 ) {?>
212
+ right:0px;
213
+ <?php } //
214
+ if (ampforwp_get_setting('header-overlay-position-d1') == 2 ) {?>
215
+ left:191px;
216
+ <?php } ?>
217
+ }
218
+ .close-nav:hover{ background: <?php echo ampforwp_sanitize_color($cross_btn_hvr_clr); ?>;}.toggle-navigation ul{list-style-type:none;margin:0;padding:0;width:100%}.menu-all-pages-container:after{content:"";clear:both}.toggle-navigation ul li{font-size:13px;border-bottom:1px solid rgba(0,0,0,.11);padding:11px 0;width:25%;float:left;text-align:center;margin-top:6px}.toggle-navigation ul ul{display:none}.toggle-navigation ul li a{color:#eee;padding:15px}.toggle-navigation{display:none;background:#444}.nav_container:hover+.toggle-navigation,.toggle-navigation:active,.toggle-navigation:focus,.toggle-navigation:hover{display:inline-block;width:100%}#amp-user-notification1 p{display:inline-block}amp-user-notification{padding:5px;text-align:center;background:#fff;border-top:1px solid} amp-user-notification button {padding: 8px 10px;background: <?php echo sanitize_hex_color( $header_background_color ); ?>;color: <?php echo sanitize_hex_color( $header_color ); ?>;margin-left: 5px;border: 0;}.amp-not-privacy{color:<?php echo sanitize_hex_color( $header_background_color ); ?>;text-decoration: none;font-size: 15px;}amp-user-notification button:hover {cursor: pointer} .amp-ad-wrapper {text-align: center} <?php if( ampforwp_get_setting('enable-single-social-icons') == true && is_single() ) { ?>
219
  body {padding-bottom: 43px;}
220
  .body.single-post .sticky_social{z-index:99999;}
221
  .body.single-post .adsforwp-stick-ad, .body.single-post amp-sticky-ad{padding-top:4px;padding-bottom:52px;}
templates/design-manager/design-2/elements/social-icons.php CHANGED
@@ -12,13 +12,15 @@ if($facebook_app_id){
12
  }
13
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
14
  $permalink = '';
15
- if(ampforwp_get_setting('enable-single-twitter-share-link')){
16
- $amp_permalink = wp_get_shortlink();
 
17
  }
18
  ?>
19
- <?php do_action('ampforwp_before_social_icons_hook',$this); ?>
 
20
  <div class="amp-wp-content post-pagination-meta ampforwp-social-icons-wrapper ampforwp-social-icons">
21
- <?php if( true == ampforwp_get_setting('ampforwp-facebook-like-button') ) {
22
  $facebook_like_url = '';
23
  $facebook_like_url = $amp_permalink;
24
  if( $facebook_like_url ){ ?>
@@ -30,7 +32,19 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
30
  data-href="<?php echo esc_url($facebook_like_url); ?>">
31
  </amp-facebook-like>
32
  <?php }
33
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
34
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
35
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
36
  <?php } ?>
@@ -48,7 +62,7 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
48
  height="28"
49
  <?php ampforwp_nofollow_social_links(); ?>
50
  data-param-url=""
51
- data-param-text="TITLE <?php echo esc_url($amp_permalink).' '.ampforwp_translation( $redux_builder_amp['amp-translator-via-text'], 'via' ).' '.esc_attr($data_param_data) ?>"
52
  ></amp-social-share>
53
  <?php } ?>
54
  <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
@@ -170,5 +184,5 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
170
  </a>
171
  <?php } ?>
172
  </div>
173
- <?php } ?>
174
  <?php do_action('ampforwp_after_social_icons_hook',$this);
12
  }
13
  if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social']) && true == $redux_builder_amp['ampforwp-page-social']) ) {
14
  $permalink = '';
15
+ $twitter_amp_permalink = $amp_permalink;
16
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
17
+ $twitter_amp_permalink = wp_get_shortlink();
18
  }
19
  ?>
20
+ <?php do_action('ampforwp_before_social_icons_hook',$this);
21
+ if(true == ampforwp_get_setting('ampforwp-social-share')){ ?>
22
  <div class="amp-wp-content post-pagination-meta ampforwp-social-icons-wrapper ampforwp-social-icons">
23
+ <?php if( true == ampforwp_get_setting('ampforwp-facebook-like-button') && false == ampforwp_get_setting('ampforwp-facebook-like-data-action') ) {
24
  $facebook_like_url = '';
25
  $facebook_like_url = $amp_permalink;
26
  if( $facebook_like_url ){ ?>
32
  data-href="<?php echo esc_url($facebook_like_url); ?>">
33
  </amp-facebook-like>
34
  <?php }
35
+ }else{
36
+ $fblikewidth = ampforwp_get_setting('ampforwp-facebook-like-width');
37
+ if(empty($fblikewidth)){
38
+ $fblikewidth = "140";
39
+ }
40
+ ?>
41
+ <amp-facebook-like <?php echo "width=". esc_attr($fblikewidth) ."" ?> height=28
42
+ layout="fixed"
43
+ data-size="large"
44
+ data-action="recommend"
45
+ data-layout="button_count" <?php ampforwp_nofollow_social_links(); ?>
46
+ data-href="<?php echo esc_url(get_the_permalink());?>">
47
+ </amp-facebook-like><?php } ?>
48
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
49
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28" <?php ampforwp_nofollow_social_links(); ?>></amp-social-share>
50
  <?php } ?>
62
  height="28"
63
  <?php ampforwp_nofollow_social_links(); ?>
64
  data-param-url=""
65
+ data-param-text="TITLE <?php echo esc_url($twitter_amp_permalink).' '.ampforwp_translation( $redux_builder_amp['amp-translator-via-text'], 'via' ).' '.esc_attr($data_param_data) ?>"
66
  ></amp-social-share>
67
  <?php } ?>
68
  <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
184
  </a>
185
  <?php } ?>
186
  </div>
187
+ <?php } } ?>
188
  <?php do_action('ampforwp_after_social_icons_hook',$this);
templates/design-manager/design-2/header-bar.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php global $redux_builder_amp; ?>
2
- <header class="container">
 
3
  <div id="headerwrap">
4
  <div id="header">
5
  <?php do_action('ampforwp_header_top_design2'); ?>
@@ -18,7 +19,7 @@
18
 
19
  <amp-sidebar id='sidebar'
20
  layout="nodisplay"
21
- side="right">
22
  <div class="toggle-navigationv2">
23
  <div role="button" tabindex="0" on='tap:sidebar.close' class="close-nav">X</div>
24
  <nav id ="primary-amp-menu">
1
  <?php global $redux_builder_amp; ?>
2
+ <?php do_action('ampforwp_admin_menu_bar_front'); ?>
3
+ <header class="container design2-header">
4
  <div id="headerwrap">
5
  <div id="header">
6
  <?php do_action('ampforwp_header_top_design2'); ?>
19
 
20
  <amp-sidebar id='sidebar'
21
  layout="nodisplay"
22
+ side="<?php echo (ampforwp_get_setting('header-overlay-position-d2') == 1 )? 'right':'left'; ?>">
23
  <div class="toggle-navigationv2">
24
  <div role="button" tabindex="0" on='tap:sidebar.close' class="close-nav">X</div>
25
  <nav id ="primary-amp-menu">
templates/design-manager/design-2/style.php CHANGED
@@ -105,7 +105,15 @@ amp-sidebar{background:<?php echo ampforwp_sanitize_color($menu_sidebar_clr); ?>
105
  .toggle-navigationv2 ul{ list-style-type: none; margin: 0; padding: 0; }
106
  .toggle-navigationv2 ul ul li a{ padding-left: 35px; background:<?php echo ampforwp_sanitize_color($submenu_bg_clr); ?>; display: inline-block }
107
  .toggle-navigationv2 ul li a{ padding: 15px 25px; width: 100%; display: inline-block; background: <?php echo ampforwp_sanitize_color($menu_bg_clr); ?>; font-size: 14px; border-bottom: 1px solid <?php echo ampforwp_sanitize_color($menu_bdr_clr); ?>;color:<?php echo ampforwp_sanitize_color($menu_elements_clr); ?>;}
108
- .close-nav{ font-size: 12px; background: <?php echo ampforwp_sanitize_color($cross_btn_bg_clr); ?>; letter-spacing: 1px; display: inline-block; padding: 10px; border-radius: 100px; line-height: 8px; margin: 14px; left: 191px; color: <?php echo ampforwp_sanitize_color($cross_btn_clr); ?>; }
 
 
 
 
 
 
 
 
109
  .close-nav:hover{ background: <?php echo ampforwp_sanitize_color($cross_btn_hvr_clr); ?>;}
110
  .toggle-navigation ul{ list-style-type: none; margin: 0; padding: 0; display: inline-block; width: 100% }
111
  .menu-all-pages-container:after{ content: ""; clear: both }
@@ -155,7 +163,7 @@ amp-lightbox{ background: rgba(0, 0, 0,0.85); }
155
  #pagination .next a, #pagination .prev a{ margin-bottom: 12px; background: #fefefe; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05); padding: 11px 15px; font-size: 12px; color: #666; }
156
  <?php } // AMP Woocommerce condition ends ?>
157
  <?php
158
- if(ampforwp_get_setting('enable-single-social-icons') == true && is_single() || is_page() ){?>
159
  /* Sticky Social bar in Single */
160
  .ampforwp-social-icons-wrapper{ margin: 0.65em 0px 0.65em 0px; height: 28px; }
161
  .sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
105
  .toggle-navigationv2 ul{ list-style-type: none; margin: 0; padding: 0; }
106
  .toggle-navigationv2 ul ul li a{ padding-left: 35px; background:<?php echo ampforwp_sanitize_color($submenu_bg_clr); ?>; display: inline-block }
107
  .toggle-navigationv2 ul li a{ padding: 15px 25px; width: 100%; display: inline-block; background: <?php echo ampforwp_sanitize_color($menu_bg_clr); ?>; font-size: 14px; border-bottom: 1px solid <?php echo ampforwp_sanitize_color($menu_bdr_clr); ?>;color:<?php echo ampforwp_sanitize_color($menu_elements_clr); ?>;}
108
+ .close-nav{ font-size: 12px; background: <?php echo ampforwp_sanitize_color($cross_btn_bg_clr); ?>; letter-spacing: 1px; display: inline-block; padding: 10px; border-radius: 100px; line-height: 8px; margin: 14px;color: <?php echo ampforwp_sanitize_color($cross_btn_clr); ?>;
109
+ position:relative;
110
+ <?php if (ampforwp_get_setting('header-overlay-position-d2') == 1 ) {?>
111
+ right:0px;
112
+ <?php } //
113
+ if (ampforwp_get_setting('header-overlay-position-d2') == 2 ) {?>
114
+ left:191px;
115
+ <?php } ?>
116
+ }
117
  .close-nav:hover{ background: <?php echo ampforwp_sanitize_color($cross_btn_hvr_clr); ?>;}
118
  .toggle-navigation ul{ list-style-type: none; margin: 0; padding: 0; display: inline-block; width: 100% }
119
  .menu-all-pages-container:after{ content: ""; clear: both }
163
  #pagination .next a, #pagination .prev a{ margin-bottom: 12px; background: #fefefe; -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05); -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05); box-shadow: 0 2px 3px rgba(0,0,0,.05); padding: 11px 15px; font-size: 12px; color: #666; }
164
  <?php } // AMP Woocommerce condition ends ?>
165
  <?php
166
+ if(is_single() || is_page() ){?>
167
  /* Sticky Social bar in Single */
168
  .ampforwp-social-icons-wrapper{ margin: 0.65em 0px 0.65em 0px; height: 28px; }
169
  .sticky_social{ width: 100%; bottom: 0; display: block; left: 0; box-shadow: 0px 4px 7px #000; background: #fff; padding: 7px 0px 0px 0px; position: fixed; margin: 0; z-index: 10; text-align: center; }
templates/design-manager/design-3/elements/social-icons.php CHANGED
@@ -18,11 +18,13 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
18
  $image = $image[0];
19
  }
20
  $permalink = '';
21
- if(ampforwp_get_setting('enable-single-twitter-share-link')){
22
- $amp_permalink = wp_get_shortlink();
 
23
  }
24
  ?>
25
- <?php do_action('ampforwp_before_social_icons_hook',$this); ?>
 
26
  <div class="amp-wp-content ampforwp-social-icons-wrapper ampforwp-social-icons">
27
  <i class="icono-share"></i>
28
  <?php if ( true == ampforwp_get_setting('ampforwp-facebook-like-button') ) {
@@ -36,7 +38,19 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
36
  data-href="<?php echo esc_url($facebook_like_url); ?>">
37
  </amp-facebook-like>
38
  <?php }
39
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
40
  <?php if ( true == $redux_builder_amp['enable-single-facebook-share'] ) { ?>
41
  <div class="ampforwp-custom-social">
42
  <a title="facebook share" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/dialog/share?app_id=<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>&display=page&href=<?php echo esc_url($amp_permalink); ?>" class="amp-social-icon-rounded amp-social-facebook" aria-label="facebook share">
@@ -54,7 +68,7 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
54
  <?php if ( true == $redux_builder_amp['enable-single-twitter-share'] ) {
55
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle']; ?>
56
  <div class="ampforwp-custom-social">
57
- <a title="twitter share" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($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">
58
  <amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjAiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNjQwLjAxNzEgNjAxLjA4NjkiIGZpbGw9IiNmZmZmZmYiID48cGF0aCBkPSJNMCA1MzAuMTU1YzEwLjQyIDEuMDE1IDIwLjgyNiAxLjU0OCAzMS4yMiAxLjU0OCA2MS4wNSAwIDExNS41MjgtMTguNzMgMTYzLjM4Ny01Ni4xNy0yOC40MjQtLjM1Mi01My45MzMtOS4wNC03Ni40NzctMjYuMDQzLTIyLjU3LTE2Ljk5LTM3Ljk4NC0zOC42NzUtNDYuMzIzLTY1LjA1NiA2LjkzMyAxLjQxOCAxNS4xMDIgMi4wOTUgMjQuNDU2IDIuMDk1IDEyLjE1IDAgMjMuNzY3LTEuNTc1IDM0Ljg2Mi00LjY4NC0zMC41MTctNS44NjctNTUuNzY2LTIwLjg5Mi03NS43MS00NC45OTctMTkuOTU0LTI0LjEzMi0yOS45Mi01MS45Ny0yOS45Mi04My41Mjh2LTEuNTc0YzE4LjM5NiAxMC40MiAzOC4zMTIgMTUuODA2IDU5LjgyOCAxNi4xMy0xOC4wMTctMTEuNzk4LTMyLjM0LTI3LjMwNC00Mi45MTUtNDYuNTctMTAuNTc2LTE5LjI0LTE1Ljg3LTQwLjEzLTE1Ljg3LTYyLjY3NCAwLTIzLjU5OCA2LjA4Ny00NS42MDggMTguMjEtNjYuMDk2IDMyLjYgNDAuNTg2IDcyLjQyIDcyLjkzOCAxMTkuNDMyIDk3LjA1NiA0NyAyNC4wOSA5Ny4zNyAzNy41MyAxNTEuMTU4IDQwLjMyNi0yLjQzMi0xMS40NDctMy42NTUtMjEuNTE2LTMuNjU1LTMwLjE4IDAtMzYuMDg1IDEyLjg0LTY2Ljk1NCAzOC41MDUtOTIuNjIgMjUuNjgtMjUuNjY2IDU2LjcwNC0zOC41MDUgOTMuMTUzLTM4LjUwNSAzNy43OSAwIDY5LjcwMiAxMy44OCA5NS43MyA0MS42NCAzMC4xNjgtNi4yNTcgNTcuOTI4LTE3LjAxNSA4My4yNTYtMzIuMjYtOS43MTggMzEuNTU4LTI4LjgxNSA1NS44NDUtNTcuMjM4IDcyLjg0NyAyNS4zMjgtMy4xMSA1MC4zMDQtMTAuMDU2IDc0LjkzLTIwLjgxNC0xNi42NTIgMjYuMDE3LTM4LjMzNyA0OC43NDItNjUuMDU3IDY4LjE1MnYxNy4xOTdjMCAzNC45OTItNS4xMjQgNzAuMTI4LTE1LjM0OCAxMDUuMzU1LTEwLjIxMiAzNS4yMTQtMjUuODUgNjguODUzLTQ2LjgzIDEwMC45NzItMjAuOTk2IDMyLjA2NS00Ni4wNSA2MC42Mi03NS4xOSA4NS41Ny0yOS4xMjYgMjQuOTc2LTY0LjA4IDQ0Ljg1My0xMDQuODUgNTkuNTktNDAuNzU0IDE0Ljc1My04NC41NTMgMjIuMDktMTMxLjM5NyAyMi4wOUMxMjguODYyIDU4OC45NCA2MS43NCA1NjkuMzUgMCA1MzAuMTU0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" />
59
  </a>
60
  </div>
@@ -194,5 +208,5 @@ if ( is_single() || (is_page() && isset($redux_builder_amp['ampforwp-page-social
194
  </a>
195
  <?php } ?>
196
  </div>
197
- <?php } ?>
198
  <?php do_action('ampforwp_after_social_icons_hook',$this);
18
  $image = $image[0];
19
  }
20
  $permalink = '';
21
+ $twitter_amp_permalink = $amp_permalink;
22
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
23
+ $twitter_amp_permalink = wp_get_shortlink();
24
  }
25
  ?>
26
+ <?php do_action('ampforwp_before_social_icons_hook',$this);
27
+ if(true == ampforwp_get_setting('ampforwp-social-share') && false == ampforwp_get_setting('ampforwp-facebook-like-data-action')){ ?>
28
  <div class="amp-wp-content ampforwp-social-icons-wrapper ampforwp-social-icons">
29
  <i class="icono-share"></i>
30
  <?php if ( true == ampforwp_get_setting('ampforwp-facebook-like-button') ) {
38
  data-href="<?php echo esc_url($facebook_like_url); ?>">
39
  </amp-facebook-like>
40
  <?php }
41
+ }else{
42
+ $fblikewidth = ampforwp_get_setting('ampforwp-facebook-like-width');
43
+ if(empty($fblikewidth)){
44
+ $fblikewidth = "140";
45
+ }
46
+ ?>
47
+ <amp-facebook-like <?php echo "width=". esc_attr($fblikewidth) ."" ?> height=28 style="margin-bottom: 8px"
48
+ layout="fixed"
49
+ data-size="large"
50
+ data-action="recommend"
51
+ data-layout="button_count" <?php ampforwp_nofollow_social_links(); ?>
52
+ data-href="<?php echo esc_url(get_the_permalink());?>">
53
+ </amp-facebook-like><?php } ?>
54
  <?php if ( true == $redux_builder_amp['enable-single-facebook-share'] ) { ?>
55
  <div class="ampforwp-custom-social">
56
  <a title="facebook share" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/dialog/share?app_id=<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>&display=page&href=<?php echo esc_url($amp_permalink); ?>" class="amp-social-icon-rounded amp-social-facebook" aria-label="facebook share">
68
  <?php if ( true == $redux_builder_amp['enable-single-twitter-share'] ) {
69
  $data_param_data = $redux_builder_amp['enable-single-twitter-share-handle']; ?>
70
  <div class="ampforwp-custom-social">
71
+ <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">
72
  <amp-img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0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jcwNC0zOC41MDUgOTMuMTUzLTM4LjUwNSAzNy43OSAwIDY5LjcwMiAxMy44OCA5NS43MyA0MS42NCAzMC4xNjgtNi4yNTcgNTcuOTI4LTE3LjAxNSA4My4yNTYtMzIuMjYtOS43MTggMzEuNTU4LTI4LjgxNSA1NS44NDUtNTcuMjM4IDcyLjg0NyAyNS4zMjgtMy4xMSA1MC4zMDQtMTAuMDU2IDc0LjkzLTIwLjgxNC0xNi42NTIgMjYuMDE3LTM4LjMzNyA0OC43NDItNjUuMDU3IDY4LjE1MnYxNy4xOTdjMCAzNC45OTItNS4xMjQgNzAuMTI4LTE1LjM0OCAxMDUuMzU1LTEwLjIxMiAzNS4yMTQtMjUuODUgNjguODUzLTQ2LjgzIDEwMC45NzItMjAuOTk2IDMyLjA2NS00Ni4wNSA2MC42Mi03NS4xOSA4NS41Ny0yOS4xMjYgMjQuOTc2LTY0LjA4IDQ0Ljg1My0xMDQuODUgNTkuNTktNDAuNzU0IDE0Ljc1My04NC41NTMgMjIuMDktMTMxLjM5NyAyMi4wOUMxMjguODYyIDU4OC45NCA2MS43NCA1NjkuMzUgMCA1MzAuMTU0eiI+PC9wYXRoPjwvc3ZnPg==" width="16" height="16" />
73
  </a>
74
  </div>
208
  </a>
209
  <?php } ?>
210
  </div>
211
+ <?php } } ?>
212
  <?php do_action('ampforwp_after_social_icons_hook',$this);
templates/design-manager/design-3/header-bar.php CHANGED
@@ -3,7 +3,13 @@ if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforw
3
  <amp-sidebar id='sidebar'
4
  layout="nodisplay"
5
  <?php if ( true == $redux_builder_amp['amp-rtl-select-option'] )
6
- { echo 'side="right"';} else{ echo 'side="left"'; } ?>>
 
 
 
 
 
 
7
  <?php global $redux_builder_amp; ?>
8
  <div class="toggle-navigationv2">
9
 
@@ -80,7 +86,8 @@ if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforw
80
  </amp-sidebar>
81
  <?php } ?>
82
  <div id="designthree" class="designthree main_container">
83
- <header class="container">
 
84
  <div id="headerwrap">
85
  <div id="header">
86
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
3
  <amp-sidebar id='sidebar'
4
  layout="nodisplay"
5
  <?php if ( true == $redux_builder_amp['amp-rtl-select-option'] )
6
+ { echo 'side="right"';} else{
7
+ if( ampforwp_get_setting('header-overlay-position-d3') == 1 ){
8
+ echo 'side="left"';
9
+ }else{
10
+ echo 'side="right"';
11
+ }
12
+ }?> >
13
  <?php global $redux_builder_amp; ?>
14
  <div class="toggle-navigationv2">
15
 
86
  </amp-sidebar>
87
  <?php } ?>
88
  <div id="designthree" class="designthree main_container">
89
+ <?php do_action('ampforwp_admin_menu_bar_front'); ?>
90
+ <header class="container design3-header">
91
  <div id="headerwrap">
92
  <div id="header">
93
  <?php if(isset($redux_builder_amp['ampforwp-amp-menu']) && $redux_builder_amp['ampforwp-amp-menu']){ ?>
templates/design-manager/design-3/style.php CHANGED
@@ -427,10 +427,43 @@ pre{ white-space: pre-wrap; }
427
  transform-origin: right center;*/
428
  }
429
  /* Sidebar */
430
- #sidebar[open]+#designthree { max-height: 100vh; overflow: hidden; animation: opening .3s normal forwards ease-in-out; -webkit-transform: translate3d(60%, 0, 0) scale(0.8); transform: translate3d(60%, 0, 0) scale(0.8); }
431
- @keyframes opening{ 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(60%, 0, 0) scale(0.8); } }
432
- @keyframes closing{ 0% { transform: translate3d(60%, 0, 0) scale(0.8); } 100% { transform: translate3d(0, 0, 0) scale(1); } }
433
- @keyframes closingFix{ 0% { max-height: 100vh; overflow: hidden; } 100% { max-height: none; overflow: visible; } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  .hamburgermenu{ float:left; position:relative; z-index: 9999; }
435
 
436
  /* Category 3 */
427
  transform-origin: right center;*/
428
  }
429
  /* Sidebar */
430
+ #sidebar[open]+#designthree { max-height: 100vh; overflow: hidden;
431
+ animation: opening .3s normal forwards ease-in-out 0s;
432
+ <?php if (ampforwp_get_setting('header-overlay-position-d3') == 1 ) {?>
433
+ transform: translate3d(60%, 0, 0) scale(0.8);
434
+ <?php } else
435
+ if (ampforwp_get_setting('header-overlay-position-d3') == 2 ) {?>
436
+ transform: translate3d(-60%, 0, 0) scale(0.8);
437
+ <?php } ?>
438
+ }
439
+ @keyframes opening{
440
+ 0% { transform: translate3d(0, 0, 0) scale(1); }
441
+ 100% {
442
+ <?php if (ampforwp_get_setting('header-overlay-position-d3') == 1 ) {?>
443
+ transform: translate3d(60%, 0, 0) scale(0.8);
444
+ <?php } else
445
+ if (ampforwp_get_setting('header-overlay-position-d3') == 2 ) {?>
446
+ transform: translate3d(-60%, 0, 0) scale(0.8);
447
+ <?php } ?>
448
+ }
449
+ }
450
+ @keyframes closing{
451
+ 0%
452
+ {
453
+ <?php if (ampforwp_get_setting('header-overlay-position-d3') == 1 ) {?>
454
+ transform: translate3d(60%, 0, 0) scale(0.8);
455
+ <?php } else
456
+ if (ampforwp_get_setting('header-overlay-position-d3') == 2 ) {?>
457
+ transform: translate3d(-60%, 0, 0) scale(0.8);
458
+ <?php } ?>
459
+ }
460
+ 100%
461
+ { transform: translate3d(0, 0, 0) scale(1); }
462
+ }
463
+ @keyframes closingFix{
464
+ 0% { max-height: 100vh; overflow: hidden; }
465
+ 100% { max-height: none; overflow: visible; }
466
+ }
467
  .hamburgermenu{ float:left; position:relative; z-index: 9999; }
468
 
469
  /* Category 3 */
templates/design-manager/swift/footer.php CHANGED
@@ -58,8 +58,9 @@ if ( isset($redux_builder_amp['footer-type']) && '1' == $redux_builder_amp['foot
58
  if($facebook_app_id){
59
  $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
60
  }
61
- if(ampforwp_get_setting('enable-single-twitter-share-link')){
62
- $amp_permalink = wp_get_shortlink();
 
63
  }
64
  if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_page() && true == $redux_builder_amp['ampforwp-page-sticky-social']) ){ ?>
65
  <div class="s_stk ss-ic">
@@ -74,6 +75,21 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
74
  data-show-faces="true">
75
  </div>
76
  <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  else { ?>
78
  <amp-facebook-like width=90 height=35 style="margin: 0 auto;margin-top: 5px;"
79
  layout="fixed"
@@ -105,7 +121,7 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
105
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
106
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
107
  <li>
108
- <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($amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>">
109
  </a>
110
  </li>
111
  <?php } ?>
@@ -140,10 +156,10 @@ if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_pag
140
  <?php } ?>
141
  <?php if(ampforwp_get_setting('enable-single-line-share') == true){
142
  $line_share = 'http://line.me/R/msg/text/';
143
- $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
144
  ?>
145
  <li>
146
- <a title="line share" class="s_li" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($amp_permalink); ?>">
147
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+Cj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= untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
60
  }
61
+ $twitter_amp_permalink = $amp_permalink;
62
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
63
+ $twitter_amp_permalink = wp_get_shortlink();
64
  }
65
  if( (is_single() && $redux_builder_amp['enable-single-social-icons']) || (is_page() && true == $redux_builder_amp['ampforwp-page-sticky-social']) ){ ?>
66
  <div class="s_stk ss-ic">
75
  data-show-faces="true">
76
  </div>
77
  <?php }
78
+ else if(true == ampforwp_get_setting('ampforwp-facebook-like-button') && true == ampforwp_get_setting('ampforwp-facebook-like-data-action') ){
79
+ $fblikewidth = ampforwp_get_setting('ampforwp-facebook-like-width');
80
+ if(empty($fblikewidth)){
81
+ $fblikewidth = "140";
82
+ }
83
+ ?>
84
+ <amp-facebook-like <?php echo "width=". esc_attr($fblikewidth) ."" ?> height=35 style="margin: 0 auto;margin-top: 5px;"
85
+ layout="fixed"
86
+ data-size="large"
87
+ data-action="recommend"
88
+ data-layout="button_count" <?php ampforwp_nofollow_social_links(); ?>
89
+ data-href="<?php echo esc_url(get_the_permalink());?>">
90
+ </amp-facebook-like>
91
+
92
+ <?php }
93
  else { ?>
94
  <amp-facebook-like width=90 height=35 style="margin: 0 auto;margin-top: 5px;"
95
  layout="fixed"
121
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
122
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
123
  <li>
124
+ <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); ?>">
125
  </a>
126
  </li>
127
  <?php } ?>
156
  <?php } ?>
157
  <?php if(ampforwp_get_setting('enable-single-line-share') == true){
158
  $line_share = 'http://line.me/R/msg/text/';
159
+ $line_amp_permalink = add_query_arg($amp_permalink,'', $line_share );
160
  ?>
161
  <li>
162
+ <a title="line share" class="s_li" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>">
163
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDItMC4wMjMtMC4wMDQtMC4wMzZjLTAuMDAxLTAuMDExLTAuMDAyLTAuMDIxLTAuMDA0LTAuMDMyICAgbC0wLjM0NC0yLjg1OGMtMC4wNjktMC41NzQtMC4xNDgtMS4yMjgtMC4yMzgtMS45NzRsLTAuMDcyLTAuNTk0bC0wLjE0NywwLjAxOGMtMy42MTctMjAuNTcx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LDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
164
 
165
  </a>
templates/design-manager/swift/functions.php CHANGED
@@ -40,6 +40,7 @@ add_amp_icon( array( 'widgets', 'search', 'shopping-cart' ) );
40
 
41
  // Swift Social Icons
42
  function ampforwp_swift_social_icons(){
 
43
  global $redux_builder_amp;
44
  $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
45
  $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
@@ -52,8 +53,9 @@ function ampforwp_swift_social_icons(){
52
  if($facebook_app_id){
53
  $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
54
  }
55
- if(ampforwp_get_setting('enable-single-twitter-share-link')){
56
- $amp_permalink = wp_get_shortlink();
 
57
  }
58
  ?>
59
  <div class="ss-ic">
@@ -69,6 +71,21 @@ function ampforwp_swift_social_icons(){
69
  data-show-faces="true">
70
  </div>
71
  <?php }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  else { ?>
73
  <amp-facebook-like width=90 height=28
74
  layout="fixed"
@@ -96,7 +113,7 @@ function ampforwp_swift_social_icons(){
96
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
97
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
98
  <li>
99
- <a class="s_tw" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://twitter.com/intent/tweet?url=<?php echo esc_url($amp_permalink); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>" aria-label="twitter share">
100
  </a>
101
  </li>
102
  <?php } ?>
@@ -131,10 +148,10 @@ function ampforwp_swift_social_icons(){
131
  <?php } ?>
132
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
133
  $line_share = 'http://line.me/R/msg/text/';
134
- $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
135
  ?>
136
  <li>
137
- <a title="line share" class="s_li" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($amp_permalink); ?>" aria-label="line share">
138
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDItMC4wMjMt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y4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
139
 
140
  </a>
@@ -215,7 +232,7 @@ function ampforwp_swift_social_icons(){
215
  <?php } ?>
216
  </ul>
217
  </div>
218
- <?php }
219
  // Remove default sticky social from Swift
220
  remove_action('amp_post_template_footer','ampforwp_sticky_social_icons');
221
  remove_action('amp_post_template_css','amp_social_styles',11);
40
 
41
  // Swift Social Icons
42
  function ampforwp_swift_social_icons(){
43
+ if(true == ampforwp_get_setting('ampforwp-social-share')){
44
  global $redux_builder_amp;
45
  $amp_permalink = $facebook_app_id = $amp_permalink_fb_messenger = '';
46
  $facebook_app_id = ampforwp_get_setting('amp-facebook-app-id-messenger');
53
  if($facebook_app_id){
54
  $amp_permalink_fb_messenger = untrailingslashit($amp_permalink). '&app_id='. $facebook_app_id;
55
  }
56
+ $twitter_amp_permalink = $amp_permalink;
57
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
58
+ $twitter_amp_permalink = wp_get_shortlink();
59
  }
60
  ?>
61
  <div class="ss-ic">
71
  data-show-faces="true">
72
  </div>
73
  <?php }
74
+ else if(true == ampforwp_get_setting('ampforwp-facebook-like-button') && true == ampforwp_get_setting('ampforwp-facebook-like-data-action') ){
75
+ $fblikewidth = ampforwp_get_setting('ampforwp-facebook-like-width');
76
+ if(empty($fblikewidth)){
77
+ $fblikewidth = "140";
78
+ }
79
+ ?>
80
+ <amp-facebook-like <?php echo "width=". esc_attr($fblikewidth) ."" ?> height=28
81
+ layout="fixed"
82
+ data-size="large"
83
+ data-action="recommend"
84
+ data-layout="button_count" <?php ampforwp_nofollow_social_links(); ?>
85
+ data-href="<?php echo esc_url(get_the_permalink());?>">
86
+ </amp-facebook-like>
87
+
88
+ <?php }
89
  else { ?>
90
  <amp-facebook-like width=90 height=28
91
  layout="fixed"
113
  $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
114
  $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
115
  <li>
116
+ <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">
117
  </a>
118
  </li>
119
  <?php } ?>
148
  <?php } ?>
149
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
150
  $line_share = 'http://line.me/R/msg/text/';
151
+ $line_amp_permalink = add_query_arg($amp_permalink,'', $line_share );
152
  ?>
153
  <li>
154
+ <a title="line share" class="s_li" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>" aria-label="line share">
155
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0d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43MTIsMC4yMzEtMS40NDEsMC4zNDMtMi4xNjEsMC4zNDNjLTIuMTk5LDAtNC4zMjMtMS4wMzktNS42NjYtMi44ODhsLTI1LjIwNy0zNC43MTd2MzAuNjA1YzAsMy44NjYtMy4xMzQsNy03LDcgICBjLTMuODY2LDAtNy0zLjEzNC03LTd2LTUyLjE2YzAtMy4wMzMsMS45NTMtNS43MjEsNC44MzgtNi42NThjMi44ODYtMC45MzYsNi4wNDUsMC4wOSw3LjgyNywyLjU0NWwyNS4yMDcsMzQuNzE3Vjk5LjY3NSAgIGMwLTMuODY2LDMuMTM0LTcsNy03YzMuODY2LDAsNywzLjEzNCw3LDdWMTUzLjM3MXogTTIzMy4zMTEsMTU5LjI2OWgtMzQuNjQ1Yy0zLjg2NiwwLTctMy4xMzQtNy03di0yNi44NDdWOTguNTczICAgYzAtMy44NjYsMy4xMzQtNyw3LTdoMzMuNTdjMy44NjYsMCw3LDMuMTM0LDcsN3MtMy4xMzQsNy03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
156
 
157
  </a>
232
  <?php } ?>
233
  </ul>
234
  </div>
235
+ <?php } }
236
  // Remove default sticky social from Swift
237
  remove_action('amp_post_template_footer','ampforwp_sticky_social_icons');
238
  remove_action('amp_post_template_css','amp_social_styles',11);
templates/design-manager/swift/header.php CHANGED
@@ -11,6 +11,7 @@ if( !ampforwp_levelup_compatibility('hf_builder_head') ){
11
  }
12
  ?>
13
  <?php if($header_type == '1'){?>
 
14
  <header class="header h_m h_m_1">
15
  <?php do_action('ampforwp_header_top_design4'); ?>
16
  <input type="checkbox" id="offcanvas-menu" class="tg" />
11
  }
12
  ?>
13
  <?php if($header_type == '1'){?>
14
+ <?php do_action('ampforwp_admin_menu_bar_front'); ?>
15
  <header class="header h_m h_m_1">
16
  <?php do_action('ampforwp_header_top_design4'); ?>
17
  <input type="checkbox" id="offcanvas-menu" class="tg" />
templates/design-manager/swift/page.php CHANGED
@@ -31,6 +31,14 @@ amp_header(); ?>
31
  if(!ampforwp_is_front_page()){
32
  amp_content();
33
  }
 
 
 
 
 
 
 
 
34
  if( ampforwp_get_setting('enable-add-this-option') == true && 'above-content' != ampforwp_get_setting('swift-add-this-position')) {
35
  echo ampforwp_addThis_support();
36
  }?>
@@ -67,157 +75,6 @@ amp_header(); ?>
67
  <?php endif; ?>
68
  <?php } ?>
69
  <?php } ?>
70
- <?php if(!checkAMPforPageBuilderStatus(ampforwp_get_the_ID())){
71
- if( is_page() && true == ampforwp_get_setting('ampforwp-page-social') && 'above-content' != ampforwp_get_setting('swift-social-position') ) { ?>
72
- <div class="ss-ic">
73
- <span class="shr-txt"><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-share-text'], 'Share' )); ?></span>
74
- <ul>
75
- <?php if($redux_builder_amp['enable-single-facebook-share']){?>
76
- <li>
77
- <a title="facebook share" class="s_fb" target="_blank" href="https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>"></a>
78
- </li>
79
- <?php } ?>
80
- <?php
81
- $data_param = '';
82
- if(ampforwp_get_setting('enable-single-twitter-share')){
83
- $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
84
- $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
85
- <li>
86
- <a title="twitter share" class="s_tw" target="_blank" href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(rawurlencode(get_the_title())); ?><?php echo esc_attr($data_param); ?>">
87
- </a>
88
- </li>
89
- <?php } ?>
90
- <?php if($redux_builder_amp['enable-single-gplus-share']){?>
91
- <li>
92
- <a title="google plus share" class="s_gp" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>"></a>
93
- </li>
94
- <?php } ?>
95
- <?php if($redux_builder_amp['enable-single-email-share']){?>
96
- <li>
97
- <a title="email" class="s_em" target="_blank" href="mailto:?subject=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&body=<?php the_permalink(); ?>"></a>
98
- </li>
99
- <?php } ?>
100
- <?php if($redux_builder_amp['enable-single-pinterest-share']){
101
- $image = '';
102
- if (ampforwp_has_post_thumbnail( ) ){
103
- $image = ampforwp_get_post_thumbnail( 'url', 'full' );
104
- }?>
105
- <li>
106
- <a title="pinterest share" class="s_pt" target="_blank" href="https://pinterest.com/pin/create/button/?media=<?php echo esc_url($image); ?>&url=<?php esc_url(the_permalink()); ?>&description=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
107
- </li>
108
- <?php } ?>
109
- <?php if($redux_builder_amp['enable-single-linkedin-share']){?>
110
- <li>
111
- <a title="linkedin share" class="s_lk" target="_blank" href="https://www.linkedin.com/shareArticle?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
112
- </li>
113
- <?php } ?>
114
- <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
115
- <li>
116
- <a title="whatsapp share" class="s_wp" target="_blank" href="https://api.whatsapp.com/send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
117
- </li>
118
- <?php } ?>
119
- <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
120
- $line_share = 'http://line.me/R/msg/text/';
121
- $amp_permalink = get_the_permalink();
122
- $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
123
- ?>
124
- <li>
125
- <a title="line share" class="s_li" href="<?php echo esc_url($amp_permalink); ?>">
126
- <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDItMC4wMjMtMC4wMDQtMC4wMzZjLTAuMDAxLTAuMDExLTAuMDAyLTAuMDIxLTAuMDA0LTAuMDMyICAgbC0wLjM0NC0yLjg1OGMtMC4wNjktMC41NzQtMC4xNDgtMS4yMjgtMC4yMzgtMS45NzRsLTAuMDcyLTAuNTk0bC0wLjE0NywwLjAxOGMtMy42MTctMjAuNTcxLTEzLjU1My00MC4w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BmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="15" height="15" />
127
-
128
- </a>
129
- </li>
130
- <?php } ?>
131
- <?php if($redux_builder_amp['enable-single-vk-share']){?>
132
- <li>
133
- <a title="vkontakte share" class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
134
- </li>
135
- <?php } ?>
136
- <?php if($redux_builder_amp['enable-single-odnoklassniki-share']){?>
137
- <li>
138
- <a title="odnoklassniki share" class="s_od" target="_blank" href="https://ok.ru/dk?st.cmd=addShare&st._surl=<?php the_permalink(); ?>"></a>
139
- </li>
140
- <?php } ?>
141
- <?php if($redux_builder_amp['enable-single-reddit-share']){?>
142
- <li>
143
- <a title="reddit share" class="s_rd" target="_blank" href="https://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
144
- </li>
145
- <?php } ?>
146
- <?php if($redux_builder_amp['enable-single-tumblr-share']){?>
147
- <li>
148
- <a title="tumblr share" class="s_tb" target="_blank" href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=<?php the_permalink(); ?>"></a>
149
- </li>
150
- <?php } ?>
151
- <?php if($redux_builder_amp['enable-single-telegram-share']){?>
152
- <li>
153
- <a title="telegram share" class="s_tg" target="_blank" href="https://telegram.me/share/url?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
154
- </li>
155
- <?php } ?>
156
- <?php if($redux_builder_amp['enable-single-digg-share']){?>
157
- <li>
158
- <a title="digg share" class="s_dg" target="_blank" href="http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
159
- </li>
160
- <?php } ?>
161
- <?php if($redux_builder_amp['enable-single-stumbleupon-share']){?>
162
- <li>
163
- <a title="stumbleupon share" class="s_su" target="_blank" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
164
- </li>
165
- <?php } ?>
166
- <?php if($redux_builder_amp['enable-single-wechat-share']){?>
167
- <li>
168
- <a title="wechat share" class="s_wc" target="_blank" href="http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url=<?php the_permalink(); ?>"></a>
169
- </li>
170
- <?php } ?>
171
- <?php if($redux_builder_amp['enable-single-viber-share']){?>
172
- <li>
173
- <a title="viber share" class="s_vb" target="_blank" href="viber://forward?text=<?php the_permalink(); ?>"></a>
174
- </li>
175
- <?php } ?>
176
- <?php if ( isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
177
- <li>
178
- <a title="yummly share" class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
179
- </li>
180
- <?php } ?>
181
- <?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
182
- <li>
183
- <a title="hatena share" class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
184
- </li>
185
- <?php } ?>
186
- <?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
187
- <li>
188
- <a title="pocket share" class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
189
- </li>
190
- <?php } ?>
191
- <?php if($redux_builder_amp['ampforwp-facebook-like-button']){?>
192
- <li>
193
- <?php if( ampforwp_is_non_amp() && isset($redux_builder_amp['ampforwp-amp-convert-to-wp']) && $redux_builder_amp['ampforwp-amp-convert-to-wp']) { ?>
194
- <div class="fb-like"
195
- data-href="<?php echo esc_url(get_the_permalink());?>"
196
- data-layout="button_count"
197
- data-action="like"
198
- data-show-faces="true">
199
- </div>
200
- <?php }
201
- else { ?>
202
- <amp-facebook-like width=90 height=28
203
- layout="fixed"
204
- data-size="large"
205
- data-layout="button_count"
206
- data-href="<?php echo esc_url(get_the_permalink());?>">
207
- </amp-facebook-like>
208
- <?php } ?>
209
- </li>
210
- <?php } ?>
211
-
212
- </ul>
213
- </div>
214
- <?php } ?>
215
- <?php if( !ampforwp_levelup_compatibility('levelup_elementor') ){ // Level up Condition starts ?>
216
- <div class="cmts">
217
- <?php amp_comments();?>
218
- </div>
219
- <?php } // Level up Condition ends ?>
220
- <?php } ?>
221
  </div>
222
  </div>
223
  </div>
31
  if(!ampforwp_is_front_page()){
32
  amp_content();
33
  }
34
+ if( !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && is_page() && true == ampforwp_get_setting('ampforwp-page-social') && 'above-content' != ampforwp_get_setting('swift-social-position') ) {
35
+ echo ampforwp_swift_social_icons();
36
+ } ?>
37
+ <?php if( !ampforwp_levelup_compatibility('levelup_elementor') && !ampforwp_is_front_page()){ // Level up Condition starts ?>
38
+ <div class="cmts">
39
+ <?php amp_comments();?>
40
+ </div>
41
+ <?php } // Level up Condition ends
42
  if( ampforwp_get_setting('enable-add-this-option') == true && 'above-content' != ampforwp_get_setting('swift-add-this-position')) {
43
  echo ampforwp_addThis_support();
44
  }?>
75
  <?php endif; ?>
76
  <?php } ?>
77
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  </div>
79
  </div>
80
  </div>
templates/design-manager/swift/single.php CHANGED
@@ -285,6 +285,9 @@ do_action("ampforwp_single_design_type_handle_d1");
285
  <div class="sp-cnt">
286
  <div class="sp-rl">
287
  <div class="sp-rt">
 
 
 
288
  <div class="cntn-wrp artl-cnt">
289
  <?php
290
  if ( 'above-content' == ampforwp_get_setting('swift-layout-addthis-pos') ){
@@ -297,136 +300,9 @@ do_action("ampforwp_single_design_type_handle_d1");
297
  </div>
298
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
299
  <div class="ss-ic">
300
- <span class="shr-txt"><?php echo esc_attr(ampforwp_translation($redux_builder_amp['amp-translator-share-text'], 'Share' )); ?></span>
301
- <ul>
302
- <?php if($redux_builder_amp['enable-single-facebook-share']){?>
303
- <li>
304
- <a class="s_fb" target="_blank" href="https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>"></a>
305
- </li>
306
- <?php } ?>
307
- <?php
308
- $data_param = '';
309
- if(ampforwp_get_setting('enable-single-twitter-share')){
310
- $data_param_data = ampforwp_get_setting('enable-single-twitter-share-handle');
311
- $data_param = ( '' == $data_param_data ) ? '' : '&via='.$data_param_data.''; ?>
312
- <li>
313
- <a class="s_tw" target="_blank" href="https://twitter.com/intent/tweet?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(ampforwp_sanitize_twitter_title(get_the_title())); ?><?php echo esc_attr($data_param); ?>">
314
- </a>
315
- </li>
316
- <?php } ?>
317
- <?php if($redux_builder_amp['enable-single-gplus-share']){?>
318
- <li>
319
- <a class="s_gp" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink(); ?>"></a>
320
- </li>
321
- <?php } ?>
322
- <?php if($redux_builder_amp['enable-single-email-share']){?>
323
- <li>
324
- <a class="s_em" target="_blank" href="mailto:?subject=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&body=<?php the_permalink(); ?>"></a>
325
- </li>
326
- <?php } ?>
327
- <?php if($redux_builder_amp['enable-single-pinterest-share']){
328
- $image = '';
329
- if (ampforwp_has_post_thumbnail( ) ){
330
- $image = ampforwp_get_post_thumbnail( 'url', 'full' );
331
- }?>
332
- <li>
333
- <a class="s_pt" target="_blank" href="https://pinterest.com/pin/create/button/?media=<?php echo esc_url($image); ?>&url=<?php esc_url(the_permalink()); ?>&description=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
334
- </li>
335
- <?php } ?>
336
- <?php if($redux_builder_amp['enable-single-linkedin-share']){?>
337
- <li>
338
- <a class="s_lk" target="_blank" href="https://www.linkedin.com/shareArticle?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
339
- </li>
340
- <?php } ?>
341
- <?php if($redux_builder_amp['enable-single-whatsapp-share']){?>
342
- <li>
343
- <a class="s_wp" target="_blank" href="https://api.whatsapp.com/send?text=<?php the_permalink(); ?>" data-action="share/whatsapp/share"></a>
344
- </li>
345
- <?php } ?>
346
- <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
347
- $line_share = 'http://line.me/R/msg/text/';
348
- $amp_permalink = get_the_permalink();
349
- $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
350
- ?>
351
- <li>
352
- <a title="line share" class="s_li" href="http://line.me/R/msg/text/?<?php echo esc_url($amp_permalink); ?>">
353
- <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2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356
- </li>
357
- <?php } ?>
358
- <?php if($redux_builder_amp['enable-single-vk-share']){?>
359
- <li>
360
- <a class="s_vk" target="_blank" href="http://vk.com/share.php?url=<?php the_permalink(); ?>"></a>
361
- </li>
362
- <?php } ?>
363
- <?php if($redux_builder_amp['enable-single-odnoklassniki-share']){?>
364
- <li>
365
- <a class="s_od" target="_blank" href="https://ok.ru/dk?st.cmd=addShare&st._surl=<?php the_permalink(); ?>"></a>
366
- </li>
367
- <?php } ?>
368
- <?php if($redux_builder_amp['enable-single-reddit-share']){?>
369
- <li>
370
- <a class="s_rd" target="_blank" href="https://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
371
- </li>
372
- <?php } ?>
373
- <?php if($redux_builder_amp['enable-single-tumblr-share']){?>
374
- <li>
375
- <a class="s_tb" target="_blank" href="https://www.tumblr.com/widgets/share/tool?canonicalUrl=<?php the_permalink(); ?>"></a>
376
- </li>
377
- <?php } ?>
378
- <?php if($redux_builder_amp['enable-single-telegram-share']){?>
379
- <li>
380
- <a class="s_tg" target="_blank" href="https://telegram.me/share/url?url=<?php the_permalink(); ?>&text=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
381
- </li>
382
- <?php } ?>
383
- <?php if($redux_builder_amp['enable-single-digg-share']){?>
384
- <li>
385
- <a class="s_dg" target="_blank" href="http://digg.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
386
- </li>
387
- <?php } ?>
388
- <?php if($redux_builder_amp['enable-single-stumbleupon-share']){?>
389
- <li>
390
- <a class="s_su" target="_blank" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
391
- </li>
392
- <?php } ?>
393
- <?php if($redux_builder_amp['enable-single-wechat-share']){?>
394
- <li>
395
- <a class="s_wc" target="_blank" href="http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url=<?php the_permalink(); ?>"></a>
396
- </li>
397
- <?php } ?>
398
- <?php if($redux_builder_amp['enable-single-viber-share']){?>
399
- <li>
400
- <a class="s_vb" target="_blank" href="viber://forward?text=<?php the_permalink(); ?>"></a>
401
- </li>
402
- <?php } ?>
403
- <?php if ( isset($redux_builder_amp['enable-single-hatena-bookmarks']) && $redux_builder_amp['enable-single-hatena-bookmarks']){?>
404
- <li>
405
- <a class="s_hb" target="_blank" href="http://b.hatena.ne.jp/entry/<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
406
- </li>
407
- <?php } ?>
408
- <?php if ( isset($redux_builder_amp['enable-single-pocket-share']) && $redux_builder_amp['enable-single-pocket-share']){?>
409
- <li>
410
- <a class="s_pk" target="_blank" href="https://getpocket.com/save?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>"></a>
411
- </li>
412
- <?php } ?>
413
- <?php if ( isset($redux_builder_amp['enable-single-yummly-share']) && $redux_builder_amp['enable-single-yummly-share']){?>
414
- <li>
415
- <a class="s_ym" target="_blank" href="http://www.yummly.com/urb/verify?url=<?php the_permalink(); ?>&title=<?php echo esc_attr(htmlspecialchars(get_the_title())); ?>&yumtype=button"></a>
416
- </li>
417
- <?php } ?>
418
- <?php if(ampforwp_get_setting('ampforwp-facebook-like-button')){?>
419
- <li>
420
- <amp-facebook-like width=90 height=28
421
- layout="fixed"
422
- data-size="large"
423
- data-layout="button_count"
424
- data-href="<?php echo esc_url(get_the_permalink());?>">
425
- </amp-facebook-like>
426
- </li>
427
- <?php } ?>
428
-
429
- </ul>
430
  </div>
431
  <?php if( true == $redux_builder_amp['ampforwp-tags-single'] && amp_tags_list()){ ?>
432
  <div class="tags">
285
  <div class="sp-cnt">
286
  <div class="sp-rl">
287
  <div class="sp-rt">
288
+ <?php if (true == ampforwp_get_setting('swift-social-position') && 'above-content' == ampforwp_get_setting('swift-social-position')){
289
+ ampforwp_swift_social_icons();
290
+ }?>
291
  <div class="cntn-wrp artl-cnt">
292
  <?php
293
  if ( 'above-content' == ampforwp_get_setting('swift-layout-addthis-pos') ){
300
  </div>
301
  <?php if( !checkAMPforPageBuilderStatus(get_the_ID()) ) { ?>
302
  <div class="ss-ic">
303
+ <?php if (true == ampforwp_get_setting('swift-social-position') && 'below-content' == ampforwp_get_setting('swift-social-position')){
304
+ ampforwp_swift_social_icons();
305
+ }?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  </div>
307
  <?php if( true == $redux_builder_amp['ampforwp-tags-single'] && amp_tags_list()){ ?>
308
  <div class="tags">
templates/design-manager/swift/style.php CHANGED
@@ -963,7 +963,7 @@ if ( true == ampforwp_get_setting('ampforwp-disqus-comments-support') ) {?>
963
  .cntn-wrp p {font-size: 16px;}
964
  }
965
  <?php } } ?>
966
- <?php if ( true == ampforwp_get_setting('ampforwp-dropcap')) { ?>
967
  .cntn-wrp > p:first-of-type::first-letter{
968
  float: left;
969
  <?php $fontsize = ampforwp_get_setting('ampforwp-dropcap-font');
@@ -2236,4 +2236,7 @@ if(true == ampforwp_get_setting('ampforwp-single-related-posts-excerpt')){?>
2236
  a.readmore-rp {
2237
  font-size: 13px;
2238
  }
 
 
 
2239
  <?php }
963
  .cntn-wrp p {font-size: 16px;}
964
  }
965
  <?php } } ?>
966
+ <?php if ( is_single() && true == ampforwp_get_setting('ampforwp-dropcap')) { ?>
967
  .cntn-wrp > p:first-of-type::first-letter{
968
  float: left;
969
  <?php $fontsize = ampforwp_get_setting('ampforwp-dropcap-font');
2236
  a.readmore-rp {
2237
  font-size: 13px;
2238
  }
2239
+ <?php }
2240
+ if(is_page()){?>
2241
+ .ss-ic li a{display: initial;}
2242
  <?php }
templates/features.php CHANGED
@@ -534,7 +534,7 @@ function ampforwp_new_dir( $dir ) {
534
  $fb_like = false;
535
  $isBBPress = (function_exists('is_bbpress') ? is_bbpress() : false );
536
  if ( true == ampforwp_get_setting('ampforwp-facebook-like-button') ){
537
- if ( is_single() && ( true == ampforwp_get_setting('enable-single-social-icons') || $social_check ) && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && !$isBBPress) {
538
  $fb_like = true;
539
  }
540
  if ( is_page() && ( true == ampforwp_get_setting('ampforwp-page-sticky-social') || ( $social_check_page && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) ) ) {
@@ -1165,14 +1165,14 @@ function ampforwp_sticky_social_icons(){
1165
  $image = ampforwp_get_post_thumbnail( 'url', 'full' );
1166
  }
1167
  $permalink = '';
1168
- if(ampforwp_get_setting('enable-single-twitter-share-link')){
1169
  $permalink = wp_get_shortlink();
1170
  }
1171
  else
1172
  $permalink = $amp_permalink;
1173
  ?>
1174
  <div class="sticky_social">
1175
- <?php if ( true == ampforwp_get_setting('ampforwp-facebook-like-button')) {
1176
  $facebook_like_url = '';
1177
  $facebook_like_url = $amp_permalink;
1178
  if ( $facebook_like_url ) { ?>
@@ -1184,7 +1184,19 @@ function ampforwp_sticky_social_icons(){
1184
  data-href="<?php echo esc_url($facebook_like_url); ?>">
1185
  </amp-facebook-like>
1186
  <?php }
1187
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
1188
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
1189
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28"></amp-social-share>
1190
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
@@ -1228,9 +1240,9 @@ function ampforwp_sticky_social_icons(){
1228
  <?php } ?>
1229
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
1230
  $line_share = 'http://line.me/R/msg/text/';
1231
- $amp_permalink = add_query_arg($amp_permalink,'', $line_share );
1232
  ?>
1233
- <a title="line share" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($amp_permalink); ?>">
1234
  <div class="amp-social-icon custom-amp-socialsharing-line">
1235
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDItMC4wMjMtMC4wMDQ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Ny03LDdoLTI2LjU3djEyLjg0OWgyMS41NjJjMy44NjYsMCw3LDMuMTM0LDcsN2MwLDMuODY2LTMuMTM0LDctNyw3ICAgaC0yMS41NjJ2MTIuODQ3aDI3LjY0NWMzLjg2NiwwLDcsMy4xMzQsNyw3UzIzNy4xNzcsMTU5LjI2OSwyMzMuMzExLDE1OS4yNjl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="50" height="20" alt="line" />
1236
  </div>
@@ -2436,7 +2448,7 @@ function ampforwp_add_widget_support() {
2436
  'after_title' => '</h4></span>'
2437
  ));
2438
 
2439
- if ( isset($redux_builder_amp['ampforwp-content-builder']) && $redux_builder_amp['ampforwp-content-builder'] ) {
2440
  $desc = "<b>Update: <a target='_blank' href='https://ampforwp.com/tutorials/article/amp-page-builder-installation/'>Introducing PageBuilder 2.0</a></b><br />Drag and Drop the AMP Modules in this Widget Area and then assign this widget area to a page <a href=http://ampforwp.com/tutorials/page-builder>(Need Help?)</a>";
2441
  $placeholder = 'PLACEHOLDER';
2442
  register_sidebar(array(
@@ -3408,7 +3420,7 @@ function ampforwp_apply_layout_builder_on_pages($post_id) {
3408
  $post_id = ampforwp_get_frontpage_id();
3409
  }
3410
 
3411
- if ( $redux_builder_amp['ampforwp-content-builder'] ) {
3412
  if ( is_page() ) {
3413
  $sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
3414
  }
@@ -3490,7 +3502,7 @@ function ampforwp_builder_checker() {
3490
  $pagebuilder_check = '';
3491
  $post_id = '';
3492
  $is_legacy_enabled = '';
3493
- $is_legacy_enabled = ampforwp_get_setting('ampforwp-content-builder');
3494
  if ( $post ) {
3495
  $post_id = $post->ID;
3496
  }
@@ -5757,10 +5769,17 @@ function ampforwp_remove_ahref_lightbox_in_amp( $content ) {
5757
  preg_match_all('/(<a(.*?)href=\"(.*?)\">(.*?)<img(.*?)src=\"(.*?)\"(.*?)\/>)/', $content, $matches);
5758
  if( count($matches[3])){
5759
  for( $i=0;$i<count($matches[3]);$i++){
5760
- if($matches[3][$i] == $matches[6][$i]){
 
 
 
 
5761
  $href = $matches[3][$i];
5762
- $href_src = str_replace( '/', '\/', $href );
5763
- $content = preg_replace('/<a(.*?)href=\"'.$href_src.'\"(.*?)>(<img(.*?)src=\"'.$href_src.'\"(.*?)\/>)<\/a>/i', '$3', $content);
 
 
 
5764
  }
5765
  }
5766
  }
@@ -7026,4 +7045,145 @@ function ampforwp_meta_revi_save_post( $post_id, $post ) {
7026
  }
7027
  }
7028
  }
7029
- // Post Meta Revisions #3548 -- end here --
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
534
  $fb_like = false;
535
  $isBBPress = (function_exists('is_bbpress') ? is_bbpress() : false );
536
  if ( true == ampforwp_get_setting('ampforwp-facebook-like-button') ){
537
+ if ( is_single() && ( true == ampforwp_get_setting('enable-single-social-icons') || (true == ampforwp_get_setting('ampforwp-social-share') && $social_check) ) && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) && !$isBBPress) {
538
  $fb_like = true;
539
  }
540
  if ( is_page() && ( true == ampforwp_get_setting('ampforwp-page-sticky-social') || ( $social_check_page && !checkAMPforPageBuilderStatus(ampforwp_get_the_ID()) ) ) ) {
1165
  $image = ampforwp_get_post_thumbnail( 'url', 'full' );
1166
  }
1167
  $permalink = '';
1168
+ if(false == ampforwp_get_setting('enable-single-twitter-share-link')){
1169
  $permalink = wp_get_shortlink();
1170
  }
1171
  else
1172
  $permalink = $amp_permalink;
1173
  ?>
1174
  <div class="sticky_social">
1175
+ <?php if ( true == ampforwp_get_setting('ampforwp-facebook-like-button') && false == ampforwp_get_setting('ampforwp-facebook-like-data-action')) {
1176
  $facebook_like_url = '';
1177
  $facebook_like_url = $amp_permalink;
1178
  if ( $facebook_like_url ) { ?>
1184
  data-href="<?php echo esc_url($facebook_like_url); ?>">
1185
  </amp-facebook-like>
1186
  <?php }
1187
+ }else{
1188
+ $fblikewidth = ampforwp_get_setting('ampforwp-facebook-like-width');
1189
+ if(empty($fblikewidth)){
1190
+ $fblikewidth = "140";
1191
+ }
1192
+ ?>
1193
+ <amp-facebook-like <?php echo "width=". esc_attr($fblikewidth) ."" ?> height=18 style="margin-bottom:-18px;"
1194
+ layout="fixed"
1195
+ data-size="large"
1196
+ data-action="recommend"
1197
+ data-layout="button_count" <?php ampforwp_nofollow_social_links(); ?>
1198
+ data-href="<?php echo esc_url(get_the_permalink());?>">
1199
+ </amp-facebook-like><?php } ?>
1200
  <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
1201
  <amp-social-share type="facebook" data-param-app_id="<?php echo esc_attr($redux_builder_amp['amp-facebook-app-id']); ?>" width="50" height="28"></amp-social-share>
1202
  <a title="facebook share" class="s_fb" target="_blank" <?php ampforwp_nofollow_social_links(); ?> href="https://www.facebook.com/sharer.php?u=<?php echo esc_url($amp_permalink); ?>"></a>
1240
  <?php } ?>
1241
  <?php if(ampforwp_get_setting('enable-single-line-share') == true) {
1242
  $line_share = 'http://line.me/R/msg/text/';
1243
+ $line_amp_permalink = add_query_arg($amp_permalink,'', $line_share );
1244
  ?>
1245
+ <a title="line share" <?php ampforwp_nofollow_social_links(); ?> href="<?php echo esc_url($line_amp_permalink); ?>">
1246
  <div class="amp-social-icon custom-amp-socialsharing-line">
1247
  <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI5Ni41MjggMjk2LjUyOCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjk2LjUyOCAyOTYuNTI4OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCI+CjxnPgoJPHBhdGggZD0iTTI5NS44MzgsMTE1LjM0N2wwLjAwMy0wLjAwMWwtMC4wOTItMC43NmMtMC4wMDEtMC4wMTMtMC4wMDItMC4wMjMtMC4wMDQtMC4wMzZjLTAuMDAxLTAuMDExLTAuMDAyLTAuMDIxLTAuMDA0LTAuMDMyICAgbC0wLjM0NC0yLjg1OGMtMC4wNjktMC41NzQtMC4xNDgtMS4yMjgtMC4yMzgtMS45NzRsLTAuMDcyLTAuNTk0bC0wLjE0NywwLjAxOGMtMy42MTctMjAuNTcxLTEzLjU1My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jl6IiBmaWxsPSIjRkZGRkZGIi8+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==" width="50" height="20" alt="line" />
1248
  </div>
2448
  'after_title' => '</h4></span>'
2449
  ));
2450
 
2451
+ if ( function_exists('ampforwp_custom_theme_files_register') ) {
2452
  $desc = "<b>Update: <a target='_blank' href='https://ampforwp.com/tutorials/article/amp-page-builder-installation/'>Introducing PageBuilder 2.0</a></b><br />Drag and Drop the AMP Modules in this Widget Area and then assign this widget area to a page <a href=http://ampforwp.com/tutorials/page-builder>(Need Help?)</a>";
2453
  $placeholder = 'PLACEHOLDER';
2454
  register_sidebar(array(
3420
  $post_id = ampforwp_get_frontpage_id();
3421
  }
3422
 
3423
+ if ( function_exists('ampforwp_custom_theme_files_register') ) {
3424
  if ( is_page() ) {
3425
  $sidebar_check = get_post_meta( $post_id,'ampforwp_custom_sidebar_select',true);
3426
  }
3502
  $pagebuilder_check = '';
3503
  $post_id = '';
3504
  $is_legacy_enabled = '';
3505
+ $is_legacy_enabled = function_exists('ampforwp_custom_theme_files_register');
3506
  if ( $post ) {
3507
  $post_id = $post->ID;
3508
  }
5769
  preg_match_all('/(<a(.*?)href=\"(.*?)\">(.*?)<img(.*?)src=\"(.*?)\"(.*?)\/>)/', $content, $matches);
5770
  if( count($matches[3])){
5771
  for( $i=0;$i<count($matches[3]);$i++){
5772
+ $href_url = $matches[3][$i];
5773
+ $href_url = explode('/', $href_url);
5774
+ $href_url = end($href_url);
5775
+ $href_url = pathinfo($href_url, PATHINFO_FILENAME);
5776
+ if($matches[3][$i] == $matches[6][$i] || strpos($matches[6][$i], $href_url) !== false){
5777
  $href = $matches[3][$i];
5778
+ $src = $matches[6][$i];
5779
+ $href_src = str_replace( '/', '\/', esc_url($href));
5780
+ $image_src = str_replace( '/', '\/', esc_url($src));
5781
+ $content = preg_replace('/<a(.*?)href=\"'.$href_src.'\"(.*?)>(<img(.*?)src=\"'.$image_src.'\"(.*?)\/>)<\/a>/i', '$3', $content);
5782
+
5783
  }
5784
  }
5785
  }
7045
  }
7046
  }
7047
  }
7048
+ // Post Meta Revisions #3548 -- end here --
7049
+
7050
+
7051
+ // FOR ADMIN MENU BAR
7052
+ add_action( 'pre_amp_render_post', 'ampforwp_front_admin_menu_bar' );
7053
+ function ampforwp_front_admin_menu_bar(){
7054
+ if( is_user_logged_in() ){
7055
+ $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
7056
+ if($pref==="true"){
7057
+ add_action("ampforwp_admin_menu_bar_front", function(){
7058
+ add_action('wp_before_admin_bar_render','ampforwp_add_admin_menu_front');
7059
+ wp_admin_bar_render();
7060
+ });
7061
+ add_action( 'admin_bar_init', 'ampforwp_init_admin_bar');
7062
+ add_action( 'wp_before_admin_bar_render','ampforwp_remove_before_admin_bar_redner',9);
7063
+ add_action( 'admin_bar_menu', 'ampforwp_remove_admin_menu_front',999);
7064
+ add_action('amp_post_template_css', 'ampforwp_head_css');
7065
+
7066
+ }
7067
+ }
7068
+ }
7069
+ function ampforwp_remove_before_admin_bar_redner(){
7070
+ remove_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );
7071
+ }
7072
+ function ampforwp_init_admin_bar(){
7073
+ remove_action( 'wp_head', '_admin_bar_bump_cb' );
7074
+ remove_action( 'wp_head', 'wp_admin_bar_header' );
7075
+ }
7076
+ function ampforwp_head_css(){
7077
+ global $ampforwpTemplate, $redux_builder_amp;
7078
+ $css = "";
7079
+ if( is_user_logged_in() ){
7080
+ $pref = get_user_option( "show_admin_bar_front", get_current_user_id() );
7081
+ if($pref==="true"){
7082
+ $css = ampforwp_get_remote_content(AMPFORWP_PLUGIN_DIR_URI."/templates/template-mode/admin-bar.css");
7083
+ $css .= ampforwp_get_remote_content(includes_url()."/css/dashicons.min.css");
7084
+ $css .= ".header,.amp-wp-header,.design2-header,.design3-header{margin-top:33px;}#headerwrap{top:32px;}#wp-admin-bar-my-account .avatar{float: right;margin-top: 6px;}#wp-admin-bar-wpseo-notifications .yoast-issue-counter{float: right;}
7085
+ @media(max-width:782px){
7086
+ .header, .amp-wp-header, .design2-header, .design3-header{
7087
+ margin-top: 46px;
7088
+ }
7089
+ #headerwrap{top:46px;}
7090
+ }";
7091
+ echo css_sanitizer($css);
7092
+ }
7093
+ }
7094
+ }
7095
+ function css_sanitizer($css){
7096
+ $css = preg_replace( '/\s*!important/', '', $css, -1, $important_count );
7097
+ $css = preg_replace( '/overflow(-[xy])?\s*:\s*(auto|scroll)\s*;?\s*/', '', $css, -1, $overlow_count );
7098
+ $css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
7099
+ $css = str_replace(array (chr(10), ' {', '{ ', ' }', '} ', '( ', ' )', ' :', ': ', ' ;', '; ', ' ,', ', ', ';}', '::-' ), array('', '{', '{', '}', '}', '(', ')', ':', ':', ';', ';', ',', ', ', '}', ' ::-'), $css);
7100
+ return $css;
7101
+ }
7102
+ function ampforwp_get_remote_content($src){
7103
+ if($src){
7104
+ $arg = array( "sslverify" => false, "timeout" => 60 ) ;
7105
+ $response = wp_remote_get( $src, $arg );
7106
+ if ( wp_remote_retrieve_response_code($response) == 200 && is_array( $response ) ) {
7107
+ $header = wp_remote_retrieve_headers($response); // array of http header lines
7108
+ $contentData = wp_remote_retrieve_body($response); // use the content
7109
+ return $contentData;
7110
+ }
7111
+ }else{
7112
+ return $contentData = file_get_contents( $src );
7113
+ }
7114
+ return '';
7115
+ }
7116
+ function ampforwp_add_admin_menu_front(){
7117
+ global $wp_admin_bar;
7118
+ $dom = new DOMDocument();
7119
+ $my_account = $wp_admin_bar->get_node('my-account');
7120
+ $title = ampforwp_content_sanitizer($my_account->title);
7121
+ $wp_admin_bar->add_menu( array(
7122
+ 'id' => 'my-account',
7123
+ 'title' => $title
7124
+ ) );
7125
+ $user_info = $wp_admin_bar->get_node('user-info');
7126
+ $title = $user_info->title;
7127
+ $dom->loadHTML($title);
7128
+ $anchors = $dom -> getElementsByTagName('img');
7129
+ $src="";
7130
+ foreach($anchors as $im){
7131
+ $src = $im->getAttribute('src');
7132
+ }
7133
+ $authname = get_the_author_meta('nickname');
7134
+ $title = '<span style="background: url('.esc_url($src).');background-repeat: no-repeat;height: 64px;position: absolute;width: 100px;top: 13px;left: -70px;" class="display-name"></span><span class="display-name">'.esc_html__($authname,'accelerated-mobile-pages').'<span>';
7135
+ $wp_admin_bar->add_menu( array(
7136
+ 'id' => 'user-info',
7137
+ 'title' => $title
7138
+ ) );
7139
+ $wp_admin_bar->add_menu( array(
7140
+ 'id' => 'wpseo-menu',
7141
+ 'title' => "SEO"
7142
+ ) );
7143
+ $wp_admin_bar->remove_menu( 'ampforwp-view-amp' );
7144
+ $url = ampforwp_get_non_amp_url();
7145
+ $wp_admin_bar->add_node(array(
7146
+ 'id' => 'ampforwp-view-non-amp',
7147
+ 'title' => 'View Non-AMP' ,
7148
+ 'href' => esc_url($url)
7149
+ ));
7150
+ }
7151
+
7152
+ function ampforwp_remove_admin_menu_front($wp){
7153
+ $node_arr = ['search'];
7154
+ for($i=0;$i<count($node_arr);$i++){
7155
+ $wp->remove_node($node_arr[$i]);
7156
+ }
7157
+ }
7158
+ function ampforwp_get_non_amp_url(){
7159
+ global $post, $wp;
7160
+ $nofollow = $page = $amp_url = $non_amp_url = '';
7161
+ if( true == ampforwp_get_setting('ampforwp-nofollow-view-nonamp') ){
7162
+ $nofollow = 'rel=nofollow';
7163
+ }
7164
+ $amp_url = untrailingslashit( home_url( $wp->request ) );
7165
+ $amp_url = explode('/', $amp_url);
7166
+ $amp_url = array_flip($amp_url);
7167
+ unset($amp_url[AMPFORWP_AMP_QUERY_VAR]);
7168
+ $non_amp_url = array_flip($amp_url);
7169
+ $non_amp_url = implode('/', $non_amp_url);
7170
+ $query_arg_array = $wp->query_vars;
7171
+
7172
+ if( array_key_exists( "page" , $query_arg_array ) ) {
7173
+ $page = $wp->query_vars['page'];
7174
+ }
7175
+ if ( $page >= '2') {
7176
+ $non_amp_url = trailingslashit( $non_amp_url . '?page=' . $page);
7177
+ }
7178
+ if ( ampforwp_get_setting('amp-mobile-redirection') ) {
7179
+ $non_amp_url = add_query_arg('nonamp','1',$non_amp_url);
7180
+ }
7181
+ else
7182
+ $non_amp_url = user_trailingslashit($non_amp_url);
7183
+ if ( true == ampforwp_get_setting('ampforwp-amp-takeover') ) {
7184
+ $non_amp_url = '';
7185
+ }
7186
+ if ( $non_amp_url ) {
7187
+ return apply_filters('ampforwp_view_nonamp_url', $non_amp_url);
7188
+ }
7189
+ }