AMP for WP – Accelerated Mobile Pages - Version 0.8.8.5

Version Description

Download this release

Release Info

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

Code changes from version 0.8.9 to 0.8.8.5

Files changed (43) hide show
  1. README.md +27 -50
  2. accelerated-moblie-pages.php +5 -7
  3. includes/includes.php +0 -1
  4. includes/options/admin-init.php +3 -5
  5. includes/options/options-init.php +288 -321
  6. readme.txt +27 -50
  7. templates/customizer/assets/customizer-control.css +0 -13
  8. templates/customizer/assets/customizer-control.js +0 -45
  9. templates/customizer/assets/customizer-preview.js +0 -84
  10. templates/customizer/customizer-controls.php +0 -96
  11. templates/customizer/customizer.php +0 -211
  12. templates/design-manager.php +0 -207
  13. templates/design-manager/design-1/elements/comments.php +0 -151
  14. templates/design-manager/design-1/elements/content.php +0 -7
  15. templates/design-manager/design-1/elements/featured-image.php +0 -18
  16. templates/design-manager/design-1/elements/meta-info.php +0 -26
  17. templates/design-manager/design-1/elements/meta-taxonomy.php +0 -16
  18. templates/design-manager/design-1/elements/related-posts.php +0 -69
  19. templates/design-manager/design-1/elements/social-icons.php +0 -28
  20. templates/design-manager/design-1/elements/title.php +0 -3
  21. templates/design-manager/design-1/footer.php +0 -10
  22. templates/design-manager/design-1/frontpage.php +0 -69
  23. templates/design-manager/design-1/header-bar.php +0 -39
  24. templates/design-manager/design-1/index.php +0 -69
  25. templates/design-manager/design-1/single.php +0 -30
  26. templates/design-manager/design-1/style.php +0 -775
  27. templates/design-manager/design-2/elements/comments.php +0 -150
  28. templates/design-manager/design-2/elements/content.php +0 -26
  29. templates/design-manager/design-2/elements/featured-image.php +0 -15
  30. templates/design-manager/design-2/elements/meta-taxonomy.php +0 -16
  31. templates/design-manager/design-2/elements/related-posts.php +0 -76
  32. templates/design-manager/design-2/elements/social-icons.php +0 -28
  33. templates/design-manager/design-2/elements/title.php +0 -3
  34. templates/design-manager/design-2/footer.php +0 -21
  35. templates/design-manager/design-2/single.php +0 -29
  36. templates/features.php +58 -144
  37. templates/{design-manager/design-2/frontpage.php → frontpage.php} +4 -5
  38. templates/{design-manager/design-2/header-bar.php → header.php} +7 -5
  39. templates/{design-manager/design-2/index.php → index.php} +10 -16
  40. templates/{design-manager/design-2/elements/meta-info.php → meta-author.php} +0 -19
  41. templates/meta-taxonomy.php +10 -0
  42. templates/single.php +227 -0
  43. templates/{design-manager/design-2/style.php → style.php} +18 -64
README.md CHANGED
@@ -7,7 +7,7 @@ Tags: AMP, accelerated mobile pages, mobile, amp project, google amp, amp wp, go
7
  Donate link: https://www.paypal.me/Kaludi/5
8
  Requires at least: 3.0
9
  Tested up to: 4.6.1
10
- Stable tag: 0.8.9
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -16,47 +16,42 @@ The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pag
16
  == Description ==
17
  Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. AMP WP is a plugin that needs to no configuration, just activate it and you are done.
18
 
19
- [What's New in this Version?](http://ampforwp.com/new/) | [Priority Support](http://ampforwp.com/priority-support/) | [View Demo](http://ampforwp.com/demo/?amp) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
20
 
21
  [youtube https://www.youtube.com/watch?v=zzRy6Q_VGGc]
22
 
23
  **Features:**
24
 
25
- * NEW - Drag & Drop Page builder Added
26
- * NEW - 2 Designs Added
27
- * NEW - 100% Yoast SEO support on AMP pages
28
- * NEW - AMP WooCommerce Support
29
- * NEW - Switch on/off Support for Pages on AMP
30
  * NEW - Translation Panel & RTL
31
  * NEW - Internal AMP linking - You can browse AMP pages internally
32
  * Related posts below the post
33
- * Recent Comments list
34
- * Automatically integrate AMP to your website.
35
- * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
36
- * 7 Advertisement sizes
37
- * Google Analytics Support.
38
- * User Friendly Theme Options Panel.
39
- * Unlimited Color Scheme.
40
- * Image Logo Upload.
41
- * Supports Posts and Pages.
42
- * Proper rel canonical tags which means that Google know the original page.
43
- * Overlay Navigation Menu bar.
44
- * Social Sharing in the Single.
45
- * Sexy Design.
46
- * Separate WordPress Menu for AMP version.
47
- * Page builder & Shortcodes Compatibility.
48
- * Carousel support for Gallery.
49
- * Better Image stretching and resizing.
50
- * Youtube Video Embed Support.
51
- * Vine Embed Support.
52
- * Twitter oembed Support.
53
- * Instagram Embed Support.
54
- * Facebook Video Embed Support.
55
  * RTL Support
56
  * Custom AMP FrontPage
57
  * Notifications
58
  * Piwik & Segment.com Support
59
- * Great Support & Active Development.
60
 
61
  **NOTE:** Next Update of this plugin will be released by end of October 2016.
62
 
@@ -124,24 +119,6 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
124
 
125
 
126
  == Changelog ==
127
- = 0.8.9 =
128
- * Proper Details at http://ampforwp.com/amp-pagebuilder/
129
- * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
130
- * 100% Yoast Compatible , Now no need to have additionally Glue Installed
131
- * 100% completed Translation panel, Now absolutely anything on page is translated
132
- * Added Option to turn on/off Page Support
133
- * Styling for Tags was Corrected
134
- * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
135
- * Default Image alignment styling added
136
- * Added Option to turn on/off Page Support
137
- * Related Posts Now use Custom Excerpt if it Exists
138
- * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
139
- * <pre> Tag styling issue fixed for AMP pages
140
- * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
141
- * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
142
- * 2 New Designs added
143
- * SEO Panel Added
144
-
145
  = 0.8.8 =
146
  * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
147
  * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
@@ -204,7 +181,7 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
204
  * Proper Details at http://ampforwp.com/new/
205
  * Validation issue fixed: 'Value' tag
206
  * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
207
- * Validation issue fixed: Table markup
208
  * Validation issue fixed: nowrap and misc tags
209
  * New Relic Support
210
  * Tags on off option
@@ -327,4 +304,4 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
327
  * Plugin URI updated
328
 
329
  = 0.1 =
330
- * Initial version
7
  Donate link: https://www.paypal.me/Kaludi/5
8
  Requires at least: 3.0
9
  Tested up to: 4.6.1
10
+ Stable tag: 0.8.8
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
16
  == Description ==
17
  Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. AMP WP is a plugin that needs to no configuration, just activate it and you are done.
18
 
19
+ [What's New in this Version?](http://ampforwp.com/new/) | [Priority Support](http://ampforwp.com/priority-support/) | [View Demo](http://ampforwp.com/demo/?amp) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
20
 
21
  [youtube https://www.youtube.com/watch?v=zzRy6Q_VGGc]
22
 
23
  **Features:**
24
 
 
 
 
 
 
25
  * NEW - Translation Panel & RTL
26
  * NEW - Internal AMP linking - You can browse AMP pages internally
27
  * Related posts below the post
28
+ * Recent Comments list
29
+ * Automatically integrate AMP to your website.
30
+ * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
31
+ * 7 Advertisement sizes
32
+ * Google Analytics Support.
33
+ * User Friendly Theme Options Panel.
34
+ * Unlimited Color Scheme.
35
+ * Image Logo Upload.
36
+ * Supports Posts and Pages.
37
+ * Proper rel canonical tags which means that Google know the original page.
38
+ * Overlay Navigation Menu bar.
39
+ * Social Sharing in the Single.
40
+ * Sexy Design.
41
+ * Separate WordPress Menu for AMP version.
42
+ * Page builder & Shortcodes Compatibility.
43
+ * Carousel support for Gallery.
44
+ * Better Image stretching and resizing.
45
+ * Youtube Video Embed Support.
46
+ * Vine Embed Support.
47
+ * Twitter oembed Support.
48
+ * Instagram Embed Support.
49
+ * Facebook Video Embed Support.
50
  * RTL Support
51
  * Custom AMP FrontPage
52
  * Notifications
53
  * Piwik & Segment.com Support
54
+ * Great Support & Active Development.
55
 
56
  **NOTE:** Next Update of this plugin will be released by end of October 2016.
57
 
119
 
120
 
121
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  = 0.8.8 =
123
  * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
124
  * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
181
  * Proper Details at http://ampforwp.com/new/
182
  * Validation issue fixed: 'Value' tag
183
  * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
184
+ * Validation issue fixed: Table markup
185
  * Validation issue fixed: nowrap and misc tags
186
  * New Relic Support
187
  * Tags on off option
304
  * Plugin URI updated
305
 
306
  = 0.1 =
307
+ * Initial version
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.8.9
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
@@ -17,16 +17,14 @@ if ( ! defined( 'ABSPATH' ) ) exit;
17
  function ampforwp_add_custom_post_support() {
18
 
19
  add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK | EP_PAGES | EP_ROOT );
20
- global $redux_builder_amp;
21
- if($redux_builder_amp['amp-on-off-for-all-pages']){
22
- add_post_type_support( 'page', AMP_QUERY_VAR );
23
- }
24
  }
25
  add_action( 'init', 'ampforwp_add_custom_post_support',11);
26
 
27
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
28
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
29
- define('AMPFORWP_VERSION','0.8.9');
30
 
31
  /*
32
  * Load Files only in the backend
@@ -91,4 +89,4 @@ function ampforwp_plugin_init() {
91
  new Ampforwp_Init;
92
  }
93
  }
94
- add_action('init','ampforwp_plugin_init',9);
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.8.8.5
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
17
  function ampforwp_add_custom_post_support() {
18
 
19
  add_rewrite_endpoint( AMP_QUERY_VAR, EP_PERMALINK | EP_PAGES | EP_ROOT );
20
+ add_post_type_support( 'page', AMP_QUERY_VAR );
21
+
 
 
22
  }
23
  add_action( 'init', 'ampforwp_add_custom_post_support',11);
24
 
25
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
26
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
27
+ define('AMPFORWP_VERSION','0.8.8');
28
 
29
  /*
30
  * Load Files only in the backend
89
  new Ampforwp_Init;
90
  }
91
  }
92
+ add_action('init','ampforwp_plugin_init',9);
includes/includes.php CHANGED
@@ -24,5 +24,4 @@
24
 
25
  // 3. Redux panel inclusion code
26
  require_once( AMPFORWP_PLUGIN_DIR . '/includes/options/admin-init.php' );
27
-
28
  ?>
24
 
25
  // 3. Redux panel inclusion code
26
  require_once( AMPFORWP_PLUGIN_DIR . '/includes/options/admin-init.php' );
 
27
  ?>
includes/options/admin-init.php CHANGED
@@ -6,10 +6,8 @@
6
  }
7
 
8
  // Load the embedded Redux Framework
9
- if ( ! class_exists( 'ReduxFramework' )) {
10
- if ( file_exists( dirname( __FILE__ ).'/redux-framework/framework.php' ) ) {
11
- require_once dirname(__FILE__).'/redux-framework/framework.php';
12
- }
13
  }
14
 
15
  // Load the theme/plugin options
@@ -20,4 +18,4 @@
20
  // Load Redux extensions
21
  if ( file_exists( dirname( __FILE__ ) . '/redux-extensions/extensions-init.php' ) ) {
22
  require_once dirname( __FILE__ ) . '/redux-extensions/extensions-init.php';
23
- }
6
  }
7
 
8
  // Load the embedded Redux Framework
9
+ if ( file_exists( dirname( __FILE__ ).'/redux-framework/framework.php' ) ) {
10
+ require_once dirname(__FILE__).'/redux-framework/framework.php';
 
 
11
  }
12
 
13
  // Load the theme/plugin options
18
  // Load Redux extensions
19
  if ( file_exists( dirname( __FILE__ ) . '/redux-extensions/extensions-init.php' ) ) {
20
  require_once dirname( __FILE__ ) . '/redux-extensions/extensions-init.php';
21
+ }
includes/options/options-init.php CHANGED
@@ -201,74 +201,102 @@
201
  ),
202
  'default' => '1'
203
  ),
204
- array(
205
- 'id' => 'ga-feild',
206
- 'type' => 'text',
207
- 'title' => __( 'Google Analytics', 'redux-framework-demo' ),
208
- 'required' => array('amp-analytics-select-option', '=' , '1'),
209
- 'subtitle' => __( 'Enter your Google Analytics ID.', 'redux-framework-demo' ),
210
- 'desc' => __('Example: UA-XXXXX-Y', 'redux-framework-demo' ),
211
- 'default' => 'UA-XXXXX-Y',
212
- ),
213
- array(
214
- 'id' => 'sa-feild',
215
- 'type' => 'text',
216
- 'title' => __( 'Segment Analytics', 'redux-framework-demo' ),
217
- 'subtitle' => __( 'Enter your Segment Analytics Key.', 'redux-framework-demo' ),
218
- 'required' => array('amp-analytics-select-option', '=' , '2'),
219
- 'default' => 'SEGMENT-WRITE-KEY',
220
- ),
221
- array(
222
- 'id' => 'pa-feild',
223
- 'type' => 'text',
224
- 'title' => __( 'Piwik Analytics', 'redux-framework-demo' ),
225
- 'required' => array('amp-analytics-select-option', '=' , '3'),
226
- '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' ),
227
- 'subtitle' => __('Enter your Piwik Analytics URL.', 'redux-framework-demo' ),
228
- 'default' => '#',
229
- ),
230
-
231
- array(
232
- 'id' =>'amp-frontpage-select-option',
233
- 'type' => 'switch',
234
- 'title' => __('Front Page', 'redux-framework-demo'),
235
- 'default' => 0,
236
- 'subtitle' => __('Custom AMP front page', 'redux-framework-demo'),
237
- 'true' => 'true',
238
- 'false' => 'false',
239
  ),
240
- array(
241
- 'id' => 'amp-frontpage-select-option-pages',
242
- 'type' => 'select',
243
- 'title' => __('Select Page as Front Page', 'redux-framework-demo'),
244
- 'required' => array('amp-frontpage-select-option', '=' , '1'),
245
- // Must provide key => value pairs for select options
246
- 'data' => 'page',
247
- 'args' => array(
248
- 'post_type' => 'page',
249
- 'posts_per_page' => 500
250
- ),
251
- 'default' => '2',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  ),
 
 
253
 
254
- // array(
255
- // 'id' => 'amp-footer-text',
256
- // 'title' => __('Footer', 'redux-framework-demo'),
257
- // 'type' => 'text',
258
- // 'subtitle' => __('Enter Footer text', 'redux-framework-demo'),
259
- // 'placeholder' => 'Copyright &copy; 2016',
260
- // 'default' => 'Copyright &copy; 2016',
261
- // ),
262
 
263
- array(
264
- 'id' => 'amp-footer-link-non-amp-page',
265
- 'type' => 'switch',
266
- 'title' => __('Link to Non-AMP page', 'redux-framework-demo'),
267
- 'subtitle' => __('Enable / Disable Link to Non-AMP page in the footer', 'redux-framework-demo'),
268
- 'true' => 'true',
269
- 'false' => 'false',
270
- 'default' => 1
271
- ),
272
 
273
  array(
274
  'id' =>'amp-rtl-select-option',
@@ -293,110 +321,14 @@
293
  'title' => __('Hide AMP on Archive Pages', 'redux-framework-demo'),
294
  'subtitle' => __('Enable / Disable AMP in the categories and tags pages', 'redux-framework-demo'),
295
  'true' => 'true',
296
- 'false' => 'false'
297
- ),
298
- array(
299
- 'id' =>'amp-on-off-for-all-pages',
300
- 'type' => 'switch',
301
- 'title' => __('AMP on Pages', 'redux-framework-demo'),
302
- 'subtitle' => __('Enable or Disable AMP on all Pages', 'redux-framework-demo'),
303
- 'default' => 1,
304
- ),
305
- // array(
306
- // 'id' => 'amp-design-selector',
307
- // 'type' => 'select',
308
- // 'title' => __( 'Design Selector', 'redux-framework-demo' ),
309
- // 'subtitle' => __( 'Select your design.', 'redux-framework-demo' ),
310
- // 'options' => array(
311
- // '1' => __('Design One', 'redux-framework-demo' ),
312
- // '2' => __('Design two', 'redux-framework-demo' )
313
- // ),
314
- // 'default' => '2'
315
- // ),
316
-
317
  )
318
  ) );//END
319
 
320
- // AMP Design SECTION
321
- Redux::setSection( $opt_name, array(
322
- 'title' => __( 'Design', 'redux-framework-demo' ),
323
- 'desc' => __( '<b>Quick Links: <a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'">AMP Page Builder & Color Settings</a></b>'),
324
- 'id' => 'amp-design',
325
- 'subsection' => true,
326
- 'fields' => array(
327
 
328
- $fields = array(
329
- 'id' => 'amp-design-selector',
330
- 'type' => 'select',
331
- 'title' => __( 'Design Selector', 'redux-framework-demo' ),
332
- 'subtitle' => __( 'Select your design.', 'redux-framework-demo' ),
333
- 'options' => array(
334
- '1' => __('Design One', 'redux-framework-demo' ),
335
- '2' => __('Design two', 'redux-framework-demo' )
336
- ),
337
- 'default' => '2'
338
- ),
339
-
340
- array(
341
- 'id' => 'css_editor',
342
- 'type' => 'ace_editor',
343
- 'title' => __('Custom CSS', 'redux-framework-demo'),
344
- 'subtitle' => __('You can customize the Stylesheet of the AMP version by using this option.', 'redux-framework-demo'),
345
- 'mode' => 'css',
346
- 'theme' => 'monokai',
347
- 'desc' => '',
348
- 'default' => "/******* Paste your Custom CSS in this Editor *******/"
349
- ),
350
- )
351
-
352
- )
353
-
354
- );
355
-
356
-
357
-
358
- // SEO SECTION
359
- Redux::setSection( $opt_name, array(
360
- 'title' => __( 'SEO', 'redux-framework-demo' ),
361
- 'desc' => __( '', 'redux-framework-demo'),
362
- 'id' => 'amp-seo',
363
- 'subsection' => true,
364
- 'fields' => array(
365
-
366
- array(
367
- 'id' => 'ampforwp-seo-yoast-meta',
368
- 'type' => 'switch',
369
- 'subtitle' => __('Adds Social and Open Graph Meta Tags from Yoast', 'redux-framework-demo'),
370
- 'title' => __( 'Add Meta Tags from Yoast', 'redux-framework-demo' ),
371
- 'default' => '1'
372
- ),
373
- array(
374
- 'id' => 'ampforwp-seo-yoast-custom-description',
375
- 'type' => 'switch',
376
- 'subtitle' => __('Adds Yoast Custom description to ld+json for AMP page', 'redux-framework-demo'),
377
- 'title' => __( 'Yoast Custom Description for AMP page', 'redux-framework-demo' ),
378
- 'default' => '1'
379
- ),
380
-
381
- array(
382
- 'id' => 'ampforwp-seo-custom-additional-meta',
383
- 'type' => 'ace_editor',
384
- 'title' => __('Additional tags for Head section AMP page', 'redux-framework-demo'),
385
- 'subtitle' => __('Adds additional Meta to the head section', 'redux-framework-demo', 'redux-framework-demo'),
386
- 'mode' => 'html',
387
- 'theme' => 'monokai',
388
- 'desc' => __('Only link and meta tags allowed', 'redux-framework-demo'),
389
- 'default' => "<!-- Paste your Additional HTML to <head> </head>tag in this Editor -->"
390
- ),
391
-
392
- )
393
-
394
- )
395
-
396
- );
397
  // AMP Menu SECTION
398
  Redux::setSection( $opt_name, array(
399
- 'title' => __( 'Menu', 'redux-framework-demo' ),
400
  'desc' => __( 'Add Menus to your AMP pages by clicking on this <a href="'.trailingslashit(get_admin_url()).'nav-menus.php?action=locations">link</a>'),
401
  'id' => 'amp-menus',
402
  'subsection' => true)
@@ -610,123 +542,193 @@ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
610
  // Single Section
611
  Redux::setSection( $opt_name, array(
612
  'title' => __( 'Single', 'redux-framework-demo' ),
613
- 'desc' => __( 'Additional Options to control the look of Single <a href="' . esc_url(admin_url('customize.php?autofocus[section]=amp_design&customize_amp=1')) .'"> Click here </a> ', 'redux-framework-demo' ),
614
  'id' => 'amp-single',
615
  'subsection' => true,
616
  'fields' => array(
617
- // Social Icons ON/OFF
618
- array(
619
- 'id' => 'enable-single-social-icons',
620
- 'type' => 'switch',
621
- 'title' => __('Sticky Social Icons', 'redux-framework-demo'),
622
- 'default' => 1,
623
- 'subtitle' => __('Enable Social Icons in single', 'redux-framework-demo'),
624
- ),
625
- // Width and Height of Image
626
- array(
627
- 'id' => 'enable-single-featured-img-width',
628
- 'type' => 'text',
629
- 'title' => __('Featured Image Width', 'redux-framework-demo'),
630
- 'default' => 512,
631
- 'subtitle' => __('Custom featured image width in Units : Px', 'redux-framework-demo'),
632
- 'placeholder' =>'Width here',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
633
  ),
634
  array(
635
- 'id' => 'enable-single-featured-img-height',
636
- 'type' => 'text',
637
- 'title' => __('Featured Image Height', 'redux-framework-demo'),
638
- 'default' => 300,
639
- 'subtitle' => __('Custom featured image height in Units : Px', 'redux-framework-demo'),
640
- 'placeholder' =>'Height here',
 
641
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
642
  // Related Post
 
 
 
 
 
 
 
 
643
  array(
644
- 'id' => 'ampforwp-single-select-type-of-related',
645
- 'type' => 'select',
646
- 'title' => __('Show Related Post from', 'redux-framework-demo'),
647
- 'data' => 'page',
648
- 'subtitle' => __('select the type of related posts', 'redux-framework-demo'),
649
- 'options' => array(
650
- '1' => 'Tags',
651
- '2' => 'Categories'
652
- ),
653
- 'args' => array(
654
- 'post_type' => 'page',
655
- 'posts_per_page' => 500
656
- ),
657
- 'default' => '2',
 
658
  ),
659
- ),
660
-
661
- ) );
662
-
663
- // Social Section
664
- Redux::setSection( $opt_name, array(
665
- 'title' => __( 'Social', 'redux-framework-demo' ),
666
- 'id' => 'amp-social',
667
- 'subsection' => true,
668
- 'fields' => array(
669
- // Facebook ON/OFF
670
- array(
671
- 'id' => 'enable-single-facebook-share',
672
- 'type' => 'switch',
673
- //'required' => array('enable-single-social-icons', '=' , '1'),
674
- 'title' => __('Facebook', 'redux-framework-demo'),
675
- 'default' => 0,
676
- ),
677
- // Facebook app ID
678
- array(
 
 
 
 
 
 
 
 
679
  'id' => 'amp-facebook-app-id',
680
  'title' => __('Facebook App ID', 'redux-framework-demo'),
681
- 'subtitle' => __('In order to use Facebook share you need to register an app ID, you can register one here: https://developers.facebook.com/apps.', 'redux-framework-demo'),
682
  'type' => 'text',
 
683
  'required' => array('enable-single-facebook-share', '=' , '1'),
684
  'placeholder' => 'Enter your facebook app id',
685
  'default' => ''
686
- ),
687
- // Twitter ON/OFF
688
- array(
689
- 'id' => 'enable-single-twitter-share',
690
- 'type' => 'switch',
691
- 'title' => __('Twitter', 'redux-framework-demo'),
692
- 'default' => 1,
693
- ),
694
- // GooglePlus ON/OFF
695
- array(
696
- 'id' => 'enable-single-gplus-share',
697
- 'type' => 'switch',
698
- 'title' => __('GooglePlus', 'redux-framework-demo'),
699
- 'default' => 1,
700
- ),
701
- // Email ON/OFF
702
- array(
703
- 'id' => 'enable-single-email-share',
704
- 'type' => 'switch',
705
- 'title' => __('Email', 'redux-framework-demo'),
706
- 'default' => 1,
707
- ),
708
- // Pinterest ON/OFF
709
- array(
710
- 'id' => 'enable-single-pinterest-share',
711
- 'type' => 'switch',
712
- 'title' => __('Pinterest', 'redux-framework-demo'),
713
- 'default' => 1,
714
- ),
715
- // LinkedIn ON/OFF
716
- array(
717
- 'id' => 'enable-single-linkedin-share',
718
- 'type' => 'switch',
719
- 'title' => __('LinkedIn', 'redux-framework-demo'),
720
- 'default' => 1,
721
- ),
722
- // WhatsApp
723
- array(
724
- 'id' => 'enable-single-whatsapp-share',
725
- 'type' => 'switch',
726
- 'title' => __('WhatsApp', 'redux-framework-demo'),
727
- 'default' => 1,
728
- ),
729
- )
 
 
 
 
 
 
730
  ) );
731
 
732
  // Structured Data
@@ -873,14 +875,14 @@ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
873
  'id' => 'amp-translator-categories-text',
874
  'type' => 'text',
875
  'title' => __('Categories', 'redux-framework-demo'),
876
- 'default' => 'Categories: ',
877
  'placeholder'=>'write here'
878
  ),
879
  array(
880
  'id' => 'amp-translator-tags-text',
881
  'type' => 'text',
882
  'title' => __('Tags', 'redux-framework-demo'),
883
- 'default' => 'Tags: ',
884
  'placeholder'=>'write here'
885
  ),
886
  array(
@@ -890,65 +892,30 @@ if(!is_plugin_active( 'amp-incontent-ads/amptoolkit-incontent-ads.php' ) ){
890
  'default' => 'By',
891
  'placeholder'=>'write here'
892
  ),
893
- array(
894
- 'id' => 'amp-translator-view-comments-text',
895
- 'type' => 'text',
896
- 'title' => __('View Comments', 'redux-framework-demo'),
897
- 'default' => 'View Comments',
898
- 'placeholder'=>'write here'
899
- ),
900
- array(
901
- 'id' => 'amp-translator-leave-a-comment-text',
902
- 'type' => 'text',
903
- 'title' => __('Leave a Comment', 'redux-framework-demo'),
904
- 'default' => 'Leave a Comment',
905
- 'placeholder'=>'write here'
906
- ),
907
- array(
908
- 'id' => 'amp-translator-at-text',
909
- 'type' => 'text',
910
- 'title' => __('at', 'redux-framework-demo'),
911
- 'default' => 'at',
912
- 'placeholder'=>'write here'
913
- ),
914
- array(
915
- 'id' => 'amp-translator-says-text',
916
- 'type' => 'text',
917
- 'title' => __('says', 'redux-framework-demo'),
918
- 'default' => 'says',
919
- 'placeholder'=>'write here'
920
- ),
921
- array(
922
- 'id' => 'amp-translator-Edit-text',
923
- 'type' => 'text',
924
- 'title' => __('Edit', 'redux-framework-demo'),
925
- 'default' => 'Edit',
926
- 'placeholder'=>'write here'
927
- ),
928
  )
929
  ) );
930
 
931
 
932
- // // CSS
933
- // Redux::setSection( $opt_name, array(
934
- // 'title' => __( 'Custom CSS Editor', 'redux-framework-demo' ),
935
- // // 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
936
- // 'id' => 'opt-css-editor',
937
- // 'subsection' => true,
938
- // 'fields' => array(
939
- // array(
940
- // 'id' => 'css_editor',
941
- // 'type' => 'ace_editor',
942
- // 'title' => __('Custom CSS', 'redux-framework-demo'),
943
- // 'subtitle' => __('You can customize the Stylesheet of the AMP version by using this option.', 'redux-framework-demo'),
944
- // 'mode' => 'css',
945
- // 'theme' => 'monokai',
946
- // 'desc' => '',
947
- // 'default' => "/******* Paste your Custom CSS in this Editor *******/"
948
- // ),
949
- // )
950
- // ) );
951
- //
952
  // Extension Section
953
  Redux::setSection( $opt_name, array(
954
  'title' => __( 'Extensions', 'redux-framework-demo' ),
201
  ),
202
  'default' => '1'
203
  ),
204
+ array(
205
+ 'id' => 'ga-feild',
206
+ 'type' => 'text',
207
+ 'title' => __( 'Google Analytics', 'redux-framework-demo' ),
208
+ 'required' => array('amp-analytics-select-option', '=' , '1'),
209
+ 'subtitle' => __( 'Enter your Google Analytics ID.', 'redux-framework-demo' ),
210
+ 'desc' => __('Example: UA-XXXXX-Y', 'redux-framework-demo' ),
211
+ 'default' => 'UA-XXXXX-Y',
212
+ ),
213
+ array(
214
+ 'id' => 'sa-feild',
215
+ 'type' => 'text',
216
+ 'title' => __( 'Segment Analytics', 'redux-framework-demo' ),
217
+ 'subtitle' => __( 'Enter your Segment Analytics Key.', 'redux-framework-demo' ),
218
+ 'required' => array('amp-analytics-select-option', '=' , '2'),
219
+ 'default' => 'SEGMENT-WRITE-KEY',
220
+ ),
221
+ array(
222
+ 'id' => 'pa-feild',
223
+ 'type' => 'text',
224
+ 'title' => __( 'Piwik Analytics', 'redux-framework-demo' ),
225
+ 'required' => array('amp-analytics-select-option', '=' , '3'),
226
+ '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' ),
227
+ 'subtitle' => __('Enter your Piwik Analytics URL.', 'redux-framework-demo' ),
228
+ 'default' => '#',
229
+ ),
230
+ array(
231
+ 'id' => 'opt-color-rgba',
232
+ 'type' => 'color_rgba',
233
+ 'title' => 'Color Scheme',
234
+ 'subtitle' => __('Change the color scheme to your branding color','redux-framework-demo' ),
235
+ 'default' => array(
236
+ 'color' => '#312C7E',
237
+ 'alpha' => 1
 
238
  ),
239
+ // These options display a fully functional color palette. Omit this argument
240
+ // for the minimal color picker, and change as desired.
241
+ 'options' => array(
242
+ 'show_input' => true,
243
+ 'show_initial' => true,
244
+ 'show_alpha' => true,
245
+ 'show_palette' => true,
246
+ 'show_palette_only' => false,
247
+ 'show_selection_palette' => true,
248
+ 'max_palette_size' => 10,
249
+ 'allow_empty' => true,
250
+ 'clickout_fires_change' => false,
251
+ 'choose_text' => 'Choose',
252
+ 'cancel_text' => 'Cancel',
253
+ 'show_buttons' => true,
254
+ 'use_extended_classes' => true,
255
+ 'palette' => null, // show default
256
+ 'input_text' => 'Select Color'
257
+ )
258
+ ),
259
+ array(
260
+ 'id' =>'amp-frontpage-select-option',
261
+ 'type' => 'switch',
262
+ 'title' => __('Front Page', 'redux-framework-demo'),
263
+ 'default' => 0,
264
+ 'subtitle' => __('Custom AMP front page', 'redux-framework-demo'),
265
+ 'true' => 'true',
266
+ 'false' => 'false',
267
+ ),
268
+ array(
269
+ 'id' => 'amp-frontpage-select-option-pages',
270
+ 'type' => 'select',
271
+ 'title' => __('Select Page as Front Page', 'redux-framework-demo'),
272
+ 'required' => array('amp-frontpage-select-option', '=' , '1'),
273
+ // Must provide key => value pairs for select options
274
+ 'data' => 'page',
275
+ 'args' => array(
276
+ 'post_type' => 'page',
277
+ 'posts_per_page' => 500
278
  ),
279
+ 'default' => '2',
280
+ ),
281
 
282
+ // array(
283
+ // 'id' => 'amp-footer-text',
284
+ // 'title' => __('Footer', 'redux-framework-demo'),
285
+ // 'type' => 'text',
286
+ // 'subtitle' => __('Enter Footer text', 'redux-framework-demo'),
287
+ // 'placeholder' => 'Copyright &copy; 2016',
288
+ // 'default' => 'Copyright &copy; 2016',
289
+ // ),
290
 
291
+ array(
292
+ 'id' => 'amp-footer-link-non-amp-page',
293
+ 'type' => 'switch',
294
+ 'title' => __('Link to Non-AMP page', 'redux-framework-demo'),
295
+ 'subtitle' => __('Enable / Disable Link to Non-AMP page in the footer', 'redux-framework-demo'),
296
+ 'true' => 'true',
297
+ 'false' => 'false',
298
+ 'default' => 1
299
+ ),
300
 
301
  array(
302
  'id' =>'amp-rtl-select-option',
321
  'title' => __('Hide AMP on Archive Pages', 'redux-framework-demo'),
322
  'subtitle' => __('Enable / Disable AMP in the categories and tags pages', 'redux-framework-demo'),
323
  'true' => 'true',
324
+ 'false' => 'false'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  )
326
  ) );//END
327
 
 
 
 
 
 
 
 
328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  // AMP Menu SECTION
330
  Redux::setSection( $opt_name, array(
331
+ 'title' => __( 'AMP Menu', 'redux-framework-demo' ),
332
  'desc' => __( 'Add Menus to your AMP pages by clicking on this <a href="'.trailingslashit(get_admin_url()).'nav-menus.php?action=locations">link</a>'),
333
  'id' => 'amp-menus',
334
  'subsection' => true)
542
  // Single Section
543
  Redux::setSection( $opt_name, array(
544
  'title' => __( 'Single', 'redux-framework-demo' ),
545
+ 'desc' => __( 'Additional Options to control the look of Single', 'redux-framework-demo' ),
546
  'id' => 'amp-single',
547
  'subsection' => true,
548
  'fields' => array(
549
+
550
+ // Featured Image ON/OFF
551
+ // array(
552
+ // 'id' => 'enable-single-featured-image',
553
+ // 'type' => 'switch',
554
+ // 'title' => __('Featured Image Above Post Content', 'redux-framework-demo'),
555
+ // 'default' => 0,
556
+ // 'subtitle' => __('Enable Featured Image in the single post', 'redux-framework-demo'),
557
+ // 'true' => 'Enabled',
558
+ // 'false' => 'Disabled',
559
+ // ),
560
+ // Post Meta ON/OFF
561
+ array(
562
+ 'id' => 'enable-single-post-meta',
563
+ 'type' => 'switch',
564
+ 'title' => __('Post Meta Above Post Content', 'redux-framework-demo'),
565
+ 'default' => 1,
566
+ 'subtitle' => __('Enable Post Meta in the single post', 'redux-framework-demo'),
567
+ 'true' => 'Enabled',
568
+ 'false' => 'Disabled',
569
+ ),
570
+ // Single Featured ON/OFF
571
+ array(
572
+ 'id' => 'enable-single-featured-img',
573
+ 'type' => 'switch',
574
+ 'title' => __('Featured Image', 'redux-framework-demo'),
575
+ 'default' => 1,
576
+ 'subtitle' => __('Enabling this will automatically display the featured image', 'redux-framework-demo'),
577
+ 'true' => 'Enabled',
578
+ 'false' => 'Disabled',
579
+ ),
580
+ // Width and Height of Image
581
+ array(
582
+ 'id' => 'enable-single-featured-img-width',
583
+ 'type' => 'text',
584
+ 'title' => __('Featured Image Width', 'redux-framework-demo'),
585
+ 'default' => 512,
586
+ 'subtitle' => __('Custom featured image width in Units : Px', 'redux-framework-demo'),
587
+ 'placeholder'=>'Width here',
588
+ 'required' => array('enable-single-featured-img', '=' , '1')
589
  ),
590
  array(
591
+ 'id' => 'enable-single-featured-img-height',
592
+ 'type' => 'text',
593
+ 'title' => __('Featured Image Height', 'redux-framework-demo'),
594
+ 'default' => 300,
595
+ 'subtitle' => __('Custom featured image height in Units : Px', 'redux-framework-demo'),
596
+ 'placeholder'=>'Height here',
597
+ 'required' => array('enable-single-featured-img', '=' , '1')
598
  ),
599
+ // Next/Previous Pagination ON/OFF
600
+ array(
601
+ 'id' => 'enable-next-previous-pagination',
602
+ 'type' => 'switch',
603
+ 'title' => __('Post Pagination', 'redux-framework-demo'),
604
+ 'default' => 1,
605
+ 'subtitle' => __('Enable Next / Previous in the single post', 'redux-framework-demo'),
606
+ 'true' => 'Enabled',
607
+ 'false' => 'Disabled',
608
+ ),
609
+ // Tags ON/OFF
610
+ array(
611
+ 'id' => 'ampforwp-single-tags-on-off',
612
+ 'type' => 'switch',
613
+ 'title' => __('Tags', 'redux-framework-demo'),
614
+ 'default' => 1,
615
+ 'subtitle' => __('Enable / Disable Tags in the single post', 'redux-framework-demo'),
616
+ 'true' => 'Enabled',
617
+ 'false' => 'Disabled',
618
+ ),
619
+
620
  // Related Post
621
+ //new related type posts field
622
+ array(
623
+ 'id' => 'ampforwp-single-select-type-of-related-switch',
624
+ 'type' => 'switch',
625
+ 'title' => __('Related Post', 'redux-framework-demo'),
626
+ 'subtitle' => __('Enable / Disable Related Posts', 'redux-framework-demo'),
627
+ 'default' => '1',
628
+ ),
629
  array(
630
+ 'id' => 'ampforwp-single-select-type-of-related',
631
+ 'type' => 'select',
632
+ 'title' => __('Show Related Post from', 'redux-framework-demo'),
633
+ 'data' => 'page',
634
+ 'subtitle' => __('select the type of related posts', 'redux-framework-demo'),
635
+ 'options' => array(
636
+ '1' => 'Tags',
637
+ '2' => 'Categories'
638
+ ),
639
+ 'args' => array(
640
+ 'post_type' => 'page',
641
+ 'posts_per_page' => 500
642
+ ),// ampforwp-single-select-type-of-related-switch
643
+ 'required' => array('ampforwp-single-select-type-of-related-switch', '=' , '1'),
644
+ 'default' => '2',
645
  ),
646
+ // Comments Post
647
+ array(
648
+ 'id' => 'ampforwp-single-comments-on-off',
649
+ 'type' => 'switch',
650
+ 'title' => __('Comments', 'redux-framework-demo'),
651
+ 'default' => 1,
652
+ 'subtitle' => __('Enable / Disable Comments in the single post', 'redux-framework-demo'),
653
+ 'true' => 'Enabled',
654
+ 'false' => 'Disabled',
655
+ ),
656
+ // Social Icons ON/OFF
657
+ array(
658
+ 'id' => 'enable-single-social-icons',
659
+ 'type' => 'switch',
660
+ 'title' => __('Social Icons', 'redux-framework-demo'),
661
+ 'default' => 1,
662
+ 'subtitle' => __('Enable Social Icons in single', 'redux-framework-demo'),
663
+ ),
664
+ // Facebook ON/OFF
665
+ array(
666
+ 'id' => 'enable-single-facebook-share',
667
+ 'type' => 'switch',
668
+ 'required' => array('enable-single-social-icons', '=' , '1'),
669
+ 'title' => __('Facebook', 'redux-framework-demo'),
670
+ 'default' => 0,
671
+ ),
672
+ // Facebook app ID
673
+ array(
674
  'id' => 'amp-facebook-app-id',
675
  'title' => __('Facebook App ID', 'redux-framework-demo'),
676
+ 'subtitle' => __('In order to use Facebook share you need to register an app ID.', 'redux-framework-demo'),
677
  'type' => 'text',
678
+ 'desc' =>__(' You can register one here: https://developers.facebook.com/apps.', 'redux-framework-demo'),
679
  'required' => array('enable-single-facebook-share', '=' , '1'),
680
  'placeholder' => 'Enter your facebook app id',
681
  'default' => ''
682
+ ),
683
+ // Twitter ON/OFF
684
+ array(
685
+ 'id' => 'enable-single-twitter-share',
686
+ 'type' => 'switch',
687
+ 'required' => array('enable-single-social-icons', '=' , '1'),
688
+ 'title' => __('Twitter', 'redux-framework-demo'),
689
+ 'default' => 1,
690
+ ),
691
+ // GooglePlus ON/OFF
692
+ array(
693
+ 'id' => 'enable-single-gplus-share',
694
+ 'type' => 'switch',
695
+ 'required' => array('enable-single-social-icons', '=' , '1'),
696
+ 'title' => __('GooglePlus', 'redux-framework-demo'),
697
+ 'default' => 1,
698
+ ),
699
+ // Email ON/OFF
700
+ array(
701
+ 'id' => 'enable-single-email-share',
702
+ 'type' => 'switch',
703
+ 'required' => array('enable-single-social-icons', '=' , '1'),
704
+ 'title' => __('Email', 'redux-framework-demo'),
705
+ 'default' => 1,
706
+ ),
707
+ // Pinterest ON/OFF
708
+ array(
709
+ 'id' => 'enable-single-pinterest-share',
710
+ 'type' => 'switch',
711
+ 'required' => array('enable-single-social-icons', '=' , '1'),
712
+ 'title' => __('Pinterest', 'redux-framework-demo'),
713
+ 'default' => 1,
714
+ ),
715
+ // LinkedIn ON/OFF
716
+ array(
717
+ 'id' => 'enable-single-linkedin-share',
718
+ 'type' => 'switch',
719
+ 'required' => array('enable-single-social-icons', '=' , '1'),
720
+ 'title' => __('LinkedIn', 'redux-framework-demo'),
721
+ 'default' => 1,
722
+ ),
723
+ array(
724
+ 'id' => 'enable-single-whatsapp-share',
725
+ 'type' => 'switch',
726
+ 'required' => array('enable-single-social-icons', '=' , '1'),
727
+ 'title' => __('WhatsApp', 'redux-framework-demo'),
728
+ 'default' => 1,
729
+ ),
730
+ ),
731
+
732
  ) );
733
 
734
  // Structured Data
875
  'id' => 'amp-translator-categories-text',
876
  'type' => 'text',
877
  'title' => __('Categories', 'redux-framework-demo'),
878
+ 'default' => 'Categories',
879
  'placeholder'=>'write here'
880
  ),
881
  array(
882
  'id' => 'amp-translator-tags-text',
883
  'type' => 'text',
884
  'title' => __('Tags', 'redux-framework-demo'),
885
+ 'default' => 'Tags',
886
  'placeholder'=>'write here'
887
  ),
888
  array(
892
  'default' => 'By',
893
  'placeholder'=>'write here'
894
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
895
  )
896
  ) );
897
 
898
 
899
+ // CSS
900
+ Redux::setSection( $opt_name, array(
901
+ 'title' => __( 'Custom CSS Editor', 'redux-framework-demo' ),
902
+ // 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
903
+ 'id' => 'opt-css-editor',
904
+ 'subsection' => true,
905
+ 'fields' => array(
906
+ array(
907
+ 'id' => 'css_editor',
908
+ 'type' => 'ace_editor',
909
+ 'title' => __('Custom CSS', 'redux-framework-demo'),
910
+ 'subtitle' => __('You can customize the Stylesheet of the AMP version by using this option.', 'redux-framework-demo'),
911
+ 'mode' => 'css',
912
+ 'theme' => 'monokai',
913
+ 'desc' => '',
914
+ 'default' => "/******* Paste your Custom CSS in this Editor *******/"
915
+ ),
916
+ )
917
+ ) );
918
+
919
  // Extension Section
920
  Redux::setSection( $opt_name, array(
921
  'title' => __( 'Extensions', 'redux-framework-demo' ),
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/5
5
  Requires at least: 3.0
6
  Tested up to: 4.6.1
7
- Stable tag: 0.8.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -13,47 +13,42 @@ The Must have AMP plugin for WordPress. Automatically add Accelerated Mobile Pag
13
  == Description ==
14
  Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. AMP WP is a plugin that needs to no configuration, just activate it and you are done.
15
 
16
- [What's New in this Version?](http://ampforwp.com/new/) | [Priority Support](http://ampforwp.com/priority-support/) | [View Demo](http://ampforwp.com/demo/?amp) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
 
18
  [youtube https://www.youtube.com/watch?v=zzRy6Q_VGGc]
19
 
20
  **Features:**
21
 
22
- * NEW - Drag & Drop Page builder Added
23
- * NEW - 2 Designs Added
24
- * NEW - 100% Yoast SEO support on AMP pages
25
- * NEW - AMP WooCommerce Support
26
- * NEW - Switch on/off Support for Pages on AMP
27
  * NEW - Translation Panel & RTL
28
  * NEW - Internal AMP linking - You can browse AMP pages internally
29
  * Related posts below the post
30
- * Recent Comments list
31
- * Automatically integrate AMP to your website.
32
- * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
33
- * 7 Advertisement sizes
34
- * Google Analytics Support.
35
- * User Friendly Theme Options Panel.
36
- * Unlimited Color Scheme.
37
- * Image Logo Upload.
38
- * Supports Posts and Pages.
39
- * Proper rel canonical tags which means that Google know the original page.
40
- * Overlay Navigation Menu bar.
41
- * Social Sharing in the Single.
42
- * Sexy Design.
43
- * Separate WordPress Menu for AMP version.
44
- * Page builder & Shortcodes Compatibility.
45
- * Carousel support for Gallery.
46
- * Better Image stretching and resizing.
47
- * Youtube Video Embed Support.
48
- * Vine Embed Support.
49
- * Twitter oembed Support.
50
- * Instagram Embed Support.
51
- * Facebook Video Embed Support.
52
  * RTL Support
53
  * Custom AMP FrontPage
54
  * Notifications
55
  * Piwik & Segment.com Support
56
- * Great Support & Active Development.
57
 
58
  **NOTE:** Next Update of this plugin will be released by end of October 2016.
59
 
@@ -121,24 +116,6 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
121
 
122
 
123
  == Changelog ==
124
- = 0.8.9 =
125
- * Proper Details at http://ampforwp.com/amp-pagebuilder/
126
- * Drag & Drop Page builder Added: You can easily modify the look of the AMP page using this feature
127
- * 100% Yoast Compatible , Now no need to have additionally Glue Installed
128
- * 100% completed Translation panel, Now absolutely anything on page is translated
129
- * Added Option to turn on/off Page Support
130
- * Styling for Tags was Corrected
131
- * Made changes to these sections to reflect in the new Design manager : Related Posts, Footer
132
- * Default Image alignment styling added
133
- * Added Option to turn on/off Page Support
134
- * Related Posts Now use Custom Excerpt if it Exists
135
- * Now AMP pages wont have Validation errors because of 'rel' attribute in 'div' Tag or 'onclick' attribute in 'a' Tag
136
- * <pre> Tag styling issue fixed for AMP pages
137
- * Frontpage (Homepage) Compatibility with AMP which means better validation of front page.
138
- * WooCommerce Support Added https://wordpress.org/plugins/amp-woocommerce/ (for E-Commerce)
139
- * 2 New Designs added
140
- * SEO Panel Added
141
-
142
  = 0.8.8 =
143
  * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
144
  * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
@@ -201,7 +178,7 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
201
  * Proper Details at http://ampforwp.com/new/
202
  * Validation issue fixed: 'Value' tag
203
  * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
204
- * Validation issue fixed: Table markup
205
  * Validation issue fixed: nowrap and misc tags
206
  * New Relic Support
207
  * Tags on off option
@@ -324,4 +301,4 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
324
  * Plugin URI updated
325
 
326
  = 0.1 =
327
- * Initial version
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.6.1
7
+ Stable tag: 0.8.8.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on your WordPress site. AMP WP is a plugin that needs to no configuration, just activate it and you are done.
15
 
16
+ [What's New in this Version?](http://ampforwp.com/new/) | [Priority Support](http://ampforwp.com/priority-support/) | [View Demo](http://ampforwp.com/demo/?amp) | [Screenshots](https://wordpress.org/plugins/accelerated-mobile-pages/screenshots/) | [Community](http://ampforwp.com/community/)
17
 
18
  [youtube https://www.youtube.com/watch?v=zzRy6Q_VGGc]
19
 
20
  **Features:**
21
 
 
 
 
 
 
22
  * NEW - Translation Panel & RTL
23
  * NEW - Internal AMP linking - You can browse AMP pages internally
24
  * Related posts below the post
25
+ * Recent Comments list
26
+ * Automatically integrate AMP to your website.
27
+ * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
28
+ * 7 Advertisement sizes
29
+ * Google Analytics Support.
30
+ * User Friendly Theme Options Panel.
31
+ * Unlimited Color Scheme.
32
+ * Image Logo Upload.
33
+ * Supports Posts and Pages.
34
+ * Proper rel canonical tags which means that Google know the original page.
35
+ * Overlay Navigation Menu bar.
36
+ * Social Sharing in the Single.
37
+ * Sexy Design.
38
+ * Separate WordPress Menu for AMP version.
39
+ * Page builder & Shortcodes Compatibility.
40
+ * Carousel support for Gallery.
41
+ * Better Image stretching and resizing.
42
+ * Youtube Video Embed Support.
43
+ * Vine Embed Support.
44
+ * Twitter oembed Support.
45
+ * Instagram Embed Support.
46
+ * Facebook Video Embed Support.
47
  * RTL Support
48
  * Custom AMP FrontPage
49
  * Notifications
50
  * Piwik & Segment.com Support
51
+ * Great Support & Active Development.
52
 
53
  **NOTE:** Next Update of this plugin will be released by end of October 2016.
54
 
116
 
117
 
118
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  = 0.8.8 =
120
  * Proper Details at http://ampforwp.com/amp-0-8-8-released-translation-panel/
121
  * Translation Panel added. You can now easily translate the AMP version from the backend without any complications.
178
  * Proper Details at http://ampforwp.com/new/
179
  * Validation issue fixed: 'Value' tag
180
  * Validation issue fixed: The attribute 'contenteditable' may not appear in tag 'a'.
181
+ * Validation issue fixed: Table markup
182
  * Validation issue fixed: nowrap and misc tags
183
  * New Relic Support
184
  * Tags on off option
301
  * Plugin URI updated
302
 
303
  = 0.1 =
304
+ * Initial version
templates/customizer/assets/customizer-control.css DELETED
@@ -1,13 +0,0 @@
1
- ul.ampforwp-design-multicheck-sortable-list .ampforwp-design-multicheck-sortable-handle{
2
- float: right;
3
- cursor: move;
4
- color: #333
5
- }
6
- ul.ampforwp-design-multicheck-sortable-list li{
7
- padding: 8px 7px 9px 9px;
8
- border: 1px solid #ddd;
9
- background: #fafafa;
10
- }
11
- .ampforwp-design-hideme{
12
- display: none !important;
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/customizer/assets/customizer-control.js DELETED
@@ -1,45 +0,0 @@
1
- jQuery( document ).ready( function($) {
2
-
3
- /* === Sortable Multi-CheckBoxes === */
4
-
5
- /* Make it sortable. */
6
- $( 'ul.ampforwp-design-multicheck-sortable-list' ).sortable({
7
- handle: '.ampforwp-design-multicheck-sortable-handle',
8
- axis: 'y',
9
- update: function( e, ui ){
10
- $('input.ampforwp-design-multicheck-sortable-item').trigger( 'change' );
11
- }
12
- });
13
-
14
- /* On changing the value. */
15
- $( "input.ampforwp-design-multicheck-sortable-item" ).on( 'change', function() {
16
-
17
- /* Get the value, and convert to string. */
18
- this_checkboxes_values = $( this ).parents( 'ul.ampforwp-design-multicheck-sortable-list' ).find( 'input.ampforwp-design-multicheck-sortable-item' ).map( function() {
19
- var active = '0';
20
- if( $(this).prop("checked") ){
21
- var active = '1';
22
- }
23
- return this.name + ':' + active;
24
- }).get().join( ',' );
25
-
26
- /* Add the value to hidden input. */
27
- $( this ).parents( 'ul.ampforwp-design-multicheck-sortable-list' ).find( 'input.ampforwp-design-multicheck-sortable' ).val( this_checkboxes_values ).trigger( 'change' );
28
-
29
- });
30
-
31
- /* === Multi-CheckBoxes === */
32
-
33
- /* On changing the value. */
34
- $( "input.ampforwp-design-multicheck-item" ).on( 'change', function() {
35
-
36
- /* Get the value (only the "checked" item), and convert to comma separated string. */
37
- this_checkboxes_values = $( this ).parents( 'ul.ampforwp-design-multicheck-list' ).find( 'input.ampforwp-design-multicheck-item:checked' ).map( function() {
38
- return this.name;
39
- }).get().join( ',' );
40
-
41
- /* Add the value to hidden input. */
42
- $( this ).parents( 'ul.ampforwp-design-multicheck-list' ).find( 'input.ampforwp-design-multicheck' ).val( this_checkboxes_values ).trigger( 'change' );
43
-
44
- });
45
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/customizer/assets/customizer-preview.js DELETED
@@ -1,84 +0,0 @@
1
- ( function( $ ) {
2
- 'use strict';
3
- $( document ).ready( function () {
4
-
5
- function ampforwp_design_controller(value) {
6
- switch (value) {
7
- case 'title:1':
8
- $('.ampforwp-title').show();
9
- $('.ampforwp-title').appendTo('.amp-wp-article');
10
- break;
11
- case 'meta_info:1':
12
- $('.ampforwp-meta-info').show();
13
- $('.ampforwp-meta-info').appendTo('.amp-wp-article');
14
- break;
15
- case 'featured_image:1':
16
- $('.amp-wp-article-featured-image').show();
17
- $('.amp-wp-article-featured-image').appendTo('.amp-wp-article');
18
- break;
19
- case 'content:1':
20
- $('.amp-wp-article-content').show();
21
- $('.amp-wp-article-content').appendTo('.amp-wp-article');
22
- break;
23
- case 'meta_taxonomy:1':
24
- $('.ampforwp-meta-taxonomy').show();
25
- $('.ampforwp-meta-taxonomy').appendTo('.amp-wp-article');
26
- break;
27
- case 'social_icons:1':
28
- $('.ampforwp-social-icons').show();
29
- $('.ampforwp-social-icons').appendTo('.amp-wp-article');
30
- break;
31
- case 'comments:1':
32
- $('.ampforwp-comment-wrapper').show();
33
- $('.ampforwp-comment-wrapper').appendTo('.amp-wp-article');
34
- break;
35
- case 'related_posts:1':
36
- $('.amp-wp-content.relatedpost').show();
37
- $('.amp-wp-content.relatedpost').appendTo('.amp-wp-article');
38
- break;
39
- case 'title:0':
40
- $('.ampforwp-title').hide();
41
- break;
42
- case 'meta_info:0':
43
- $('.ampforwp-meta-info').hide();
44
- break;
45
- case 'featured_image:0':
46
- $('.amp-wp-article-featured-image').hide();
47
- break;
48
- case 'content:0':
49
- $('.amp-wp-article-content').hide();
50
- break;
51
- case 'meta_taxonomy:0':
52
- $('.ampforwp-meta-taxonomy').hide();
53
- break;
54
- case 'social_icons:0':
55
- $('.ampforwp-social-icons').hide();
56
- break;
57
- case 'comments:0':
58
- $('.ampforwp-comment-wrapper').hide();
59
- break;
60
- case 'related_posts:0':
61
- $('.amp-wp-content.relatedpost').hide();
62
- break;
63
- }
64
- }
65
-
66
- // Default Settings for the customizer
67
- var ampforwp_dm_settings = wp.customize.instance( 'ampforwp_design[elements]' ).get()
68
- ampforwp_dm_settings = ampforwp_dm_settings.split(',');
69
- $.each(ampforwp_dm_settings, function (index, value) {
70
- ampforwp_design_controller(value);
71
- });
72
-
73
- // Update the live settings
74
- wp.customize( 'ampforwp_design[elements]', function( value ){
75
- value.bind( function( to ) {
76
- var result = to.split(',');
77
- $.each(result, function (index, value) {
78
- ampforwp_design_controller(value);
79
- });
80
- } );
81
- } );
82
-
83
- });
84
- } )( jQuery );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/customizer/customizer-controls.php DELETED
@@ -1,96 +0,0 @@
1
- <?php
2
- /**
3
- * Sortable multi check boxes custom control.
4
- * @since 0.1.0
5
- * @author David Chandra Purnama <david@genbu.me>
6
- * @copyright Copyright (c) 2015, Genbu Media
7
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
8
- */
9
- class AMPFORWP_Customize_Control_Sortable_Checkboxes extends WP_Customize_Control {
10
-
11
- /**
12
- * Control Type
13
- */
14
- public $type = 'ampforwp-design-multicheck-sortable';
15
-
16
- /**
17
- * Enqueue Scripts
18
- */
19
- public function enqueue() {
20
- wp_enqueue_style( 'ampforwp-share-customize' );
21
- wp_enqueue_script( 'ampforwp-share-customize' );
22
- }
23
-
24
- /**
25
- * Render Settings
26
- */
27
- public function render_content() {
28
-
29
- /* if no choices, bail. */
30
- if ( empty( $this->choices ) ){
31
- return;
32
- } ?>
33
-
34
- <?php if ( !empty( $this->label ) ){ ?>
35
- <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
36
- <?php } // add label if needed. ?>
37
-
38
- <?php if ( !empty( $this->description ) ){ ?>
39
- <span class="description customize-control-description"><?php echo $this->description; ?></span>
40
- <?php } // add desc if needed. ?>
41
-
42
- <?php
43
- /* Data */
44
- $values = explode( ',', $this->value() );
45
- $choices = $this->choices;
46
-
47
- /* If values exist, use it. */
48
- $options = array();
49
- if( $values ){
50
-
51
- /* get individual item */
52
- foreach( $values as $value ){
53
-
54
- /* separate item with option */
55
- $value = explode( ':', $value );
56
-
57
- /* build the array. remove options not listed on choices. */
58
- if ( array_key_exists( $value[0], $choices ) ){
59
- $options[$value[0]] = $value[1] ? '1' : '0';
60
- }
61
- }
62
- }
63
- /* if there's new options (not saved yet), add it in the end. */
64
- foreach( $choices as $key => $val ){
65
-
66
- /* if not exist, add it in the end. */
67
- if ( ! array_key_exists( $key, $options ) ){
68
- $options[$key] = '0'; // use zero to deactivate as default for new items.
69
- }
70
- }
71
- ?>
72
-
73
- <ul class="ampforwp-design-multicheck-sortable-list">
74
-
75
- <?php foreach ( $options as $key => $value ){ ?>
76
-
77
- <li>
78
- <label>
79
- <input name="<?php echo esc_attr( $key ); ?>" class="ampforwp-design-multicheck-sortable-item" type="checkbox" value="<?php echo esc_attr( $value ); ?>" <?php checked( $value ); ?> />
80
- <?php echo esc_html( $choices[$key] ); ?>
81
- </label>
82
- <i class="dashicons dashicons-menu ampforwp-design-multicheck-sortable-handle"></i>
83
- </li>
84
-
85
- <?php } // end choices. ?>
86
-
87
- <li class="ampforwp-design-hideme">
88
- <input type="hidden" class="ampforwp-design-multicheck-sortable" <?php $this->link(); ?> value="<?php echo esc_attr( $this->value() ); ?>" />
89
- </li>
90
-
91
- </ul><!-- .ampforwp-design-multicheck-sortable-list -->
92
-
93
-
94
- <?php
95
- }
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/customizer/customizer.php DELETED
@@ -1,211 +0,0 @@
1
- <?php
2
- class AMPFORWP_Customizer_Design_Contols extends AMP_Customizer_Design_Settings {
3
- const NEW_COLOR_SCHEME = 'light';
4
-
5
- public static function init() {
6
- add_action( 'amp_customizer_init', array( __CLASS__, 'init_customizer' ) );
7
- add_filter( 'amp_customizer_get_settings', array( __CLASS__, 'append_settings' ) );
8
- }
9
-
10
- public static function init_customizer() {
11
- add_action( 'amp_customizer_register_settings', array( __CLASS__, 'register_customizer_settings' ) );
12
- add_action( 'amp_customizer_register_ui', array( __CLASS__, 'register_customizer_ui' ) );
13
- add_action( 'amp_customizer_enqueue_preview_scripts', array( __CLASS__, 'enqueue_customizer_preview_scripts' ) );
14
- }
15
-
16
- public static function register_customizer_settings( $wp_customize ) {
17
-
18
- /* Add Settings */
19
- $wp_customize->add_setting(
20
- 'ampforwp_design[elements]', /* option name */
21
- array(
22
- 'default' => self::ampforwp_controls_default(),
23
- // 'sanitize_callback' => 'ampforwp_sanitize_controller',
24
- 'transport' => 'postMessage',
25
- 'type' => 'option',
26
- 'capability' => 'manage_options',
27
- 'priority' => 10,
28
- )
29
- );
30
-
31
- }
32
-
33
- public function register_customizer_ui( $wp_customize ) {
34
- /* Load custom controls */
35
- require_once( AMPFORWP_PLUGIN_DIR . 'templates/customizer/customizer-controls.php' );
36
-
37
- /* Add Control for the settings. */
38
- $choices = array();
39
- $services = self::ampforwp_controls();
40
- foreach( $services as $key => $val ){
41
- $choices[$key] = $val['label'];
42
- }
43
- $wp_customize->add_control(
44
- new AMPFORWP_Customize_Control_Sortable_Checkboxes(
45
- $wp_customize, 'ampforwp_controls',
46
- array(
47
- 'section' => 'amp_design',
48
- 'settings' => 'ampforwp_design[elements]',
49
- 'label' => __( 'Design Manager', 'ampforwp' ),
50
- 'description' => __( 'Enable and reorder Design Elements.', 'ampforwp' ),
51
- 'choices' => $choices,
52
- 'priority' => 9,
53
- )
54
- )
55
- );
56
- }
57
-
58
- public static function enqueue_customizer_preview_scripts() {
59
- wp_enqueue_script(
60
- 'ampforwp-customizer-design-preview',
61
- plugin_dir_url( __FILE__ ) . 'assets/customizer-preview.js' ,
62
- array( 'amp-customizer' ),
63
- false,
64
- true
65
- );
66
- }
67
-
68
- public static function append_settings( $settings ) {
69
- $settings = wp_parse_args( $settings, array(
70
- 'color_scheme_new' => self::NEW_COLOR_SCHEME,
71
- ) );
72
-
73
- $theme_colors = self::get_colors_for_color_scheme( $settings['color_scheme'] );
74
-
75
- return array_merge( $settings, $theme_colors, array(
76
- 'link_color' => $settings['header_background_color'],
77
- ) );
78
- }
79
-
80
- /**
81
- * Sanitize Sharing Services
82
- * @since 0.1.0
83
- */
84
- private function ampforwp_sanitize_controller( $input ){
85
-
86
- /* Var */
87
- $output = array();
88
-
89
- /* Get valid services */
90
- $valid_services = self::ampforwp_controls();
91
- // var_dump($valid_services);
92
-
93
- /* Make array */
94
- $services = explode( ',', $input );
95
-
96
- /* Bail. */
97
- if( ! $services ){
98
- return null;
99
- }
100
-
101
- /* Loop and verify */
102
- foreach( $services as $service ){
103
-
104
- /* Separate service and status */
105
- $service = explode( ':', $service );
106
-
107
- if( isset( $service[0] ) && isset( $service[1] ) ){
108
- if( array_key_exists( $service[0], $valid_services ) ){
109
- $status = $service[1] ? '1' : '0';
110
- $output[] = trim( $service[0] . ':' . $status );
111
- }
112
- }
113
-
114
- }
115
-
116
- return trim( esc_attr( implode( ',', $output ) ) );
117
- }
118
-
119
- /**
120
- * Services
121
- * list of available sharing services
122
- */
123
- public function ampforwp_controls(){
124
-
125
- $services = array();
126
-
127
- /* Meta info */
128
- $services['meta_info'] = array(
129
- 'id' => 'meta_info',
130
- 'label' => __( 'Meta info', 'ampforwp' ),
131
- );
132
-
133
- /* title */
134
- $services['title'] = array(
135
- 'id' => 'title',
136
- 'label' => __( 'Title', 'ampforwp' ),
137
- );
138
-
139
- /* Featured Image */
140
- $services['featured_image'] = array(
141
- 'id' => 'featured_image',
142
- 'label' => __( 'Featured Image', 'ampforwp' ),
143
- );
144
-
145
- /* The Content */
146
- $services['content'] = array(
147
- 'id' => 'content',
148
- 'label' => __( 'The Content', 'ampforwp' ),
149
- );
150
-
151
- /* Meta Taxonomy */
152
- $services['meta_taxonomy'] = array(
153
- 'id' => 'meta_taxonomy',
154
- 'label' => __( 'Categories and Tags', 'ampforwp' ),
155
- );
156
-
157
- /* Social Icons */
158
- $services['social_icons'] = array(
159
- 'id' => 'social_icons',
160
- 'label' => __( 'Social Icons', 'ampforwp' ),
161
- );
162
-
163
- /* Comments */
164
- $services['comments'] = array(
165
- 'id' => 'comments',
166
- 'label' => __( 'Comments', 'ampforwp' ),
167
- );
168
-
169
- /* Related Posts */
170
- $services['related_posts'] = array(
171
- 'id' => 'related_posts',
172
- 'label' => __( 'Related Posts', 'ampforwp' ),
173
- );
174
-
175
- return apply_filters( 'ampforwp_controls', $services );
176
- }
177
-
178
-
179
- /**
180
- * Utility: Default Services to use in customizer default value
181
- * @return string
182
- */
183
- public function ampforwp_controls_default(){
184
- $default = array();
185
- $services = self::ampforwp_controls();
186
- foreach( $services as $service ){
187
- $default[] = $service['id'] . ':1'; /* activate all as default. */
188
- }
189
- return apply_filters( 'ampforwp_controls_default', implode( ',', $default ) );
190
- }
191
- }
192
-
193
- // Add New Contols and Settings in Customizer
194
- add_action( 'amp_init', array( 'AMPFORWP_Customizer_Design_Contols', 'init' ) );
195
-
196
- /* Register Customizer Scripts */
197
- add_action( 'customize_controls_enqueue_scripts', 'ampforwp_customize_register_scripts', 0 );
198
- define( 'AMPFORWP_SHARE_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) );
199
-
200
- /**
201
- * Register Scripts
202
- * so we can easily load this scripts multiple times when needed (?)
203
- */
204
- function ampforwp_customize_register_scripts(){
205
-
206
- /* CSS */
207
- wp_register_style( 'ampforwp-share-customize', AMPFORWP_SHARE_URL . 'assets/customizer-control.css' );
208
-
209
- /* JS */
210
- wp_register_script( 'ampforwp-share-customize', AMPFORWP_SHARE_URL . 'assets/customizer-control.js', array( 'jquery', 'jquery-ui-sortable', 'customize-controls' ) );
211
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager.php DELETED
@@ -1,207 +0,0 @@
1
- <?php
2
-
3
-
4
- if ( is_customize_preview() ) {
5
-
6
- // Load all the elements in the customizer as we want all the elements in design-manager
7
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_title' );
8
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_meta_info' );
9
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_featured_image' );
10
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_content' );
11
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_meta_taxonomy' );
12
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_social_icons' );
13
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_comments' );
14
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_related_posts' );
15
- }
16
-
17
-
18
- $data = get_option( 'ampforwp_design' );
19
-
20
- // Adding default Value
21
- if ($data['elements'] == '') {
22
- $data['elements'] = "meta_info:1,title:1,featured_image:1,content:1,meta_taxonomy:1,social_icons:1,comments:1,related_posts:1";
23
- }
24
-
25
- if( isset( $data['elements'] ) || ! empty( $data['elements'] ) ){
26
- $options = explode( ',', $data['elements'] );
27
- };
28
-
29
- if ($options): foreach ($options as $key=>$value) {
30
- if ( ! is_customize_preview() ) {
31
- switch ($value) {
32
- case 'title:1':
33
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_title' );
34
- break;
35
- case 'meta_info:1':
36
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_meta_info' );
37
- break;
38
- case 'featured_image:1':
39
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_featured_image' );
40
- break;
41
- case 'content:1':
42
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_the_content' );
43
- break;
44
- case 'meta_taxonomy:1':
45
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_meta_taxonomy' );
46
- break;
47
- case 'social_icons:1':
48
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_social_icons' );
49
- define('AMPFORWP_DM_SOCIAL_CHECK','true');
50
- break;
51
- case 'comments:1':
52
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_comments' );
53
- break;
54
- case 'related_posts:1':
55
- add_filter( 'ampforwp_design_elements', 'ampforwp_add_element_related_posts' );
56
- break;
57
- }
58
- }
59
- }
60
- endif;
61
-
62
-
63
- // Design Selector
64
- 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;
72
- }
73
-
74
- }
75
-
76
-
77
- add_action('pre_amp_render_post','ampforwp_stylesheet_file_insertion', 12 );
78
- function ampforwp_stylesheet_file_insertion() {
79
-
80
- // Add StyleSheet
81
- require AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() . '/style.php';
82
- }
83
-
84
- // Post Title
85
- function ampforwp_add_element_the_title( $meta_parts ) {
86
- $meta_parts[] = 'ampforwp-the-title';
87
- return $meta_parts;
88
- }
89
-
90
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_the_title', 10, 3 );
91
-
92
- function ampforwp_design_element_the_title( $file, $type, $post ) {
93
- if ( 'ampforwp-the-title' === $type ) {
94
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/title.php' ;
95
- }
96
- return $file;
97
- }
98
-
99
-
100
- // Meta Info
101
- function ampforwp_add_element_meta_info( $meta_parts ) {
102
- $meta_parts[] = 'ampforwp-meta-info';
103
- return $meta_parts;
104
- }
105
-
106
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_meta_info', 10, 3 );
107
-
108
- function ampforwp_design_element_meta_info( $file, $type, $post ) {
109
- if ( 'ampforwp-meta-info' === $type ) {
110
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/meta-info.php' ;
111
- }
112
- return $file;
113
- }
114
-
115
-
116
- // Featured Image
117
- function ampforwp_add_element_featured_image( $meta_parts ) {
118
- $meta_parts[] = 'ampforwp-featured-image';
119
- return $meta_parts;
120
- }
121
-
122
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_featured_image', 10, 3 );
123
-
124
- function ampforwp_design_element_featured_image( $file, $type, $post ) {
125
- if ( 'ampforwp-featured-image' === $type ) {
126
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/featured-image.php';
127
- }
128
- return $file;
129
- }
130
-
131
-
132
- // The Content
133
- function ampforwp_add_element_the_content( $meta_parts ) {
134
- $meta_parts[] = 'ampforwp-the-content';
135
- return $meta_parts;
136
- }
137
-
138
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_the_content', 10, 3 );
139
-
140
- function ampforwp_design_element_the_content( $file, $type, $post ) {
141
- if ( 'ampforwp-the-content' === $type ) {
142
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/content.php';
143
- }
144
- return $file;
145
- }
146
-
147
- // Meta Texonomy
148
- function ampforwp_add_element_meta_taxonomy( $meta_parts ) {
149
- $meta_parts[] = 'ampforwp-meta-taxonomy';
150
- return $meta_parts;
151
- }
152
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_meta_taxonomy', 10, 3 );
153
-
154
- function ampforwp_design_element_meta_taxonomy( $file, $type, $post ) {
155
- if ( 'ampforwp-meta-taxonomy' === $type ) {
156
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/meta-taxonomy.php';
157
- }
158
- return $file;
159
- }
160
-
161
- // Social Icons
162
- function ampforwp_add_element_social_icons( $meta_parts ) {
163
- $meta_parts[] = 'ampforwp-social-icons';
164
- return $meta_parts;
165
- }
166
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_social_icons', 10, 3 );
167
-
168
- function ampforwp_design_element_social_icons( $file, $type, $post ) {
169
- if ( 'ampforwp-social-icons' === $type ) {
170
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/social-icons.php';
171
- }
172
- return $file;
173
- }
174
-
175
-
176
- // Comments
177
- function ampforwp_add_element_comments( $meta_parts ) {
178
- $meta_parts[] = 'ampforwp-comments';
179
- return $meta_parts;
180
- }
181
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_comments', 10, 3 );
182
-
183
- function ampforwp_design_element_comments( $file, $type, $post ) {
184
- if ( 'ampforwp-comments' === $type ) {
185
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/comments.php';
186
- }
187
- return $file;
188
- }
189
-
190
- // Related Posts
191
- function ampforwp_add_element_related_posts( $meta_parts ) {
192
- $meta_parts[] = 'ampforwp-related-posts';
193
- return $meta_parts;
194
- }
195
- add_filter( 'amp_post_template_file', 'ampforwp_design_element_related_posts', 10, 3 );
196
-
197
- function ampforwp_design_element_related_posts( $file, $type, $post ) {
198
- if ( 'ampforwp-related-posts' === $type ) {
199
- $file = AMPFORWP_PLUGIN_DIR . 'templates/design-manager/design-'. ampforwp_design_selector() .'/elements/related-posts.php';
200
- }
201
- return $file;
202
- }
203
-
204
-
205
-
206
-
207
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/comments.php DELETED
@@ -1,151 +0,0 @@
1
- <div class="ampforwp-comment-wrapper">
2
- <?php
3
- global $redux_builder_amp;
4
- // Gather comments for a specific page/post
5
- $postID = get_the_ID();
6
- $comments = get_comments(array(
7
- 'post_id' => $postID,
8
- 'status' => 'approve' //Change this to the type of comments to be displayed
9
- ));
10
-
11
- if ( $comments ) { ?>
12
- <div class="amp-wp-content comments_list">
13
- <h3><?php global $redux_builder_amp; echo $redux_builder_amp['amp-translator-view-comments-text'] ?></h3>
14
- <ul>
15
- <?php
16
- // Display the list of comments
17
- function ampforwp_custom_translated_comment($comment, $args, $depth){
18
- $GLOBALS['comment'] = $comment; ?>
19
- <?php if('0' === $comment->comment_parent){ ?>
20
- <li id="li-comment-<?php comment_ID() ?>"
21
- <?php comment_class(); ?> >
22
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
23
- <footer class="comment-meta">
24
- <div class="comment-author vcard">
25
- <?php global $redux_builder_amp;
26
- printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
27
- </div>
28
- <!-- .comment-author -->
29
- <?php if ($comment->comment_approved == '0') : ?>
30
- <em><?php _e('Your comment is awaiting moderation.') ?></em>
31
- <br />
32
- <?php endif; ?>
33
- <!--comment moderation ends here-->
34
- <div class="comment-metadata">
35
- <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
36
- <?php
37
- printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
38
- ?>
39
- </a>
40
- <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
41
- </div>
42
- <!-- .comment-metadata -->
43
- </footer>
44
- <!-- .comment-meta -->
45
- <div class="comment-content">
46
- <p><?php echo get_comment_text(); ?></p>
47
- </div>
48
- <!-- .comment-content -->
49
- </article>
50
- <!-- .comment-body -->
51
- </li>
52
- <!-- #comment-## -->
53
- <?php
54
- }else {?>
55
- <li id="li-comment-<?php comment_ID() ?>"
56
- <?php comment_class(); ?> >
57
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
58
- <footer class="comment-meta">
59
- <div class="comment-author vcard">
60
- <?php global $redux_builder_amp;
61
- printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
62
- </div>
63
- <!-- .comment-author -->
64
- <?php if ($comment->comment_approved == '0') : ?>
65
- <em><?php _e('Your comment is awaiting moderation.') ?></em>
66
- <br />
67
- <?php endif; ?>
68
- <!--comment moderation ends here-->
69
- <div class="comment-metadata">
70
- <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
71
- <?php
72
- printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
73
- ?>
74
- </a>
75
- <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
76
- </div>
77
- <!-- .comment-metadata -->
78
- </footer>
79
- <!-- .comment-meta -->
80
- <div class="comment-content">
81
- <p><?php echo get_comment_text(); ?></p>
82
- </div>
83
- <!-- .comment-content -->
84
- <?php ampforwp_custom_translated_comment_nested($comment, $args, $depth);
85
- ?>
86
- </article>
87
- <!-- .comment-body -->
88
- </li>
89
- <!-- #comment-## -->
90
- <?php
91
- }
92
- }// end of ampforwp_custom_translated_comment()
93
-
94
- function ampforwp_custom_translated_comment_nested($comment, $args, $depth){
95
- $GLOBALS['comment'] = $comment; ?>
96
- <ul class="children">
97
- <li id="li-comment-<?php comment_ID() ?>"
98
- <?php comment_class(); ?> >
99
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
100
- <footer class="comment-meta">
101
- <div class="comment-author vcard">
102
- <?php global $redux_builder_amp;
103
- printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
104
- </div>
105
- <!-- .comment-author -->
106
- <?php if ($comment->comment_approved == '0') : ?>
107
- <em><?php _e('Your comment is awaiting moderation.') ?></em>
108
- <br />
109
- <?php endif; ?>
110
- <!--comment moderation ends here-->
111
- <div class="comment-metadata">
112
- <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
113
- <?php
114
- printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
115
- ?>
116
- </a>
117
- <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
118
- </div>
119
- <!-- .comment-metadata -->
120
- </footer>
121
- <!-- .comment-meta -->
122
- <div class="comment-content">
123
- <p><?php echo get_comment_text(); ?></p>
124
- </div>
125
- <!-- .comment-content -->
126
- </article>
127
- <!-- .comment-body -->
128
- </li>
129
- <!-- #comment-## -->
130
- </ul>
131
- <!-- .children -->
132
- <?php
133
- }// end of ampforwp_custom_translated_comment_nested()
134
-
135
- wp_list_comments( array(
136
- 'per_page' => 10, //Allow comment pagination
137
- 'style' => 'li',
138
- 'type' => 'comment',
139
- 'max_depth' => 0,
140
- 'avatar_size' => 0,
141
- 'callback' => 'ampforwp_custom_translated_comment',
142
- 'reverse_top_level' => false //Show the latest comments at the top of the list
143
- ), $comments); ?>
144
- </ul>
145
- </div>
146
- <div class="comment-button-wrapper">
147
- <a href="<?php echo get_permalink().'#commentform' ?>"><?php esc_html_e( $redux_builder_amp['amp-translator-leave-a-comment-text'] ); ?></a>
148
- </div><?php
149
- }
150
- ?>
151
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/content.php DELETED
@@ -1,7 +0,0 @@
1
- <div class="amp-wp-article-content">
2
- <?php do_action('ampforwp_inside_post_content_before') ?>
3
-
4
- <?php echo $this->get( 'post_amp_content' ); // amphtml content; no kses ?>
5
-
6
- <?php do_action('ampforwp_inside_post_content_after') ?>
7
- </div>
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/featured-image.php DELETED
@@ -1,18 +0,0 @@
1
- <?php
2
- $featured_image = $this->get( 'featured_image' );
3
-
4
- if ( empty( $featured_image ) ) {
5
- return;
6
- }
7
-
8
- $amp_html = $featured_image['amp_html'];
9
- $caption = $featured_image['caption'];
10
- ?>
11
- <figure class="amp-wp-article-featured-image wp-caption">
12
- <?php echo $amp_html; // amphtml content; no kses ?>
13
- <?php if ( $caption ) : ?>
14
- <p class="wp-caption-text">
15
- <?php echo wp_kses_data( $caption ); ?>
16
- </p>
17
- <?php endif; ?>
18
- </figure>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/meta-info.php DELETED
@@ -1,26 +0,0 @@
1
- <div class="amp-wp-article-header ampforwp-meta-info">
2
-
3
- <?php $post_author = $this->get( 'post_author' ); ?>
4
- <?php if ( $post_author ) : ?>
5
- <?php $author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ); ?>
6
- <div class="amp-wp-meta amp-wp-byline">
7
- <?php if ( function_exists( 'get_avatar_url' ) ) : ?>
8
- <amp-img src="<?php echo esc_url( $author_avatar_url ); ?>" width="24" height="24" layout="fixed"></amp-img>
9
- <?php endif; ?>
10
- <span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
11
- </div>
12
- <?php endif; ?>
13
-
14
- <div class="amp-wp-meta amp-wp-posted-on">
15
- <time datetime="<?php echo esc_attr( date( 'c', $this->get( 'post_publish_timestamp' ) ) ); ?>">
16
- <?php
17
- echo esc_html(
18
- sprintf(
19
- _x( '%s ago', '%s = human-readable time difference', 'amp' ),
20
- human_time_diff( $this->get( 'post_publish_timestamp' ), current_time( 'timestamp' ) )
21
- )
22
- );
23
- ?>
24
- </time>
25
- </div>
26
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/meta-taxonomy.php DELETED
@@ -1,16 +0,0 @@
1
- <div class="amp-wp-article-header amp-wp-article-category ampforwp-meta-taxonomy ">
2
-
3
- <?php global $redux_builder_amp; ?>
4
-
5
- <?php $ampforwp_categories = get_the_terms( $this->ID, 'category' );
6
- if ( $ampforwp_categories ) : ?>
7
- <div class="amp-wp-meta amp-wp-tax-category">
8
- <span><?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .': ', 'amp' )); ?></span>
9
- <?php foreach ($ampforwp_categories as $cat ) {
10
- echo (' <a href="'.get_category_link($cat->term_taxonomy_id).'?'. AMP_QUERY_VAR .'" > '. $cat->name .'</a>');
11
- } ?>
12
- </div>
13
- <?php endif; ?>
14
-
15
-
16
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/related-posts.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
- $orig_post = $post;
3
- global $post, $redux_builder_amp;
4
-
5
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==2) {
6
- $categories = get_the_category($post->ID);
7
- if ($categories) {
8
- $category_ids = array();
9
- foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
10
- $args=array(
11
- 'category__in' => $category_ids,
12
- 'post__not_in' => array($post->ID),
13
- 'posts_per_page'=> 3,
14
- 'caller_get_posts'=>1
15
- );
16
- }
17
- } //end of block for categories
18
- //code block for tags
19
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
20
- $ampforwp_tags = get_the_tags($post->ID);
21
- if ($ampforwp_tags) {
22
- $tag_ids = array();
23
- foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
24
- $args=array(
25
- 'tag__and' => $tag_ids,
26
- 'post__not_in' => array($post->ID),
27
- 'posts_per_page'=> 3,
28
- 'caller_get_posts'=>1
29
- );
30
- }
31
- }//end of block for tags
32
-
33
- $my_query = new wp_query( $args );
34
- if( $my_query->have_posts() ) { ?>
35
- <div class="amp-wp-content relatedpost">
36
- <div class="related_posts">
37
- <ol class="clearfix">
38
- <h3><?php echo esc_html( $redux_builder_amp['amp-translator-related-text'] ); ?></h3>
39
- <?php
40
- while( $my_query->have_posts() ) {
41
- $my_query->the_post();?>
42
- <li class="<?php if ( has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
43
- <?php if ( has_post_thumbnail() ) {
44
- $thumb_id_2 = get_post_thumbnail_id();
45
- $thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, 'thumbnail', true);
46
- $thumb_url_2 = $thumb_url_array_2[0];?>
47
- <amp-img src="<?php echo $thumb_url_2 ?>" width="150" height="150" layout="responsive"></amp-img>
48
- <?php } ?>
49
- <div class="related_link">
50
- <a href="<?php the_permalink(); ?><?php echo AMP_QUERY_VAR ;?>"><?php the_title(); ?></a>
51
- <?php
52
- if(has_excerpt()){
53
- $content = the_excerpt();
54
- }else{
55
- $content = get_the_content();
56
- }
57
- ?>
58
- <p><?php echo wp_trim_words( $content , '15' ); ?></p>
59
- </div>
60
- </li>
61
- <?php
62
- } ?>
63
- </ol>
64
- </div>
65
- </div> <?php
66
- }
67
- $post = $orig_post;
68
- wp_reset_postdata();
69
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/social-icons.php DELETED
@@ -1,28 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <div class="ampforwp-social-icons">
3
- <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
4
- <amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
5
- <?php } ?>
6
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
7
- <amp-social-share type="twitter" width="50" height="28"></amp-social-share>
8
- <?php } ?>
9
- <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
10
- <amp-social-share type="gplus" width="50" height="28"></amp-social-share>
11
- <?php } ?>
12
- <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
13
- <amp-social-share type="email" width="50" height="28"></amp-social-share>
14
- <?php } ?>
15
- <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
16
- <amp-social-share type="pinterest" width="50" height="28"></amp-social-share>
17
- <?php } ?>
18
- <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
19
- <amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
20
- <?php } ?>
21
- <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
22
- <a href="whatsapp://send">
23
- <div class="whatsapp-share-icon">
24
- <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwxOS42MjgsOTAsNDMuODQxeiBNNDUuODE4LDYuOTgyICAgYy0yMC40ODQsMC0zNy4xNDYsMTYuNTM1LTM3LjE0NiwzNi44NTljMCw4LjA2NSwyLjYyOSwxNS41MzQsNy4wNzYsMjEuNjFMMTEuMTA3LDc5LjE0bDE0LjI3NS00LjUzNyAgIGM1Ljg2NSwzLjg1MSwxMi44OTEsNi4wOTcsMjAuNDM3LDYuMDk3YzIwLjQ4MSwwLDM3LjE0Ni0xNi41MzMsMzcuMTQ2LTM2Ljg1N1M2Ni4zMDEsNi45ODIsNDUuODE4LDYuOTgyeiBNNjguMTI5LDUzLjkzOCAgIGMtMC4yNzMtMC40NDctMC45OTQtMC43MTctMi4wNzYtMS4yNTRjLTEuMDg0LTAuNTM3LTYuNDEtMy4xMzgtNy40LTMuNDk1Yy0wLjk5My0wLjM1OC0xLjcxNy0wLjUzOC0yLjQzOCwwLjUzNyAgIGMtMC43MjEsMS4wNzYtMi43OTcsMy40OTUtMy40Myw0LjIxMmMtMC42MzIsMC43MTktMS4yNjMsMC44MDktMi4zNDcsMC4yNzFjLTEuMDgyLTAuNTM3LTQuNTcxLTEuNjczLTguNzA4LTUuMzMzICAgYy0zLjIxOS0yLjg0OC01LjM5My02LjM2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
25
- </div>
26
- </a>
27
- <?php } ?>
28
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/elements/title.php DELETED
@@ -1,3 +0,0 @@
1
- <header class="amp-wp-article-header ampforwp-title">
2
- <h1 class="amp-wp-title"><?php echo wp_kses_data( $this->get( 'post_title' ) ); ?></h1>
3
- </header>
 
 
 
templates/design-manager/design-1/footer.php DELETED
@@ -1,10 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <footer class="amp-wp-footer">
3
- <div>
4
- <h2><?php echo esc_html( $this->get( 'blog_name' ) ); ?></h2>
5
- <p> <?php echo $redux_builder_amp['amp-footer-text']; ?>
6
- <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'ampforwp' ) ); ?>"><?php printf( __( 'Powered by %s', 'ampforwp' ), 'WordPress' ); ?></a>
7
- </p>
8
- <a href="#top" class="back-to-top"><?php echo esc_html( $redux_builder_amp['amp-translator-top-text'] ); ?></a>
9
- </div>
10
- </footer>
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/frontpage.php DELETED
@@ -1,69 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <!doctype html>
3
- <html amp>
4
- <head>
5
- <meta charset="utf-8">
6
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
7
- <?php do_action( 'amp_post_template_head', $this ); ?>
8
-
9
- <style amp-custom>
10
- <?php $this->load_parts( array( 'style' ) ); ?>
11
- <?php do_action( 'amp_post_template_css', $this ); ?>
12
- </style>
13
- </head>
14
- <body class="single-post amp-wp-frontpage">
15
- <?php $this->load_parts( array( 'header-bar' ) ); ?>
16
-
17
- <?php do_action( 'ampforwp_after_header', $this ); ?>
18
-
19
-
20
- <div class="amp-wp-content the_content">
21
- <?php do_action( 'ampforwp_before_post_content', $this ); ?>
22
-
23
- <?php
24
- global $redux_demo;
25
- //echo 'Multi Select value: ' . $redux_builder_amp['amp-frontpage-select-option-pages'];
26
- ?>
27
-
28
- <?php $the_query = new WP_Query( 'page_id=' . $redux_builder_amp['amp-frontpage-select-option-pages'] . '' ); ?>
29
- <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
30
- <?php the_content(); ?>
31
- <?php endwhile;?>
32
-
33
- <?php do_action( 'ampforwp_after_post_content', $this ); ?>
34
- </div>
35
-
36
- <div class="amp-wp-content post-pagination-meta">
37
- <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-taxonomy' ) ) ); ?>
38
-
39
-
40
-
41
- </div>
42
-
43
- <?php if($redux_builder_amp['enable-single-social-icons'] == true) { ?>
44
- <div class="sticky_social">
45
- <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
46
- <amp-social-share type="facebook" width="50" height="28"></amp-social-share>
47
- <?php } ?>
48
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
49
- <amp-social-share type="twitter" width="50" height="28"></amp-social-share>
50
- <?php } ?>
51
- <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
52
- <amp-social-share type="gplus" width="50" height="28"></amp-social-share>
53
- <?php } ?>
54
- <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
55
- <amp-social-share type="email" width="50" height="28"></amp-social-share>
56
- <?php } ?>
57
- <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
58
- <amp-social-share type="pinterest" width="50" height="28"></amp-social-share>
59
- <?php } ?>
60
- <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
61
- <amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
62
- <?php } ?>
63
- </div>
64
- <?php } ?>
65
-
66
- <?php $this->load_parts( array( 'footer' ) ); ?>
67
- <?php do_action( 'amp_post_template_footer', $this ); ?>
68
- </body>
69
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/header-bar.php DELETED
@@ -1,39 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <header id="#top" class="amp-wp-header">
3
- <div class="ampforwp-logo-area" >
4
-
5
- <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . '?' .AMP_QUERY_VAR; ?>">
6
- <?php if (true == ($redux_builder_amp['opt-media']['url'])) { ?>
7
- <amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="190" height="36" alt="logo" class="amp-logo"></amp-img>
8
- <?php } else {
9
- echo esc_html( $this->get( 'blog_name' ) );
10
- } ?>
11
- </a>
12
-
13
-
14
- <a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>">
15
- <?php $site_icon_url = $this->get( 'site_icon_url' );
16
- if ( $site_icon_url ) : ?>
17
- <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
18
- <?php endif; ?>
19
- </a>
20
-
21
- <div on='tap:sidebar.toggle' role="button" tabindex="0" class="nav_container">
22
- <a href="#" class="toggle-text">
23
- <span></span>
24
- <span></span>
25
- <span></span>
26
- </a>
27
- </div>
28
-
29
- </div>
30
-
31
- </header>
32
- <amp-sidebar id='sidebar'
33
- layout="nodisplay"
34
- side="right">
35
- <div class="toggle-navigationv2">
36
- <div role="button" tabindex="0" on='tap:sidebar.close' class="close-nav">X</div>
37
- <?php wp_nav_menu( array( 'theme_location' => 'amp-menu' ) ); ?>
38
- </div>
39
- </amp-sidebar>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/index.php DELETED
@@ -1,69 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <!doctype html>
3
- <html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
4
- <head>
5
- <meta charset="utf-8">
6
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
7
- <?php do_action( 'amp_post_template_head', $this ); ?>
8
- <style amp-custom>
9
- <?php $this->load_parts( array( 'style' ) ); ?>
10
- <?php do_action( 'amp_post_template_css', $this ); ?>
11
- </style>
12
- </head>
13
-
14
- <body class="<?php echo esc_attr( $this->get( 'body_class' ) ); ?>">
15
-
16
- <?php $this->load_parts( array( 'header-bar' ) ); ?>
17
-
18
- <article class="amp-wp-article ampforwp-custom-index amp-wp-home">
19
-
20
- <?php do_action('ampforwp_post_before_design_elements') ?>
21
-
22
- <?php
23
- if ( have_posts() ) :
24
- while ( have_posts() ) : the_post(); ?>
25
- <div class="amp-wp-content amp-wp-article-header">
26
-
27
- <h1 class="amp-wp-title">
28
- <?php $ampforwp_post_url = get_permalink(); ?>
29
- <a href="<?php echo trailingslashit($ampforwp_post_url) . AMP_QUERY_VAR ;?>"><?php the_title() ?></a>
30
- </h1>
31
-
32
- <div class="amp-wp-meta">
33
- <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author', 'meta-time' ) ) ); ?>
34
- </div>
35
-
36
- <?php
37
- if(has_excerpt()){
38
- $content = the_excerpt();
39
- }else{
40
- $content = get_the_content();
41
- }
42
- ?>
43
- <p><?php echo wp_trim_words( $content , '50'); ?></p>
44
- </div>
45
- <?php endwhile; ?>
46
-
47
- <div class="amp-wp-content pagination-holder">
48
-
49
- <div id="pagination">
50
- <div class="next"><?php next_posts_link( $redux_builder_amp['amp-translator-next-text']. ' &raquo;', 0 ) ?></div>
51
- <div class="prev"><?php previous_posts_link( '&laquo; '. $redux_builder_amp['amp-translator-previous-text'] ); ?></div>
52
- <div class="clearfix"></div>
53
- </div>
54
-
55
- </div>
56
-
57
- <?php endif; ?>
58
-
59
- <?php do_action('ampforwp_post_after_design_elements') ?>
60
-
61
- </article>
62
-
63
-
64
- <?php $this->load_parts( array( 'footer' ) ); ?>
65
-
66
- <?php do_action( 'amp_post_template_footer', $this ); ?>
67
-
68
- </body>
69
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/single.php DELETED
@@ -1,30 +0,0 @@
1
- <!doctype html>
2
- <html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
6
- <?php do_action( 'amp_post_template_head', $this ); ?>
7
- <style amp-custom>
8
- <?php $this->load_parts( array( 'style' ) ); ?>
9
- <?php do_action( 'amp_post_template_css', $this ); ?>
10
- </style>
11
- </head>
12
-
13
- <body class="<?php echo esc_attr( $this->get( 'body_class' ) ); ?>">
14
-
15
- <?php $this->load_parts( array( 'header-bar' ) ); ?>
16
-
17
- <article class="amp-wp-article">
18
- <?php do_action('ampforwp_post_before_design_elements') ?>
19
-
20
- <?php $this->load_parts( apply_filters( 'ampforwp_design_elements', array( 'empty-filter' ) ) ); ?>
21
-
22
- <?php do_action('ampforwp_post_after_design_elements') ?>
23
- </article>
24
-
25
- <?php $this->load_parts( array( 'footer' ) ); ?>
26
-
27
- <?php do_action( 'amp_post_template_footer', $this ); ?>
28
-
29
- </body>
30
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-1/style.php DELETED
@@ -1,775 +0,0 @@
1
- <?php
2
- add_action('amp_post_template_css', 'ampforwp_additional_style_input');
3
-
4
- function ampforwp_additional_style_input( $amp_template ) {
5
- global $redux_builder_amp;
6
- $get_customizer = new AMP_Post_Template( $post_id );
7
-
8
- // Get content width
9
- $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
10
-
11
- // Get template colors
12
- $theme_color = $get_customizer->get_customizer_setting( 'theme_color' );
13
- $text_color = $get_customizer->get_customizer_setting( 'text_color' );
14
- $muted_text_color = $get_customizer->get_customizer_setting( 'muted_text_color' );
15
- $border_color = $get_customizer->get_customizer_setting( 'border_color' );
16
- $link_color = $get_customizer->get_customizer_setting( 'link_color' );
17
- $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
18
- $header_color = $get_customizer->get_customizer_setting( 'header_color' );
19
- ?>
20
- /* Generic WP styling */
21
-
22
- .alignright {
23
- float: right;
24
- }
25
-
26
- .alignleft {
27
- float: left;
28
- }
29
-
30
- .aligncenter {
31
- display: block;
32
- margin-left: auto;
33
- margin-right: auto;
34
- }
35
-
36
- .amp-wp-enforced-sizes {
37
- /** Our sizes fallback is 100vw, and we have a padding on the container; the max-width here prevents the element from overflowing. **/
38
- max-width: 100%;
39
- margin: 0 auto;
40
- }
41
-
42
- .amp-wp-unknown-size img {
43
- /** Worst case scenario when we can't figure out dimensions for an image. **/
44
- /** Force the image into a box of fixed dimensions and use object-fit to scale. **/
45
- object-fit: contain;
46
- }
47
-
48
- /* Template Styles */
49
-
50
- .amp-wp-content,
51
- .amp-wp-title-bar div {
52
- <?php if ( $content_max_width > 0 ) : ?>
53
- margin: 0 auto;
54
- max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
55
- <?php endif; ?>
56
- }
57
-
58
- html {
59
- background: <?php echo sanitize_hex_color( $header_background_color ); ?>;
60
- }
61
-
62
- body {
63
- background: <?php echo sanitize_hex_color( $theme_color ); ?>;
64
- color: <?php echo sanitize_hex_color( $text_color ); ?>;
65
- font-family: 'Merriweather', 'Times New Roman', Times, Serif;
66
- font-weight: 300;
67
- line-height: 1.75em;
68
- }
69
-
70
- p,
71
- ol,
72
- ul,
73
- figure {
74
- margin: 0 0 1em;
75
- padding: 0;
76
- }
77
-
78
- a,
79
- a:visited {
80
- color: <?php echo sanitize_hex_color( $link_color ); ?>;
81
- }
82
-
83
- a:hover,
84
- a:active,
85
- a:focus {
86
- color: <?php echo sanitize_hex_color( $text_color ); ?>;
87
- }
88
-
89
- /* Quotes */
90
-
91
- blockquote {
92
- color: <?php echo sanitize_hex_color( $text_color ); ?>;
93
- background: rgba(127,127,127,.125);
94
- border-left: 2px solid <?php echo sanitize_hex_color( $link_color ); ?>;
95
- margin: 8px 0 24px 0;
96
- padding: 16px;
97
- }
98
-
99
- blockquote p:last-child {
100
- margin-bottom: 0;
101
- }
102
-
103
- /* UI Fonts */
104
-
105
- .amp-wp-meta,
106
- .amp-wp-header div,
107
- .amp-wp-title,
108
- .wp-caption-text,
109
- .amp-wp-tax-category,
110
- .amp-wp-tax-tag,
111
- .amp-wp-comments-link,
112
- .amp-wp-footer p,
113
- .back-to-top {
114
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
115
- }
116
-
117
- /* Header */
118
-
119
- .amp-wp-header {
120
- background-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;
121
- }
122
-
123
- .amp-wp-header div {
124
- color: <?php echo sanitize_hex_color( $header_color ); ?>;
125
- font-size: 1em;
126
- font-weight: 400;
127
- margin: 0 auto;
128
- max-width: calc(840px - 32px);
129
- padding: .875em 16px;
130
- position: relative;
131
- }
132
-
133
- .amp-wp-header a {
134
- color: <?php echo sanitize_hex_color( $header_color ); ?>;
135
- text-decoration: none;
136
- }
137
-
138
- /* Site Icon */
139
-
140
- .amp-wp-header .amp-wp-site-icon {
141
- /** site icon is 32px **/
142
- background-color: <?php echo sanitize_hex_color( $header_color ); ?>;
143
- border: 1px solid <?php echo sanitize_hex_color( $header_color ); ?>;
144
- border-radius: 50%;
145
- position: absolute;
146
- right: 18px;
147
- top: 10px;
148
- }
149
-
150
- /* Article */
151
-
152
- .amp-wp-article {
153
- color: <?php echo sanitize_hex_color( $text_color ); ?>;
154
- font-weight: 400;
155
- margin: 1.5em auto;
156
- max-width: 840px;
157
- overflow-wrap: break-word;
158
- word-wrap: break-word;
159
- }
160
-
161
- /* Article Header */
162
-
163
- .amp-wp-article-header {
164
- align-items: center;
165
- align-content: stretch;
166
- display: flex;
167
- flex-wrap: wrap;
168
- justify-content: space-between;
169
- margin: 1.5em 16px 1.5em;
170
- }
171
- .amp-wp-title {
172
- color: <?php echo sanitize_hex_color( $text_color ); ?>;
173
- display: block;
174
- flex: 1 0 100%;
175
- font-weight: 900;
176
- margin: 0;
177
- width: 100%;
178
- }
179
-
180
- /* Article Meta */
181
-
182
- .amp-wp-meta {
183
- color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
184
- display: inline-block;
185
- flex: 2 1 50%;
186
- font-size: .875em;
187
- line-height: 1.7em;
188
- margin: 0;
189
- padding: 0;
190
- }
191
- .ampforwp-meta-info{
192
- margin-top: 0px;
193
- }
194
- .amp-wp-article-header .amp-wp-meta:last-of-type {
195
- text-align: right;
196
- }
197
-
198
- .amp-wp-article-header .amp-wp-meta:first-of-type {
199
- text-align: left;
200
- }
201
-
202
- .amp-wp-byline amp-img,
203
- .amp-wp-byline .amp-wp-author {
204
- display: inline-block;
205
- vertical-align: middle;
206
- }
207
-
208
- .amp-wp-byline amp-img {
209
- border: 1px solid <?php echo sanitize_hex_color( $link_color ); ?>;
210
- border-radius: 50%;
211
- position: relative;
212
- margin-right: 6px;
213
- }
214
-
215
- .amp-wp-posted-on {
216
- text-align: right;
217
- }
218
-
219
- /* Featured image */
220
-
221
- .amp-wp-article-featured-image {
222
- margin: 1.5em 16px 1.5em;
223
- }
224
- .amp-wp-article-featured-image amp-img {
225
- margin: 0 auto;
226
- }
227
- .amp-wp-article-featured-image.wp-caption .wp-caption-text {
228
- margin: 0 18px;
229
- }
230
- /* Front page */
231
- .amp-wp-frontpage .the_content {
232
- padding: 10px;
233
- }
234
- /* Article Content */
235
- .amp-wp-article a{
236
- text-decoration:none
237
- }
238
- .amp-wp-article-content {
239
- margin: 0 16px;
240
- }
241
-
242
- .amp-wp-article-content ul,
243
- .amp-wp-article-content ol {
244
- margin-left: 1em;
245
- }
246
-
247
- .amp-wp-article-content amp-img {
248
- margin: 0 auto;
249
- }
250
-
251
- .amp-wp-article-content amp-img.alignright {
252
- margin: 0 0 1em 16px;
253
- }
254
-
255
- .amp-wp-article-content amp-img.alignleft {
256
- margin: 0 16px 1em 0;
257
- }
258
-
259
- /* Captions */
260
-
261
- .wp-caption {
262
- padding: 0;
263
- }
264
-
265
- .wp-caption.alignleft {
266
- margin-right: 16px;
267
- }
268
-
269
- .wp-caption.alignright {
270
- margin-left: 16px;
271
- }
272
-
273
- .wp-caption-text {
274
- border-bottom: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;
275
- color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
276
- font-size: .875em;
277
- line-height: 1.5em;
278
- margin: 0;
279
- padding: .66em 10px .75em;
280
- }
281
-
282
- /* AMP Media */
283
-
284
- amp-carousel {
285
- background: <?php echo sanitize_hex_color( $border_color ); ?>;
286
- margin: 0 -16px 1.5em;
287
- }
288
- amp-iframe,
289
- amp-youtube,
290
- amp-instagram,
291
- amp-vine {
292
- background: <?php echo sanitize_hex_color( $border_color ); ?>;
293
- margin: 0 -16px 1.5em;
294
- }
295
-
296
- .amp-wp-article-content amp-carousel amp-img {
297
- border: none;
298
- }
299
-
300
- amp-carousel > amp-img > img {
301
- object-fit: contain;
302
- }
303
-
304
- .amp-wp-iframe-placeholder {
305
- background: <?php echo sanitize_hex_color( $border_color ); ?> url( <?php echo esc_url( $get_customizer->get( 'placeholder_image_url' ) ); ?> ) no-repeat center 40%;
306
- background-size: 48px 48px;
307
- min-height: 48px;
308
- }
309
-
310
- /* Article Footer Meta */
311
-
312
- .amp-wp-article-footer .amp-wp-meta {
313
- display: block;
314
- }
315
- .amp-wp-tax-category span{
316
- margin-right:5px;
317
- }
318
- .amp-wp-tax-category,
319
- .amp-wp-tax-tag {
320
- color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
321
- font-size: .875em;
322
- line-height: 1.5em;
323
- margin: 1.5em 16px;
324
- }
325
-
326
- .amp-wp-comments-link {
327
- color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
328
- font-size: .875em;
329
- line-height: 1.5em;
330
- text-align: center;
331
- margin: 2.25em 0 1.5em;
332
- }
333
-
334
- .amp-wp-comments-link a {
335
- border-style: solid;
336
- border-color: <?php echo sanitize_hex_color( $border_color ); ?>;
337
- border-width: 1px 1px 2px;
338
- border-radius: 4px;
339
- background-color: transparent;
340
- color: <?php echo sanitize_hex_color( $link_color ); ?>;
341
- cursor: pointer;
342
- display: block;
343
- font-size: 14px;
344
- font-weight: 600;
345
- line-height: 18px;
346
- margin: 0 auto;
347
- max-width: 200px;
348
- padding: 11px 16px;
349
- text-decoration: none;
350
- width: 50%;
351
- -webkit-transition: background-color 0.2s ease;
352
- transition: background-color 0.2s ease;
353
- }
354
-
355
- /* AMP Footer */
356
-
357
- .amp-wp-footer {
358
- border-top: 1px solid <?php echo sanitize_hex_color( $border_color ); ?>;
359
- margin: calc(1.5em - 1px) 0 0;
360
- }
361
-
362
- .amp-wp-footer div {
363
- margin: 0 auto;
364
- max-width: calc(840px - 32px);
365
- padding: 1.25em 16px 1.25em;
366
- position: relative;
367
- }
368
-
369
- .amp-wp-footer h2 {
370
- font-size: 1em;
371
- line-height: 1.375em;
372
- margin: 0 0 .5em;
373
- }
374
-
375
- .amp-wp-footer p {
376
- color: <?php echo sanitize_hex_color( $muted_text_color ); ?>;
377
- font-size: .8em;
378
- line-height: 1.5em;
379
- margin: 0 85px 0 0;
380
- }
381
-
382
- .amp-wp-footer a {
383
- text-decoration: none;
384
- }
385
-
386
- .back-to-top {
387
- bottom: 1.275em;
388
- font-size: .8em;
389
- font-weight: 600;
390
- line-height: 2em;
391
- position: absolute;
392
- right: 16px;
393
- }
394
-
395
-
396
- /* Header */
397
- .amp-wp-header {
398
- }
399
- .amp-wp-header .nav_container {
400
- float: right;
401
- top: -11px;
402
- line-height: 1;
403
- right: 60px;
404
- }
405
- .toggle-text {
406
- position: absolute;
407
- right: 0;
408
- height: 22px;
409
- width: 28px;
410
- }
411
- .toggle-text span {
412
- display: block;
413
- position: absolute;
414
- height: 2px;
415
- width: 25px;
416
- background: #ffffff;
417
- border-radius: 19px;
418
- opacity: 1;
419
- left: 0;
420
- }
421
- .toggle-text span:nth-child(2) {
422
- top: 9px;
423
- }
424
- .toggle-text span:nth-child(3) {
425
- top: 18px;
426
- }
427
- /* Homepage */
428
- .amp-wp-home .amp-wp-meta{
429
- margin:5px 0px
430
- }
431
- .amp-wp-home .amp-wp-content p {
432
- display: inline-block;
433
- width: 100%;
434
- }
435
- .ampforwp-custom-index .amp-wp-title a {
436
- text-decoration: none;
437
- color: <?php echo sanitize_hex_color( $text_color ); ?>;
438
- }
439
- .amp-wp-meta {
440
- display: flex;
441
- }
442
- .amp-wp-posted-on {
443
- display: initial
444
- }
445
- .ampforwp-custom-index .amp-wp-content {
446
- margin-bottom: 30px;
447
- }
448
- /* Home Pagination */
449
- .pagination-holder{
450
- margin: 1.5em 16px 1.5em
451
- }
452
- #pagination .next {
453
- display: inline-block;
454
- float: right
455
- }
456
- #pagination .prev {
457
- display: inline-block;
458
- }
459
-
460
- /* Single */
461
- .amp-wp-article-content amp-img {
462
- max-width : 100%;
463
- }
464
- .amp-wp-meta.amp-wp-tax-category,
465
- .amp-wp-meta.amp-wp-tax-tag {
466
- margin : 0
467
- }
468
- .amp-wp-meta.amp-wp-tax-tag {
469
- display : initial
470
- }
471
- /* Social Icons */
472
- .ampforwp-social-icons{
473
- margin: 1.5em 16px 1.5em;
474
- height: 30px;
475
- }
476
- .whatsapp-share-icon {
477
- width: 50px;
478
- height: 20px;
479
- display: inline-block;
480
- background: #5cbe4a;
481
- padding: 4px 0px;
482
- position: relative;
483
- top: -4px;
484
- text-align: center
485
- }
486
- .comment-button-wrapper a{
487
- font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
488
- border-style: solid;
489
- border-color: #c2c2c2;
490
- border-width: 1px 1px 2px;
491
- border-radius: 4px;
492
- background-color: transparent;
493
- color: #0a89c0;
494
- cursor: pointer;
495
- display: block;
496
- font-size: 14px;
497
- font-weight: 600;
498
- text-align:center;
499
- line-height: 18px;
500
- margin: 0 auto;
501
- max-width: 200px;
502
- padding: 11px 16px;
503
- text-decoration: none;
504
- width: 50%;
505
- -webkit-transition: background-color 0.2s ease;
506
- transition: background-color 0.2s ease;
507
- }
508
- /* Related Posts */
509
- .relatedpost{
510
- margin: 2em 16px 2em;
511
- }
512
- main .amp-wp-content.relatedpost {
513
- background: none;
514
- box-shadow: none;
515
- max-width: 1030px;
516
- }
517
- .related_posts h3, .comments_list h3{
518
- font-size: 14px;
519
- font-weight: bold;
520
- letter-spacing: 0.4px;
521
- margin: 25px 0 10px 0;
522
- color: #333;
523
- }
524
- .related_posts ol{
525
- list-style-type:none;
526
- margin:0;
527
- padding:0;
528
- font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif
529
- }
530
- .related_posts ol li{
531
- display:inline-block;
532
- width:100%;
533
- margin-bottom: 12px;
534
- padding: 0px;
535
- }
536
- .related_posts .related_link a{
537
- color: #000;
538
- font-size: 18px;
539
- }
540
- .related_posts ol li amp-img{
541
- width:100px;
542
- float:left;
543
- margin-right:15px
544
- }
545
- .related_posts ol li p{
546
- font-size: 12px;
547
- color: #999;
548
- line-height: 1.2;
549
- margin: 12px 0 0 0;
550
- }
551
- .no_related_thumbnail{
552
- padding: 15px 18px;
553
- }
554
-
555
- /* Comments */
556
- .comments_list{
557
- margin: 2.5em 16px 2.5em
558
- }
559
- main .amp-wp-content.comments_list {
560
- background: none;
561
- box-shadow: none;
562
- max-width: 1030px;
563
- }
564
- .comments_list div{
565
- display:inline-block;
566
- }
567
- .comments_list ul{
568
- margin:0;
569
- padding:0
570
- }
571
- .comments_list ul.children{
572
- padding-bottom:10px;
573
- }
574
- .comments_list ul li p{
575
- margin: 0;
576
- font-size: 14px;
577
- clear: both;
578
- padding-top: 5px;
579
- }
580
- .comments_list ul li{
581
- font-family:sans-serif;
582
- font-size:11px;
583
- list-style-type:none;
584
- margin-bottom: 12px;
585
- background: #fefefe;
586
- -moz-border-radius: 2px;
587
- -webkit-border-radius: 2px;
588
- border-radius: 2px;
589
- -moz-box-shadow: 0 2px 3px rgba(0,0,0,.05);
590
- -webkit-box-shadow: 0 2px 3px rgba(0,0,0,.05);
591
- box-shadow: 0 2px 3px rgba(0,0,0,.05);
592
- padding: 0px;
593
- max-width: 1000px;
594
- }
595
- .comments_list ul li .says{
596
- margin-right: 4px;
597
- }
598
- .comments_list ul li p{
599
- font-family:'Merriweather', 'Times New Roman', Times, Serif
600
- }
601
- .comments_list ul li .comment-body{
602
- padding: 10px 0px 15px 0px;
603
- }
604
- .comment-author{ float:left }
605
- .single-post footer.comment-meta{
606
- /* float:right */
607
- padding-bottom: 0;
608
- }
609
- .comments_list li li{
610
- margin: 20px 20px 10px 20px;
611
- background: #f7f7f7;
612
- box-shadow: none;
613
- border: 1px solid #eee;
614
- }
615
- .comments_list li li li{
616
- margin:20px 20px 10px 20px
617
- }
618
-
619
- /* Slide Navigation code */
620
- amp-sidebar {
621
- width: 250px;
622
- }
623
- .amp-sidebar-image {
624
- line-height: 100px;
625
- vertical-align:middle;
626
- }
627
- .amp-close-image {
628
- top: 15px;
629
- left: 225px;
630
- cursor: pointer;
631
- }
632
- .toggle-navigationv2 ul {
633
- list-style-type: none;
634
- margin: 0;
635
- font-family:sans-serif;
636
- padding: 0;
637
- }
638
- .toggle-navigationv2 ul ul li a {
639
- padding-left: 35px;
640
- background: #fff;
641
- display: inline-block
642
- }
643
- .toggle-navigationv2 ul li a{
644
- padding: 10px 15px 10px 25px;
645
- width: 88%;
646
- display: inline-block;
647
- text-decoration: none;
648
- background: #fafafa;
649
- font-size: 13px;
650
- border-bottom: 1px solid #efefef;
651
- }
652
- .close-nav{
653
- font-size: 12px;
654
- font-family: sans-serif;
655
- background: rgba(0, 0, 0, 0.25);
656
- letter-spacing: 1px;
657
- display: inline-block;
658
- padding: 10px;
659
- border-radius: 100px;
660
- line-height: 8px;
661
- margin: 14px;
662
- left: 191px;
663
- color: #fff;
664
- }
665
- .close-nav:hover{
666
- background: rgba(0, 0, 0, 0.45);
667
- }
668
- .toggle-navigation ul{
669
- list-style-type: none;
670
- margin: 0;
671
- padding: 0;
672
- display: inline-block;
673
- width: 100%
674
- }
675
- .menu-all-pages-container:after{
676
- content: "";
677
- clear: both
678
- }
679
- .toggle-navigation ul li{
680
- font-size: 13px;
681
- border-bottom: 1px solid rgba(0, 0, 0, 0.11);
682
- padding: 11px 0px;
683
- width: 25%;
684
- float: left;
685
- text-align: center;
686
- margin-top: 6px
687
- }
688
- .toggle-navigation ul ul{
689
- display: none
690
- }
691
- .toggle-navigation ul li a{
692
- color: #eee;
693
- padding: 15px;
694
- }
695
- .toggle-navigation{
696
- display: none;
697
- background: #444;
698
- }
699
- .nav_container:hover + .toggle-navigation,
700
- .toggle-navigation:hover,
701
- .toggle-navigation:active,
702
- .toggle-navigation:focus{
703
- display: inline-block;
704
- width: 100%;
705
- }
706
-
707
- /* Notifications */
708
- #amp-user-notification1 p {
709
- display: inline-block;
710
- }
711
- amp-user-notification {
712
- padding: 5px;
713
- text-align: center;
714
- background: #fff;
715
- border-top: 1px solid;
716
- }
717
- amp-user-notification button {
718
- padding: 8px 10px;
719
- background: <?php echo sanitize_hex_color( $header_background_color ); ?>;
720
- color: <?php echo sanitize_hex_color( $header_color ); ?>;
721
- margin-left: 5px;
722
- border: 0;
723
- }
724
- amp-user-notification button:hover {
725
- cursor: pointer
726
- }
727
-
728
- /* Advertisement */
729
- .amp-ad-wrapper {
730
- text-align: center
731
- }
732
- /* Sticky Social bar in Single */
733
- <?php if( $redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>
734
- body {
735
- padding-bottom: 43px;
736
- }
737
- <?php } ?>
738
- .sticky_social{
739
- width: 100%;
740
- bottom: 0;
741
- display: block;
742
- left: 0;
743
- box-shadow: 0px 4px 7px #000;
744
- background: #fff;
745
- padding: 7px 0px 0px 0px;
746
- position: fixed;
747
- margin: 0;
748
- z-index: 999;
749
- text-align: center;
750
- }
751
- .whatsapp-share-icon {
752
- width: 50px;
753
- height: 20px;
754
- display: inline-block;
755
- background: #5cbe4a;
756
- padding: 4px 0px;
757
- position: relative;
758
- top: -4px;
759
- }
760
- .amp-wp-author:before{
761
- }
762
- .amp-wp-tax-category a:after,
763
- .amp-wp-tax-tag a:after {
764
- content: ', ';
765
- }
766
- .amp-wp-tax-category a:last-child:after,
767
- .amp-wp-tax-tag a:last-child:after {
768
- content: ' ';
769
- }
770
-
771
- pre {
772
- white-space: pre-wrap;
773
- }
774
- <?php
775
- } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/comments.php DELETED
@@ -1,150 +0,0 @@
1
- <div class="ampforwp-comment-wrapper">
2
- <?php
3
- global $redux_builder_amp;
4
- // Gather comments for a specific page/post
5
- $postID = get_the_ID();
6
- $comments = get_comments(array(
7
- 'post_id' => $postID,
8
- 'status' => 'approve' //Change this to the type of comments to be displayed
9
- ));
10
- if ( $comments ) { ?>
11
- <div class="amp-wp-content comments_list">
12
- <h3><?php echo $redux_builder_amp['amp-translator-view-comments-text'] ?></h3>
13
- <ul>
14
- <?php
15
- // Display the list of comments
16
- function ampforwp_custom_translated_comment($comment, $args, $depth){
17
- $GLOBALS['comment'] = $comment; ?>
18
- <?php if('0' === $comment->comment_parent){ ?>
19
- <li id="li-comment-<?php comment_ID() ?>"
20
- <?php comment_class(); ?> >
21
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
22
- <footer class="comment-meta">
23
- <div class="comment-author vcard">
24
- <?php global $redux_builder_amp;
25
- printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
26
- </div>
27
- <!-- .comment-author -->
28
- <?php if ($comment->comment_approved == '0') : ?>
29
- <em><?php _e('Your comment is awaiting moderation.') ?></em>
30
- <br />
31
- <?php endif; ?>
32
- <!--comment moderation ends here-->
33
- <div class="comment-metadata">
34
- <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
35
- <?php
36
- printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
37
- ?>
38
- </a>
39
- <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
40
- </div>
41
- <!-- .comment-metadata -->
42
- </footer>
43
- <!-- .comment-meta -->
44
- <div class="comment-content">
45
- <p><?php echo get_comment_text(); ?></p>
46
- </div>
47
- <!-- .comment-content -->
48
- </article>
49
- <!-- .comment-body -->
50
- </li>
51
- <!-- #comment-## -->
52
- <?php
53
- }else {?>
54
- <li id="li-comment-<?php comment_ID() ?>"
55
- <?php comment_class(); ?> >
56
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
57
- <footer class="comment-meta">
58
- <div class="comment-author vcard">
59
- <?php global $redux_builder_amp;
60
- printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
61
- </div>
62
- <!-- .comment-author -->
63
- <?php if ($comment->comment_approved == '0') : ?>
64
- <em><?php _e('Your comment is awaiting moderation.') ?></em>
65
- <br />
66
- <?php endif; ?>
67
- <!--comment moderation ends here-->
68
- <div class="comment-metadata">
69
- <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
70
- <?php
71
- printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
72
- ?>
73
- </a>
74
- <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
75
- </div>
76
- <!-- .comment-metadata -->
77
- </footer>
78
- <!-- .comment-meta -->
79
- <div class="comment-content">
80
- <p><?php echo get_comment_text(); ?></p>
81
- </div>
82
- <!-- .comment-content -->
83
- <?php ampforwp_custom_translated_comment_nested($comment, $args, $depth);
84
- ?>
85
- </article>
86
- <!-- .comment-body -->
87
- </li>
88
- <!-- #comment-## -->
89
- <?php
90
- }
91
- }// end of ampforwp_custom_translated_comment()
92
-
93
- function ampforwp_custom_translated_comment_nested($comment, $args, $depth){
94
- $GLOBALS['comment'] = $comment; ?>
95
- <ul class="children">
96
- <li id="li-comment-<?php comment_ID() ?>"
97
- <?php comment_class(); ?> >
98
- <article id="comment-<?php comment_ID(); ?>" class="comment-body">
99
- <footer class="comment-meta">
100
- <div class="comment-author vcard">
101
- <?php global $redux_builder_amp;
102
- printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
103
- </div>
104
- <!-- .comment-author -->
105
- <?php if ($comment->comment_approved == '0') : ?>
106
- <em><?php _e('Your comment is awaiting moderation.') ?></em>
107
- <br />
108
- <?php endif; ?>
109
- <!--comment moderation ends here-->
110
- <div class="comment-metadata">
111
- <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
112
- <?php
113
- printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
114
- ?>
115
- </a>
116
- <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
117
- </div>
118
- <!-- .comment-metadata -->
119
- </footer>
120
- <!-- .comment-meta -->
121
- <div class="comment-content">
122
- <p><?php echo get_comment_text(); ?></p>
123
- </div>
124
- <!-- .comment-content -->
125
- </article>
126
- <!-- .comment-body -->
127
- </li>
128
- <!-- #comment-## -->
129
- </ul>
130
- <!-- .children -->
131
- <?php
132
- }// end of ampforwp_custom_translated_comment_nested()
133
-
134
- wp_list_comments( array(
135
- 'per_page' => 10, //Allow comment pagination
136
- 'style' => 'li',
137
- 'type' => 'comment',
138
- 'max_depth' => 0,
139
- 'avatar_size' => 0,
140
- 'callback' => 'ampforwp_custom_translated_comment',
141
- 'reverse_top_level' => false //Show the latest comments at the top of the list
142
- ), $comments); ?>
143
- </ul>
144
- </div>
145
- <div class="comment-button-wrapper">
146
- <a href="<?php echo get_permalink().'#commentform' ?>"><?php esc_html_e( $redux_builder_amp['amp-translator-leave-a-comment-text'] ); ?></a>
147
- </div><?php
148
- }
149
- ?>
150
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/content.php DELETED
@@ -1,26 +0,0 @@
1
- <div class="amp-wp-article-content">
2
- <div class="amp-wp-content the_content">
3
- <?php do_action('ampforwp_before_post_content') ?>
4
-
5
- <?php echo $this->get( 'post_amp_content' ); // amphtml content; no kses ?>
6
-
7
- <?php do_action('ampforwp_after_post_content') ?>
8
- </div>
9
- <div class="amp-wp-content post-pagination-meta">
10
- <div id="pagination">
11
- <div class="next">
12
- <?php $next_post = get_next_post();
13
- if (!empty( $next_post )) { ?>
14
- <a href="<?php echo get_permalink( $next_post->ID ) . AMP_QUERY_VAR; ?>"><?php echo $next_post->post_title; ?> &raquo;</a> <?php
15
- } ?>
16
- </div>
17
- <div class="prev">
18
- <?php $prev_post = get_previous_post();
19
- if (!empty( $prev_post )) { ?>
20
- <a href="<?php echo get_permalink( $prev_post->ID ). AMP_QUERY_VAR; ?>"> &laquo; <?php echo $prev_post->post_title ?></a> <?php
21
- } ?>
22
- </div>
23
- <div class="clearfix"></div>
24
- </div>
25
- </div>
26
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/featured-image.php DELETED
@@ -1,15 +0,0 @@
1
- <div class="amp-wp-article-featured-image amp-wp-content featured-image-content">
2
- <?php global $redux_builder_amp; ?>
3
- <?php
4
- if ( has_post_thumbnail() ) {
5
- $thumb_id = get_post_thumbnail_id();
6
- $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'large', true);
7
- $thumb_url = $thumb_url_array[0];
8
- ?>
9
- <div class="post-featured-img">
10
- <amp-img src=<?php echo $thumb_url ?>
11
- width=<?php global $redux_builder_amp; echo $redux_builder_amp['enable-single-featured-img-width'] ?>
12
- height=<?php echo $redux_builder_amp['enable-single-featured-img-height']?> layout=responsive></amp-img>
13
- </div>
14
- <?php } ?>
15
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/meta-taxonomy.php DELETED
@@ -1,16 +0,0 @@
1
- <div class="amp-wp-article-header amp-wp-article-category ampforwp-meta-taxonomy ">
2
-
3
-
4
- <?php
5
- global $redux_builder_amp;
6
- $ampforwp_tags= get_the_terms( $this->ID, 'post_tag' );
7
- if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) : ?>
8
- <div class="amp-wp-meta amp-wp-tax-tag ampforwp-tax-tag">
9
- <?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .': ', 'amp' ));
10
- foreach ($ampforwp_tags as $tag) {
11
- echo ('<a href="'.get_tag_link($tag->term_taxonomy_id).'?amp" >'.$tag->name .'</a>');
12
- } ?>
13
- </div>
14
- <?php endif;?>
15
-
16
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/related-posts.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
- $orig_post = $post;
3
- global $post, $redux_builder_amp;
4
-
5
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
6
- $categories = get_the_category($post->ID);
7
- if ($categories) {
8
- $category_ids = array();
9
- foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
10
- $args=array(
11
- 'category__in' => $category_ids,
12
- 'post__not_in' => array($post->ID),
13
- 'posts_per_page'=> 3,
14
- 'caller_get_posts'=>1
15
- );
16
- }
17
- } //end of block for categories
18
- //code block for tags
19
- if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
20
- $ampforwp_tags = get_the_tags($post->ID);
21
- if ($ampforwp_tags) {
22
- $tag_ids = array();
23
- foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
24
- $args=array(
25
- 'tag__and' => $tag_ids,
26
- 'post__not_in' => array($post->ID),
27
- 'posts_per_page'=> 3,
28
- 'caller_get_posts'=>1
29
- );
30
- }
31
- }//end of block for tags
32
- $my_query = new wp_query( $args );
33
- if( $my_query->have_posts() ) { ?>
34
- <div class="amp-wp-content relatedpost">
35
- <div class="related_posts">
36
- <ol class="clearfix">
37
- <h3><?php echo esc_html( $redux_builder_amp['amp-translator-related-text'] ); ?></h3>
38
- <?php
39
- while( $my_query->have_posts() ) {
40
- $my_query->the_post();
41
- $related_post_permalink = get_permalink();
42
- $related_post_permalink = trailingslashit($related_post_permalink);
43
- $related_post_permalink = $related_post_permalink . AMP_QUERY_VAR ;;
44
- ?>
45
- <li class="<?php if ( has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>"><a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
46
- <?php
47
- $thumb_id_2 = get_post_thumbnail_id();
48
- $thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, 'thumbnail', true);
49
- $thumb_url_2 = $thumb_url_array_2[0];
50
- ?>
51
-
52
- <?php if ( has_post_thumbnail() ) { ?>
53
- <amp-img src="<?php echo esc_url( $thumb_url_2 ); ?>" width="150" height="150" layout="responsive"></amp-img>
54
- <?php } ?>
55
- <div class="related_link">
56
- <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
57
- <?php if(has_excerpt()){
58
- $content = the_excerpt();
59
- }else{
60
- $content = get_the_content();
61
- }
62
- ?>
63
- <p><?php echo wp_trim_words( $content , '15' ); ?></p>
64
- </div>
65
- </li>
66
- <?php
67
- }
68
-
69
- } ?>
70
- </ol>
71
- </div>
72
- </div> <?php
73
- $post = $orig_post;
74
- wp_reset_postdata();
75
- //related posts code ends here
76
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/social-icons.php DELETED
@@ -1,28 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <div class="amp-wp-content post-pagination-meta ampforwp-social-icons-wrapper ampforwp-social-icons">
3
- <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
4
- <amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
5
- <?php } ?>
6
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
7
- <amp-social-share type="twitter" width="50" height="28"></amp-social-share>
8
- <?php } ?>
9
- <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
10
- <amp-social-share type="gplus" width="50" height="28"></amp-social-share>
11
- <?php } ?>
12
- <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
13
- <amp-social-share type="email" width="50" height="28"></amp-social-share>
14
- <?php } ?>
15
- <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
16
- <amp-social-share type="pinterest" width="50" height="28"></amp-social-share>
17
- <?php } ?>
18
- <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
19
- <amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
20
- <?php } ?>
21
- <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
22
- <a href="whatsapp://send">
23
- <div class="whatsapp-share-icon">
24
- <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwxOS42MjgsOTAsNDMuODQxeiBNNDUuODE4LDYuOTgyICAgYy0yMC40ODQsMC0zNy4xNDYsMTYuNTM1LTM3LjE0NiwzNi44NTljMCw4LjA2NSwyLjYyOSwxNS41MzQsNy4wNzYsMjEuNjFMMTEuMTA3LDc5LjE0bDE0LjI3NS00LjUzNyAgIGM1Ljg2NSwzLjg1MSwxMi44OTEsNi4wOTcsMjAuNDM3LDYuMDk3YzIwLjQ4MSwwLDM3LjE0Ni0xNi41MzMsMzcuMTQ2LTM2Ljg1N1M2Ni4zMDEsNi45ODIsNDUuODE4LDYuOTgyeiBNNjguMTI5LDUzLjkzOCAgIGMtMC4yNzMtMC40NDctMC45OTQtMC43MTctMi4wNzYtMS4yNTRjLTEuMDg0LTAuNTM3LTYuNDEtMy4xMzgtNy40LTMuNDk1Yy0wLjk5My0wLjM1OC0xLjcxNy0wLjUzOC0yLjQzOCwwLjUzNyAgIGMtMC43MjEsMS4wNzYtMi43OTcsMy40OTUtMy40Myw0LjIxMmMtMC42MzIsMC43MTktMS4yNjMsMC44MDktMi4zNDcsMC4yNzFjLTEuMDgyLTAuNTM3LTQuNTcxLTEuNjczLTguNzA4LTUuMzMzICAgYy0zLjIxOS0yLjg0OC01LjM5My02LjM2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
25
- </div>
26
- </a>
27
- <?php } ?>
28
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/elements/title.php DELETED
@@ -1,3 +0,0 @@
1
- <header class="amp-wp-article-header ampforwp-title">
2
- <h1 class="amp-wp-title"><?php echo wp_kses_data( $this->get( 'post_title' ) ); ?></h1>
3
- </header>
 
 
 
templates/design-manager/design-2/footer.php DELETED
@@ -1,21 +0,0 @@
1
- <?php global $redux_builder_amp;
2
- if ( is_home() ) {
3
- $ampforwp_backto_nonamp = home_url();
4
- } elseif ( is_single() ){
5
- $ampforwp_backto_nonamp = get_permalink( $post->ID );
6
- } else {
7
- $ampforwp_backto_nonamp = '';
8
- }
9
- ?>
10
- <footer class="container">
11
- <div id="footer">
12
- <p><a href="#header"> <?php echo esc_html( $redux_builder_amp['amp-translator-top-text'] ); ?></a> <?php
13
- //24. Added an options button for switching on/off link to non amp page
14
- if($redux_builder_amp['amp-footer-link-non-amp-page']=='1'){ if ( $ampforwp_backto_nonamp ) { ?>
15
- |
16
- <a href="<?php echo $ampforwp_backto_nonamp; ?>"><?php echo esc_html( $redux_builder_amp['amp-translator-non-amp-page-text'] ) ;?> </a> <?php } }?>
17
- </p>
18
- <p><?php echo esc_html( $redux_builder_amp['amp-translator-footer-text'] ); ?> </p>
19
- </div>
20
- </footer>
21
- <?php do_action('ampforwp_global_after_footer'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/design-manager/design-2/single.php DELETED
@@ -1,29 +0,0 @@
1
- <?php global $redux_builder_amp; ?>
2
- <!doctype html>
3
- <html amp>
4
- <head>
5
- <meta charset="utf-8">
6
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
7
- <?php do_action( 'amp_post_template_head', $this ); ?>
8
- <style amp-custom>
9
- <?php $this->load_parts( array( 'style' ) ); ?>
10
- <?php do_action( 'amp_post_template_css', $this ); ?>
11
- </style>
12
- </head>
13
- <body class="single-post">
14
- <?php $this->load_parts( array( 'header-bar' ) ); ?>
15
-
16
- <?php do_action( 'ampforwp_after_header', $this ); ?>
17
- <main>
18
- <article class="amp-wp-article">
19
- <?php do_action('ampforwp_post_before_design_elements') ?>
20
-
21
- <?php $this->load_parts( apply_filters( 'ampforwp_design_elements', array( 'empty-filter' ) ) ); ?>
22
-
23
- <?php do_action('ampforwp_post_after_design_elements') ?>
24
- </article>
25
- </main>
26
- <?php $this->load_parts( array( 'footer' ) ); ?>
27
- <?php do_action( 'amp_post_template_footer', $this ); ?>
28
- </body>
29
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/features.php CHANGED
@@ -1,7 +1,6 @@
1
  <?php
2
  /* This file will contain all the Extra FEATURES.
3
 
4
- 0.9. AMP Design Manager Files
5
  1. Add Home REL canonical
6
  2. Custom Design
7
  3. Custom Style files
@@ -12,7 +11,7 @@
12
  5. Customize with Width of the site
13
  6. Add required Javascripts for extra AMP features
14
  7. Footer for AMP Pages
15
- 8. Add Main tag as a Wrapper ( removed in 0.8.9 )
16
  9. Advertisement code
17
  10. Analytics Area
18
  10.1 Analytics Support added for Google Analytics
@@ -27,21 +26,15 @@
27
  17. Archives Canonical in AMP version
28
  18. Custom Canonical for Homepage
29
  19. Remove Canonical tags
30
- 20. Remove the default Google font for performance ( removed in 0.8.9 )
31
  21. Remove Schema data from All In One Schema.org Rich Snippets Plugin
32
  22. Removing author links from comments Issue #180
33
  23. The analytics tag appears more than once in the document. This will soon be an error
34
- 24. Seperate Sticky Single Social Icons
35
- 25. Yoast meta Support
36
  */
37
  // Adding AMP-related things to the main theme
38
  global $redux_builder_amp;
39
 
40
-
41
- // 0.9. AMP Design Manager Files
42
- require 'design-manager.php';
43
- require 'customizer/customizer.php';
44
-
45
  // 1. Add Home REL canonical
46
  // Add AMP rel-canonical for home and archive pages
47
 
@@ -101,27 +94,21 @@
101
  if($redux_builder_amp['amp-frontpage-select-option'] == 0) {
102
  if ( is_home() || is_archive() ) {
103
  if ( 'single' === $type ) {
104
- $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/index.php';
105
  }
106
  }
107
  } elseif ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
108
  if ( is_home() || is_archive() ) {
109
  if ( 'single' === $type ) {
110
- $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/frontpage.php';
111
  }
112
  }
113
  }
114
  // Custom Single file
115
  if ( is_single() || is_page() ) {
116
-
117
- if('single' === $type && !('product' === $post->post_type )) {
118
- $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/single.php';
119
- }
120
- else if ( class_exists( 'WooCommerce' ) ) {
121
- if('single' === $type && 'product' === $post->post_type ) {
122
- $file = AMPFORWP_PLUGIN_DIR . '/templates/wc.php';
123
- }
124
- }
125
  }
126
  return $file;
127
  }
@@ -129,17 +116,17 @@
129
  // 3. Custom Style files
130
  add_filter( 'amp_post_template_file', 'ampforwp_set_custom_style', 10, 3 );
131
  function ampforwp_set_custom_style( $file, $type, $post ) {
132
- if ( 'style' === $type ) {
133
- $file = '';
134
- }
135
  return $file;
136
  }
137
 
138
  // 4. Custom Header files
139
- add_filter( 'amp_post_template_file', 'ampforwp_custom_header', 10, 3 );
140
- function ampforwp_custom_header( $file, $type, $post ) {
141
  if ( 'header-bar' === $type ) {
142
- $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/header-bar.php';
143
  }
144
  return $file;
145
  }
@@ -174,18 +161,14 @@
174
  // 6. Add required Javascripts for extra AMP features
175
  add_action('amp_post_template_head','ampforwp_register_additional_scripts');
176
  function ampforwp_register_additional_scripts() {
177
- global $redux_builder_amp;
178
- ?>
179
  <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
180
  <script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
181
  <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
182
  <?php if($redux_builder_amp['amp-enable-notifications'] == true) { ?>
183
  <script async custom-element="amp-user-notification" src="https://cdn.ampproject.org/v0/amp-user-notification-0.1.js"></script>
184
  <?php } ?>
185
- <?php if( $redux_builder_amp['enable-single-social-icons'] == true || AMPFORWP_DM_SOCIAL_CHECK === 'true' ) {
186
-
187
-
188
- ?>
189
  <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
190
  <?php } ?>
191
  <!-- AMP Advertisement Script -->
@@ -195,29 +178,50 @@
195
 
196
 
197
  // 7. Footer for AMP Pages
198
- add_filter( 'amp_post_template_file', 'ampforwp_custom_footer', 10, 3 );
199
- function ampforwp_custom_footer( $file, $type, $post ) {
200
- if ( 'footer' === $type ) {
201
- $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/footer.php';
 
 
 
 
 
202
  }
203
- return $file;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  }
205
 
206
- add_action('ampforwp_global_after_footer','ampforwp_footer');
207
- function ampforwp_footer() {
208
- global $redux_builder_amp; ?>
209
- <!--Plugin Verion :<?php echo (AMPFORWP_VERSION); ?> -->
210
- <?php if($redux_builder_amp['amp-enable-notifications'] == true) { ?>
211
- <!-- Thanks to @nicholasgriffintn for Cookie Notification Code-->
212
- <amp-user-notification layout=nodisplay id="amp-user-notification1">
213
- <p><?php echo $redux_builder_amp['amp-notification-text']; ?> </p>
214
- <button on="tap:amp-user-notification1.dismiss"><?php echo $redux_builder_amp['amp-accept-button-text']; ?></button>
215
- </amp-user-notification>
216
- <?php }
217
  }
218
 
219
- // 8. Add Main tag as a Wrapper
220
- // Removed this code after moving to design manager
 
 
221
 
222
  // 9. Advertisement code
223
  // Below Header Global
@@ -455,11 +459,6 @@
455
  $content = preg_replace('#<table.*?>#i', '<table width="100%">', $content);
456
  $content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content);
457
  $content = preg_replace('/href="javascript:void*/', ' ', $content);
458
- //for removing attributes within html tags
459
- $content = preg_replace('/(<[^>]+) onclick=".*?"/', '$1', $content);
460
- $content = preg_replace('/(<[^>]+) rel=".*?"/', '$1', $content);
461
- $content = preg_replace('/(<[^>]+) date/', '$1', $content);
462
-
463
  // $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
464
  return $content;
465
  }
@@ -494,21 +493,6 @@
494
  'height' => 36,
495
  'width' => 190,
496
  );
497
-
498
- //code for adding 'description' meta from Yoast SEO
499
-
500
- if($redux_builder_amp['ampforwp-seo-yoast-custom-description']){
501
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
502
- if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
503
- $front = WPSEO_Frontend::get_instance();
504
- $desc = $front->metadesc( false );
505
- if ( $desc ) {
506
- $metadata['description'] = $desc;
507
- }
508
- }
509
- }
510
- //End of code for adding 'description' meta from Yoast SEO
511
-
512
  return $metadata;
513
  }
514
 
@@ -715,9 +699,9 @@ function ampforwp_amp_remove_actions() {
715
  add_action( 'amp_post_template_head', 'ampforwp_amp_remove_actions', 9 );
716
 
717
  // 20. Remove the default Google font for performance
718
- // add_action( 'amp_post_template_head', function() {
719
- // remove_action( 'amp_post_template_head', 'amp_post_template_add_fonts' );
720
- // }, 9 );
721
 
722
  // 21. Remove Schema data from All In One Schema.org Rich Snippets Plugin
723
  add_action( 'pre_amp_render_post', 'ampforwp_remove_schema_data' );
@@ -740,73 +724,3 @@ if( ! function_exists( "disable_comment_author_links" ) ) {
740
 
741
  // 23. The analytics tag appears more than once in the document. This will soon be an error
742
  remove_action( 'amp_post_template_head', 'quads_amp_add_amp_ad_js');
743
-
744
- // 24. Seperate Sticky Single Social Icons
745
- // TO DO: we can directly call social-icons.php instead of below code
746
- add_action('amp_post_template_footer','ampforwp_sticky_social_icons');
747
- function ampforwp_sticky_social_icons(){
748
- global $redux_builder_amp;
749
- if($redux_builder_amp['enable-single-social-icons'] == true && is_single() ) { ?>
750
- <div class="sticky_social">
751
- <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
752
- <amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
753
- <?php } ?>
754
- <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
755
- <amp-social-share type="twitter" width="50" height="28"></amp-social-share>
756
- <?php } ?>
757
- <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
758
- <amp-social-share type="gplus" width="50" height="28"></amp-social-share>
759
- <?php } ?>
760
- <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
761
- <amp-social-share type="email" width="50" height="28"></amp-social-share>
762
- <?php } ?>
763
- <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
764
- <amp-social-share type="pinterest" width="50" height="28"></amp-social-share>
765
- <?php } ?>
766
- <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
767
- <amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
768
- <?php } ?>
769
- <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
770
- <a href="whatsapp://send">
771
- <div class="whatsapp-share-icon">
772
- <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwxOS42MjgsOTAsNDMuODQxeiBNNDUuODE4LDYuOTgyICAgYy0yMC40ODQsMC0zNy4xNDYsMTYuNTM1LTM3LjE0NiwzNi44NTljMCw4LjA2NSwyLjYyOSwxNS41MzQsNy4wNzYsMjEuNjFMMTEuMTA3LDc5LjE0bDE0LjI3NS00LjUzNyAgIGM1Ljg2NSwzLjg1MSwxMi44OTEsNi4wOTcsMjAuNDM3LDYuMDk3YzIwLjQ4MSwwLDM3LjE0Ni0xNi41MzMsMzcuMTQ2LTM2Ljg1N1M2Ni4zMDEsNi45ODIsNDUuODE4LDYuOTgyeiBNNjguMTI5LDUzLjkzOCAgIGMtMC4yNzMtMC40NDctMC45OTQtMC43MTctMi4wNzYtMS4yNTRjLTEuMDg0LTAuNTM3LTYuNDEtMy4xMzgtNy40LTMuNDk1Yy0wLjk5My0wLjM1OC0xLjcxNy0wLjUzOC0yLjQzOCwwLjUzNyAgIGMtMC43MjEsMS4wNzYtMi43OTcsMy40OTUtMy40Myw0LjIxMmMtMC42MzIsMC43MTktMS4yNjMsMC44MDktMi4zNDcsMC4yNzFjLTEuMDgyLTAuNTM3LTQuNTcxLTEuNjczLTguNzA4LTUuMzMzICAgYy0zLjIxOS0yLjg0OC01LjM5My02LjM2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="50" height="20" />
773
- </div>
774
- </a>
775
- <?php } ?>
776
- </div>
777
- <?php }
778
- }
779
- // if ( $ampforwp_social_icons_enabled == true ) {
780
- //
781
- // }
782
-
783
- // add_action('amp_post_template_head','ampforwp_register_social_sharing_script');
784
-
785
- function ampforwp_register_social_sharing_script() {
786
-
787
-
788
- ?>
789
- <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script> <?php
790
- }
791
-
792
- // 25. Yoast meta Support
793
- function ampforwp_custom_yoast_meta(){
794
- global $redux_builder_amp;
795
- $is_amp_endpoint = is_amp_endpoint();
796
- if ($redux_builder_amp['ampforwp-seo-yoast-meta']) {
797
- // if ( WPSEO_Options::grant_access() ) {
798
- $options = WPSEO_Options::get_option( 'wpseo_social' );
799
- if ( $options['twitter'] === true ) {
800
- WPSEO_Twitter::get_instance();
801
- }
802
- if ( $options['opengraph'] === true ) {
803
- $GLOBALS['wpseo_og'] = new WPSEO_OpenGraph;
804
- }
805
- do_action( 'wpseo_opengraph' );
806
- echo strip_tags($redux_builder_amp['ampforwp-seo-custom-additional-meta'], '<link><meta>' );
807
- // }
808
- }
809
- }
810
- if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
811
- add_action( 'amp_post_template_head', 'ampforwp_custom_yoast_meta' );
812
- }
1
  <?php
2
  /* This file will contain all the Extra FEATURES.
3
 
 
4
  1. Add Home REL canonical
5
  2. Custom Design
6
  3. Custom Style files
11
  5. Customize with Width of the site
12
  6. Add required Javascripts for extra AMP features
13
  7. Footer for AMP Pages
14
+ 8. Add Main tag as a Wrapper
15
  9. Advertisement code
16
  10. Analytics Area
17
  10.1 Analytics Support added for Google Analytics
26
  17. Archives Canonical in AMP version
27
  18. Custom Canonical for Homepage
28
  19. Remove Canonical tags
29
+ 20. Remove the default Google font for performance
30
  21. Remove Schema data from All In One Schema.org Rich Snippets Plugin
31
  22. Removing author links from comments Issue #180
32
  23. The analytics tag appears more than once in the document. This will soon be an error
33
+
 
34
  */
35
  // Adding AMP-related things to the main theme
36
  global $redux_builder_amp;
37
 
 
 
 
 
 
38
  // 1. Add Home REL canonical
39
  // Add AMP rel-canonical for home and archive pages
40
 
94
  if($redux_builder_amp['amp-frontpage-select-option'] == 0) {
95
  if ( is_home() || is_archive() ) {
96
  if ( 'single' === $type ) {
97
+ $file = AMPFORWP_PLUGIN_DIR . '/templates/index.php';
98
  }
99
  }
100
  } elseif ($redux_builder_amp['amp-frontpage-select-option'] == 1) {
101
  if ( is_home() || is_archive() ) {
102
  if ( 'single' === $type ) {
103
+ $file = AMPFORWP_PLUGIN_DIR . '/templates/frontpage.php';
104
  }
105
  }
106
  }
107
  // Custom Single file
108
  if ( is_single() || is_page() ) {
109
+ if ( 'single' === $type ) {
110
+ $file = AMPFORWP_PLUGIN_DIR . '/templates/single.php';
111
+ }
 
 
 
 
 
 
112
  }
113
  return $file;
114
  }
116
  // 3. Custom Style files
117
  add_filter( 'amp_post_template_file', 'ampforwp_set_custom_style', 10, 3 );
118
  function ampforwp_set_custom_style( $file, $type, $post ) {
119
+ if ( 'style' === $type ) {
120
+ $file = AMPFORWP_PLUGIN_DIR . '/templates/style.php';
121
+ }
122
  return $file;
123
  }
124
 
125
  // 4. Custom Header files
126
+ add_filter( 'amp_post_template_file', 'mohammed_amp_set_custom_header', 10, 3 );
127
+ function mohammed_amp_set_custom_header( $file, $type, $post ) {
128
  if ( 'header-bar' === $type ) {
129
+ $file = AMPFORWP_PLUGIN_DIR . '/templates/header.php';
130
  }
131
  return $file;
132
  }
161
  // 6. Add required Javascripts for extra AMP features
162
  add_action('amp_post_template_head','ampforwp_register_additional_scripts');
163
  function ampforwp_register_additional_scripts() {
164
+ global $redux_builder_amp; ?>
 
165
  <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
166
  <script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
167
  <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
168
  <?php if($redux_builder_amp['amp-enable-notifications'] == true) { ?>
169
  <script async custom-element="amp-user-notification" src="https://cdn.ampproject.org/v0/amp-user-notification-0.1.js"></script>
170
  <?php } ?>
171
+ <?php if( $redux_builder_amp['enable-single-social-icons'] == true ) { ?>
 
 
 
172
  <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
173
  <?php } ?>
174
  <!-- AMP Advertisement Script -->
178
 
179
 
180
  // 7. Footer for AMP Pages
181
+ add_action('amp_post_template_footer','ampforwp_footer');
182
+ function ampforwp_footer() {
183
+ global $redux_builder_amp;
184
+ if ( is_home() ) {
185
+ $ampforwp_backto_nonamp = home_url();
186
+ } elseif ( is_single() ){
187
+ $ampforwp_backto_nonamp = get_permalink( $post->ID );
188
+ } else {
189
+ $ampforwp_backto_nonamp = '';
190
  }
191
+ ?>
192
+
193
+ <footer class="container">
194
+ <div id="footer">
195
+ <p><a href="#header"> <?php global $redux_builder_amp; _e($redux_builder_amp['amp-translator-top-text'].'','ampforwp');?></a> <?php
196
+ //24. Added an options button for switching on/off link to non amp page
197
+ if($redux_builder_amp['amp-footer-link-non-amp-page']=='1'){ if ( $ampforwp_backto_nonamp ) { ?>
198
+ |
199
+ <a href="?<?php echo $ampforwp_backto_nonamp; ?>"><?php
200
+ global $redux_builder_amp; _e("".$redux_builder_amp['amp-translator-non-amp-page-text'],'ampforwp');?></a> <?php } }?>
201
+ </p>
202
+ <p><?php echo $redux_builder_amp['amp-translator-footer-text']; ?> </p>
203
+ </div>
204
+ </footer>
205
+ <!--Plugin Verion :<?php echo (AMPFORWP_VERSION); ?> -->
206
+ <!-- Thanks to @nicholasgriffintn for Cookie Notification Code-->
207
+ <?php if($redux_builder_amp['amp-enable-notifications'] == true) { ?>
208
+ <amp-user-notification layout=nodisplay id="amp-user-notification1">
209
+ <p><?php echo $redux_builder_amp['amp-notification-text']; ?> </p>
210
+ <button on="tap:amp-user-notification1.dismiss"><?php echo $redux_builder_amp['amp-accept-button-text']; ?></button>
211
+ </amp-user-notification>
212
+ <?php }
213
  }
214
 
215
+ // 8. Add Main tag as a Wrapper
216
+ add_action('ampforwp_after_header','ampforwp_main_tag_begins');
217
+ function ampforwp_main_tag_begins() {
218
+ echo ' <main>';
 
 
 
 
 
 
 
219
  }
220
 
221
+ add_action('amp_post_template_footer','ampforwp_main_tag_ends',9);
222
+ function ampforwp_main_tag_ends() {
223
+ echo '</main>';
224
+ }
225
 
226
  // 9. Advertisement code
227
  // Below Header Global
459
  $content = preg_replace('#<table.*?>#i', '<table width="100%">', $content);
460
  $content = preg_replace('#<style scoped.*?>(.*?)</style>#i', '', $content);
461
  $content = preg_replace('/href="javascript:void*/', ' ', $content);
 
 
 
 
 
462
  // $content = preg_replace('/<img*/', '<amp-img', $content); // Fallback for plugins
463
  return $content;
464
  }
493
  'height' => 36,
494
  'width' => 190,
495
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  return $metadata;
497
  }
498
 
699
  add_action( 'amp_post_template_head', 'ampforwp_amp_remove_actions', 9 );
700
 
701
  // 20. Remove the default Google font for performance
702
+ add_action( 'amp_post_template_head', function() {
703
+ remove_action( 'amp_post_template_head', 'amp_post_template_add_fonts' );
704
+ }, 9 );
705
 
706
  // 21. Remove Schema data from All In One Schema.org Rich Snippets Plugin
707
  add_action( 'pre_amp_render_post', 'ampforwp_remove_schema_data' );
724
 
725
  // 23. The analytics tag appears more than once in the document. This will soon be an error
726
  remove_action( 'amp_post_template_head', 'quads_amp_add_amp_ad_js');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/{design-manager/design-2/frontpage.php → frontpage.php} RENAMED
@@ -16,7 +16,7 @@
16
 
17
  <?php do_action( 'ampforwp_after_header', $this ); ?>
18
 
19
- <main>
20
  <div class="amp-wp-content the_content">
21
  <?php do_action( 'ampforwp_before_post_content', $this ); ?>
22
 
@@ -37,7 +37,7 @@ global $redux_demo;
37
  <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-taxonomy' ) ) ); ?>
38
 
39
 
40
-
41
  </div>
42
 
43
  <?php if($redux_builder_amp['enable-single-social-icons'] == true) { ?>
@@ -62,9 +62,8 @@ global $redux_demo;
62
  <?php } ?>
63
  </div>
64
  <?php } ?>
65
- </main>
66
- <?php $this->load_parts( array( 'footer' ) ); ?>
67
- <?php do_action( 'amp_post_template_footer', $this ); ?>
68
 
 
 
69
  </body>
70
  </html>
16
 
17
  <?php do_action( 'ampforwp_after_header', $this ); ?>
18
 
19
+
20
  <div class="amp-wp-content the_content">
21
  <?php do_action( 'ampforwp_before_post_content', $this ); ?>
22
 
37
  <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-taxonomy' ) ) ); ?>
38
 
39
 
40
+
41
  </div>
42
 
43
  <?php if($redux_builder_amp['enable-single-social-icons'] == true) { ?>
62
  <?php } ?>
63
  </div>
64
  <?php } ?>
 
 
 
65
 
66
+
67
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
68
  </body>
69
  </html>
templates/{design-manager/design-2/header-bar.php → header.php} RENAMED
@@ -1,8 +1,8 @@
1
- <header class="container">
2
  <div id="headerwrap">
3
  <div id="header">
4
-
5
- <?php global $redux_builder_amp;
6
  $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) . '?' . AMP_QUERY_VAR;
7
  ?>
8
 
@@ -19,11 +19,13 @@
19
  </header>
20
 
21
 
 
 
22
  <div on='tap:sidebar.toggle' role="button" tabindex="0" class="nav_container">
23
- <a href="#" class="toggle-text"><?php echo esc_html( $redux_builder_amp['amp-translator-navigate-text'] ); ?></a>
24
  </div>
25
 
26
-
27
  <amp-sidebar id='sidebar'
28
  layout="nodisplay"
29
  side="right">
1
+ <header class="container">
2
  <div id="headerwrap">
3
  <div id="header">
4
+
5
+ <?php global $redux_builder_amp;
6
  $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) . '?' . AMP_QUERY_VAR;
7
  ?>
8
 
19
  </header>
20
 
21
 
22
+
23
+
24
  <div on='tap:sidebar.toggle' role="button" tabindex="0" class="nav_container">
25
+ <a href="#" class="toggle-text"><?php echo $redux_builder_amp['amp-translator-navigate-text']; ?></a>
26
  </div>
27
 
28
+
29
  <amp-sidebar id='sidebar'
30
  layout="nodisplay"
31
  side="right">
templates/{design-manager/design-2/index.php → index.php} RENAMED
@@ -16,13 +16,13 @@
16
 
17
  <?php do_action( 'ampforwp_after_header', $this ); ?>
18
 
19
- <main>
20
-
21
  <?php if ( have_posts() ) :
22
  while ( have_posts() ) : the_post();
23
 
24
  $ampforwp_amp_post_url = trailingslashit( get_permalink() ) . AMP_QUERY_VAR ;
25
 
 
 
26
  ?>
27
 
28
  <div class="amp-wp-content amp-loop-list">
@@ -39,14 +39,7 @@
39
 
40
  <h2 class="amp-wp-title"> <a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"> <?php the_title(); ?></a></h2>
41
 
42
- <?php
43
-
44
- if(has_excerpt()){
45
- $content = the_excerpt();
46
- }else{
47
- $content = get_the_content();
48
- }
49
- ?>
50
  <p><?php echo wp_trim_words( $content , '15' ); ?></p>
51
 
52
  </div>
@@ -54,23 +47,24 @@
54
 
55
  </div>
56
 
57
- <?php endwhile; ?>
 
 
58
 
59
 
60
  <div class="amp-wp-content pagination-holder">
61
 
62
  <div id="pagination">
63
- <div class="next"><?php next_posts_link( $redux_builder_amp['amp-translator-next-text'] . ' &raquo;', 0 ) ?></div>
64
- <div class="prev"><?php previous_posts_link( '&laquo; '. $redux_builder_amp['amp-translator-previous-text'] ); ?></div>
65
-
66
  <div class="clearfix"></div>
67
  </div>
68
 
69
  </div>
70
 
71
  <?php endif; ?>
72
- </main>
73
- <?php $this->load_parts( array( 'footer' ) ); ?>
74
  <?php do_action( 'amp_post_template_footer', $this ); ?>
75
  </body>
76
  </html>
16
 
17
  <?php do_action( 'ampforwp_after_header', $this ); ?>
18
 
 
 
19
  <?php if ( have_posts() ) :
20
  while ( have_posts() ) : the_post();
21
 
22
  $ampforwp_amp_post_url = trailingslashit( get_permalink() ) . AMP_QUERY_VAR ;
23
 
24
+ do_action('ampforwp_index_page_before_post');
25
+
26
  ?>
27
 
28
  <div class="amp-wp-content amp-loop-list">
39
 
40
  <h2 class="amp-wp-title"> <a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"> <?php the_title(); ?></a></h2>
41
 
42
+ <?php $content = get_the_content();?>
 
 
 
 
 
 
 
43
  <p><?php echo wp_trim_words( $content , '15' ); ?></p>
44
 
45
  </div>
47
 
48
  </div>
49
 
50
+ <?php
51
+ do_action('ampforwp_index_page_after_post');
52
+ endwhile; ?>
53
 
54
 
55
  <div class="amp-wp-content pagination-holder">
56
 
57
  <div id="pagination">
58
+ <div class="next"><?php global $redux_builder_amp; next_posts_link( $redux_builder_amp['amp-translator-next-text']." &raquo;", 0 ) ?></div>
59
+ <div class="prev"><?php previous_posts_link( '&laquo;'.$redux_builder_amp['amp-translator-previous-text'] ); ?></div>
 
60
  <div class="clearfix"></div>
61
  </div>
62
 
63
  </div>
64
 
65
  <?php endif; ?>
66
+
67
+
68
  <?php do_action( 'amp_post_template_footer', $this ); ?>
69
  </body>
70
  </html>
templates/{design-manager/design-2/elements/meta-info.php → meta-author.php} RENAMED
@@ -1,7 +1,3 @@
1
- <div class="amp-wp-article-header ampforwp-meta-info">
2
- <div class="amp-wp-content post-title-meta">
3
-
4
- <ul class="amp-wp-meta amp-meta-wrapper">
5
  <?php $post_author = $this->get( 'post_author' ); ?>
6
  <?php if ( $post_author ) : ?>
7
  <?php $author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ); ?>
@@ -15,18 +11,3 @@
15
 
16
  </div>
17
  <?php endif; ?>
18
-
19
- <?php
20
- $ampforwp_categories = get_the_terms( $this->ID, 'category' );
21
- if ( $ampforwp_categories ) : ?>
22
- <div class="amp-wp-meta amp-wp-tax-category ampforwp-tax-category">
23
- <span><?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .': ', 'amp' )); ?></span>
24
- <?php foreach ($ampforwp_categories as $cat ) {
25
- echo ('<a href="'.get_category_link($cat->term_taxonomy_id).'?amp" >'.$cat->name .'</a>');
26
- } ?>
27
- </div>
28
- <?php endif; ?>
29
-
30
- </ul>
31
- </div>
32
- </div>
 
 
 
 
1
  <?php $post_author = $this->get( 'post_author' ); ?>
2
  <?php if ( $post_author ) : ?>
3
  <?php $author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 24 ) ); ?>
11
 
12
  </div>
13
  <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/meta-taxonomy.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $ampforwp_categories = get_the_terms( $this->ID, 'category' );
3
+ if ( $ampforwp_categories ) : ?>
4
+ <div class="amp-wp-meta amp-wp-tax-category ampforwp-tax-category">
5
+ <span><?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .': ', 'amp' )); ?></span>
6
+ <?php foreach ($ampforwp_categories as $cat ) {
7
+ echo ('<a href="'.get_site_url().'/category/' . $cat->slug .'/?amp" >'.$cat->name .'</a>');
8
+ } ?>
9
+ </div>
10
+ <?php endif; ?>
templates/single.php ADDED
@@ -0,0 +1,227 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $redux_builder_amp; ?>
2
+ <!doctype html>
3
+ <html amp>
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
7
+ <?php do_action( 'amp_post_template_head', $this ); ?>
8
+ <style amp-custom>
9
+ <?php $this->load_parts( array( 'style' ) ); ?>
10
+ <?php do_action( 'amp_post_template_css', $this ); ?>
11
+ </style>
12
+ </head>
13
+ <body class="single-post">
14
+ <?php $this->load_parts( array( 'header-bar' ) ); ?>
15
+
16
+ <?php do_action( 'ampforwp_after_header', $this ); ?>
17
+
18
+
19
+ <div class="amp-wp-content post-title-meta">
20
+ <?php if($redux_builder_amp['enable-single-post-meta'] == true) { ?>
21
+ <ul class="amp-wp-meta amp-meta-wrapper">
22
+ <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-author') ) ); ?>
23
+
24
+
25
+ <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array('meta-taxonomy' ) ) ); ?>
26
+
27
+ <li class="cb"></li>
28
+ </ul>
29
+ <?php } ?>
30
+ <h1 class="amp-wp-title"><?php echo wp_kses_data( $this->get( 'post_title' ) ); ?></h1>
31
+ </div>
32
+ <div class="amp-wp-content featured-image-content">
33
+ <?php if($redux_builder_amp['enable-single-featured-img'] == true) {
34
+ if ( has_post_thumbnail() ) { ?>
35
+ <?php
36
+ $thumb_id = get_post_thumbnail_id();
37
+ $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'large', true);
38
+ $thumb_url = $thumb_url_array[0];
39
+ ?>
40
+ <div class="post-featured-img"><amp-img src=<?php echo $thumb_url ?>
41
+ width=<?php global $redux_builder_amp; echo $redux_builder_amp['enable-single-featured-img-width'] ?>
42
+ height=<?php echo $redux_builder_amp['enable-single-featured-img-height']?> layout=responsive></amp-img></div>
43
+ <?php } } ?>
44
+ </div>
45
+ <div class="amp-wp-content the_content">
46
+
47
+ <?php do_action( 'ampforwp_before_post_content', $this ); ?>
48
+
49
+ <?php echo $this->get( 'post_amp_content' ); // amphtml content; no kses ?>
50
+ <?php do_action( 'ampforwp_after_post_content', $this ); ?>
51
+ </div>
52
+
53
+ <div class="amp-wp-content post-pagination-meta">
54
+ <?php if($redux_builder_amp['ampforwp-single-tags-on-off'] == true) {
55
+ $ampforwp_tags= get_the_terms( $this->ID, 'post_tag' );
56
+ if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) : ?>
57
+ <div class="amp-wp-meta amp-wp-tax-tag ampforwp-tax-tag">
58
+ <?php global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .': ', 'amp' ));
59
+ foreach ($ampforwp_tags as $tag) {
60
+ echo ('<a href="'.get_site_url().'/tag/' . $tag->slug .'/?amp" >'.$tag->name .'</a>');
61
+ } ?>
62
+ </div>
63
+ <?php endif;
64
+ } ?>
65
+
66
+ <?php if($redux_builder_amp['enable-next-previous-pagination'] == true) { ?>
67
+ <div id="pagination">
68
+ <div class="next">
69
+ <?php $next_post = get_next_post();
70
+ if (!empty( $next_post )) { ?>
71
+ <a href="<?php echo get_permalink( $next_post->ID ) . AMP_QUERY_VAR; ?>"><?php echo $next_post->post_title; ?> &raquo;</a> <?php
72
+ } ?>
73
+ </div>
74
+ <div class="prev">
75
+ <?php $prev_post = get_previous_post();
76
+ if (!empty( $prev_post )) { ?>
77
+ <a href="<?php echo get_permalink( $prev_post->ID ). AMP_QUERY_VAR; ?>"> &laquo; <?php echo $prev_post->post_title ?></a> <?php
78
+ } ?>
79
+ </div>
80
+ <div class="clearfix"></div>
81
+ </div>
82
+ <?php } ?>
83
+ </div>
84
+
85
+ <?php if($redux_builder_amp['enable-single-social-icons'] == true) { ?>
86
+ <div class="sticky_social">
87
+ <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
88
+ <amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="50" height="28"></amp-social-share>
89
+ <?php } ?>
90
+ <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
91
+ <amp-social-share type="twitter" width="50" height="28"></amp-social-share>
92
+ <?php } ?>
93
+ <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
94
+ <amp-social-share type="gplus" width="50" height="28"></amp-social-share>
95
+ <?php } ?>
96
+ <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
97
+ <amp-social-share type="email" width="50" height="28"></amp-social-share>
98
+ <?php } ?>
99
+ <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
100
+ <amp-social-share type="pinterest" width="50" height="28"></amp-social-share>
101
+ <?php } ?>
102
+ <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
103
+ <amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
104
+ <?php } ?>
105
+ <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
106
+ <a href="whatsapp://send?text=<?php the_title(); ?> - <?php echo the_permalink(); ?>">
107
+ <div class="whatsapp-share-icon">
108
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwxOS42MjgsOTAsNDMuODQxeiBNNDUuODE4LDYuOTgyICAgYy0yMC40ODQsMC0zNy4xNDYsMTYuNTM1LTM3LjE0NiwzNi44NTljMCw4LjA2NSwyLjYyOSwxNS41MzQsNy4wNzYsMjEuNjFMMTEuMTA3LDc5LjE0bDE0LjI3NS00LjUzNyAgIGM1Ljg2NSwzLjg1MSwxMi44OTEsNi4wOTcsMjAuNDM3LDYuMDk3YzIwLjQ4MSwwLDM3LjE0Ni0xNi41MzMsMzcuMTQ2LTM2Ljg1N1M2Ni4zMDEsNi45ODIsNDUuODE4LDYuOTgyeiBNNjguMTI5LDUzLjkzOCAgIGMtMC4yNzMtMC40NDctMC45OTQtMC43MTctMi4wNzYtMS4yNTRjLTEuMDg0LTAuNTM3LTYuNDEtMy4xMzgtNy40LTMuNDk1Yy0wLjk5My0wLjM1OC0xLjcxNy0wLjUzOC0yLjQzOCwwLjUzNyAgIGMtMC43MjEsMS4wNzYtMi43OTcsMy40OTUtMy40Myw0LjIxMmMtMC42MzIsMC43MTktMS4yNjMsMC44MDktMi4zNDcsMC4yNzFjLTEuMDgyLTAuNTM3LTQuNTcxLTEuNjczLTguNzA4LTUuMzMzICAgYy0zLjIxOS0yLjg0OC01LjM5My02LjM2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="30" height="20" />
109
+ </div>
110
+ </a>
111
+ <?php } ?>
112
+ </div>
113
+ <?php } ?>
114
+
115
+ <?php
116
+ //related posts code starts here
117
+ $orig_post = $post;
118
+ global $post;
119
+ // ampforwp-single-select-type-of-related-switch
120
+ if($redux_builder_amp['ampforwp-single-select-type-of-related-switch']==1){ //code block for categories
121
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
122
+ $categories = get_the_category($post->ID);
123
+ if ($categories) {
124
+ $category_ids = array();
125
+ foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
126
+ $args=array(
127
+ 'category__in' => $category_ids,
128
+ 'post__not_in' => array($post->ID),
129
+ 'posts_per_page'=> 3,
130
+ 'caller_get_posts'=>1
131
+ );
132
+ }
133
+ }//end of block for categories
134
+
135
+ //code block for tags
136
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
137
+ $ampforwp_tags = get_the_tags($post->ID);
138
+ if ($ampforwp_tags) {
139
+ $tag_ids = array();
140
+ foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
141
+ $args=array(
142
+ 'tag__and' => $tag_ids,
143
+ 'post__not_in' => array($post->ID),
144
+ 'posts_per_page'=> 3,
145
+ 'caller_get_posts'=>1
146
+ );
147
+ }
148
+ }//end of block for tags
149
+ } $my_query = new wp_query( $args );
150
+ if( $my_query->have_posts() ) { ?>
151
+ <div class="amp-wp-content relatedpost">
152
+ <div class="related_posts">
153
+ <ol class="clearfix">
154
+ <h3><?php global $redux_builder_amp; echo $redux_builder_amp['amp-translator-related-text'] ?></h3>
155
+ <?php
156
+ while( $my_query->have_posts() ) {
157
+ $my_query->the_post();
158
+ $related_post_permalink = get_permalink();
159
+ $related_post_permalink = trailingslashit($related_post_permalink);
160
+ $related_post_permalink = $related_post_permalink . AMP_QUERY_VAR ;;
161
+ ?>
162
+ <li class="<?php if ( has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>"><a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
163
+ <?php
164
+ $thumb_id_2 = get_post_thumbnail_id();
165
+ $thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, 'thumbnail', true);
166
+ $thumb_url_2 = $thumb_url_array_2[0];
167
+ ?>
168
+
169
+ <?php if ( has_post_thumbnail() ) { ?>
170
+ <amp-img src="<?php echo esc_url( $thumb_url_2 ); ?>" width="150" height="150" layout="responsive"></amp-img>
171
+ <?php } ?>
172
+ <div class="related_link">
173
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
174
+ <?php $content = get_the_content();?>
175
+ <p><?php echo wp_trim_words( $content , '15' ); ?></p>
176
+ </div>
177
+ </li>
178
+ <?php
179
+ }
180
+
181
+ } ?>
182
+ </ol>
183
+ </div>
184
+ </div>
185
+ <?php
186
+ $post = $orig_post;
187
+ wp_reset_query();
188
+ //related posts code ends here
189
+ ?>
190
+
191
+
192
+ <?php if($redux_builder_amp['ampforwp-single-comments-on-off'] == true) { ?>
193
+ <!-- Comments -->
194
+ <?php
195
+ // Gather comments for a specific page/post
196
+ $postID = get_the_ID();
197
+ $comments = get_comments(array(
198
+ 'post_id' => $postID,
199
+ 'status' => 'approve' //Change this to the type of comments to be displayed
200
+ ));
201
+ if ( $comments ) { ?>
202
+ <div class="amp-wp-content comments_list">
203
+ <h3>View Comments</h3>
204
+ <ul>
205
+ <?php
206
+ // Display the list of comments
207
+ wp_list_comments( array(
208
+ 'per_page' => 10, //Allow comment pagination
209
+ 'style' => 'li',
210
+ 'type' => 'comment',
211
+ 'max_depth' => 0,
212
+ 'avatar_size' => 0,
213
+ 'reverse_top_level' => false //Show the latest comments at the top of the list
214
+ ), $comments);
215
+
216
+ ?>
217
+ </ul>
218
+ </div>
219
+ <div class="comment-button-wrapper">
220
+ <a href="<?php echo get_permalink().'#commentform' ?>">Leave a Comment</a>
221
+ </div><?php
222
+ }
223
+ } ?>
224
+
225
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
226
+ </body>
227
+ </html>
templates/{design-manager/design-2/style.php → style.php} RENAMED
@@ -1,22 +1,4 @@
1
  <?php global $redux_builder_amp; ?>
2
- <?php
3
- add_action('amp_post_template_css', 'ampforwp_additional_style_input_2');
4
-
5
- function ampforwp_additional_style_input_2( $amp_template ) {
6
- global $redux_builder_amp;
7
- $get_customizer = new AMP_Post_Template( $post_id );
8
- // Get content width
9
- $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
10
- // Get template colors
11
- $theme_color = $get_customizer->get_customizer_setting( 'theme_color' );
12
- $text_color = $get_customizer->get_customizer_setting( 'text_color' );
13
- $muted_text_color = $get_customizer->get_customizer_setting( 'muted_text_color' );
14
- $border_color = $get_customizer->get_customizer_setting( 'border_color' );
15
- $link_color = $get_customizer->get_customizer_setting( 'link_color' );
16
- $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
17
- $header_color = $get_customizer->get_customizer_setting( 'header_color' );
18
- ?>
19
-
20
  /* Global Styling */
21
  body{
22
  background: #f1f1f1;
@@ -32,10 +14,11 @@ a {
32
 
33
  /* Template Styles */
34
  .amp-wp-content, .amp-wp-title-bar div {
35
- <?php if ( $content_max_width > 0 ) : ?>
36
- max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
37
- margin: 0 auto;
38
- <?php endif; ?>
 
39
  }
40
 
41
  /* Slide Navigation code */
@@ -165,7 +148,7 @@ amp-sidebar {
165
  }
166
  #pagination .next{
167
  float: right;
168
- margin-bottom: 10px;
169
  }
170
  #pagination .prev{
171
  float: left
@@ -185,10 +168,6 @@ amp-sidebar {
185
  }
186
 
187
  /* Sticky Social bar in Single */
188
- .ampforwp-social-icons-wrapper{
189
- margin: 0.65em 0px 0.65em 0px;
190
- height: 28px;
191
- }
192
  .sticky_social{
193
  width: 100%;
194
  bottom: 0;
@@ -302,7 +281,7 @@ h2.amp-wp-title , .amp-wp-post-content p{
302
  }
303
  h1.amp-wp-title {
304
  text-align: center;
305
- margin: 0.7em 0px 0.6em 0px;
306
  font-size: 1.5em;
307
  }
308
  .amp-wp-content.post-title-meta,
@@ -323,10 +302,6 @@ h1.amp-wp-title {
323
  }
324
  .amp-meta-wrapper{
325
  border-bottom: 1px solid #DADADA;
326
- padding-bottom:10px;
327
- display:inline-block;
328
- width:100%;
329
- margin-bottom:0
330
  }
331
  .amp-wp-meta {
332
  padding-left: 0;
@@ -361,6 +336,7 @@ li.amp-wp-tax-category {
361
  }
362
  .amp-wp-meta {
363
  font-size: 12px;
 
364
  color: #555;
365
  }
366
  .amp-ad-wrapper {
@@ -377,11 +353,8 @@ li.amp-wp-tax-category {
377
  margin-bottom: 15px;
378
  }
379
  .amp-wp-tax-tag{
380
- font-size: 13px;
381
- border: 0;
382
- display: inline-block;
383
- margin: 0.5em 0px 0.7em 0px;
384
- width: 100%;
385
  }
386
  main .amp-wp-content.featured-image-content {
387
  padding: 0px;
@@ -395,8 +368,7 @@ main .amp-wp-content.relatedpost {
395
  background: none;
396
  box-shadow: none;
397
  max-width: 1030px;
398
- padding:0px 0 0 0;
399
- margin:1.8em 0px 1.5em 0px
400
  }
401
  .related_posts h3, .comments_list h3{
402
  font-size: 14px;
@@ -452,9 +424,6 @@ main .amp-wp-content.relatedpost {
452
  }
453
 
454
  /* Comments */
455
- .ampforwp-comment-wrapper{
456
- margin:1.8em 0px 1.5em 0px
457
- }
458
  main .amp-wp-content.comments_list {
459
  background: none;
460
  box-shadow: none;
@@ -495,9 +464,6 @@ main .amp-wp-content.comments_list {
495
  padding: 25px;
496
  width: 91%;
497
  }
498
- .comments_list ul li .comment-body .comment-author{
499
- margin-right:5px
500
- }
501
  .comment-author{ float:left }
502
  .single-post footer.comment-meta{
503
  /* float:right */
@@ -553,9 +519,6 @@ amp-user-notification button:hover {
553
  background: #f3f3f3;
554
  }
555
 
556
- pre {
557
- white-space: pre-wrap;
558
- }
559
  /* Responsive */
560
  @media screen and (max-width: 800px) {
561
  .single-post main{
@@ -720,22 +683,19 @@ main .amp-loop-list {
720
  .amp-wp-tax-tag a,
721
  a,
722
  .amp-wp-author {
723
- color: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
724
  }
725
  .amp-wp-content blockquote{
726
- border-color:<?php echo sanitize_hex_color( $header_background_color ); ?>;;
727
  }
728
  .nav_container, .comment-button-wrapper a {
729
- background: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
730
- }
731
- .nav_container a{
732
- color:<?php echo sanitize_hex_color( $header_color ); ?>
733
  }
734
  amp-user-notification {
735
- border-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
736
  }
737
  amp-user-notification button {
738
- background-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
739
  }
740
  <?php if( $redux_builder_amp['enable-single-social-icons'] == true ) { ?>
741
  .single-post footer {
@@ -771,13 +731,7 @@ amp-user-notification button {
771
  content: ' ';
772
  }
773
 
774
- /* New V0.8.7(drag and drop) style */
775
- .amp-wp-article-content img {
776
- max-width: 100%;
777
- }
778
-
779
 
780
 
781
- /* Custom Style Code */
782
- <?php echo $redux_builder_amp['css_editor'];
783
- } ?>
1
  <?php global $redux_builder_amp; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /* Global Styling */
3
  body{
4
  background: #f1f1f1;
14
 
15
  /* Template Styles */
16
  .amp-wp-content, .amp-wp-title-bar div {
17
+ <?php $content_max_width = absint( $this->get( 'content_max_width' ) ); ?>
18
+ <?php if ( $content_max_width > 0 ) : ?>
19
+ max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
20
+ margin: 0 auto;
21
+ <?php endif; ?>
22
  }
23
 
24
  /* Slide Navigation code */
148
  }
149
  #pagination .next{
150
  float: right;
151
+ margin-bottom: 22px;
152
  }
153
  #pagination .prev{
154
  float: left
168
  }
169
 
170
  /* Sticky Social bar in Single */
 
 
 
 
171
  .sticky_social{
172
  width: 100%;
173
  bottom: 0;
281
  }
282
  h1.amp-wp-title {
283
  text-align: center;
284
+ margin: 20px 0px 18px 0px;
285
  font-size: 1.5em;
286
  }
287
  .amp-wp-content.post-title-meta,
302
  }
303
  .amp-meta-wrapper{
304
  border-bottom: 1px solid #DADADA;
 
 
 
 
305
  }
306
  .amp-wp-meta {
307
  padding-left: 0;
336
  }
337
  .amp-wp-meta {
338
  font-size: 12px;
339
+ padding-bottom: 10px;
340
  color: #555;
341
  }
342
  .amp-ad-wrapper {
353
  margin-bottom: 15px;
354
  }
355
  .amp-wp-tax-tag{
356
+ font-size:13px;
357
+ border:0
 
 
 
358
  }
359
  main .amp-wp-content.featured-image-content {
360
  padding: 0px;
368
  background: none;
369
  box-shadow: none;
370
  max-width: 1030px;
371
+ padding:1px 0 0 0;
 
372
  }
373
  .related_posts h3, .comments_list h3{
374
  font-size: 14px;
424
  }
425
 
426
  /* Comments */
 
 
 
427
  main .amp-wp-content.comments_list {
428
  background: none;
429
  box-shadow: none;
464
  padding: 25px;
465
  width: 91%;
466
  }
 
 
 
467
  .comment-author{ float:left }
468
  .single-post footer.comment-meta{
469
  /* float:right */
519
  background: #f3f3f3;
520
  }
521
 
 
 
 
522
  /* Responsive */
523
  @media screen and (max-width: 800px) {
524
  .single-post main{
683
  .amp-wp-tax-tag a,
684
  a,
685
  .amp-wp-author {
686
+ color: <?php echo $color ?>;
687
  }
688
  .amp-wp-content blockquote{
689
+ border-color:<?php echo $color ?>;
690
  }
691
  .nav_container, .comment-button-wrapper a {
692
+ background: <?php echo $color ?>;
 
 
 
693
  }
694
  amp-user-notification {
695
+ border-color: <?php echo $color ?>;
696
  }
697
  amp-user-notification button {
698
+ background-color: <?php echo $color ?>;
699
  }
700
  <?php if( $redux_builder_amp['enable-single-social-icons'] == true ) { ?>
701
  .single-post footer {
731
  content: ' ';
732
  }
733
 
 
 
 
 
 
734
 
735
 
736
+ /* Custom Style Code */
737
+ <?php echo $redux_builder_amp['css_editor']; ?>