AMP for WP – Accelerated Mobile Pages - Version 0.9.38

Version Description

  • View full details at https://ampforwp.com/google-tag-manager-for-amp/
  • Google Tag manager included [New feature]
  • Iframe max-width added [Improvement]
  • Paginated pages have different titles now. [Bug fix]
Download this release

Release Info

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

Code changes from version 0.9.37.5 to 0.9.38

README.md CHANGED
@@ -3,15 +3,15 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
- Tested up to: 4.7
7
- Stable tag: 0.9.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site.
12
 
13
  == Description ==
14
- Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. AMP makes your website faster for Mobile visitors.
15
 
16
  [What's New in this Version?](http://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://demo.ampforwp.com/amp/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
 
@@ -29,13 +29,15 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
29
 
30
  = Features: =
31
 
 
 
32
  * NEW - Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
33
  * NEW - Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
34
  * NEW - Custom Post Type Support
35
  * NEW - Star Ratings
36
  * Drag & Drop Page builder Added
37
  * 2 Designs Added
38
- * Yoast SEO support on AMP pages
39
  * AMP WooCommerce Support
40
  * Switch on/off Support for Pages on AMP
41
  * Translation Panel & RTL
@@ -122,6 +124,59 @@ You can contact me using this url: http://ampforwp.com/contact/
122
 
123
  == Changelog ==
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  = 0.9.34 =
126
  * Newspaper theme by Tagdiv was having issues, we have fixed this one.
127
 
3
  Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, google, plugin
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
+ Tested up to: 4.7.2
7
+ Stable tag: 0.9.38
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ AMP for WP is the most recommended AMP plugin by the community. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site.
12
 
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?](http://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://demo.ampforwp.com/amp/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
 
29
 
30
  = Features: =
31
 
32
+ * NEW - Google Tag Manager Support
33
+ * NEW - Page, Category & Tags Support Added
34
  * NEW - Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
35
  * NEW - Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
36
  * NEW - Custom Post Type Support
37
  * NEW - Star Ratings
38
  * Drag & Drop Page builder Added
39
  * 2 Designs Added
40
+ * Yoast SEO support on AMP pages and other SEO plugins
41
  * AMP WooCommerce Support
42
  * Switch on/off Support for Pages on AMP
43
  * Translation Panel & RTL
124
 
125
  == Changelog ==
126
 
127
+ = 0.9.37 =
128
+ * View full details at https://ampforwp.com/category-tags-archive-support-added/
129
+ * Google Tag manager included [New feature]
130
+ * Iframe max-width added [Improvement]
131
+ * Paginated pages have different titles now. [Bug fix]
132
+
133
+ = 0.9.37 =
134
+ * View full details at https://ampforwp.com/category-tags-archive-support-added/
135
+ * Debug issues solved [Bug fix]
136
+ * Remove Extra styling added by other Themes/ Plugins [3rd party themes and plugin Support]
137
+ * Category, Tags & Archive Support with titles added [Enchancement]
138
+ * Archive Title support added [Enchancement]
139
+ * There were some issues with attachments [Bug fix]
140
+ * removed ? from amp url's [Improvement]
141
+ * Mobile redirection for Archives added and 404 redirections removed for archives [Improvement]
142
+ * View non-amp version now properly redirects to the normal version. #415 [Bug fix]
143
+ * Added an option to turn off AMP support for Homepage. [Enchancement]
144
+ * Too many redirects issue on homepage is fixed #435 [Improvement]
145
+ * Spell check and G tags are removed for thrive & Spell check compatibility [Better Validation]
146
+ * If image is not available in gravatar fixed, it was throwing an error #365 #327 [Improvement]
147
+ * Comment anchor link changed for simplecomment button files in both designs [Improvement]
148
+ * Redirection Loop issue fixed [Bug fix]
149
+ * Shortcodes were visible in excerpt, it's fixed now. [Improvement]
150
+ * Defer onload by other plugins was causing issues #431 [Better Validation & 3rd party support]
151
+ * Improved Sessions [Improvement]
152
+ * Advnaced Settings panel was created for better user experience. [Improvement]
153
+ * Spell check tag was causing validation issues. [Better Validation & 3rd party support]
154
+ * RTL issue fixed #454 [Bug fixed]
155
+
156
+ = 0.9.36 =
157
+ * Full details at https://ampforwp.com/0-9-36-released-stability-update-43rd-update/
158
+ * Redux Core Update. Better compatibility with the Salient theme and Themeforest themes & plugins using redux framework in their core, which makes the plugin much stable. [Huge Improvements]
159
+ * Hide advertisement section if advance ads plugin is active. [Better User experience]
160
+ * Ultimate Social Media PLUS Plugin Compatibility (Link) [3rd Party plugin Compatibility & Better Validation]
161
+ * Launch Post Builder button added. One of the important feature called ‘Post Builder’, that is drag and drop post builder was somewhere hidden in the customizer, so positioned it for better visibility from users. [Better UX]
162
+
163
+ = 0.9.35 =
164
+ * Full details at https://ampforwp.com/page-builder-realtime-preview-3rd-party-plugins-compatibility/
165
+ * Customizer page builder (Design Manager) was not showing real-time preview, we have fixed this issue properly [Bug fix]
166
+ * Attachment page was having the wrong endpoint. [Bug fix]
167
+ * Fb:like div has href, showfaces, send and action tag, which was against validation [Validation Improvement]
168
+ * A plugin (Spam Protection by CleanTalk, no Captcha Anti-Spam) was forcefully adding script into the AMP version. [3rd party Compatibility]
169
+ * Lang attributes were added [Enhancement]
170
+ * The tag like was disallowed in the AMP [Validation Improvement]
171
+ * We did some more testing with Visual Composer & AMP [3rd party Compatibility]
172
+ * AMP on Pages option was not working in some cases. [Bug fix]
173
+ * Disable comment button when comments were disabled. This was fixed by @lofesa and was sent as a pull request. Thank you Lofesa!
174
+ * g:plusone tag was not getting removed properly. [Validation Improvement]
175
+ * Thrive headline optimizer was having issues in AMP version. [Validation Improvement]
176
+ * Structured Data Image width issue solved [Enhancement]
177
+ * BJ Lazy Load was having issues, we have added a fix which will make this plugin compatible with the AMP. [3rd party Compatibility & Validation Improvement]
178
+ * imageanchor=”1″ was getting added by some 3rd party plugin, this was fixed.[Validation Improvement]
179
+
180
  = 0.9.34 =
181
  * Newspaper theme by Tagdiv was having issues, we have fixed this one.
182
 
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.37.5
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
@@ -25,7 +25,7 @@ add_action( 'init', 'ampforwp_add_custom_post_support',11);
25
 
26
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
27
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
28
- define('AMPFORWP_VERSION','0.9.37.5');
29
 
30
  // Redux panel inclusion code
31
  if ( !class_exists( 'ReduxFramework' ) ) {
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.38
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
25
 
26
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
27
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
28
+ define('AMPFORWP_VERSION','0.9.38');
29
 
30
  // Redux panel inclusion code
31
  if ( !class_exists( 'ReduxFramework' ) ) {
includes/options/admin-config.php CHANGED
@@ -139,7 +139,7 @@ Redux::setArgs( "redux_builder_amp", $args );
139
  'id' => 'opt-text-subsection',
140
  'subsection' => true,
141
  'fields' => array(
142
-
143
  array(
144
  'id' => 'opt-media',
145
  'type' => 'media',
@@ -149,44 +149,7 @@ Redux::setArgs( "redux_builder_amp", $args );
149
  'desc' => __('Recommend logo size is: 190x36', 'redux-framework-demo')
150
  ),
151
 
152
- array(
153
- 'id' => 'amp-analytics-select-option',
154
- 'type' => 'select',
155
- 'title' => __( 'Analytics Type', 'redux-framework-demo' ),
156
- 'subtitle' => __( 'Select your Analytics provider.', 'redux-framework-demo' ),
157
- 'options' => array(
158
- '1' => __('Google Analytics', 'redux-framework-demo' ),
159
- '2' => __('Segment Analytics', 'redux-framework-demo' ),
160
- '3' => __('Piwik Analytics', 'redux-framework-demo' )
161
- ),
162
- 'default' => '1',
163
- ),
164
- array(
165
- 'id' => 'ga-feild',
166
- 'type' => 'text',
167
- 'title' => __( 'Google Analytics', 'redux-framework-demo' ),
168
- 'required' => array('amp-analytics-select-option', '=' , '1'),
169
- 'subtitle' => __( 'Enter your Google Analytics ID.', 'redux-framework-demo' ),
170
- 'desc' => __('Example: UA-XXXXX-Y', 'redux-framework-demo' ),
171
- 'default' => 'UA-XXXXX-Y',
172
- ),
173
- array(
174
- 'id' => 'sa-feild',
175
- 'type' => 'text',
176
- 'title' => __( 'Segment Analytics', 'redux-framework-demo' ),
177
- 'subtitle' => __( 'Enter your Segment Analytics Key.', 'redux-framework-demo' ),
178
- 'required' => array('amp-analytics-select-option', '=' , '2'),
179
- 'default' => 'SEGMENT-WRITE-KEY',
180
- ),
181
- array(
182
- 'id' => 'pa-feild',
183
- 'type' => 'text',
184
- 'title' => __( 'Piwik Analytics', 'redux-framework-demo' ),
185
- 'required' =>array('amp-analytics-select-option', '=' , '3'),
186
- 'desc' => __( 'Example: https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM', 'redux-framework-demo' ),
187
- 'subtitle' => __('Enter your Piwik Analytics URL.', 'redux-framework-demo' ),
188
- 'default' => '#',
189
- ),
190
  array(
191
  'id' =>'amp-frontpage-select-option',
192
  'type' => 'switch',
@@ -218,6 +181,21 @@ Redux::setArgs( "redux_builder_amp", $args );
218
  'default' => 0,
219
  'required' => array('amp-frontpage-select-option', '=' , '1'),
220
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
 
222
  // array(
223
  // 'id' => 'amp-footer-text',
@@ -228,15 +206,7 @@ Redux::setArgs( "redux_builder_amp", $args );
228
  // 'default' => 'Copyright © 2016',
229
  // ),
230
 
231
- array(
232
- 'id' => 'amp-footer-link-non-amp-page',
233
- 'type' => 'switch',
234
- 'title' => __('Link to Non-AMP page in Footer', 'redux-framework-demo'),
235
- 'subtitle' => __('Enable / Disable Link to Non-AMP page in the footer', 'redux-framework-demo'),
236
- 'true' => 'true',
237
- 'false' => 'false',
238
- 'default' => 1
239
- ),
240
 
241
  // array(
242
  // 'id' => 'amp-navigation-text',
@@ -247,15 +217,6 @@ Redux::setArgs( "redux_builder_amp", $args );
247
  // 'default' => 'Navigate'
248
  // ),
249
 
250
- array(
251
- 'id' =>'amp-on-off-for-all-pages',
252
- 'type' => 'switch',
253
- 'title' => __('AMP on Pages', 'redux-framework-demo'),
254
- 'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
255
- 'default' => 1,
256
- 'desc' => __( 'Re-Save permalink if you make changes in this option', 'redux-framework-demo' ),
257
- ),
258
-
259
  // array(
260
  // 'id' => 'amp-ad-places',
261
  // 'type' => 'select',
@@ -272,6 +233,107 @@ Redux::setArgs( "redux_builder_amp", $args );
272
  )
273
  ) );//END
274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  // AMP Design SECTION
276
  Redux::setSection( $opt_name, array(
277
  'title' => __( 'Design', 'redux-framework-demo' ),
@@ -925,58 +987,59 @@ Redux::setArgs( "redux_builder_amp", $args );
925
  //
926
 
927
 
928
- // Advance Settings SECTION
929
- Redux::setSection( $opt_name, array(
930
- 'title' => __( 'Advanced', 'redux-framework-demo' ),
931
- 'desc' => __( 'This section has Advance settings'),
932
- 'id' => 'amp-advance',
933
- 'subsection' => true,
934
- 'fields' => array(
935
-
936
- array(
937
- 'id' => 'ampforwp-homepage-on-off-support',
938
- 'type' => 'switch',
939
- 'title' => __('Homepage Support', 'redux-framework-demo'),
940
- 'subtitle' => __('Enable/Disable Home page using this switch.', 'redux-framework-demo'),
941
- 'default' => '1'
942
- ),
943
- array(
944
- 'id' => 'ampforwp-archive-support',
945
- 'type' => 'switch',
946
- 'title' => __('Archive page Support', 'redux-framework-demo'),
947
- 'subtitle' => __('Enable/Disable Archive pages using this switch.', 'redux-framework-demo'),
948
- 'default' => '0'
949
- ),
 
 
 
 
 
 
950
 
951
- array(
952
- 'id' => 'amp-mobile-redirection',
953
- 'type' => 'switch',
954
- 'title' => __('Mobile Redirection', 'redux-framework-demo'),
955
- 'subtitle' => __('
956
- Enable AMP for your mobile users. Give your visitors a Faster mobile User Experience.','ampforwp'),
957
- 'default' => 0,
958
 
959
- ),
960
- array(
961
- 'id' =>'amp-on-off-support-for-non-amp-home-page',
962
- 'type' => 'switch',
963
- 'title' => __('Non-AMP HomePage link in Header and Logo', 'redux-framework-demo'),
964
- 'subtitle' => __('If you want users in header to go to non-AMP website from the Header, then you can enable this option', 'redux-framework-demo'),
965
- 'default' => 0,
966
- ),
967
- array(
968
- 'id' =>'amp-rtl-select-option',
969
- 'type' => 'switch',
970
- 'title' => __('RTL Support', 'redux-framework-demo'),
971
- 'default' => 0,
972
- 'subtitle' => __('Enable Right to Left language support', 'redux-framework-demo'),
973
- 'true' => 'true',
974
- 'false' => 'false',
975
- ),
 
976
 
977
- ),
978
 
979
- ) );
980
 
981
 
982
  // Extension Section
139
  'id' => 'opt-text-subsection',
140
  'subsection' => true,
141
  'fields' => array(
142
+
143
  array(
144
  'id' => 'opt-media',
145
  'type' => 'media',
149
  'desc' => __('Recommend logo size is: 190x36', 'redux-framework-demo')
150
  ),
151
 
152
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  array(
154
  'id' =>'amp-frontpage-select-option',
155
  'type' => 'switch',
181
  'default' => 0,
182
  'required' => array('amp-frontpage-select-option', '=' , '1'),
183
  ),
184
+ array(
185
+ 'id' =>'amp-on-off-for-all-pages',
186
+ 'type' => 'switch',
187
+ 'title' => __('AMP on Pages', 'redux-framework-demo'),
188
+ 'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
189
+ 'default' => 1,
190
+ 'desc' => __( 'Re-Save permalink if you make changes in this option', 'redux-framework-demo' ),
191
+ ),
192
+ array(
193
+ 'id' =>'amp-on-off-support-for-non-amp-home-page',
194
+ 'type' => 'switch',
195
+ 'title' => __('Non-AMP HomePage link in Header and Logo', 'redux-framework-demo'),
196
+ 'subtitle' => __('If you want users in header to go to non-AMP website from the Header, then you can enable this option', 'redux-framework-demo'),
197
+ 'default' => 0,
198
+ ),
199
 
200
  // array(
201
  // 'id' => 'amp-footer-text',
206
  // 'default' => 'Copyright © 2016',
207
  // ),
208
 
209
+
 
 
 
 
 
 
 
 
210
 
211
  // array(
212
  // 'id' => 'amp-navigation-text',
217
  // 'default' => 'Navigate'
218
  // ),
219
 
 
 
 
 
 
 
 
 
 
220
  // array(
221
  // 'id' => 'amp-ad-places',
222
  // 'type' => 'select',
233
  )
234
  ) );//END
235
 
236
+ // AMP GTM SECTION
237
+ Redux::setSection( $opt_name, array(
238
+ 'title' => __('Analytics'),
239
+ // 'icon' => 'el el-th-large',
240
+ 'desc' => 'You can either use Google Tag Manager or Other Analytics Providers',
241
+ 'subsection' => true,
242
+ 'fields' =>
243
+ array(
244
+
245
+
246
+ array(
247
+ 'id' => 'amp-analytics-select-option',
248
+ 'type' => 'select',
249
+ 'title' => __( 'Analytics Type', 'redux-framework-demo' ),
250
+ 'subtitle' => __( 'Select your Analytics provider.', 'redux-framework-demo' ),
251
+ 'options' => array(
252
+ '1' => __('Google Analytics', 'redux-framework-demo' ),
253
+ '2' => __('Segment Analytics', 'redux-framework-demo' ),
254
+ '3' => __('Piwik Analytics', 'redux-framework-demo' )
255
+ ),
256
+ 'required' => array(
257
+ array('amp-use-gtm-option', '=' , '0'),
258
+ ),
259
+ 'default' => '1',
260
+ ),
261
+ array(
262
+ 'id' => 'ga-feild',
263
+ 'type' => 'text',
264
+ 'title' => __( 'Google Analytics', 'redux-framework-demo' ),
265
+ 'required' => array(
266
+ array('amp-use-gtm-option', '=' , '0'),
267
+ array('amp-analytics-select-option', '=' , '1')
268
+ ),
269
+ 'subtitle' => __( 'Enter your Google Analytics ID.', 'redux-framework-demo' ),
270
+ 'desc' => __('Example: UA-XXXXX-Y', 'redux-framework-demo' ),
271
+ 'default' => 'UA-XXXXX-Y',
272
+ ),
273
+ array(
274
+ 'id' => 'sa-feild',
275
+ 'type' => 'text',
276
+ 'title' => __( 'Segment Analytics', 'redux-framework-demo' ),
277
+ 'subtitle' => __( 'Enter your Segment Analytics Key.', 'redux-framework-demo' ),
278
+ 'required' => array(
279
+ array('amp-use-gtm-option', '=' , '0'),
280
+ array('amp-analytics-select-option', '=' , '2')
281
+ ),
282
+ 'default' => 'SEGMENT-WRITE-KEY',
283
+ ),
284
+ array(
285
+ 'id' => 'pa-feild',
286
+ 'type' => 'text',
287
+ 'title' => __( 'Piwik Analytics', 'redux-framework-demo' ),
288
+ 'required' => array(
289
+ array('amp-use-gtm-option', '=' , '0'),
290
+ array('amp-analytics-select-option', '=' , '3')
291
+ ),
292
+ 'desc' => __( 'Example: https://piwik.example.org/piwik.php?idsite=YOUR_SITE_ID&rec=1&action_name=TITLE&urlref=DOCUMENT_REFERRER&url=CANONICAL_URL&rand=RANDOM', 'redux-framework-demo' ),
293
+ 'subtitle' => __('Enter your Piwik Analytics URL.', 'redux-framework-demo' ),
294
+ 'default' => '#',
295
+ ),
296
+
297
+ array(
298
+ 'id' => 'amp-use-gtm-option',
299
+ 'type' => 'switch',
300
+ 'title' => __( 'Use Google Tag Manager', 'redux-framework-demo' ),
301
+ 'subtitle' => __( 'Select your Analytics provider.', 'redux-framework-demo' ),
302
+ 'default' => 0,
303
+ ),
304
+ array(
305
+ 'id' =>'amp-gtm-id',
306
+ 'type' => 'text',
307
+ 'title' => __('Tag Manager ID'),
308
+ 'default' => '',
309
+ 'placeholder' => 'GTM-5XXXXXP',
310
+ 'required' => array(
311
+ array('amp-use-gtm-option', '=' , '1')
312
+ ),
313
+ ),
314
+ array(
315
+ 'id' =>'amp-gtm-analytics-type',
316
+ 'type' => 'text',
317
+ 'title' => __('Analytics Type'),
318
+ 'default' => '',
319
+ 'placeholder' => 'googleanalytics',
320
+ 'required' => array(
321
+ array('amp-use-gtm-option', '=' , '1')
322
+ ),
323
+ ),
324
+ array(
325
+ 'id' =>'amp-gtm-analytics-code',
326
+ 'type' => 'text',
327
+ 'title' => __('Analytics ID'),
328
+ 'default' => '',
329
+ 'placeholder' => 'UA-XXXXXX-Y',
330
+ 'required' => array(
331
+ array('amp-use-gtm-option', '=' , '1')),
332
+ ),
333
+ )
334
+ )
335
+ );
336
+
337
  // AMP Design SECTION
338
  Redux::setSection( $opt_name, array(
339
  'title' => __( 'Design', 'redux-framework-demo' ),
987
  //
988
 
989
 
990
+ // Advance Settings SECTION
991
+ Redux::setSection( $opt_name, array(
992
+ 'title' => __( 'Advance Settings', 'redux-framework-demo' ),
993
+ 'desc' => __( 'This section has Advance settings'),
994
+ 'id' => 'amp-advance',
995
+ 'subsection' => true,
996
+ 'fields' => array(
997
+ array(
998
+ 'id' => 'ampforwp-homepage-on-off-support',
999
+ 'type' => 'switch',
1000
+ 'title' => __('Homepage Support', 'redux-framework-demo'),
1001
+ 'subtitle' => __('Enable/Disable Home page using this switch.', 'redux-framework-demo'),
1002
+ 'default' => '1'
1003
+ ),
1004
+ array(
1005
+ 'id' => 'ampforwp-archive-support',
1006
+ 'type' => 'switch',
1007
+ 'title' => __('Archive page Support', 'redux-framework-demo'),
1008
+ 'subtitle' => __('Enable/Disable Archive pages using this switch.', 'redux-framework-demo'),
1009
+ 'default' => '0'
1010
+ ),
1011
+ array(
1012
+ 'id' => 'amp-mobile-redirection',
1013
+ 'type' => 'switch',
1014
+ 'title' => __('Mobile Redirection', 'redux-framework-demo'),
1015
+ 'subtitle' => __('
1016
+ Enable AMP for your mobile users. Give your visitors a Faster mobile User Experience.','ampforwp'),
1017
+ 'default' => 0,
1018
 
1019
+ ),
 
 
 
 
 
 
1020
 
1021
+ array(
1022
+ 'id' =>'amp-rtl-select-option',
1023
+ 'type' => 'switch',
1024
+ 'title' => __('RTL Support', 'redux-framework-demo'),
1025
+ 'default' => 0,
1026
+ 'subtitle' => __('Enable Right to Left language support', 'redux-framework-demo'),
1027
+ 'true' => 'true',
1028
+ 'false' => 'false',
1029
+ ),
1030
+ array(
1031
+ 'id' => 'amp-footer-link-non-amp-page',
1032
+ 'type' => 'switch',
1033
+ 'title' => __('Link to Non-AMP page in Footer', 'redux-framework-demo'),
1034
+ 'subtitle' => __('Enable / Disable Link to Non-AMP page in the footer', 'redux-framework-demo'),
1035
+ 'true' => 'true',
1036
+ 'false' => 'false',
1037
+ 'default' => 1
1038
+ ),
1039
 
1040
+ ),
1041
 
1042
+ ) );
1043
 
1044
 
1045
  // Extension Section
readme.txt CHANGED
@@ -4,14 +4,14 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7.2
7
- Stable tag: 0.9.37.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  AMP for WP is the most recommended AMP plugin by the community. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site.
12
 
13
  == Description ==
14
- Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. AMP makes your website faster for Mobile visitors.
15
 
16
  [What's New in this Version?](http://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://demo.ampforwp.com/amp/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
 
@@ -29,6 +29,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
29
 
30
  = Features: =
31
 
 
32
  * NEW - Page, Category & Tags Support Added
33
  * NEW - Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
34
  * NEW - Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
@@ -123,6 +124,12 @@ You can contact me using this url: http://ampforwp.com/contact/
123
 
124
  == Changelog ==
125
 
 
 
 
 
 
 
126
  = 0.9.37 =
127
  * View full details at https://ampforwp.com/category-tags-archive-support-added/
128
  * Debug issues solved [Bug fix]
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7.2
7
+ Stable tag: 0.9.38
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  AMP for WP is the most recommended AMP plugin by the community. Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site.
12
 
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?](http://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://demo.ampforwp.com/amp/) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
 
29
 
30
  = Features: =
31
 
32
+ * NEW - Google Tag Manager Support
33
  * NEW - Page, Category & Tags Support Added
34
  * NEW - Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
35
  * NEW - Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
124
 
125
  == Changelog ==
126
 
127
+ = 0.9.38 =
128
+ * View full details at https://ampforwp.com/google-tag-manager-for-amp/
129
+ * Google Tag manager included [New feature]
130
+ * Iframe max-width added [Improvement]
131
+ * Paginated pages have different titles now. [Bug fix]
132
+
133
  = 0.9.37 =
134
  * View full details at https://ampforwp.com/category-tags-archive-support-added/
135
  * Debug issues solved [Bug fix]
templates/design-manager/design-1/style.php CHANGED
@@ -39,6 +39,7 @@ function ampforwp_additional_style_input( $amp_template ) {
39
  /** Force the image into a box of fixed dimensions and use object-fit to scale. **/
40
  object-fit: contain;
41
  }
 
42
  /* Template Styles */
43
  .amp-wp-content,
44
  .amp-wp-title-bar div {
39
  /** Force the image into a box of fixed dimensions and use object-fit to scale. **/
40
  object-fit: contain;
41
  }
42
+ amp-iframe { max-width: 100%; margin-bottom : 20px; }
43
  /* Template Styles */
44
  .amp-wp-content,
45
  .amp-wp-title-bar div {
templates/design-manager/design-2/style.php CHANGED
@@ -32,6 +32,7 @@ a {
32
  .clearfix, .cb{
33
  clear: both
34
  }
 
35
 
36
  /* Template Styles */
37
  .amp-wp-content, .amp-wp-title-bar div {
32
  .clearfix, .cb{
33
  clear: both
34
  }
35
+ amp-iframe { max-width: 100%; margin-bottom : 20px; }
36
 
37
  /* Template Styles */
38
  .amp-wp-content, .amp-wp-title-bar div {
templates/features.php CHANGED
@@ -40,6 +40,7 @@
40
  30. TagDiv menu issue removed
41
  31. removing scripts added by cleantalk
42
  32. removing bj loading for amp
 
43
 
44
  */
45
  // Adding AMP-related things to the main theme
@@ -985,7 +986,15 @@ function ampforwp_remove_title_tags(){
985
  if ( $redux_builder_amp['amp-frontpage-select-option']== 1) {
986
  $ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
987
  $site_title = get_the_title( $ID ) . ' | ' . get_option('blogname');
988
- }
 
 
 
 
 
 
 
 
989
  echo $site_title ;
990
  } ?>
991
  </title>
@@ -1069,3 +1078,48 @@ function ampforwp_remove_bj_load() {
1069
  }
1070
  }
1071
  add_action( 'bjll/compat', 'ampforwp_remove_bj_load' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  30. TagDiv menu issue removed
41
  31. removing scripts added by cleantalk
42
  32. removing bj loading for amp
43
+ 33. Google tag manager support added
44
 
45
  */
46
  // Adding AMP-related things to the main theme
986
  if ( $redux_builder_amp['amp-frontpage-select-option']== 1) {
987
  $ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
988
  $site_title = get_the_title( $ID ) . ' | ' . get_option('blogname');
989
+ } else {
990
+ global $wp;
991
+ $current_archive_url = home_url( $wp->request );
992
+ $current_url_in_pieces = explode('/',$current_archive_url);
993
+ $cnt = count($current_url_in_pieces);
994
+ if( is_numeric( $current_url_in_pieces[ $cnt-1 ] ) ) {
995
+ $site_title .= ' | Page '.$current_url_in_pieces[$cnt-1];
996
+ }
997
+ }
998
  echo $site_title ;
999
  } ?>
1000
  </title>
1078
  }
1079
  }
1080
  add_action( 'bjll/compat', 'ampforwp_remove_bj_load' );
1081
+
1082
+ //33. Google tag manager support added
1083
+ // Remove any old scripts that have been loaded by other Plugins
1084
+ add_action('init', 'amp_gtm_remove_analytics_code');
1085
+ function amp_gtm_remove_analytics_code() {
1086
+ global $redux_builder_amp;
1087
+ if( $redux_builder_amp['amp-use-gtm-option'] ) {
1088
+ remove_action('amp_post_template_footer','ampforwp_analytics',11);
1089
+ remove_action('amp_post_template_head','ampforwp_register_analytics_script', 20);
1090
+ } else {
1091
+ remove_filter( 'amp_post_template_analytics', 'amp_gtm_add_gtm_support' );
1092
+
1093
+ }
1094
+ }
1095
+
1096
+ // Create GTM support
1097
+ add_filter( 'amp_post_template_analytics', 'amp_gtm_add_gtm_support' );
1098
+ function amp_gtm_add_gtm_support( $analytics ) {
1099
+ global $redux_builder_amp;
1100
+ if ( ! is_array( $analytics ) ) {
1101
+ $analytics = array();
1102
+ }
1103
+
1104
+ $analytics['amp-gtm-googleanalytics'] = array(
1105
+ 'type' => $redux_builder_amp['amp-gtm-analytics-type'],
1106
+ 'attributes' => array(
1107
+ 'data-credentials' => 'include',
1108
+ 'config' => 'https://www.googletagmanager.com/amp.json?id='. $redux_builder_amp['amp-gtm-id'] .'&gtm.url=SOURCE_URL'
1109
+ ),
1110
+ 'config_data' => array(
1111
+ 'vars' => array(
1112
+ 'account' => $redux_builder_amp['amp-gtm-analytics-code']
1113
+ ),
1114
+ 'triggers' => array(
1115
+ 'trackPageview' => array(
1116
+ 'on' => 'visible',
1117
+ 'request' => 'pageview',
1118
+ ),
1119
+ ),
1120
+ ),
1121
+ );
1122
+
1123
+ return $analytics;
1124
+ }
1125
+