AMP for WP – Accelerated Mobile Pages - Version 0.9.53

Version Description

(19th June 2017) = * View more details on https://ampforwp.com/stability-validation-issues-59th-update/ * Compatibility Issue with Rocket Lazy Load plugin #907 * Link color issue with UX of Color Pickers in Design 3 #731 * amp-analytics js appears more than once when Google tag manager is used #885 * SEO by SQUIRRLY is adding analytics twice #678 * Fatal error when WPSEO is activated #900 * Design 3 Sticky header should have an option #625 * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912 * Yandex Metrika support in AMP #585 * Histats Analytics Support #880 * Chartbeat Analytics Support #882 * Do not strip Rel from anchor tags #790 * Design close Resulting Blank Screen in AMP Site #642 * Logo size is not applying #817 * AMP Publisher logo guidelines #162 * Remove amp-social-share extension .js from Custom Frontpage #899 * Add compatibility with Sassy Social Share #679 * Remove Disallowed like tag from Facebook Like button by Ultimate Facebook plugin

Download this release

Release Info

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

Code changes from version 0.9.51.1 to 0.9.53

README.md CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
- Tested up to: 4.7.5
7
- Stable tag: 0.9.51
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -17,23 +17,24 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
17
 
18
  [youtube https://www.youtube.com/watch?v=jglJGmlZyos]
19
 
20
- > <strong>Extensions</strong><br>
21
- > 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), [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).
22
- >
23
- > <strong>Premium Support</strong><br>
24
- > 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.
25
- >
26
- > <strong>Bug Reports</strong><br>
27
- > 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.
28
 
29
 
30
  = Features: =
31
 
 
32
  * NEW - Page Builder for AMP! [Watch the Demo](http://ampforwp.com/demo/#pagebuilder) | [How to](https://ampforwp.com/tutorials/page-builder/)
33
  * NEW - Github Gist Support
34
  * NEW - Facebook Comments Support
35
  * NEW - Email Opt-in Subscription form support in AMP added
36
- * NEW - Call to Action boxes and notification bars
37
  * 9 Advertisement sizes - 2 More AD slots added recently
38
  * Comments Forms in AMP.
39
  * Native AMP Search functionality.
@@ -77,7 +78,7 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
77
  * RTL Support
78
  * Custom AMP FrontPage
79
  * Notifications
80
- * Piwik & Segment.com, StatCounter (NEW) & Effective Measure (NEW) Support
81
  * Incontent & DoubleClick Support
82
  * Great Support & Active Development.
83
  * Widgets & WooCommerce
@@ -134,6 +135,30 @@ You can contact me using this url: http://ampforwp.com/contact/
134
 
135
  == Changelog ==
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  = 0.9.51 (8th June 2017) =
138
  * View more details on https://ampforwp.com/page-builder-released-in-amp/
139
  * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
+ Tested up to: 4.8
7
+ Stable tag: 0.9.53
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
17
 
18
  [youtube https://www.youtube.com/watch?v=jglJGmlZyos]
19
 
20
+ <strong>Extensions</strong><br>
21
+ 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).
22
+
23
+ <strong>Premium Support</strong><br>
24
+ 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.
25
+
26
+ <strong>Bug Reports</strong><br>
27
+ 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.
28
 
29
 
30
  = Features: =
31
 
32
+ * NEW - Contact Form 7 Support [More Info](https://ampforwp.com/contact-form-7/)
33
  * NEW - Page Builder for AMP! [Watch the Demo](http://ampforwp.com/demo/#pagebuilder) | [How to](https://ampforwp.com/tutorials/page-builder/)
34
  * NEW - Github Gist Support
35
  * NEW - Facebook Comments Support
36
  * NEW - Email Opt-in Subscription form support in AMP added
37
+ * Call to Action boxes and notification bars
38
  * 9 Advertisement sizes - 2 More AD slots added recently
39
  * Comments Forms in AMP.
40
  * Native AMP Search functionality.
78
  * RTL Support
79
  * Custom AMP FrontPage
80
  * Notifications
81
+ * Chartbeat (NEW), Hi-stats (NEW), Yandex Metrika (NEW), Piwik, Segment.com, StatCounter, Effective Measure and comScore Support
82
  * Incontent & DoubleClick Support
83
  * Great Support & Active Development.
84
  * Widgets & WooCommerce
135
 
136
  == Changelog ==
137
 
138
+ = 0.9.53 (19th June 2017) =
139
+ * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
140
+ * Compatibility Issue with Rocket Lazy Load plugin #907
141
+ * Link color issue with UX of Color Pickers in Design 3 #731
142
+ * amp-analytics js appears more than once when Google tag manager is used #885
143
+ * SEO by SQUIRRLY is adding analytics twice #678
144
+ * Fatal error when WPSEO is activated #900
145
+ * Design 3 Sticky header should have an option #625
146
+ * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912
147
+ * Yandex Metrika support in AMP #585
148
+ * Histats Analytics Support #880
149
+ * Chartbeat Analytics Support #882
150
+ * Do not strip Rel from anchor tags #790
151
+ * Design close Resulting Blank Screen in AMP Site #642
152
+ * Logo size is not applying #817
153
+ * AMP Publisher logo guidelines #162
154
+ * Remove amp-social-share extension .js from Custom Frontpage #899
155
+ * Add compatibility with Sassy Social Share #679
156
+ * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
157
+
158
+ = 0.9.51.1 (12th June 2017) =
159
+ * Redirection issue after 0.9.51 Update.
160
+ * Improved compatibility with plugins.
161
+
162
  = 0.9.51 (8th June 2017) =
163
  * View more details on https://ampforwp.com/page-builder-released-in-amp/
164
  * Page Builder Support added ( See Tutorial at https://ampforwp.com/tutorials/page-builder/ )
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.51.1
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
@@ -17,7 +17,7 @@ define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
17
  define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
18
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
19
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
20
- define('AMPFORWP_VERSION','0.9.51.1');
21
  // any changes to AMP_QUERY_VAR should be refelected here
22
  define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
23
 
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.53
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/25
17
  define('AMPFORWP_PLUGIN_DIR_URI', plugin_dir_url(__FILE__));
18
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
19
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
20
+ define('AMPFORWP_VERSION','0.9.53');
21
  // any changes to AMP_QUERY_VAR should be refelected here
22
  define('AMPFORWP_AMP_QUERY_VAR', apply_filters( 'amp_query_var', 'amp' ) );
23
 
images/cf7.png ADDED
Binary file
images/cf7_.png ADDED
Binary file
includes/options/admin-config.php CHANGED
@@ -23,7 +23,15 @@ $extension_listing = '
23
  <div class="extension_btn">From: $19</div>
24
  </div>
25
  </a></li>
26
- <li class="second"><a href="http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
 
 
 
 
 
 
 
 
27
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/email.png" /></div>
28
  <div class="extension_desc">
29
  <h2>Email Opt-in Forms</h2>
@@ -31,7 +39,7 @@ $extension_listing = '
31
  <div class="extension_btn">From: $79</div>
32
  </div>
33
  </a></li>
34
- <li class="first"><a href="http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=extension-tab_amp-cta&utm_campaign=AMP%20Plugin" target="_blank">
35
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/mac-click.png" /></div>
36
  <div class="extension_desc">
37
  <h2>Call To Action (CTA)</h2>
@@ -39,7 +47,7 @@ $extension_listing = '
39
  <div class="extension_btn">From: $29</div>
40
  </div>
41
  </a></li>
42
- <li class="second"><a href="http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=extension-tab_custom-post-type&utm_campaign=AMP%20Plugin" target="_blank">
43
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
44
  <div class="extension_desc">
45
  <h2>Custom Post Type</h2>
@@ -48,7 +56,7 @@ $extension_listing = '
48
  </div>
49
  </a></li>
50
 
51
- <li class="first"><a href="http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
52
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/acf.png" /></div>
53
  <div class="extension_desc">
54
  <h2>Advanced Custom Fields</h2>
@@ -56,7 +64,7 @@ $extension_listing = '
56
  <div class="extension_btn">From: $29</div>
57
  </div>
58
  </a></li>
59
- <li class="second"><a href="http://ampforwp.com/doubleclick-for-publishers/#utm_source=options-panel&utm_medium=extension-tab_doubleclick&utm_campaign=AMP%20Plugin" target="_blank">
60
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/dfp.png" /></div>
61
  <div class="extension_desc">
62
  <h2>DoubleClick For Publishers</h2>
@@ -66,7 +74,7 @@ $extension_listing = '
66
  </a></li>
67
 
68
 
69
- <li class="first"><a href="http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=extension-tab_amp-ratings&utm_campaign=AMP%20Plugin" target="_blank">
70
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/star.png" /></div>
71
  <div class="extension_desc">
72
  <h2>Star Ratings</h2>
@@ -74,7 +82,7 @@ $extension_listing = '
74
  <div class="extension_btn">From: $19</div>
75
  </div>
76
  </a></li>
77
- <li class="second"><a href="https://wordpress.org/plugins/amp-woocommerce/" target="_blank">
78
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/woo.png" /></div>
79
  <div class="extension_desc">
80
  <h2>AMP WooCommerce</h2>
@@ -83,7 +91,7 @@ $extension_listing = '
83
  </div>
84
  </a></li>
85
 
86
- <li class="first"><a href="http://ampforwp.com/amp-category-base-remove-support/#utm_source=options-panel&utm_medium=extension-tab_amp-category-base-remove-support&utm_campaign=AMP%20Plugin" target="_blank">
87
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/puzzel.png" /></div>
88
  <div class="extension_desc">
89
  <h2>Category Base Removal</h2>
@@ -91,7 +99,7 @@ $extension_listing = '
91
  <div class="extension_btn">FREE</div>
92
  </div>
93
  </a></li>
94
- <li class="second"><a href="https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=extension-tab_amp-more-comingsoon&utm_campaign=AMP%20Plugin" target="_blank">
95
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
96
  <div class="extension_desc">
97
  <h2>More Coming Soon</h2>
@@ -648,6 +656,18 @@ Redux::setArgs( "redux_builder_amp", $args );
648
  ),
649
  'default' => '2'
650
  ),
 
 
 
 
 
 
 
 
 
 
 
 
651
  array(
652
  'id' => 'amp-opt-color-rgba-colorscheme',
653
  'type' => 'color_rgba',
@@ -681,6 +701,20 @@ Redux::setArgs( "redux_builder_amp", $args );
681
  array('amp-design-selector', '=' , '3')
682
  )
683
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684
  array(
685
  'id' => 'amp-opt-color-rgba-headerelements',
686
  'type' => 'color_rgba',
@@ -721,7 +755,6 @@ Redux::setArgs( "redux_builder_amp", $args );
721
  'required' => array(
722
  array('amp-design-selector', '=' , '3')
723
  ),
724
- 'desc' => __('HTTPS is required for search to work on AMP pages.', 'accelerated-mobile-pages' ),
725
  'default' => '0'
726
  ),
727
 
@@ -733,7 +766,6 @@ Redux::setArgs( "redux_builder_amp", $args );
733
  'required' => array(
734
  array('amp-design-selector', '=' , '2')
735
  ),
736
- 'desc' => __('HTTPS is required for search to work on AMP pages.', 'accelerated-mobile-pages' ),
737
  'default' => '0'
738
  ),
739
 
@@ -745,7 +777,6 @@ Redux::setArgs( "redux_builder_amp", $args );
745
  'required' => array(
746
  array('amp-design-selector', '=' , '1')
747
  ),
748
- 'desc' => __('HTTPS is required for search to work on AMP pages.', 'accelerated-mobile-pages' ),
749
  'default' => '0'
750
  ),
751
  // Call Now button
@@ -1666,6 +1697,9 @@ Redux::setArgs( "redux_builder_amp", $args );
1666
  '5' => __('comScore', 'accelerated-mobile-pages' ),
1667
  '6' => __('Effective Measure', 'accelerated-mobile-pages' ),
1668
  '7' => __('StatCounter', 'accelerated-mobile-pages' ),
 
 
 
1669
  ),
1670
  'required' => array(
1671
  array('amp-use-gtm-option', '=' , '0'),
@@ -1756,6 +1790,38 @@ Redux::setArgs( "redux_builder_amp", $args );
1756
  'required' => array(
1757
  array('amp-analytics-select-option', '=' , '5')),
1758
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1759
 
1760
  //GTM
1761
  array(
@@ -1814,6 +1880,29 @@ Redux::setArgs( "redux_builder_amp", $args );
1814
  'url' => true,
1815
  'title' => __('Default Structured Data Logo', 'accelerated-mobile-pages'),
1816
  'subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1817
  ),
1818
  array(
1819
  'id' => 'amp-structured-data-placeholder-image',
@@ -1842,6 +1931,32 @@ Redux::setArgs( "redux_builder_amp", $args );
1842
  )
1843
  ) );
1844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1845
  // Notifications SECTION
1846
  Redux::setSection( $opt_name, array(
1847
  'title' => __( 'Notifications', 'accelerated-mobile-pages' ),
23
  <div class="extension_btn">From: $19</div>
24
  </div>
25
  </a></li>
26
+ <li class="second"><a href="http://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=extension-tab_cf7&utm_campaign=AMP%20Plugin" target="_blank">
27
+ <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/cf7.png" /></div>
28
+ <div class="extension_desc">
29
+ <h2>Contact Form 7</h2>
30
+ <p>Add Contact Us Form in AMP.</p>
31
+ <div class="extension_btn">From: $39</div>
32
+ </div>
33
+ </a></li>
34
+ <li class="first"><a href="http://ampforwp.com/opt-in-forms/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
35
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/email.png" /></div>
36
  <div class="extension_desc">
37
  <h2>Email Opt-in Forms</h2>
39
  <div class="extension_btn">From: $79</div>
40
  </div>
41
  </a></li>
42
+ <li class="second"><a href="http://ampforwp.com/call-to-action/#utm_source=options-panel&utm_medium=extension-tab_amp-cta&utm_campaign=AMP%20Plugin" target="_blank">
43
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/mac-click.png" /></div>
44
  <div class="extension_desc">
45
  <h2>Call To Action (CTA)</h2>
47
  <div class="extension_btn">From: $29</div>
48
  </div>
49
  </a></li>
50
+ <li class="first"><a href="http://ampforwp.com/custom-post-type/#utm_source=options-panel&utm_medium=extension-tab_custom-post-type&utm_campaign=AMP%20Plugin" target="_blank">
51
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
52
  <div class="extension_desc">
53
  <h2>Custom Post Type</h2>
56
  </div>
57
  </a></li>
58
 
59
+ <li class="second"><a href="http://ampforwp.com/acf-amp/#utm_source=options-panel&utm_medium=extension-tab_opt-in-forms&utm_campaign=AMP%20Plugin" target="_blank">
60
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/acf.png" /></div>
61
  <div class="extension_desc">
62
  <h2>Advanced Custom Fields</h2>
64
  <div class="extension_btn">From: $29</div>
65
  </div>
66
  </a></li>
67
+ <li class="first"><a href="http://ampforwp.com/doubleclick-for-publishers/#utm_source=options-panel&utm_medium=extension-tab_doubleclick&utm_campaign=AMP%20Plugin" target="_blank">
68
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/dfp.png" /></div>
69
  <div class="extension_desc">
70
  <h2>DoubleClick For Publishers</h2>
74
  </a></li>
75
 
76
 
77
+ <li class="second"><a href="http://ampforwp.com/amp-ratings/#utm_source=options-panel&utm_medium=extension-tab_amp-ratings&utm_campaign=AMP%20Plugin" target="_blank">
78
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/star.png" /></div>
79
  <div class="extension_desc">
80
  <h2>Star Ratings</h2>
82
  <div class="extension_btn">From: $19</div>
83
  </div>
84
  </a></li>
85
+ <li class="first"><a href="https://wordpress.org/plugins/amp-woocommerce/" target="_blank">
86
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/woo.png" /></div>
87
  <div class="extension_desc">
88
  <h2>AMP WooCommerce</h2>
91
  </div>
92
  </a></li>
93
 
94
+ <li class="second"><a href="http://ampforwp.com/amp-category-base-remove-support/#utm_source=options-panel&utm_medium=extension-tab_amp-category-base-remove-support&utm_campaign=AMP%20Plugin" target="_blank">
95
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/puzzel.png" /></div>
96
  <div class="extension_desc">
97
  <h2>Category Base Removal</h2>
99
  <div class="extension_btn">FREE</div>
100
  </div>
101
  </a></li>
102
+ <li class="first"><a href="https://ampforwp.com/extensions/#utm_source=options-panel&utm_medium=extension-tab_amp-more-comingsoon&utm_campaign=AMP%20Plugin" target="_blank">
103
  <div class="align_left"><img src="'.AMPFORWP_IMAGE_DIR . '/comments.png" /></div>
104
  <div class="extension_desc">
105
  <h2>More Coming Soon</h2>
656
  ),
657
  'default' => '2'
658
  ),
659
+
660
+ array(
661
+ 'id' => 'amp-opt-sticky-head',
662
+ 'type' => 'switch',
663
+ 'title' => __('Make Header UnSticky','accelerated-mobile-pages'),
664
+ 'required' => array(
665
+ array('amp-design-selector', '=' , '3')
666
+ ),
667
+ 'desc' => __('Turning it ON will remove the sticky head from the design.', 'accelerated-mobile-pages' ),
668
+ 'default' => '0'
669
+ ),
670
+
671
  array(
672
  'id' => 'amp-opt-color-rgba-colorscheme',
673
  'type' => 'color_rgba',
701
  array('amp-design-selector', '=' , '3')
702
  )
703
  ),
704
+
705
+ array(
706
+ 'id' => 'amp-opt-color-rgba-link',
707
+ 'type' => 'color_rgba',
708
+ 'title' => __('Anchor Link Color','accelerated-mobile-pages'),
709
+ 'default' => array(
710
+ 'color' => '#f42f42',
711
+ ),
712
+ 'required' => array(
713
+ array('amp-design-selector', '=' , '3')
714
+ )
715
+ ),
716
+
717
+
718
  array(
719
  'id' => 'amp-opt-color-rgba-headerelements',
720
  'type' => 'color_rgba',
755
  'required' => array(
756
  array('amp-design-selector', '=' , '3')
757
  ),
 
758
  'default' => '0'
759
  ),
760
 
766
  'required' => array(
767
  array('amp-design-selector', '=' , '2')
768
  ),
 
769
  'default' => '0'
770
  ),
771
 
777
  'required' => array(
778
  array('amp-design-selector', '=' , '1')
779
  ),
 
780
  'default' => '0'
781
  ),
782
  // Call Now button
1697
  '5' => __('comScore', 'accelerated-mobile-pages' ),
1698
  '6' => __('Effective Measure', 'accelerated-mobile-pages' ),
1699
  '7' => __('StatCounter', 'accelerated-mobile-pages' ),
1700
+ '8' => __('Histats Analytics', 'accelerated-mobile-pages'),
1701
+ '9' => __('Yandex Metrika', 'accelerated-mobile-pages'),
1702
+ '10' => __('Chartbeat Analytics', 'accelerated-mobile-pages'),
1703
  ),
1704
  'required' => array(
1705
  array('amp-use-gtm-option', '=' , '0'),
1790
  'required' => array(
1791
  array('amp-analytics-select-option', '=' , '5')),
1792
  ),
1793
+ array(
1794
+ 'id' => 'histats-feild',
1795
+ 'type' => 'text',
1796
+ 'title' => __( 'Histats Analytics', 'accelerated-mobile-pages' ),
1797
+ 'required' => array(
1798
+ array('amp-use-gtm-option', '=' , '0'),
1799
+ array('amp-analytics-select-option', '=' , '8')
1800
+ ),
1801
+ 'subtitle' => __( 'Enter your Histats Analytics ID.', 'accelerated-mobile-pages' ),
1802
+ 'desc' => 'Tutorial: <a href="https://ampforwp.com/tutorials/how-to-get-histats-analytics-id/">How to get Histats Analytics ID for AMP?</a>',
1803
+ 'default' => '',
1804
+ ),
1805
+ array(
1806
+ 'id' =>'amp-Yandex-Metrika-analytics-code',
1807
+ 'type' => 'text',
1808
+ 'title' => __('Yandex Metrika Analytics ID','accelerated-mobile-pages'),
1809
+ 'default' => '',
1810
+ 'required' => array(
1811
+ array('amp-use-gtm-option', '=' , '0'),
1812
+ array('amp-analytics-select-option', '=' , '9')),
1813
+ 'subtitle' => __( 'Enter your Counter ID.', 'accelerated-mobile-pages' ),
1814
+ ),
1815
+ array(
1816
+ 'id' =>'amp-Chartbeat-analytics-code',
1817
+ 'type' => 'text',
1818
+ 'title' => __('Chartbeat Analytics ID','accelerated-mobile-pages'),
1819
+ 'default' => '',
1820
+ 'required' => array(
1821
+ array('amp-use-gtm-option', '=' , '0'),
1822
+ array('amp-analytics-select-option', '=' , '10')),
1823
+ 'subtitle' => __( 'Enter your Account ID.', 'accelerated-mobile-pages' ),
1824
+ ),
1825
 
1826
  //GTM
1827
  array(
1880
  'url' => true,
1881
  'title' => __('Default Structured Data Logo', 'accelerated-mobile-pages'),
1882
  'subtitle' => __('Upload the logo you want to show in Google Structured Data. ', 'accelerated-mobile-pages'),
1883
+ ),
1884
+ array(
1885
+ 'id' => 'ampforwp-sd-logo-dimensions',
1886
+ 'title' => __('Custom Logo Size', 'accelerated-mobile-pages'),
1887
+ 'type' => 'switch',
1888
+ 'default' => 0,
1889
+ ),
1890
+ array(
1891
+ 'id' => 'ampforwp-sd-logo-width',
1892
+ 'type' => 'text',
1893
+ 'title' => __('Logo Width', 'accelerated-mobile-pages'),
1894
+ 'desc' => __('Default width is 600 pixels', 'accelerated-mobile-pages'),
1895
+ 'default' => '600',
1896
+ 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
1897
+ ),
1898
+ array(
1899
+ 'id' => 'ampforwp-sd-logo-height',
1900
+ 'type' => 'text',
1901
+ 'title' => __('Logo Height', 'accelerated-mobile-pages'),
1902
+ 'desc' => __('Default height is 60 pixels', 'accelerated-mobile-pages'),
1903
+ 'default' => '60',
1904
+ 'required'=>array('ampforwp-sd-logo-dimensions','=','1'),
1905
+
1906
  ),
1907
  array(
1908
  'id' => 'amp-structured-data-placeholder-image',
1931
  )
1932
  ) );
1933
 
1934
+ // Contact Form SECTION
1935
+ Redux::setSection( $opt_name, array(
1936
+ 'title' => __( 'Contact Form', 'accelerated-mobile-pages' ),
1937
+ 'desc' => 'Contact form 7 forms will automatically be converted into AMP compatible.',
1938
+ 'id' => 'amp-contact',
1939
+ 'subsection' => true,
1940
+ 'fields' => array(
1941
+ array(
1942
+ 'id' =>'amp-enable-contactform',
1943
+ 'type' => 'switch',
1944
+ 'title' => __('Contact Form 7 Support', 'accelerated-mobile-pages'),
1945
+ 'default' => '',
1946
+ 'true' => 'Enabled',
1947
+ 'false' => 'Disabled',
1948
+ ),
1949
+ array(
1950
+ // 'title' => __('Notification text', 'accelerated-mobile-pages'),
1951
+ 'id' => 'info_normal',
1952
+ 'type' => 'info',
1953
+ 'required' => array('amp-enable-contactform', '=' , '1'),
1954
+ 'desc' => '<div style=" background: #FFF9C4;padding: 12px;line-height: 1.6;margin: -35px -12px 0 -12px;"><b>ONE LAST STEP REQUIRED:</b> This feature requires <a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Contact Form 7 extension</a>.<br /> <div style="margin-top:4px;">(<a href="https://ampforwp.com/contact-form-7/#utm_source=options-panel&utm_medium=cf7-tab_cf7_installation_link&utm_campaign=AMP%20Plugin" target="_blank">Click here for more info</a>)</div></div>',
1955
+ ),
1956
+ ),
1957
+
1958
+ ) );
1959
+
1960
  // Notifications SECTION
1961
  Redux::setSection( $opt_name, array(
1962
  'title' => __( 'Notifications', 'accelerated-mobile-pages' ),
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
- Tested up to: 4.7.5
7
- Stable tag: 0.9.51.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -17,23 +17,24 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
17
 
18
  [youtube https://www.youtube.com/watch?v=jglJGmlZyos]
19
 
20
- > <strong>Extensions</strong><br>
21
- > 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), [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).
22
- >
23
- > <strong>Premium Support</strong><br>
24
- > 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.
25
- >
26
- > <strong>Bug Reports</strong><br>
27
- > 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.
28
 
29
 
30
  = Features: =
31
 
 
32
  * NEW - Page Builder for AMP! [Watch the Demo](http://ampforwp.com/demo/#pagebuilder) | [How to](https://ampforwp.com/tutorials/page-builder/)
33
  * NEW - Github Gist Support
34
  * NEW - Facebook Comments Support
35
  * NEW - Email Opt-in Subscription form support in AMP added
36
- * NEW - Call to Action boxes and notification bars
37
  * 9 Advertisement sizes - 2 More AD slots added recently
38
  * Comments Forms in AMP.
39
  * Native AMP Search functionality.
@@ -77,7 +78,7 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
77
  * RTL Support
78
  * Custom AMP FrontPage
79
  * Notifications
80
- * Piwik & Segment.com, StatCounter (NEW) & Effective Measure (NEW) Support
81
  * Incontent & DoubleClick Support
82
  * Great Support & Active Development.
83
  * Widgets & WooCommerce
@@ -134,6 +135,25 @@ You can contact me using this url: http://ampforwp.com/contact/
134
 
135
  == Changelog ==
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  = 0.9.51.1 (12th June 2017) =
139
  * Redirection issue after 0.9.51 Update.
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin, SEO
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
+ Tested up to: 4.8
7
+ Stable tag: 0.9.53
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
17
 
18
  [youtube https://www.youtube.com/watch?v=jglJGmlZyos]
19
 
20
+ <strong>Extensions</strong><br>
21
+ 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).
22
+
23
+ <strong>Premium Support</strong><br>
24
+ 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.
25
+
26
+ <strong>Bug Reports</strong><br>
27
+ 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.
28
 
29
 
30
  = Features: =
31
 
32
+ * NEW - Contact Form 7 Support [More Info](https://ampforwp.com/contact-form-7/)
33
  * NEW - Page Builder for AMP! [Watch the Demo](http://ampforwp.com/demo/#pagebuilder) | [How to](https://ampforwp.com/tutorials/page-builder/)
34
  * NEW - Github Gist Support
35
  * NEW - Facebook Comments Support
36
  * NEW - Email Opt-in Subscription form support in AMP added
37
+ * Call to Action boxes and notification bars
38
  * 9 Advertisement sizes - 2 More AD slots added recently
39
  * Comments Forms in AMP.
40
  * Native AMP Search functionality.
78
  * RTL Support
79
  * Custom AMP FrontPage
80
  * Notifications
81
+ * Chartbeat (NEW), Hi-stats (NEW), Yandex Metrika (NEW), Piwik, Segment.com, StatCounter, Effective Measure and comScore Support
82
  * Incontent & DoubleClick Support
83
  * Great Support & Active Development.
84
  * Widgets & WooCommerce
135
 
136
  == Changelog ==
137
 
138
+ = 0.9.53 (19th June 2017) =
139
+ * View more details on https://ampforwp.com/stability-validation-issues-59th-update/
140
+ * Compatibility Issue with Rocket Lazy Load plugin #907
141
+ * Link color issue with UX of Color Pickers in Design 3 #731
142
+ * amp-analytics js appears more than once when Google tag manager is used #885
143
+ * SEO by SQUIRRLY is adding analytics twice #678
144
+ * Fatal error when WPSEO is activated #900
145
+ * Design 3 Sticky header should have an option #625
146
+ * Search form was enhanced, it can now be used on the websites without https certificate. That will certainly fix a lot of validation issues. #912
147
+ * Yandex Metrika support in AMP #585
148
+ * Histats Analytics Support #880
149
+ * Chartbeat Analytics Support #882
150
+ * Do not strip Rel from anchor tags #790
151
+ * Design close Resulting Blank Screen in AMP Site #642
152
+ * Logo size is not applying #817
153
+ * AMP Publisher logo guidelines #162
154
+ * Remove amp-social-share extension .js from Custom Frontpage #899
155
+ * Add compatibility with Sassy Social Share #679
156
+ * Remove Disallowed ‘like’ tag from Facebook Like button by Ultimate Facebook plugin
157
 
158
  = 0.9.51.1 (12th June 2017) =
159
  * Redirection issue after 0.9.51 Update.
templates/design-manager.php CHANGED
@@ -65,7 +65,7 @@ add_action('pre_amp_render_post','ampforwp_design_selector', 11 );
65
  function ampforwp_design_selector() {
66
 
67
  global $redux_builder_amp;
68
- if ( $redux_builder_amp ) {
69
  return $redux_builder_amp['amp-design-selector'];
70
  } else {
71
  return 2;
65
  function ampforwp_design_selector() {
66
 
67
  global $redux_builder_amp;
68
+ if ( $redux_builder_amp['amp-design-selector'] ) {
69
  return $redux_builder_amp['amp-design-selector'];
70
  } else {
71
  return 2;
templates/design-manager/design-1/frontpage.php CHANGED
@@ -25,7 +25,7 @@ $template = new AMP_Post_Template( $post_id );?>
25
  if ( ! $amp_custom_content_enable ) {
26
  $amp_component_scripts = $template->data['amp_component_scripts'];
27
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) {
28
- if ( $ampforwp_service == 'amp-sidebar') {
29
  continue;
30
  }
31
  ?>
25
  if ( ! $amp_custom_content_enable ) {
26
  $amp_component_scripts = $template->data['amp_component_scripts'];
27
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) {
28
+ if ( $ampforwp_service == 'amp-sidebar' || $ampforwp_service == 'amp-analytics' ) {
29
  continue;
30
  }
31
  ?>
templates/design-manager/design-2/frontpage.php CHANGED
@@ -24,7 +24,7 @@ $template = new AMP_Post_Template( $post_id );?>
24
  if ( ! $amp_custom_content_enable ) {
25
  $amp_component_scripts = $template->data['amp_component_scripts'];
26
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) {
27
- if ( $ampforwp_service == 'amp-sidebar') {
28
  continue;
29
  } ?>
30
  <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo $ampforwp_js_file; ?>" async></script> <?php
24
  if ( ! $amp_custom_content_enable ) {
25
  $amp_component_scripts = $template->data['amp_component_scripts'];
26
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) {
27
+ if ( $ampforwp_service == 'amp-sidebar' || $ampforwp_service == 'amp-analytics' ) {
28
  continue;
29
  } ?>
30
  <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo $ampforwp_js_file; ?>" async></script> <?php
templates/design-manager/design-3/frontpage.php CHANGED
@@ -25,7 +25,7 @@ $template = new AMP_Post_Template( $post_id );?>
25
  if ( ! $amp_custom_content_enable ) {
26
  $amp_component_scripts = $template->data['amp_component_scripts'];
27
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) {
28
- if ( $ampforwp_service == 'amp-sidebar') {
29
  continue;
30
  } ?>
31
  <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo $ampforwp_js_file; ?>" async></script> <?php
25
  if ( ! $amp_custom_content_enable ) {
26
  $amp_component_scripts = $template->data['amp_component_scripts'];
27
  foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) {
28
+ if ( $ampforwp_service == 'amp-sidebar' || $ampforwp_service == 'amp-analytics') {
29
  continue;
30
  } ?>
31
  <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo $ampforwp_js_file; ?>" async></script> <?php
templates/design-manager/design-3/style.php CHANGED
@@ -7,7 +7,10 @@ function ampforwp_additional_style_input_2( $amp_template ) {
7
  $colorscheme = $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color'];
8
  $headercolor = $redux_builder_amp['amp-opt-color-rgba-headercolor']['color'];
9
  $font_color = $redux_builder_amp['amp-opt-color-rgba-font']['color'];
 
10
  $headerelements = $redux_builder_amp['amp-opt-color-rgba-headerelements']['color'];
 
 
11
  $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
12
  // Get template colors
13
  $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
@@ -72,10 +75,20 @@ amp-accordion>section[expanded] li a:before{ content: "\25b8"; left: -7px; top:
72
  .sticky_social .whatsapp-share-icon{ padding: 4px 0px 14px 0px; height: 28px; top: -4px; position: relative; }
73
  .sticky_social .line-share-icon{ padding: 4px 0px 14px 0px; height: 28px; top: -4px; position: relative; }
74
  /* Header */
 
 
75
  #header{ background: #fff; text-align: center; height:50px; box-shadow:0 0 32px rgba(0,0,0,.15); }
76
  header{ padding-bottom:50px; }
77
  #headerwrap{ position: fixed; z-index:1000; width: 100%; top:0; }
 
 
 
 
 
 
 
78
  #header h1{ text-align: center; font-size: 16px; position: relative; font-weight: bold; line-height: 53px; padding: 0; margin: 0; text-transform: uppercase }
 
79
  main .amp-wp-content{ font-size: 18px; line-height: 29px; color:#111 }
80
  .single-post main .amp-wp-article-content h1{ font-size:2em}
81
  .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6{ font-family: 'Roboto Slab', serif; margin: 0px 0px 5px 0px; line-height: 1.6; }
@@ -317,6 +330,8 @@ main .amp-wp-content{ direction: rtl; }
317
  /* Style Modifer */
318
  <?php $color = $redux_builder_amp['opt-color-rgba']['color']; ?>
319
  a { color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?> }
 
 
320
  .amp-wp-content blockquote { border-color: <?php echo sanitize_hex_color( $header_background_color ); ?>; }
321
  amp-user-notification { border-color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?>;}
322
  amp-user-notification button { background-color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?>;}
7
  $colorscheme = $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color'];
8
  $headercolor = $redux_builder_amp['amp-opt-color-rgba-headercolor']['color'];
9
  $font_color = $redux_builder_amp['amp-opt-color-rgba-font']['color'];
10
+ $link_color = $redux_builder_amp['amp-opt-color-rgba-link']['color'];
11
  $headerelements = $redux_builder_amp['amp-opt-color-rgba-headerelements']['color'];
12
+ $sticky_head = $redux_builder_amp['amp-opt-sticky-head'];
13
+
14
  $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
15
  // Get template colors
16
  $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
75
  .sticky_social .whatsapp-share-icon{ padding: 4px 0px 14px 0px; height: 28px; top: -4px; position: relative; }
76
  .sticky_social .line-share-icon{ padding: 4px 0px 14px 0px; height: 28px; top: -4px; position: relative; }
77
  /* Header */
78
+ /*Sticky Head For Design 3*/
79
+
80
  #header{ background: #fff; text-align: center; height:50px; box-shadow:0 0 32px rgba(0,0,0,.15); }
81
  header{ padding-bottom:50px; }
82
  #headerwrap{ position: fixed; z-index:1000; width: 100%; top:0; }
83
+
84
+
85
+ <?php if($sticky_head) { ?>
86
+ header{ padding-bottom:0px; }
87
+ #headerwrap{ position: relative;}
88
+ <?php } ?>
89
+
90
  #header h1{ text-align: center; font-size: 16px; position: relative; font-weight: bold; line-height: 53px; padding: 0; margin: 0; text-transform: uppercase }
91
+
92
  main .amp-wp-content{ font-size: 18px; line-height: 29px; color:#111 }
93
  .single-post main .amp-wp-article-content h1{ font-size:2em}
94
  .single-post main .amp-wp-article-content h1, .single-post main .amp-wp-article-content h2, .single-post main .amp-wp-article-content h3, .single-post main .amp-wp-article-content h4, .single-post main .amp-wp-article-content h5, .single-post main .amp-wp-article-content h6{ font-family: 'Roboto Slab', serif; margin: 0px 0px 5px 0px; line-height: 1.6; }
330
  /* Style Modifer */
331
  <?php $color = $redux_builder_amp['opt-color-rgba']['color']; ?>
332
  a { color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?> }
333
+ body a { color: <?php echo $redux_builder_amp['amp-opt-color-rgba-link']['color']; ?> }
334
+
335
  .amp-wp-content blockquote { border-color: <?php echo sanitize_hex_color( $header_background_color ); ?>; }
336
  amp-user-notification { border-color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?>;}
337
  amp-user-notification button { background-color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?>;}
templates/features.php CHANGED
@@ -75,6 +75,7 @@
75
  63. Frontpage Comments #682
76
  64. PageBuilder
77
  65. Remove Filters code added through Class by other plugins
 
78
  */
79
  // Adding AMP-related things to the main theme
80
  global $redux_builder_amp;
@@ -361,16 +362,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
361
  <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
362
  <?php }
363
  }
364
- } ?>
365
- <?php if($redux_builder_amp['amp-frontpage-select-option'] == 1) { ?>
366
- <?php if( $redux_builder_amp['enable-single-social-icons'] == true || AMPFORWP_DM_SOCIAL_CHECK === 'true' ) {
367
- if( is_home() ) {
368
- if( is_socialshare_or_socialsticky_enabled_in_ampforwp() ) { ?>
369
- <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
370
- <?php }
371
- }
372
- }
373
- }
374
  // Check if any of the ads are enabled then only load ads script
375
  // moved this code to its own function and done the AMP way
376
  }
@@ -781,9 +773,56 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
781
  </div>
782
  <!--END StatCounter CODE -->
783
  <?php }
784
-
785
-
786
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
787
  }//analytics function ends here
788
 
789
  // 11. Strip unwanted codes and tags from the_content
@@ -820,7 +859,8 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
820
  /* Removed So Inline style can work
821
  $content = preg_replace('/(<[^>]+) style=".*?"/', '$1', $content);
822
  */
823
- $content = preg_replace('/(<[^>]+) rel=".*?"/', '$1', $content);
 
824
  $content = preg_replace('/(<[^>]+) ref=".*?"/', '$1', $content);
825
  $content = preg_replace('/(<[^>]+) date=".*?"/', '$1', $content);
826
  $content = preg_replace('/(<[^>]+) time=".*?"/', '$1', $content);
@@ -831,7 +871,7 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
831
 
832
  //removing scripts and rel="nofollow" from Body and from divs
833
  //issue #268
834
- $content = str_replace(' rel="nofollow"',"",$content);
835
  $content = preg_replace('/<script[^>]*>.*?<\/script>/i', '', $content);
836
  /// simpy add more elements to simply strip tag but not the content as so
837
  /// Array ("p","font");
@@ -851,6 +891,8 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
851
  $content = preg_replace('/xml:lang=[^>]*/', '', $content);
852
 
853
  // $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
 
 
854
  return $content;
855
  }
856
 
@@ -885,7 +927,10 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
885
  global $redux_builder_amp;
886
  $structured_data_logo = '';
887
  $structured_data_main_logo = '';
888
-
 
 
 
889
  if (! empty( $redux_builder_amp['opt-media']['url'] ) ) {
890
  $structured_data_main_logo = $redux_builder_amp['opt-media']['url'];
891
  }
@@ -900,8 +945,8 @@ define('AMPFORWP_COMMENTS_PER_PAGE', $redux_builder_amp['ampforwp-number-of-comm
900
  $metadata['publisher']['logo'] = array(
901
  '@type' => 'ImageObject',
902
  'url' => $structured_data_logo ,
903
- 'height' => 36,
904
- 'width' => 190,
905
  );
906
 
907
  //code for adding 'description' meta from Yoast SEO
@@ -1209,6 +1254,7 @@ function ampforwp_remove_schema_data() {
1209
  // Ultimate Social Media PLUS Compatiblity Added
1210
  remove_filter('the_content','sfsi_plus_beforaftereposts');
1211
  remove_filter('the_content','sfsi_plus_beforeafterblogposts');
 
1212
 
1213
  // Thrive Content Builder
1214
  $amp_custom_content_enable = get_post_meta( get_the_ID() , 'ampforwp_custom_content_editor_checkbox', true);
@@ -1223,6 +1269,11 @@ function ampforwp_remove_schema_data() {
1223
  remove_filter('the_content', 'fb_like_button');
1224
  remove_filter('the_excerpt', 'fb_like_button');
1225
 
 
 
 
 
 
1226
  // Remove Popups and other elements added by Slider-in Plugin
1227
  define('WDSI_BOX_RENDERED', true, true);
1228
 
@@ -1230,6 +1281,11 @@ function ampforwp_remove_schema_data() {
1230
  if ( function_exists('ampforwp_remove_filters_for_class')) {
1231
  //Remove Disallowed 'like' tag from facebook Like button by Ultimate Facebook
1232
  ampforwp_remove_filters_for_class( 'the_content', 'Wdfb_UniversalWorker', 'inject_facebook_button', 10 );
 
 
 
 
 
1233
  }
1234
  }
1235
 
@@ -1337,12 +1393,14 @@ function ampforwp_custom_yoast_meta_homepage(){
1337
  if ($redux_builder_amp['ampforwp-seo-yoast-meta']) {
1338
  if(! class_exists('YoastSEO_AMP') ) {
1339
  if ( class_exists('WPSEO_Options')) {
1340
- $options = WPSEO_Options::get_option( 'wpseo_social' );
1341
- if ( $options['twitter'] === true ) {
1342
- WPSEO_Twitter::get_instance();
1343
- }
1344
- if ( $options['opengraph'] === true ) {
1345
- $GLOBALS['wpseo_og'] = new WPSEO_OpenGraph;
 
 
1346
  }
1347
  }
1348
  do_action( 'wpseo_opengraph' );
@@ -2831,4 +2889,21 @@ function ampforwp_remove_filters_for_class( $hook_name = '', $class_name ='', $m
2831
  }
2832
  }
2833
  return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2834
  }
75
  63. Frontpage Comments #682
76
  64. PageBuilder
77
  65. Remove Filters code added through Class by other plugins
78
+ 66. Make AMP compatible with Squirrly SEO
79
  */
80
  // Adding AMP-related things to the main theme
81
  global $redux_builder_amp;
362
  <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
363
  <?php }
364
  }
365
+ }
 
 
 
 
 
 
 
 
 
366
  // Check if any of the ads are enabled then only load ads script
367
  // moved this code to its own function and done the AMP way
368
  }
773
  </div>
774
  <!--END StatCounter CODE -->
775
  <?php }
776
+ // 10.8 Analytics Support added for Histats Analytics
777
+ if( $redux_builder_amp['amp-analytics-select-option']=='8' ) { ?>
778
+ <!-- BEGIN Histats CODE -->
779
+ <div id="histats">
780
+ <amp-pixel src="//sstatic1.histats.com/0.gif?<?php global $redux_builder_amp; echo $redux_builder_amp['histats-feild']; ?>&101" >
781
+ </amp-pixel>
782
+ </div>
783
+ <!--END Histats CODE -->
784
+ <?php }
785
+ // 10.9 Analytics Support added for Yandex Metrika Analytics
786
+ global $redux_builder_amp;
787
+ if ( $redux_builder_amp['amp-analytics-select-option']=='9' ){ ?>
788
+ <amp-analytics type="metrika">
789
+ <script type="application/json">
790
+ {
791
+ "vars": {
792
+ "counterId": "<?php global $redux_builder_amp; echo $redux_builder_amp['amp-Yandex-Metrika-analytics-code']; ?>"
793
+ },
794
+ "triggers": {
795
+ "notBounce": {
796
+ "on": "timer",
797
+ "timerSpec": {
798
+ "immediate": false,
799
+ "interval": 15,
800
+ "maxTimerLength": 16
801
+ },
802
+ "request": "notBounce"
803
+ }
804
+ }
805
+ }
806
+ </script>
807
+ </amp-analytics>
808
+ <?php }//code ends for supporting Yandex Metrika Analytics
809
+ // 10.10 Analytics Support added for Chartbeat Analytics
810
+ global $redux_builder_amp;
811
+ if ( $redux_builder_amp['amp-analytics-select-option']=='10' ){ ?>
812
+ <amp-analytics type="chartbeat">
813
+ <script type="application/json">
814
+ {
815
+ 'vars': {
816
+ 'accountId':"<?php global $redux_builder_amp; echo $redux_builder_amp['amp-Chartbeat-analytics-code']; ?>",
817
+ 'title': "<?php the_title(); ?>",
818
+ 'authors': "<?php the_author_meta('display_name');?>",
819
+ 'dashboardDomain': "<?php echo site_url();?>"
820
+ }
821
+ }
822
+ </script>
823
+ </amp-analytics>
824
+ <?php
825
+ }//code ends for supporting Chartbeat Analytics
826
  }//analytics function ends here
827
 
828
  // 11. Strip unwanted codes and tags from the_content
859
  /* Removed So Inline style can work
860
  $content = preg_replace('/(<[^>]+) style=".*?"/', '$1', $content);
861
  */
862
+ //$content = preg_replace('/(<[^>]+) rel=".*?"/', '$1', $content);
863
+ $content = preg_replace('/<div(.*?) rel=".*?"(.*?)/', '<div $1', $content);
864
  $content = preg_replace('/(<[^>]+) ref=".*?"/', '$1', $content);
865
  $content = preg_replace('/(<[^>]+) date=".*?"/', '$1', $content);
866
  $content = preg_replace('/(<[^>]+) time=".*?"/', '$1', $content);
871
 
872
  //removing scripts and rel="nofollow" from Body and from divs
873
  //issue #268
874
+ //$content = str_replace(' rel="nofollow"',"",$content);
875
  $content = preg_replace('/<script[^>]*>.*?<\/script>/i', '', $content);
876
  /// simpy add more elements to simply strip tag but not the content as so
877
  /// Array ("p","font");
891
  $content = preg_replace('/xml:lang=[^>]*/', '', $content);
892
 
893
  // $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
894
+ // Removing the type attribute from the <ul>
895
+ $content = preg_replace('/<ul(.*?)type=".*?"(.*?)/','<ul $1',$content);
896
  return $content;
897
  }
898
 
927
  global $redux_builder_amp;
928
  $structured_data_logo = '';
929
  $structured_data_main_logo = '';
930
+ $ampforwp_sd_height = '';
931
+ $ampforwp_sd_width = '';
932
+ $ampforwp_sd_height = $redux_builder_amp['ampforwp-sd-logo-height'];
933
+ $ampforwp_sd_width = $redux_builder_amp['ampforwp-sd-logo-width'];
934
  if (! empty( $redux_builder_amp['opt-media']['url'] ) ) {
935
  $structured_data_main_logo = $redux_builder_amp['opt-media']['url'];
936
  }
945
  $metadata['publisher']['logo'] = array(
946
  '@type' => 'ImageObject',
947
  'url' => $structured_data_logo ,
948
+ 'height' => $ampforwp_sd_height,
949
+ 'width' => $ampforwp_sd_width,
950
  );
951
 
952
  //code for adding 'description' meta from Yoast SEO
1254
  // Ultimate Social Media PLUS Compatiblity Added
1255
  remove_filter('the_content','sfsi_plus_beforaftereposts');
1256
  remove_filter('the_content','sfsi_plus_beforeafterblogposts');
1257
+
1258
 
1259
  // Thrive Content Builder
1260
  $amp_custom_content_enable = get_post_meta( get_the_ID() , 'ampforwp_custom_content_editor_checkbox', true);
1269
  remove_filter('the_content', 'fb_like_button');
1270
  remove_filter('the_excerpt', 'fb_like_button');
1271
 
1272
+ // Compatibility issue with the rocket lazy load #907
1273
+ remove_filter( 'the_content' , 'rocket_lazyload_images', PHP_INT_MAX );
1274
+ remove_filter( 'the_content', 'rocket_lazyload_iframes', PHP_INT_MAX );
1275
+ add_filter( 'do_rocket_lazyload', '__return_false' );
1276
+
1277
  // Remove Popups and other elements added by Slider-in Plugin
1278
  define('WDSI_BOX_RENDERED', true, true);
1279
 
1281
  if ( function_exists('ampforwp_remove_filters_for_class')) {
1282
  //Remove Disallowed 'like' tag from facebook Like button by Ultimate Facebook
1283
  ampforwp_remove_filters_for_class( 'the_content', 'Wdfb_UniversalWorker', 'inject_facebook_button', 10 );
1284
+ //Compatibility with Sassy Social Share Plugin
1285
+ ampforwp_remove_filters_for_class( 'the_content', 'Sassy_Social_Share_Public', 'render_sharing', 10 );
1286
+ ampforwp_remove_filters_for_class( 'amp_post_template_head', 'Sassy_Social_Share_Public', 'frontend_scripts', 10 );
1287
+ ampforwp_remove_filters_for_class( 'amp_post_template_css', 'Sassy_Social_Share_Public', 'frontend_inline_style', 10 );
1288
+ ampforwp_remove_filters_for_class( 'amp_post_template_css', 'Sassy_Social_Share_Public', 'frontend_amp_css', 10 );
1289
  }
1290
  }
1291
 
1393
  if ($redux_builder_amp['ampforwp-seo-yoast-meta']) {
1394
  if(! class_exists('YoastSEO_AMP') ) {
1395
  if ( class_exists('WPSEO_Options')) {
1396
+ if( method_exists('WPSEO_Options', 'get_option')){
1397
+ $options = WPSEO_Options::get_option( 'wpseo_social' );
1398
+ if ( $options['twitter'] === true ) {
1399
+ WPSEO_Twitter::get_instance();
1400
+ }
1401
+ if ( $options['opengraph'] === true ) {
1402
+ $GLOBALS['wpseo_og'] = new WPSEO_OpenGraph;
1403
+ }
1404
  }
1405
  }
1406
  do_action( 'wpseo_opengraph' );
2889
  }
2890
  }
2891
  return false;
2892
+ }
2893
+
2894
+
2895
+ // 66. Make AMP compatible with Squirrly SEO
2896
+ add_action('pre_amp_render_post','ampforwp_remove_sq_seo');
2897
+ function ampforwp_remove_sq_seo() {
2898
+ $ampforwp_sq_google_analytics = '';
2899
+ $ampforwp_sq_amp_analytics = '';
2900
+
2901
+ if ( class_exists( 'SQ_Tools' ) ) {
2902
+ $ampforwp_sq_google_analytics = SQ_Tools::$options['sq_google_analytics'];
2903
+ $ampforwp_sq_amp_analytics = SQ_Tools::$options['sq_auto_amp'];
2904
+ }
2905
+
2906
+ if ( $ampforwp_sq_google_analytics && $ampforwp_sq_amp_analytics ) {
2907
+ remove_action('amp_post_template_head','ampforwp_register_analytics_script', 20);
2908
+ }
2909
  }
templates/search-functions.php CHANGED
@@ -71,9 +71,12 @@ function ampforwp_the_search_form() {
71
  function ampforwp_get_search_form() {
72
  if ( is_search_enabled_in_ampforwp() ) {
73
  global $redux_builder_amp;
 
74
  $label = ampforwp_translation($redux_builder_amp['ampforwp-search-label'], 'Type your search query and hit enter');
 
 
75
  $placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
76
- $form = '<form role="search" method="get" id="searchform" class="searchform" target="_top" action="' . get_bloginfo('url') .'">
77
  <div>
78
  <label class="screen-reader-text" for="s">' . $label . '</label>
79
  <input type="text" placeholder="AMP" value="1" name="amp" class="hide" id="ampsomething" />
71
  function ampforwp_get_search_form() {
72
  if ( is_search_enabled_in_ampforwp() ) {
73
  global $redux_builder_amp;
74
+ $action_url = '';
75
  $label = ampforwp_translation($redux_builder_amp['ampforwp-search-label'], 'Type your search query and hit enter');
76
+ $action_url = esc_url( get_bloginfo('url') );
77
+ $action_url = preg_replace('#^http?:#', '', $action_url);
78
  $placeholder = ampforwp_translation($redux_builder_amp['ampforwp-search-placeholder'], 'Type Here' );
79
+ $form = '<form role="search" method="get" id="searchform" class="searchform" target="_top" action="' . $action_url .'">
80
  <div>
81
  <label class="screen-reader-text" for="s">' . $label . '</label>
82
  <input type="text" placeholder="AMP" value="1" name="amp" class="hide" id="ampsomething" />