AMP for WP – Accelerated Mobile Pages - Version 0.9.97.44

Version Description

(28th March 2019) = * Added: Captions feature in AMP page builder #2645 * Added: Compatibility with the Youtube Oembed Plyr plugin #1505 * Added: Caption option for gallery/slider module in pagebuilder #2790 * Added: Like & share feature for every image in instant_articles #2764 * Added: Genesis option in SEO settings #2386 * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980 * Fixed: AMP Theme Framework getting conflicted #2782 * Fixed: Unwanted code for call-now component is being used #2652 * Fixed: amphtml tag while AMP Takeover option is enabled #2550 * Fixed: Debug warnings after 0.9.97.15 #2532 * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978

Full changelog available in changelog.txt

Download this release

Release Info

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

Code changes from version 0.9.97.43 to 0.9.97.44

README.md CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
- Stable tag: 0.9.97.43
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,7 +13,7 @@ AMP for WP is the most recommended AMP plugin by the community. Automatically ad
13
  == Description ==
14
  AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) functionality to your WordPress site. AMP makes your website faster for Mobile visitors.
15
 
16
- [What's New in this Version?](https://ampforwp.com/new/) | [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) | [View Demo](https://ampforwp.com/demo/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](https://ampforwp.com/community/)
17
 
18
  [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
 
@@ -22,8 +22,8 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
22
  <strong>Extensions</strong><br>
23
  Some useful extensions to extend AMP features, check [AMP Adsense Support](https://ampforwp.com/advanced-amp-ads/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Contact Form 7 Support](https://ampforwp.com/contact-form-7/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Email Opt-in Support](https://ampforwp.com/opt-in-forms/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) and [Call To Action Support](https://ampforwp.com/call-to-action/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin). To view more, go to our [Extensions page](https://ampforwp.com/extensions/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin).
24
 
25
- <strong>Premium Support</strong><br>
26
- We try our best to provide support on WordPress.org forums. However, One-on-one email support is available to people who bought the [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) only.
27
 
28
  <strong>Bug Reports</strong><br>
29
  Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
@@ -110,13 +110,11 @@ Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkalu
110
  = Getting Started: =
111
  **[1. User Documentation:](https://ampforwp.com/help/)** The AMP for WordPress plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
112
 
113
- **[2. Developer Docs:](https://ampforwp.com/help/#extend)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
114
 
115
- **[3. Fixing AMP Validation Errors:](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin)** We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.
116
 
117
- **[4. Community Support Forum:](https://ampforwp.com/help/#support-forum)** We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.
118
-
119
- **[5. Frequently Asked Questions:](https://ampforwp.com/faq/)** Some of the Frequently Asked questions.
120
 
121
 
122
  == Installation ==
@@ -185,6 +183,19 @@ Device testing done through [BrowserStack](https://www.browserstack.com)
185
 
186
  == Changelog ==
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  = 0.9.97.43 (12th March 2019) =
189
  * Fixed: Fallback for Redux classes #2377
190
  * Fixed: Search widget CSS for Design-2 #1400
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
+ Stable tag: 0.9.97.44
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) functionality to your WordPress site. AMP makes your website faster for Mobile visitors.
15
 
16
+ [What's New in this Version?](https://ampforwp.com/new/) | [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) | [View Demo](https://ampforwp.com/demo/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](https://ampforwp.com/help-center/)
17
 
18
  [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
 
22
  <strong>Extensions</strong><br>
23
  Some useful extensions to extend AMP features, check [AMP Adsense Support](https://ampforwp.com/advanced-amp-ads/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Contact Form 7 Support](https://ampforwp.com/contact-form-7/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Email Opt-in Support](https://ampforwp.com/opt-in-forms/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) and [Call To Action Support](https://ampforwp.com/call-to-action/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin). To view more, go to our [Extensions page](https://ampforwp.com/extensions/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin).
24
 
25
+ <strong>Support</strong><br>
26
+ We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://ampforwp.com/help-center/) where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
27
 
28
  <strong>Bug Reports</strong><br>
29
  Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
110
  = Getting Started: =
111
  **[1. User Documentation:](https://ampforwp.com/help/)** The AMP for WordPress plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
112
 
113
+ **[2. Developer Docs:](https://ampforwp.com/tutorials/article-categories/developer-documentation/)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
114
 
115
+ **[3. Support:](https://ampforwp.com/help-center/)** We try our best to provide support on WordPress.org forums. However, We have a special community support where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
116
 
117
+ **[4. Premium Support:](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin)** We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.
 
 
118
 
119
 
120
  == Installation ==
183
 
184
  == Changelog ==
185
 
186
+ = 0.9.97.44 (28th March 2019) =
187
+ * Added: Captions feature in AMP page builder #2645
188
+ * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
189
+ * Added: Caption option for gallery/slider module in pagebuilder #2790
190
+ * Added: Like & share feature for every image in instant_articles #2764
191
+ * Added: Genesis option in SEO settings #2386
192
+ * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
193
+ * Fixed: AMP Theme Framework getting conflicted #2782
194
+ * Fixed: Unwanted code for call-now component is being used #2652
195
+ * Fixed: amphtml tag while AMP Takeover option is enabled #2550
196
+ * Fixed: Debug warnings after 0.9.97.15 #2532
197
+ * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
198
+
199
  = 0.9.97.43 (12th March 2019) =
200
  * Fixed: Fallback for Redux classes #2377
201
  * Fixed: Search widget CSS for Design-2 #1400
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.97.43
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -20,7 +20,7 @@ define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
- define('AMPFORWP_VERSION','0.9.97.43');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.97.44
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
20
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.html');
21
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
22
  define('AMPFORWP_MAIN_PLUGIN_DIR', plugin_dir_path( __DIR__ ) );
23
+ define('AMPFORWP_VERSION','0.9.97.44');
24
  // any changes to AMP_QUERY_VAR should be refelected here
25
  function ampforwp_generate_endpoint(){
26
  $ampforwp_slug = '';
changelog.txt CHANGED
@@ -1,5 +1,18 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 0.9.97.43 (12th March 2019) =
4
  * Fixed: Fallback for Redux classes #2377
5
  * Fixed: Search widget CSS for Design-2 #1400
1
  == Changelog ==
2
 
3
+ = 0.9.97.44 (28th March 2019) =
4
+ * Added: Captions feature in AMP page builder #2645
5
+ * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
6
+ * Added: Caption option for gallery/slider module in pagebuilder #2790
7
+ * Added: Like & share feature for every image in instant_articles #2764
8
+ * Added: Genesis option in SEO settings #2386
9
+ * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
10
+ * Fixed: AMP Theme Framework getting conflicted #2782
11
+ * Fixed: Unwanted code for call-now component is being used #2652
12
+ * Fixed: amphtml tag while AMP Takeover option is enabled #2550
13
+ * Fixed: Debug warnings after 0.9.97.15 #2532
14
+ * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
15
+
16
  = 0.9.97.43 (12th March 2019) =
17
  * Fixed: Fallback for Redux classes #2377
18
  * Fixed: Search widget CSS for Design-2 #1400
components/breadcrumb/breadcrumb.php CHANGED
@@ -79,7 +79,7 @@
79
  }
80
  /*Breadcrumb with tags Start*/
81
  $tags_breadcrumbs = '';
82
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'tags'){
83
  $post_tags = wp_get_post_tags($post->ID);
84
  if(!empty($post_tags)){
85
  foreach( $post_tags as $post_obj){
@@ -92,7 +92,7 @@
92
  echo $tags_breadcrumbs;
93
  }
94
  }
95
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'category'){
96
  // Get post category info
97
  $category = get_the_category();
98
  if(!empty($category)) {
79
  }
80
  /*Breadcrumb with tags Start*/
81
  $tags_breadcrumbs = '';
82
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'tags'){
83
  $post_tags = wp_get_post_tags($post->ID);
84
  if(!empty($post_tags)){
85
  foreach( $post_tags as $post_obj){
92
  echo $tags_breadcrumbs;
93
  }
94
  }
95
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
96
  // Get post category info
97
  $category = get_the_category();
98
  if(!empty($category)) {
components/components-core.php CHANGED
@@ -245,14 +245,6 @@ function amp_post_pagination($args='' ){
245
  }
246
  }
247
 
248
- // Call Now
249
- function amp_call_now(){
250
- global $loadComponent;
251
- if(isset($loadComponent['AMP-call-now']) && $loadComponent['AMP-call-now']==true){
252
- amp_call_button_html_output();
253
- }
254
- }
255
-
256
  // Breadcrumb
257
  function amp_breadcrumb(){
258
  global $loadComponent;
@@ -661,4 +653,11 @@ if( true == ampforwp_get_setting('ampforwp-footer-top') ) { ?>
661
  text-align: center;
662
  line-height: 1.5;
663
  }
664
- <?php } } ?>
 
 
 
 
 
 
 
245
  }
246
  }
247
 
 
 
 
 
 
 
 
 
248
  // Breadcrumb
249
  function amp_breadcrumb(){
250
  global $loadComponent;
653
  text-align: center;
654
  line-height: 1.5;
655
  }
656
+ <?php } }
657
+
658
+ // Fallback for amp_call_now #2782
659
+ if ( !function_exists('amp_call_now') ) {
660
+ function amp_call_now(){
661
+ ampforwp_call_button_html_output();
662
+ }
663
+ }
components/loop/loop.php CHANGED
@@ -310,6 +310,7 @@ function amp_loop_date($args=array()){
310
  current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
311
  'ago');
312
  }
 
313
  echo '<div class="loop-date">'.esc_html($post_date).'</div>';
314
  }
315
 
310
  current_time('timestamp') ) .' '. ampforwp_translation( $redux_builder_amp['amp-translator-ago-date-text'],
311
  'ago');
312
  }
313
+ $post_date = apply_filters('ampforwp_modify_post_date',$post_date);
314
  echo '<div class="loop-date">'.esc_html($post_date).'</div>';
315
  }
316
 
includes/change-log.php CHANGED
@@ -46,7 +46,7 @@ function ampforwp_nl2p($string, $only_if_no_html = TRUE) {
46
  return $string;
47
  }
48
 
49
- $readme_file = AMPFORWP_PLUGIN_DIR.'readme.txt';
50
  $readme = file_get_contents($readme_file);
51
 
52
  $readme = preg_replace('/`(.*?)`/', '<code>\\1</code>', $readme);
46
  return $string;
47
  }
48
 
49
+ $readme_file = AMPFORWP_PLUGIN_DIR.'changelog.txt';
50
  $readme = file_get_contents($readme_file);
51
 
52
  $readme = preg_replace('/`(.*?)`/', '<code>\\1</code>', $readme);
includes/options/admin-config.php CHANGED
@@ -31,19 +31,7 @@ $cta_desc = '<a href="'.$cta_AD_URL.'" target="_blank"><img class="ampforwp-ad-
31
  $all_extensions_data = array();
32
  global $all_extensions_data;
33
  $extension_listing_array = array(
34
- array(
35
- 'name'=>'ADS for WP',
36
- 'desc'=>'A Revolutionary way of adding ADS in your WordPress',
37
- 'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
38
- 'price'=>'Free',
39
- 'url_link'=>'http://ampforwp.com/ads-for-wp/#utm_source=options-panel&utm_medium=extension-tab_advanced-amp-ads&utm_campaign=AMP%20Plugin',
40
- 'plugin_active_path'=> 'ads-for-wp/ads-for-wp.php',
41
- 'item_name'=>'ADS for WP',
42
- 'store_url'=>'https://accounts.ampforwp.com',
43
- 'is_activated'=>(is_plugin_active('ads-for-wp/ads-for-wp.php')? 1: 2),
44
- 'settingUrl'=>admin_url('edit.php?post_type=ads-for-wp-ads'),
45
- ),
46
- array(
47
  'name'=>'Advanced AMP ADS',
48
  'desc'=>'Add Advertisement directly in the content',
49
  'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
@@ -1016,7 +1004,7 @@ $eu_iso_codes = array(
1016
 
1017
  // All the possible arguments for Redux.
1018
  //$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
1019
- $proDetailsProvide = '<a class="premium_features_btn_txt" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">'.esc_html__('Get more out of AMP','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Get PRO Version</a> ';
1020
  if($ampforwp_nameOfUser!=""){
1021
  $proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".$ampforwp_nameOfUser."</span> <a class='' href='".admin_url('admin.php?page=amp_options&tabid=opt-go-premium')."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
1022
  }elseif($ampforwp_is_productActivated){
@@ -1104,10 +1092,7 @@ Redux::setArgs( "redux_builder_amp", $args );
1104
  )
1105
  ),
1106
  'desc' => '<div class="amp-faq">'.esc_html__('Thank you for using Accelerated Mobile Pages plugin.', 'accelerated-mobile-pages'). ' ' .
1107
- ' <h2 style="width: 150px;float: right;
1108
- padding: 8px 11px;background: #4CAF50;
1109
- font-size: 13px;margin: -40px 0 0 10px;
1110
- border-radius: 5px;line-height: 22px;position:relative;top:30px"><a style="color: #fff;text-decoration: none;" href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages?rate=5#postform">'.esc_html__('Like this plugin?', 'accelerated-mobile-pages').'<br />'.esc_html__(' Leave a 5 Star Rating', 'accelerated-mobile-pages').'</a></h2>'.esc_html__('We are actively working on updating the plugin. We have built user friendly options which allows you to make changes on your AMP version.', 'accelerated-mobile-pages' )
1111
  . '<div style="width:100%;margin:20px 0px 10px 0px" class="getstarted_wrapper">
1112
  <div class="getstarted_options">
1113
  <p><b>'.esc_html__('Getting Started', 'accelerated-mobile-pages').'</b></p>
@@ -1122,23 +1107,18 @@ Redux::setArgs( "redux_builder_amp", $args );
1122
  <p><b>'.esc_html__('Useful Links', 'accelerated-mobile-pages').'</b></p>
1123
  <ul class="getstarted_ul">
1124
  <li><a href="https://ampforwp.com/tutorials/article-categories/extension/" target="_blank">'.esc_html__('Extensions & Themes Docs', 'accelerated-mobile-pages').'</a></li>
1125
- <li><a href="https://ampforwp.com/tutorials/article-categories/extending/" target="_blank">'.esc_html__('Developers Docs', 'accelerated-mobile-pages').'</a></li>
1126
  <li><a href="https://ampforwp.com/amp-theme-framework/" target="_blank">'.esc_html__('Create a Custom Theme for AMP', 'accelerated-mobile-pages').'</a></li>
1127
  <li><a href="https://ampforwp.com/tutorials/article-categories/how-to/" target="_blank">'.esc_html__('General How To\'s', 'accelerated-mobile-pages').'</a></li>
1128
  </ul>
1129
  </div>
1130
- <div class="getstarted_options" style="padding-bottom: 33px;width: 16%;" >
1131
- <p><b>'.esc_html__('Get Stable Updates', 'accelerated-mobile-pages').'</b></p>
1132
- <ul class="getstarted_ul">
1133
- <li style="list-style:none;"><a href="https://ampforwp.com/beta-test/" target="_blank">'.esc_html__('Become a Beta Tester and Help us Push Stable Updates', 'accelerated-mobile-pages').'</a></li>
1134
- </ul>
1135
- </div>
1136
  <div class="clear"></div>
1137
  </div>'
1138
- . '<p><strong>1. <a href="https://ampforwp.com/priority-support/" target="_blank">' . esc_html__( 'Fixing AMP Validation Errors ', 'accelerated-mobile-pages' ) . '</a>:</strong>' . esc_html__( 'We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.' ) . '</p>'
1139
- . '<p><strong>2. <a href="https://ampforwp.com/help/#support-forum" target="_blank">' . esc_html__( 'Community Support Forum ', 'accelerated-mobile-pages' ) . '</a>:</strong>' . esc_html__( 'We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.', 'accelerated-mobile-pages' ) . '</p>'
1140
- . '<p><strong>3. <a href="https://ampforwp.com/help/#contact" target="_blank">' . esc_html__( 'Hire Us / Other queries ', 'accelerated-mobile-pages' ) . '</a>:</strong>' . esc_html__( 'We try to answer each and every email, so remember to give us some time. For any other queries, please use the contact form. Please be descriptive as possible.', 'accelerated-mobile-pages' ) . '</p>'
1141
- . '<p><strong>4. <a href="http://ampforwp.com/new/" target="_blank">' . esc_html__( ' What\'s New in this Version? ', 'accelerated-mobile-pages' ) . '</strong>' . esc_html__( 'If you want to know whats new in the latest version of the plugin, then please use this link. ', 'accelerated-mobile-pages') . '</a>:</p>'
 
1142
 
1143
  . '</p></div>
1144
  <br /><p><h3>'.esc_html__('Take AMP to the Next Level with Premium Extensions').'</h3></p>
@@ -1843,6 +1823,9 @@ Redux::setArgs( "redux_builder_amp", $args );
1843
  elseif ( defined( 'RANK_MATH_FILE' ) ) {
1844
  $default = 'rank_math';
1845
  }
 
 
 
1846
  return $default;
1847
  }
1848
  }
@@ -1890,7 +1873,8 @@ Redux::setArgs( "redux_builder_amp", $args );
1890
  'options' => array(
1891
  'yoast' => 'Yoast',
1892
  'aioseo' => 'All in One SEO',
1893
- 'rank_math' => 'Rank Math SEO'
 
1894
  ),
1895
  'default' => ampforwp_seo_default(),
1896
  ),
@@ -3494,6 +3478,13 @@ Redux::setSection( $opt_name, array(
3494
  'tooltip-subtitle' => esc_html__('Add ia:markup meta tag. Find out more about<a href="https://developers.facebook.com/docs/instant-articles/crawler-ingestion" target="_blank">here</a> ', 'accelerated-mobile-pages'),
3495
  'required' => array('fb-instant-article-switch', '=', 1)
3496
  ),
 
 
 
 
 
 
 
3497
  array(
3498
  'id' => 'fbia-header-text-area',
3499
  'type' => 'textarea',
@@ -4754,6 +4745,7 @@ Redux::setSection( $opt_name, array(
4754
  'indent' => true,
4755
  'layout_type' => 'accordion',
4756
  'accordion-open'=> 1,
 
4757
  ),
4758
  array(
4759
  'id' => 'header-type',
31
  $all_extensions_data = array();
32
  global $all_extensions_data;
33
  $extension_listing_array = array(
34
+ array(
 
 
 
 
 
 
 
 
 
 
 
 
35
  'name'=>'Advanced AMP ADS',
36
  'desc'=>'Add Advertisement directly in the content',
37
  'img_src'=>AMPFORWP_IMAGE_DIR . '/click.png',
1004
 
1005
  // All the possible arguments for Redux.
1006
  //$amp_redux_header = '<span id="name"><span style="color: #4dbefa;">U</span>ltimate <span style="color: #4dbefa;">W</span>idgets</span>';
1007
+ $proDetailsProvide = '<a class="technical_support_btn_txt" href="https://ampforwp.com/support/" target="_blank">'.esc_html__('Technical Support','accelerated-mobile-pages').'</a> <a class="premium_features_btn" href="https://ampforwp.com/membership/#utm_source=options-panel&utm_medium=view_pro_features_btn&utm_campaign=AMP%20Plugin" target="_blank">Upgrade to PRO</a> ';
1008
  if($ampforwp_nameOfUser!=""){
1009
  $proDetailsProvide = "<span class='extension-menu-call'><span class='activated-plugins'>Hello, ".$ampforwp_nameOfUser."</span> <a class='' href='".admin_url('admin.php?page=amp_options&tabid=opt-go-premium')."'><i class='dashicons-before dashicons-admin-generic'></i></a></span>";
1010
  }elseif($ampforwp_is_productActivated){
1092
  )
1093
  ),
1094
  'desc' => '<div class="amp-faq">'.esc_html__('Thank you for using Accelerated Mobile Pages plugin.', 'accelerated-mobile-pages'). ' ' .
1095
+ ''.esc_html__('We are actively working on updating the plugin. We have built user friendly options which allows you to make changes on your AMP version.', 'accelerated-mobile-pages' )
 
 
 
1096
  . '<div style="width:100%;margin:20px 0px 10px 0px" class="getstarted_wrapper">
1097
  <div class="getstarted_options">
1098
  <p><b>'.esc_html__('Getting Started', 'accelerated-mobile-pages').'</b></p>
1107
  <p><b>'.esc_html__('Useful Links', 'accelerated-mobile-pages').'</b></p>
1108
  <ul class="getstarted_ul">
1109
  <li><a href="https://ampforwp.com/tutorials/article-categories/extension/" target="_blank">'.esc_html__('Extensions & Themes Docs', 'accelerated-mobile-pages').'</a></li>
1110
+ <li><a href="https://ampforwp.com/tutorials/article-categories/developer-documentation/" target="_blank">'.esc_html__('Developers Docs', 'accelerated-mobile-pages').'</a></li>
1111
  <li><a href="https://ampforwp.com/amp-theme-framework/" target="_blank">'.esc_html__('Create a Custom Theme for AMP', 'accelerated-mobile-pages').'</a></li>
1112
  <li><a href="https://ampforwp.com/tutorials/article-categories/how-to/" target="_blank">'.esc_html__('General How To\'s', 'accelerated-mobile-pages').'</a></li>
1113
  </ul>
1114
  </div>
 
 
 
 
 
 
1115
  <div class="clear"></div>
1116
  </div>'
1117
+ . '<p><strong>' . sprintf( '1. <a href="https://ampforwp.com/support/" target="_blank">%s</a>: ',esc_html__('Technical Customer Support','accelerated-mobile-pages')) . '</strong>' . esc_html__('We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.', 'accelerated-mobile-pages' ) . '</p>'
1118
+ . '<p><strong>' . sprintf( '2. <a href="https://github.com/ahmedkaludi/accelerated-mobile-pages/issues" target="_blank">%s</a>: ',esc_html__('Found a bug? Use GitHub','accelerated-mobile-pages' )) . '</strong>' . esc_html__( 'If you’ve discovered a bug in our software, the best place to report it is on GitHub. This is where the AMP developers are active. They’ll review your bug report and triage the bug. The more relevant details you add to your report, the faster bugs are usually solved. And please remember to search first, We think that most general tickets have been created already.', 'accelerated-mobile-pages' ) . '</p>'
1119
+ . '<p><strong>' . sprintf( '3. <a href="https://ampforwp.com/priority-support/" target="_blank">%s</a>: ',esc_html__('Priority Support','accelerated-mobile-pages' )) . '</strong>' . esc_html__( 'We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.', 'accelerated-mobile-pages' ) . '</p>'
1120
+ . '<p><strong>' . sprintf( '4. <a href="https://ampforwp.com/hire/" target="_blank">%s</a>: ',esc_html__('Hire Us / Customization', 'accelerated-mobile-pages' )) . '</strong>' . esc_html__( 'We are your development backbone who specialises Backend and Frontend technologies. We have the capability to handle & solve the complex issues. If you have any customization, feel free to ask.', 'accelerated-mobile-pages' ) . '</p>'
1121
+ . '<p><strong>' . sprintf( '5. <a href="http://ampforwp.com/new/" target="_blank"> %s</a>: ',esc_html__('What\'s New in this Version?','accelerated-mobile-pages' )) . '</strong>' . esc_html__( 'If you want to know whats new in the latest version of the plugin, then please use this link.', 'accelerated-mobile-pages' ) . '</p>'
1122
 
1123
  . '</p></div>
1124
  <br /><p><h3>'.esc_html__('Take AMP to the Next Level with Premium Extensions').'</h3></p>
1823
  elseif ( defined( 'RANK_MATH_FILE' ) ) {
1824
  $default = 'rank_math';
1825
  }
1826
+ elseif ( function_exists('genesis_title') ) {
1827
+ $default = 'genesis';
1828
+ }
1829
  return $default;
1830
  }
1831
  }
1873
  'options' => array(
1874
  'yoast' => 'Yoast',
1875
  'aioseo' => 'All in One SEO',
1876
+ 'rank_math' => 'Rank Math SEO',
1877
+ 'genesis' => 'Genesis',
1878
  ),
1879
  'default' => ampforwp_seo_default(),
1880
  ),
3478
  'tooltip-subtitle' => esc_html__('Add ia:markup meta tag. Find out more about<a href="https://developers.facebook.com/docs/instant-articles/crawler-ingestion" target="_blank">here</a> ', 'accelerated-mobile-pages'),
3479
  'required' => array('fb-instant-article-switch', '=', 1)
3480
  ),
3481
+ array(
3482
+ 'id' => 'fb-instant-feedback',
3483
+ 'type' => 'switch',
3484
+ 'title' => esc_html__('Feedback for Media', 'accelerated-mobile-pages'),
3485
+ 'tooltip-subtitle' => esc_html__('Allow like and comment for media', 'accelerated-mobile-pages'),
3486
+ 'required' => array('fb-instant-article-switch', '=', 1)
3487
+ ),
3488
  array(
3489
  'id' => 'fbia-header-text-area',
3490
  'type' => 'textarea',
4745
  'indent' => true,
4746
  'layout_type' => 'accordion',
4747
  'accordion-open'=> 1,
4748
+ 'required' => array( array('amp-design-selector', '=' , '4') ),
4749
  ),
4750
  array(
4751
  'id' => 'header-type',
includes/options/redux-core/assets/css/redux-admin.css CHANGED
@@ -432,7 +432,12 @@ img.ampforwp-post-builder-img{
432
  width: 370px;
433
  border: 1px solid #eee;
434
  }
435
- .premium_features_btn{
 
 
 
 
 
436
  margin-left: 10px;
437
  font-size: 12px !important;
438
  padding: 6px 12px;
432
  width: 370px;
433
  border: 1px solid #eee;
434
  }
435
+ #redux-intro-text .technical_support_btn_txt{
436
+ background: #fdfdfd;
437
+ box-shadow: 0px 0px 6px #ddd;
438
+ color: #eb3548 !important;
439
+ }
440
+ .premium_features_btn,.technical_support_btn_txt{
441
  margin-left: 10px;
442
  font-size: 12px !important;
443
  padding: 6px 12px;
includes/welcome.php CHANGED
@@ -69,7 +69,7 @@ function ampforwp_welcome_screen_content() {
69
  <div class="amp_expert_user amp_user_onboarding_choose">
70
  <!--<div class="amp_user_avatar"></div>-->
71
  <!--<h3>Change log</h3>-->
72
- <?php require AMPFORWP_PLUGIN_DIR.'/includes/change-log.php';?>
73
  </div>
74
  </div>
75
 
69
  <div class="amp_expert_user amp_user_onboarding_choose">
70
  <!--<div class="amp_user_avatar"></div>-->
71
  <!--<h3>Change log</h3>-->
72
+ <?php require AMPFORWP_PLUGIN_DIR.'includes/change-log.php';?>
73
  </div>
74
  </div>
75
 
pagebuilder/inc/viewShowFrontData.php CHANGED
@@ -709,13 +709,14 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
709
  }
710
  }
711
  if($moduleField['type']=="upload"){
712
- $image_alt = $imageUrl = $imageWidth = $imageHeight = '';
713
  if( isset( $repeaterUserValues[$moduleField['name'].'_'.$repeaterVarIndex."_image_data"] ) ) {
714
  $replace = $repeaterUserValues[$moduleField['name'].'_'.$repeaterVarIndex."_image_data"];
715
  $imageUrl = $replace[0];
716
  $imageWidth = $replace[1];
717
  $imageHeight = $replace[2];
718
  $image_alt = (isset($replace['alt'])? $replace['alt']: "");
 
719
  }elseif($replace != ""){
720
  $imageDetails = ampforwp_get_attachment_id( $replace);
721
  if(is_array($imageDetails)){
@@ -723,6 +724,7 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
723
  $imageWidth = $imageDetails[1];
724
  $imageHeight = $imageDetails[2];
725
  $image_alt = (isset($imageDetails['alt'])? $imageDetails['alt']: "");
 
726
  }
727
  }
728
  $imageUrl = esc_url($imageUrl);
@@ -769,6 +771,15 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
769
  ),
770
  $repeaterFrontTemplate
771
  );
 
 
 
 
 
 
 
 
 
772
  $repeaterFrontTemplate = ampforwp_replaceIfContentConditional($moduleField['name'], $imageUrl, $repeaterFrontTemplate);
773
  }else{
774
  if($moduleField['type']=="text"){
@@ -892,13 +903,14 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
892
  if(!is_array($replace)){
893
 
894
  if($field['type']=="upload"){
895
- $image_alt = $imageUrl = $imageWidth = $imageHeight = '';
896
  if(isset($contentArray[$field['name']."_image_data"])){
897
  $replace= $contentArray[$field['name']."_image_data"];
898
  $imageUrl = $replace[0];
899
  $imageWidth = $replace[1];
900
  $imageHeight = $replace[2];
901
- $image_alt = (isset($replace['alt'])? $replace['alt']: "");;
 
902
  }elseif( $replace != "" ){
903
  $imageDetails = ampforwp_get_attachment_id( $replace);
904
  if(is_array($imageDetails)){
@@ -906,6 +918,7 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
906
  $imageWidth = $imageDetails[1];
907
  $imageHeight = $imageDetails[2];
908
  $image_alt = (isset($imageDetails['alt'])? $imageDetails['alt']: "");
 
909
  }
910
  }
911
  $imageUrl = esc_url($imageUrl);
@@ -946,6 +959,15 @@ function ampforwp_rowData($container,$col,$moduleTemplate){
946
  ),
947
  $moduleFrontHtml
948
  );
 
 
 
 
 
 
 
 
 
949
  $moduleFrontHtml = ampforwp_replaceIfContentConditional($field['name'], $imageUrl, $moduleFrontHtml);
950
  }else{
951
  $moduleFrontHtml = str_replace('{{'.$field['name'].'}}', esc_html( $replace), $moduleFrontHtml);
@@ -1060,9 +1082,15 @@ function ampforwp_get_attachment_id( $url , $imagetype='full') {
1060
  }
1061
 
1062
  }
1063
- $imageDetails = wp_get_attachment_image_src($attachment_id, $imagetype, false);
1064
- if($imageDetails){
1065
- $imageDetails['alt'] = get_post_meta($attachment_id,'_wp_attachment_image_alt', true);
 
 
 
 
 
 
1066
  }
1067
  return $imageDetails;
1068
  }
709
  }
710
  }
711
  if($moduleField['type']=="upload"){
712
+ $image_alt = $imageUrl = $imageWidth = $imageHeight = $image_caption = '';
713
  if( isset( $repeaterUserValues[$moduleField['name'].'_'.$repeaterVarIndex."_image_data"] ) ) {
714
  $replace = $repeaterUserValues[$moduleField['name'].'_'.$repeaterVarIndex."_image_data"];
715
  $imageUrl = $replace[0];
716
  $imageWidth = $replace[1];
717
  $imageHeight = $replace[2];
718
  $image_alt = (isset($replace['alt'])? $replace['alt']: "");
719
+ $image_caption = (isset($replace['caption'])? $replace['caption']: "");
720
  }elseif($replace != ""){
721
  $imageDetails = ampforwp_get_attachment_id( $replace);
722
  if(is_array($imageDetails)){
724
  $imageWidth = $imageDetails[1];
725
  $imageHeight = $imageDetails[2];
726
  $image_alt = (isset($imageDetails['alt'])? $imageDetails['alt']: "");
727
+ $image_caption = (isset($imageDetails['caption'])? $imageDetails['caption']: "");
728
  }
729
  }
730
  $imageUrl = esc_url($imageUrl);
771
  ),
772
  $repeaterFrontTemplate
773
  );
774
+ $repeaterFrontTemplate = str_replace(
775
+ array('{{image_caption}}',
776
+ '{{image_caption_'.$moduleField['name'].'}}'
777
+ ),
778
+ array($image_caption,
779
+ $image_caption
780
+ ),
781
+ $repeaterFrontTemplate
782
+ );
783
  $repeaterFrontTemplate = ampforwp_replaceIfContentConditional($moduleField['name'], $imageUrl, $repeaterFrontTemplate);
784
  }else{
785
  if($moduleField['type']=="text"){
903
  if(!is_array($replace)){
904
 
905
  if($field['type']=="upload"){
906
+ $image_alt = $imageUrl = $imageWidth = $imageHeight = $image_caption = '';
907
  if(isset($contentArray[$field['name']."_image_data"])){
908
  $replace= $contentArray[$field['name']."_image_data"];
909
  $imageUrl = $replace[0];
910
  $imageWidth = $replace[1];
911
  $imageHeight = $replace[2];
912
+ $image_alt = (isset($replace['alt'])? $replace['alt']: "");
913
+ $image_caption = (isset($replace['caption'])? $replace['caption']: "");
914
  }elseif( $replace != "" ){
915
  $imageDetails = ampforwp_get_attachment_id( $replace);
916
  if(is_array($imageDetails)){
918
  $imageWidth = $imageDetails[1];
919
  $imageHeight = $imageDetails[2];
920
  $image_alt = (isset($imageDetails['alt'])? $imageDetails['alt']: "");
921
+ $image_caption = (isset($imageDetails['caption'])? $imageDetails['caption']: "");
922
  }
923
  }
924
  $imageUrl = esc_url($imageUrl);
959
  ),
960
  $moduleFrontHtml
961
  );
962
+ $moduleFrontHtml = str_replace(
963
+ array('{{image_caption}}',
964
+ '{{image_caption_'.$field['name'].'}}'
965
+ ),
966
+ array($image_caption,
967
+ $image_caption
968
+ ),
969
+ $moduleFrontHtml
970
+ );
971
  $moduleFrontHtml = ampforwp_replaceIfContentConditional($field['name'], $imageUrl, $moduleFrontHtml);
972
  }else{
973
  $moduleFrontHtml = str_replace('{{'.$field['name'].'}}', esc_html( $replace), $moduleFrontHtml);
1082
  }
1083
 
1084
  }
1085
+ $imageDetails = array();
1086
+ if ( $attachment_id ) {
1087
+ $imageDetails = wp_get_attachment_image_src($attachment_id, $imagetype, false);
1088
+ if($imageDetails){
1089
+ $image = get_post($attachment_id);
1090
+ $caption = $image->post_excerpt;
1091
+ $imageDetails['alt'] = get_post_meta($attachment_id,'_wp_attachment_image_alt', true);
1092
+ $imageDetails['caption'] = $caption;
1093
+ }
1094
  }
1095
  return $imageDetails;
1096
  }
pagebuilder/modules/image-mod-module.php CHANGED
@@ -3,7 +3,7 @@
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
  $output = '
5
  {{if_condition_img_hyperlink==1}}<a href="{{hyperlink_link_img}}" {{if_condition_img_link_open==new_page}}target="_blank"{{ifend_condition_img_link_open_new_page}}>{{ifend_condition_img_hyperlink_1}}
6
- {{if_img_upload}}<amp-img src="{{img_upload}}" {{if_id}}id="{{id}}"{{ifend_id}} width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}" class="{{user_class}}"></amp-img>{{ifend_img_upload}}
7
  {{if_condition_img_hyperlink==1}}</a>{{ifend_condition_img_hyperlink_1}}';
8
 
9
  $css = '
@@ -44,6 +44,20 @@ return array(
44
  'content_type'=>'css',
45
  ),
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  array(
48
  'type' =>'checkbox_bool',
49
  'name' =>"img_hyperlink",
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
  $output = '
5
  {{if_condition_img_hyperlink==1}}<a href="{{hyperlink_link_img}}" {{if_condition_img_link_open==new_page}}target="_blank"{{ifend_condition_img_link_open_new_page}}>{{ifend_condition_img_hyperlink_1}}
6
+ {{if_img_upload}}<figure><amp-img src="{{img_upload}}" {{if_id}}id="{{id}}"{{ifend_id}} width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}" class="{{user_class}}"></amp-img>{{if_condition_image_caption==1}}<figcaption><center>{{image_caption}}</center></figcaption>{{ifend_condition_image_caption_1}}</figure>{{ifend_img_upload}}
7
  {{if_condition_img_hyperlink==1}}</a>{{ifend_condition_img_hyperlink_1}}';
8
 
9
  $css = '
44
  'content_type'=>'css',
45
  ),
46
 
47
+ array(
48
+ 'type' =>'checkbox_bool',
49
+ 'name' =>"image_caption",
50
+ 'label' => esc_html__('Caption','accelerated-mobile-pages'),
51
+ 'tab' =>'customizer',
52
+ 'default' => 1,
53
+ 'content_type'=>'html',
54
+ 'options' =>array(
55
+ array(
56
+ 'label'=>'Image Caption',
57
+ 'value'=>1,
58
+ ),
59
+ ),
60
+ ),
61
  array(
62
  'type' =>'checkbox_bool',
63
  'name' =>"img_hyperlink",
pagebuilder/modules/slider-mod-module.php CHANGED
@@ -185,7 +185,7 @@ return array(
185
  'front_template'=>
186
  array(
187
  "image"=>'
188
- {{if_img_upload}}<amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
189
  ',
190
  "button"=>'<button on="tap:carousel-with-preview-{{unique_cell_id}}.goToSlide(index={{repeater_unique}})">
191
  {{if_img_upload}}<amp-img src="{{img_upload-thumbnail}}" width="150" height="150" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
185
  'front_template'=>
186
  array(
187
  "image"=>'
188
+ {{if_img_upload}}<figure><amp-img src="{{img_upload}}" width="{{image_width}}" height="{{image_height}}" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img><figcaption>{{image_caption}}</figcaption></figure>{{ifend_img_upload}}
189
  ',
190
  "button"=>'<button on="tap:carousel-with-preview-{{unique_cell_id}}.goToSlide(index={{repeater_unique}})">
191
  {{if_img_upload}}<amp-img src="{{img_upload-thumbnail}}" width="150" height="150" {{if_image_layout}}layout="{{image_layout}}"{{ifend_image_layout}} alt="{{image_alt}}"></amp-img>{{ifend_img_upload}}
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
- Stable tag: 0.9.97.43
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,7 +13,7 @@ AMP for WP is the most recommended AMP plugin by the community. Automatically ad
13
  == Description ==
14
  AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) functionality to your WordPress site. AMP makes your website faster for Mobile visitors.
15
 
16
- [What's New in this Version?](https://ampforwp.com/new/) | [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) | [View Demo](https://ampforwp.com/demo/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](https://ampforwp.com/community/)
17
 
18
  [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
 
@@ -22,8 +22,8 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
22
  <strong>Extensions</strong><br>
23
  Some useful extensions to extend AMP features, check [AMP Adsense Support](https://ampforwp.com/advanced-amp-ads/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Contact Form 7 Support](https://ampforwp.com/contact-form-7/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Email Opt-in Support](https://ampforwp.com/opt-in-forms/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) and [Call To Action Support](https://ampforwp.com/call-to-action/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin). To view more, go to our [Extensions page](https://ampforwp.com/extensions/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin).
24
 
25
- <strong>Premium Support</strong><br>
26
- We try our best to provide support on WordPress.org forums. However, One-on-one email support is available to people who bought the [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) only.
27
 
28
  <strong>Bug Reports</strong><br>
29
  Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
@@ -111,13 +111,11 @@ Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkalu
111
  = Getting Started: =
112
  **[1. User Documentation:](https://ampforwp.com/help/)** The AMP for WordPress plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
113
 
114
- **[2. Developer Docs:](https://ampforwp.com/help/#extend)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
115
 
116
- **[3. Fixing AMP Validation Errors:](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin)** We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.
117
 
118
- **[4. Community Support Forum:](https://ampforwp.com/help/#support-forum)** We have a special community support forum where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means alot to us and so we try our best to reply each and every question that gets asked.
119
-
120
- **[5. Frequently Asked Questions:](https://ampforwp.com/faq/)** Some of the Frequently Asked questions.
121
 
122
  == Credits ==
123
  Some code used in this plugin was forked from 'AMP for WordPress' plugin https://wordpress.org/plugins/amp/ - License URI: http://www.gnu.org/licenses/gpl-2.0.html.
@@ -186,9 +184,17 @@ You can contact us from [here](https://ampforwp.com/contact/)
186
 
187
  == Changelog ==
188
 
189
- = 0.9.97.43 (12th March 2019) =
190
- * Fixed: Fallback for Redux classes #2377
191
- * Fixed: Search widget CSS for Design-2 #1400
192
- * Fixed: Navigation Menu CSS for Swift theme #2593
 
 
 
 
 
 
 
 
193
 
194
  Full changelog available in changelog.txt
4
  Donate link: https://www.paypal.me/Kaludi/25
5
  Requires at least: 3.0
6
  Tested up to: 5.1
7
+ Stable tag: 0.9.97.44
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) functionality to your WordPress site. AMP makes your website faster for Mobile visitors.
15
 
16
+ [What's New in this Version?](https://ampforwp.com/new/) | [Priority Support](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) | [View Demo](https://ampforwp.com/demo/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](https://ampforwp.com/help-center/)
17
 
18
  [youtube https://www.youtube.com/watch?v=Em1nsE_KaKw]
19
 
22
  <strong>Extensions</strong><br>
23
  Some useful extensions to extend AMP features, check [AMP Adsense Support](https://ampforwp.com/advanced-amp-ads/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Contact Form 7 Support](https://ampforwp.com/contact-form-7/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin), [Email Opt-in Support](https://ampforwp.com/opt-in-forms/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin) and [Call To Action Support](https://ampforwp.com/call-to-action/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin). To view more, go to our [Extensions page](https://ampforwp.com/extensions/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin).
24
 
25
+ <strong>Support</strong><br>
26
+ We try our best to provide support on WordPress.org forums. However, We have a special [community support](https://ampforwp.com/help-center/) where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
27
 
28
  <strong>Bug Reports</strong><br>
29
  Bug reports for AMP for WP are [welcomed on GitHub](https://github.com/ahmedkaludi/Accelerated-Mobile-Pages). Please note GitHub is _not_ a support forum, and issues that aren't properly qualified as bugs will be closed.
111
  = Getting Started: =
112
  **[1. User Documentation:](https://ampforwp.com/help/)** The AMP for WordPress plugin is easy to setup but we have some tutorials and guides prepared for you which will help you dive deep with the plugin.
113
 
114
+ **[2. Developer Docs:](https://ampforwp.com/tutorials/article-categories/developer-documentation/)** We have created special documentations for developers and semi technical users who are willing to modify the plugin according to their own needs.
115
 
116
+ **[3. Support:](https://ampforwp.com/help-center/)** We try our best to provide support on WordPress.org forums. However, We have a special community support where you can ask us questions and get help about your AMP related questions. Delivering a good user experience means a lot to us and so we try our best to reply each and every question that gets asked.
117
 
118
+ **[4. Premium Support:](https://ampforwp.com/priority-support/#utm_source=wp_org&utm_medium=description-tab-pro-box&utm_campaign=AMP%20Plugin)** We will personally take care that your website’s AMP version is perfectly validated. We will make sure that your AMP version gets approved and indexed by Google Webmaster Tools properly and we will even keep an eye on AMP updates from Google and implement them into your website.
 
 
119
 
120
  == Credits ==
121
  Some code used in this plugin was forked from 'AMP for WordPress' plugin https://wordpress.org/plugins/amp/ - License URI: http://www.gnu.org/licenses/gpl-2.0.html.
184
 
185
  == Changelog ==
186
 
187
+ = 0.9.97.44 (28th March 2019) =
188
+ * Added: Captions feature in AMP page builder #2645
189
+ * Added: Compatibility with the Youtube Oembed Plyr plugin #1505
190
+ * Added: Caption option for gallery/slider module in pagebuilder #2790
191
+ * Added: Like & share feature for every image in instant_articles #2764
192
+ * Added: Genesis option in SEO settings #2386
193
+ * Added: Improved the 'Setup AMP Feature' and 'Welcome to AMP' tabs & Enhance the Support button on AMP panel #2980
194
+ * Fixed: AMP Theme Framework getting conflicted #2782
195
+ * Fixed: Unwanted code for call-now component is being used #2652
196
+ * Fixed: amphtml tag while AMP Takeover option is enabled #2550
197
+ * Fixed: Debug warnings after 0.9.97.15 #2532
198
+ * Fixed: 'Header design' section in "Header" tab removed when design-1,2 and 3 is active & minor improvements #2978
199
 
200
  Full changelog available in changelog.txt
templates/design-manager/design-1/elements/bread-crumbs.php CHANGED
@@ -80,7 +80,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
80
  }
81
  /*Breadcrumb with tags Start*/
82
  $tags_breadcrumbs = '';
83
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'tags'){
84
  $post_tags = wp_get_post_tags($post->ID);
85
  if(!empty($post_tags)){
86
  foreach( $post_tags as $post_obj){
@@ -94,7 +94,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
94
  }
95
  }
96
 
97
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'category'){
98
  // Get post category info
99
  $category = get_the_category();
100
 
80
  }
81
  /*Breadcrumb with tags Start*/
82
  $tags_breadcrumbs = '';
83
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'tags'){
84
  $post_tags = wp_get_post_tags($post->ID);
85
  if(!empty($post_tags)){
86
  foreach( $post_tags as $post_obj){
94
  }
95
  }
96
 
97
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
98
  // Get post category info
99
  $category = get_the_category();
100
 
templates/design-manager/design-2/elements/bread-crumbs.php CHANGED
@@ -80,7 +80,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
80
  }
81
  /*Breadcrumb with tags Start*/
82
  $tags_breadcrumbs = '';
83
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'tags'){
84
  $post_tags = wp_get_post_tags($post->ID);
85
  if(!empty($post_tags)){
86
  foreach( $post_tags as $post_obj){
@@ -93,7 +93,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
93
  echo $tags_breadcrumbs;
94
  }
95
  }
96
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'category'){
97
  // Get post category info
98
  $category = get_the_category();
99
  if(!empty($category)) {
80
  }
81
  /*Breadcrumb with tags Start*/
82
  $tags_breadcrumbs = '';
83
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'tags'){
84
  $post_tags = wp_get_post_tags($post->ID);
85
  if(!empty($post_tags)){
86
  foreach( $post_tags as $post_obj){
93
  echo $tags_breadcrumbs;
94
  }
95
  }
96
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
97
  // Get post category info
98
  $category = get_the_category();
99
  if(!empty($category)) {
templates/design-manager/design-3/elements/bread-crumbs.php CHANGED
@@ -80,7 +80,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
80
  }
81
  /*Breadcrumb with tags Start*/
82
  $tags_breadcrumbs = '';
83
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'tags'){
84
  $post_tags = wp_get_post_tags($post->ID);
85
  if(!empty($post_tags)){
86
  foreach( $post_tags as $post_obj){
@@ -93,7 +93,7 @@ if ( isset($redux_builder_amp['ampforwp-bread-crumb']) && 1 == $redux_builder_am
93
  echo $tags_breadcrumbs;
94
  }
95
  }
96
- if($redux_builder_amp['ampforwp-bread-crumb-type'] == 'category'){
97
  // Get post category info
98
  $category = get_the_category();
99
  if(!empty($category)) {
80
  }
81
  /*Breadcrumb with tags Start*/
82
  $tags_breadcrumbs = '';
83
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'tags'){
84
  $post_tags = wp_get_post_tags($post->ID);
85
  if(!empty($post_tags)){
86
  foreach( $post_tags as $post_obj){
93
  echo $tags_breadcrumbs;
94
  }
95
  }
96
+ if(ampforwp_get_setting('ampforwp-bread-crumb-type') == 'category'){
97
  // Get post category info
98
  $category = get_the_category();
99
  if(!empty($category)) {
templates/features.php CHANGED
@@ -2484,7 +2484,7 @@ function ampforwp_replace_title_tags() {
2484
  }
2485
 
2486
  //Genesis #1013
2487
- if(function_exists('genesis_title')){
2488
  if(is_home() && is_front_page() && !$redux_builder_amp['amp-frontpage-select-option']){
2489
  // Determine the doctitle.
2490
  $genesis_title = genesis_get_seo_option( 'home_doctitle' ) ? genesis_get_seo_option( 'home_doctitle' ) : get_bloginfo( 'name' );
@@ -2930,6 +2930,18 @@ function ampforwp_header_html_output() {
2930
  if( $redux_builder_amp['amp-header-text-area-for-html'] ) {
2931
  echo $redux_builder_amp['amp-header-text-area-for-html'] ;
2932
  }
 
 
 
 
 
 
 
 
 
 
 
 
2933
  }
2934
 
2935
 
@@ -2993,7 +3005,7 @@ function ampforwp_talking_to_robots() {
2993
  $meta_content = "noindex,noarchive";
2994
  }
2995
  // Genesis
2996
- if ( function_exists('genesis_get_robots_meta_content') ) {
2997
  $meta_content = genesis_get_robots_meta_content();
2998
  }
2999
  // All in One SEO #1720
@@ -3968,6 +3980,12 @@ if( ! function_exists(' ampforwp_youtube_modified_params ') ){
3968
  }
3969
  // Remove that param from URL
3970
  $amp_youtube['data-videoid'] = preg_replace('/&(.*)/', '', $amp_youtube['data-videoid']);
 
 
 
 
 
 
3971
  }
3972
  return $amp_youtube;
3973
  }
@@ -4993,7 +5011,7 @@ function ampforwp_generate_meta_desc($json=""){
4993
  }
4994
 
4995
  //Genesis #1013
4996
- if ( function_exists('genesis_meta') ) {
4997
  $genesis_description = '';
4998
  if ( is_home() && is_front_page() && ! $redux_builder_amp['amp-frontpage-select-option'] ) {
4999
  $genesis_description = genesis_get_seo_option( 'home_description' ) ? genesis_get_seo_option( 'home_description' ) : get_bloginfo( 'description' );
2484
  }
2485
 
2486
  //Genesis #1013
2487
+ if(function_exists('genesis_title') && 'genesis' == ampforwp_get_setting('ampforwp-seo-selection') ){
2488
  if(is_home() && is_front_page() && !$redux_builder_amp['amp-frontpage-select-option']){
2489
  // Determine the doctitle.
2490
  $genesis_title = genesis_get_seo_option( 'home_doctitle' ) ? genesis_get_seo_option( 'home_doctitle' ) : get_bloginfo( 'name' );
2930
  if( $redux_builder_amp['amp-header-text-area-for-html'] ) {
2931
  echo $redux_builder_amp['amp-header-text-area-for-html'] ;
2932
  }
2933
+ // amphtml tag when AMP Takeover is enabled #2550
2934
+ if(ampforwp_get_setting('ampforwp-amp-takeover') == true){
2935
+ $amp_url = "";
2936
+ $amp_url = ampforwp_amphtml_generator();
2937
+ $canonical_url = "";
2938
+ $canonical_url = explode('/', $amp_url);
2939
+ $canonical_url = array_flip($canonical_url);
2940
+ unset($canonical_url['amp']);
2941
+ $canonical_url = array_flip($canonical_url);
2942
+ $canonical_url = implode('/' , $canonical_url);
2943
+ printf('<link rel="amphtml" href="%s" />', user_trailingslashit(esc_url($canonical_url)));
2944
+ }
2945
  }
2946
 
2947
 
3005
  $meta_content = "noindex,noarchive";
3006
  }
3007
  // Genesis
3008
+ if ( function_exists('genesis_get_robots_meta_content') && 'genesis' == ampforwp_get_setting('ampforwp-seo-selection') ) {
3009
  $meta_content = genesis_get_robots_meta_content();
3010
  }
3011
  // All in One SEO #1720
3980
  }
3981
  // Remove that param from URL
3982
  $amp_youtube['data-videoid'] = preg_replace('/&(.*)/', '', $amp_youtube['data-videoid']);
3983
+ // Plyr Plugin Compatibility #1505
3984
+ if ( class_exists('Plyr') ) {
3985
+ $amp_youtube['data-param-rel'] = 0;
3986
+ $amp_youtube['data-param-autoplay'] = 0;
3987
+ $amp_youtube['data-param-showinfo'] = 0;
3988
+ }
3989
  }
3990
  return $amp_youtube;
3991
  }
5011
  }
5012
 
5013
  //Genesis #1013
5014
+ if ( function_exists('genesis_meta') && 'genesis' == ampforwp_get_setting('ampforwp-seo-selection') ) {
5015
  $genesis_description = '';
5016
  if ( is_home() && is_front_page() && ! $redux_builder_amp['amp-frontpage-select-option'] ) {
5017
  $genesis_description = genesis_get_seo_option( 'home_description' ) ? genesis_get_seo_option( 'home_description' ) : get_bloginfo( 'description' );
templates/instant-articles/instant-article-sanitizer.php CHANGED
@@ -134,7 +134,9 @@ function ampforwp_fbia_validate_images($DOMDocument){
134
  // Let's continue working with the figure tag
135
  $element = $figure;
136
  }
137
-
 
 
138
 
139
  if($element->parentNode->nodeName != "body"){
140
  // Let's find the highest container if it does not reside in the body already
@@ -266,15 +268,18 @@ function ampforwp_fbia_video_element( $DOMDocument ){
266
  $video = $video_elements->item( $i );
267
 
268
  if($video->parentNode->nodeName == "figure"){
269
- // This element is already wrapped in a figure tag, we only need to make sure it's placed right
270
- $video = $video->parentNode;
271
- } else {
272
- // Wrap this video into a figure tag
273
- $figure = $DOMDocument->createElement('figure');
274
- $video->parentNode->replaceChild($figure, $video);
275
- $figure->appendChild($video);
276
- $video = $figure;
277
- }
 
 
 
278
  }
279
  return $DOMDocument;
280
  }
134
  // Let's continue working with the figure tag
135
  $element = $figure;
136
  }
137
+ if ( ampforwp_get_setting('fb-instant-feedback') ) {
138
+ $element->setAttribute( 'data-feedback', 'fb:likes, fb:comments' );
139
+ }
140
 
141
  if($element->parentNode->nodeName != "body"){
142
  // Let's find the highest container if it does not reside in the body already
268
  $video = $video_elements->item( $i );
269
 
270
  if($video->parentNode->nodeName == "figure"){
271
+ // This element is already wrapped in a figure tag, we only need to make sure it's placed right
272
+ $video = $video->parentNode;
273
+ } else {
274
+ // Wrap this video into a figure tag
275
+ $figure = $DOMDocument->createElement('figure');
276
+ $video->parentNode->replaceChild($figure, $video);
277
+ $figure->appendChild($video);
278
+ $video = $figure;
279
+ }
280
+ if ( ampforwp_get_setting('fb-instant-feedback') ) {
281
+ $video->setAttribute( 'data-feedback', 'fb:likes, fb:comments' );
282
+ }
283
  }
284
  return $DOMDocument;
285
  }