AMP for WP – Accelerated Mobile Pages - Version 0.9.42

Version Description

  • View more details at https://ampforwp.com/design-three-update/
  • Design 3 was released Video Overview along with new options and features. View the video overview at: https://www.youtube.com/watch?v=ub1pwskt3Rc [Major Feature]
  • Ticket #517 Added Upload field into Redux core [3rd party Compatiblity]
  • Ticket#529 Controls for archive titles added [Improvement]
  • Ticket #548 Jetpack photon code removed
Download this release

Release Info

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

Code changes from version 0.9.41 to 0.9.42

Files changed (41) hide show
  1. accelerated-moblie-pages.php +7 -7
  2. includes/includes.php +20 -1
  3. includes/options/admin-config.php +387 -17
  4. includes/options/redux-core/inc/fields/upload/blank.png +0 -0
  5. includes/options/redux-core/inc/fields/upload/field_upload.js +151 -0
  6. includes/options/redux-core/inc/fields/upload/field_upload.php +65 -0
  7. includes/options/redux-core/inc/fields/upload/field_upload_3_4.js +56 -0
  8. includes/options/redux-core/inc/fields/upload/gallery.js +164 -0
  9. readme.txt +10 -2
  10. templates/customizer/assets/customizer-control.js +13 -0
  11. templates/customizer/customizer.php +43 -12
  12. templates/design-manager/design-1/elements/meta-taxonomy.php +7 -6
  13. templates/design-manager/design-1/footer.php +5 -0
  14. templates/design-manager/design-1/header-bar.php +18 -3
  15. templates/design-manager/design-2/elements/meta-info.php +3 -3
  16. templates/design-manager/design-2/elements/meta-taxonomy.php +3 -3
  17. templates/design-manager/design-2/footer.php +2 -1
  18. templates/design-manager/design-2/header-bar.php +5 -2
  19. templates/design-manager/design-3/archive.php +118 -0
  20. templates/design-manager/design-3/elements/comments.php +85 -0
  21. templates/design-manager/design-3/elements/content.php +41 -0
  22. templates/design-manager/design-3/elements/featured-image.php +15 -0
  23. templates/design-manager/design-3/elements/meta-info.php +37 -0
  24. templates/design-manager/design-3/elements/meta-taxonomy.php +29 -0
  25. templates/design-manager/design-3/elements/related-posts.php +84 -0
  26. templates/design-manager/design-3/elements/simple-comment-button.php +8 -0
  27. templates/design-manager/design-3/elements/social-icons.php +30 -0
  28. templates/design-manager/design-3/elements/title.php +3 -0
  29. templates/design-manager/design-3/fonts/icomoon.eot +0 -0
  30. templates/design-manager/design-3/fonts/icomoon.svg +22 -0
  31. templates/design-manager/design-3/fonts/icomoon.ttf +0 -0
  32. templates/design-manager/design-3/fonts/icomoon.woff +0 -0
  33. templates/design-manager/design-3/footer.php +109 -0
  34. templates/design-manager/design-3/frontpage.php +88 -0
  35. templates/design-manager/design-3/functions.php +179 -0
  36. templates/design-manager/design-3/header-bar.php +112 -0
  37. templates/design-manager/design-3/index.php +170 -0
  38. templates/design-manager/design-3/search.php +118 -0
  39. templates/design-manager/design-3/single.php +30 -0
  40. templates/design-manager/design-3/style.php +1326 -0
  41. templates/features.php +62 -9
accelerated-moblie-pages.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
- Version: 0.9.41
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
16
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
17
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
18
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
19
- define('AMPFORWP_VERSION','0.9.41');
20
 
21
  // Rewrite the Endpoints after the plugin is activate, as priority is set to 11
22
  function ampforwp_add_custom_post_support() {
@@ -50,7 +50,7 @@ function ampforwp_add_custom_rewrite_rules() {
50
  } else {
51
  $rewrite_category = 'category';
52
  }
53
-
54
  add_rewrite_rule(
55
  $rewrite_category.'\/(.+?)\/amp/?$',
56
  'index.php?amp&category_name=$matches[1]',
@@ -63,13 +63,13 @@ function ampforwp_add_custom_rewrite_rules() {
63
  'top'
64
  );
65
 
66
- // For tag pages
67
  $rewrite_tag = get_option('tag_base');
68
  if (! empty($rewrite_tag)) {
69
  $rewrite_tag = get_option('tag_base');
70
  } else {
71
  $rewrite_tag = 'tag';
72
- }
73
  add_rewrite_rule(
74
  $rewrite_tag.'\/(.+?)\/amp/?$',
75
  'index.php?amp&tag=$matches[1]',
@@ -81,7 +81,7 @@ function ampforwp_add_custom_rewrite_rules() {
81
  'index.php?amp&tag=$matches[1]&paged=$matches[2]',
82
  'top'
83
  );
84
-
85
  }
86
  add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
87
 
@@ -93,7 +93,7 @@ function ampforwp_rewrite_activation() {
93
  // Flushing rewrite urls ONLY on activation
94
  global $wp_rewrite;
95
  $wp_rewrite->flush_rules();
96
-
97
  }
98
 
99
  register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: AMP for WP - Accelerated Mobile Pages for WordPress
6
+ Version: 0.9.42
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: https://ampforwp.com/
9
  Donate link: https://www.paypal.me/Kaludi/5
16
  define('AMPFORWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
17
  define('AMPFORWP_DISQUS_URL',plugin_dir_url(__FILE__).'includes/disqus.php');
18
  define('AMPFORWP_IMAGE_DIR',plugin_dir_url(__FILE__).'images');
19
+ define('AMPFORWP_VERSION','0.9.42');
20
 
21
  // Rewrite the Endpoints after the plugin is activate, as priority is set to 11
22
  function ampforwp_add_custom_post_support() {
50
  } else {
51
  $rewrite_category = 'category';
52
  }
53
+
54
  add_rewrite_rule(
55
  $rewrite_category.'\/(.+?)\/amp/?$',
56
  'index.php?amp&category_name=$matches[1]',
63
  'top'
64
  );
65
 
66
+ // For tag pages
67
  $rewrite_tag = get_option('tag_base');
68
  if (! empty($rewrite_tag)) {
69
  $rewrite_tag = get_option('tag_base');
70
  } else {
71
  $rewrite_tag = 'tag';
72
+ }
73
  add_rewrite_rule(
74
  $rewrite_tag.'\/(.+?)\/amp/?$',
75
  'index.php?amp&tag=$matches[1]',
81
  'index.php?amp&tag=$matches[1]&paged=$matches[2]',
82
  'top'
83
  );
84
+
85
  }
86
  add_action( 'init', 'ampforwp_add_custom_rewrite_rules' );
87
 
93
  // Flushing rewrite urls ONLY on activation
94
  global $wp_rewrite;
95
  $wp_rewrite->flush_rules();
96
+
97
  }
98
 
99
  register_deactivation_hook( __FILE__, 'ampforwp_rewrite_deactivate', 20 );
includes/includes.php CHANGED
@@ -1,10 +1,13 @@
1
  <?php
2
  /* This file will contain all the extra code that works like a supporting.
3
- 1. AMP menu code
 
 
4
  2. Newsletter code
5
  */
6
  // 1. AMP menu code
7
  // Registering Custom AMP menu for this plugin
 
8
  if (! function_exists( 'ampforwp_menu') ) {
9
  function ampforwp_menu() {
10
  register_nav_menus(
@@ -16,6 +19,22 @@
16
  add_action( 'init', 'ampforwp_menu' );
17
  }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  // 2. Newsletter code
20
  require_once( AMPFORWP_PLUGIN_DIR . '/includes/newsletter.php' );
21
  ?>
1
  <?php
2
  /* This file will contain all the extra code that works like a supporting.
3
+ 1. Register AMP menu
4
+ 1.1 AMP Header menu
5
+ 1.2 Design 3 Footer Menu
6
  2. Newsletter code
7
  */
8
  // 1. AMP menu code
9
  // Registering Custom AMP menu for this plugin
10
+ // 1.1 AMP Header menu
11
  if (! function_exists( 'ampforwp_menu') ) {
12
  function ampforwp_menu() {
13
  register_nav_menus(
19
  add_action( 'init', 'ampforwp_menu' );
20
  }
21
 
22
+ // 1.2 Design 3 Footer Menu
23
+ global $redux_builder_amp;
24
+ if ( $redux_builder_amp['amp-design-selector'] == 3) {
25
+ add_action( 'init', 'ampforwp_design_3_footermenu' );
26
+ }
27
+ if (! function_exists( 'ampforwp_design_3_footermenu') ) {
28
+ function ampforwp_design_3_footermenu() {
29
+ register_nav_menus(
30
+ array(
31
+ 'amp-footer-menu' => __( 'AMP Footer Menu','ampforwp' ),
32
+ )
33
+ );
34
+ }
35
+ }
36
+
37
+
38
  // 2. Newsletter code
39
  require_once( AMPFORWP_PLUGIN_DIR . '/includes/newsletter.php' );
40
  ?>
includes/options/admin-config.php CHANGED
@@ -189,13 +189,7 @@ Redux::setArgs( "redux_builder_amp", $args );
189
  'default' => 1,
190
  'desc' => __( 'Re-Save permalink if you make changes in this option', 'redux-framework-demo' ),
191
  ),
192
- array(
193
- 'id' =>'amp-on-off-support-for-non-amp-home-page',
194
- 'type' => 'switch',
195
- 'title' => __('Non-AMP HomePage link in Header and Logo', 'redux-framework-demo'),
196
- 'subtitle' => __('If you want users in header to go to non-AMP website from the Header, then you can enable this option', 'redux-framework-demo'),
197
- 'default' => 0,
198
- ),
199
 
200
  // array(
201
  // 'id' => 'amp-footer-text',
@@ -334,6 +328,23 @@ Redux::setArgs( "redux_builder_amp", $args );
334
  )
335
  );
336
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  // AMP Design SECTION
338
  Redux::setSection( $opt_name, array(
339
  'title' => __( 'Design', 'redux-framework-demo' ),
@@ -351,10 +362,83 @@ Redux::setArgs( "redux_builder_amp", $args );
351
  'subtitle' => __( 'Select your design.', 'redux-framework-demo' ),
352
  'options' => array(
353
  '1' => __('Design One', 'redux-framework-demo' ),
354
- '2' => __('Design Two', 'redux-framework-demo' )
 
355
  ),
356
  'default' => '2'
357
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
 
359
  array(
360
  'id' => 'css_editor',
@@ -691,10 +775,18 @@ Redux::setArgs( "redux_builder_amp", $args );
691
 
692
  // Social Section
693
  Redux::setSection( $opt_name, array(
694
- 'title' => __( 'Social', 'redux-framework-demo' ),
695
  'id' => 'amp-social',
 
696
  'subsection' => true,
697
  'fields' => array(
 
 
 
 
 
 
 
698
  // Facebook ON/OFF
699
  array(
700
  'id' => 'enable-single-facebook-share',
@@ -763,6 +855,235 @@ Redux::setArgs( "redux_builder_amp", $args );
763
  'title' => __('WhatsApp', 'redux-framework-demo'),
764
  'default' => 1,
765
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
766
  )
767
  ) );
768
 
@@ -850,6 +1171,27 @@ Redux::setArgs( "redux_builder_amp", $args );
850
  'id' => 'amp-translator',
851
  'subsection' => true,
852
  'fields' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
853
  array(
854
  'id' => 'amp-translator-top-text',
855
  'type' => 'text',
@@ -927,6 +1269,20 @@ Redux::setArgs( "redux_builder_amp", $args );
927
  'default' => 'By',
928
  'placeholder'=>'write here'
929
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
930
  array(
931
  'id' => 'amp-translator-view-comments-text',
932
  'type' => 'text',
@@ -969,6 +1325,20 @@ Redux::setArgs( "redux_builder_amp", $args );
969
  'default' => 'ago',
970
  'placeholder'=>'write here'
971
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
972
  )
973
  ) );
974
 
@@ -1038,7 +1408,6 @@ Redux::setArgs( "redux_builder_amp", $args );
1038
  ) );
1039
 
1040
 
1041
-
1042
  // Advance Settings SECTION
1043
  Redux::setSection( $opt_name, array(
1044
  'title' => __( 'Advance Settings', 'redux-framework-demo' ),
@@ -1046,13 +1415,7 @@ Redux::setSection( $opt_name, array(
1046
  'id' => 'amp-advance',
1047
  'subsection' => true,
1048
  'fields' => array(
1049
- array(
1050
- 'id' =>'ampforwp-amp-on-off-catgs-tags',
1051
- 'type' => 'switch',
1052
- 'title' => __('Non-AMP links on Meta Archives', 'redux-framework-demo'),
1053
- 'default' => 0,
1054
- 'subtitle' => __('Disable/Enable AMP links on Archives Meta', 'redux-framework-demo'),
1055
- ),
1056
  array(
1057
  'id' => 'ampforwp-homepage-on-off-support',
1058
  'type' => 'switch',
@@ -1060,6 +1423,13 @@ Redux::setSection( $opt_name, array(
1060
  'subtitle' => __('Enable/Disable Home page using this switch.', 'redux-framework-demo'),
1061
  'default' => '1'
1062
  ),
 
 
 
 
 
 
 
1063
  array(
1064
  'id' => 'ampforwp-archive-support',
1065
  'type' => 'switch',
189
  'default' => 1,
190
  'desc' => __( 'Re-Save permalink if you make changes in this option', 'redux-framework-demo' ),
191
  ),
192
+
 
 
 
 
 
 
193
 
194
  // array(
195
  // 'id' => 'amp-footer-text',
328
  )
329
  );
330
 
331
+
332
+ //code for fetching ctegories to show as a list in redux settings
333
+ $categories = get_categories( array(
334
+ 'orderby' => 'name',
335
+ 'order' => 'ASC'
336
+ ) );
337
+ $categories_array = array();
338
+ if ( $categories ) :
339
+ foreach ($categories as $cat ) {
340
+ $cat_id = $cat->cat_ID;
341
+ $key = "".$cat_id;
342
+ //building assosiative array of ID-cat_name
343
+ $categories_array[ $key ] = $cat->name;
344
+ }
345
+ endif;
346
+ //End of code for fetching ctegories to show as a list in redux settings
347
+
348
  // AMP Design SECTION
349
  Redux::setSection( $opt_name, array(
350
  'title' => __( 'Design', 'redux-framework-demo' ),
362
  'subtitle' => __( 'Select your design.', 'redux-framework-demo' ),
363
  'options' => array(
364
  '1' => __('Design One', 'redux-framework-demo' ),
365
+ '2' => __('Design Two', 'redux-framework-demo' ),
366
+ '3' => __('Design Three', 'redux-framework-demo' )
367
  ),
368
  'default' => '2'
369
  ),
370
+ array(
371
+ 'id' => 'amp-opt-color-rgba-colorscheme',
372
+ 'type' => 'color_rgba',
373
+ 'title' => 'Color Scheme',
374
+ 'default' => array(
375
+ 'color' => '#F42F42',
376
+ ),
377
+ 'required' => array(
378
+ array('amp-design-selector', '=' , '3')
379
+ )
380
+ ),
381
+ array(
382
+ 'id' => 'amp-opt-color-rgba-headercolor',
383
+ 'type' => 'color_rgba',
384
+ 'title' => 'Header Color',
385
+ 'default' => array(
386
+ 'color' => '#FFFFFF',
387
+ ),
388
+ 'required' => array(
389
+ array('amp-design-selector', '=' , '3')
390
+ )
391
+ ),
392
+ array(
393
+ 'id' => 'amp-opt-color-rgba-font',
394
+ 'type' => 'color_rgba',
395
+ 'title' => 'Color Scheme Font Color',
396
+ 'default' => array(
397
+ 'color' => '#fff',
398
+ ),
399
+ 'required' => array(
400
+ array('amp-design-selector', '=' , '3')
401
+ )
402
+ ),
403
+
404
+ array(
405
+ 'id' => 'amp-design-3-featured-slider',
406
+ 'type' => 'switch',
407
+ 'title' => __( 'Featured Slider', 'redux-framework-demo' ),
408
+ 'required' => array(
409
+ array('amp-design-selector', '=' , '3')
410
+ ),
411
+ 'default' => '1'
412
+ ),
413
+ array(
414
+ 'id' => 'amp-design-3-category-selector',
415
+ 'type' => 'select',
416
+ 'title' => __( 'Featured Slider Category', 'redux-framework-demo' ),
417
+ 'options' => $categories_array,
418
+ 'required' => array(
419
+ array('amp-design-selector', '=' , '3'),
420
+ array('amp-design-3-featured-slider', '=' , '1')
421
+ ),
422
+ ),
423
+ array(
424
+ 'id' => 'amp-design-3-search-feature',
425
+ 'type' => 'switch',
426
+ 'title' => __( 'Search', 'redux-framework-demo' ),
427
+ 'required' => array(
428
+ array('amp-design-selector', '=' , '3')
429
+ ),
430
+ 'default' => '0'
431
+ ),
432
+ array(
433
+ 'id' => 'amp-design-3-credit-link',
434
+ 'type' => 'switch',
435
+ 'title' => __( 'Credit link', 'redux-framework-demo' ),
436
+ 'required' => array(
437
+ array('amp-design-selector', '=' , '3')
438
+ ),
439
+ 'default' => '1'
440
+ ),
441
+
442
 
443
  array(
444
  'id' => 'css_editor',
775
 
776
  // Social Section
777
  Redux::setSection( $opt_name, array(
778
+ 'title' => __( 'Social Share', 'redux-framework-demo' ),
779
  'id' => 'amp-social',
780
+ 'desc' => 'enable social share and your social profiels here',
781
  'subsection' => true,
782
  'fields' => array(
783
+ array(
784
+ 'id' => 'social-media-share-subsection',
785
+ 'type' => 'section',
786
+ 'title' => __('Social Media Share', 'redux-framework-demo'),
787
+ 'subtitle' => __('Please enable shocial media companies for share here', 'redux-framework-demo'),
788
+ 'indent' => true
789
+ ),
790
  // Facebook ON/OFF
791
  array(
792
  'id' => 'enable-single-facebook-share',
855
  'title' => __('WhatsApp', 'redux-framework-demo'),
856
  'default' => 1,
857
  ),
858
+ array(
859
+ 'id' => 'social-media-profiles-subsection',
860
+ 'type' => 'section',
861
+ 'title' => __('Social Media Profiles (Design #3)', 'redux-framework-demo'),
862
+ 'subtitle' => __('Please enter your personal/organizational social media profiles here', 'redux-framework-demo'),
863
+ 'indent' => true
864
+ ),
865
+ //#1
866
+ array(
867
+ 'id' => 'enable-single-twittter-profile',
868
+ 'type' => 'switch',
869
+ 'title' => __('Twittter ', 'redux-framework-demo'),
870
+ 'default' => 1,
871
+ 'required' => array(
872
+ array('amp-design-selector', '=' , '3')
873
+ ),
874
+ ),
875
+ array(
876
+ 'id' => 'enable-single-twittter-profile-url',
877
+ 'type' => 'text',
878
+ 'title' => __('Twittter URL', 'redux-framework-demo'),
879
+ 'default' => '#',
880
+ 'required' => array(
881
+ array('amp-design-selector', '=' , '3'),
882
+ array('enable-single-twittter-profile', '=' , '1')
883
+ ),
884
+ ),
885
+ //#2
886
+ array(
887
+ 'id' => 'enable-single-facebook-profile',
888
+ 'type' => 'switch',
889
+ 'title' => __('Facebook ', 'redux-framework-demo'),
890
+ 'default' => 1,
891
+ 'required' => array(
892
+ array('amp-design-selector', '=' , '3')
893
+ ),
894
+ ),
895
+ array(
896
+ 'id' => 'enable-single-facebook-profile-url',
897
+ 'type' => 'text',
898
+ 'title' => __('Facebook URL', 'redux-framework-demo'),
899
+ 'default' => '#',
900
+ 'required' => array(
901
+ array('amp-design-selector', '=' , '3'),
902
+ array('enable-single-facebook-profile', '=' , '1')
903
+ ),
904
+ ),
905
+ //#3
906
+ array(
907
+ 'id' => 'enable-single-pintrest-profile',
908
+ 'type' => 'switch',
909
+ 'title' => __('Pintrest ', 'redux-framework-demo'),
910
+ 'default' => 1,
911
+ 'required' => array(
912
+ array('amp-design-selector', '=' , '3')
913
+ ),
914
+ ),
915
+ array(
916
+ 'id' => 'enable-single-pintrest-profile-url',
917
+ 'type' => 'text',
918
+ 'title' => __('Pintrest URL', 'redux-framework-demo'),
919
+ 'default' => '#',
920
+ 'required' => array(
921
+ array('amp-design-selector', '=' , '3'),
922
+ array('enable-single-pintrest-profile', '=' , '1')
923
+ ),
924
+ ),
925
+ //#4
926
+ array(
927
+ 'id' => 'enable-single-google-plus-profile',
928
+ 'type' => 'switch',
929
+ 'title' => __('Google Plus ', 'redux-framework-demo'),
930
+ 'default' => 0,
931
+ 'required' => array(
932
+ array('amp-design-selector', '=' , '3')
933
+ ),
934
+ ),
935
+ array(
936
+ 'id' => 'enable-single-google-plus-profile-url',
937
+ 'type' => 'text',
938
+ 'title' => __('Google Plus URL', 'redux-framework-demo'),
939
+ 'default' => '',
940
+ 'required' => array(
941
+ array('amp-design-selector', '=' , '3'),
942
+ array('enable-single-google-plus-profile', '=' , '1')
943
+ ),
944
+ ),
945
+ //#5
946
+ array(
947
+ 'id' => 'enable-single-linkdin-profile',
948
+ 'type' => 'switch',
949
+ 'title' => __('Linkdin ', 'redux-framework-demo'),
950
+ 'default' => 0,
951
+ 'required' => array(
952
+ array('amp-design-selector', '=' , '3')
953
+ ),
954
+ ),
955
+ array(
956
+ 'id' => 'enable-single-linkdin-profile-url',
957
+ 'type' => 'text',
958
+ 'title' => __('Linkdin URL', 'redux-framework-demo'),
959
+ 'default' => '',
960
+ 'required' => array(
961
+ array('amp-design-selector', '=' , '3'),
962
+ array('enable-single-linkdin-profile', '=' , '1')
963
+ ),
964
+ ),
965
+ //#6
966
+ array(
967
+ 'id' => 'enable-single-youtube-profile',
968
+ 'type' => 'switch',
969
+ 'title' => __('Youtube ', 'redux-framework-demo'),
970
+ 'default' => 1,
971
+ 'required' => array(
972
+ array('amp-design-selector', '=' , '3')
973
+ ),
974
+ ),
975
+ array(
976
+ 'id' => 'enable-single-youtube-profile-url',
977
+ 'type' => 'text',
978
+ 'default' => '#',
979
+ 'title' => __('Youtube URL', 'redux-framework-demo'),
980
+ 'required' => array(
981
+ array('amp-design-selector', '=' , '3'),
982
+ array('enable-single-youtube-profile', '=' , '1')
983
+ ),
984
+ ),
985
+ //#7
986
+ array(
987
+ 'id' => 'enable-single-instagram-profile',
988
+ 'type' => 'switch',
989
+ 'title' => __('Instagram ', 'redux-framework-demo'),
990
+ 'default' => 0,
991
+ 'required' => array(
992
+ array('amp-design-selector', '=' , '3')
993
+ ),
994
+ ),
995
+ array(
996
+ 'id' => 'enable-single-instagram-profile-url',
997
+ 'type' => 'text',
998
+ 'default' => '',
999
+ 'title' => __('Instagram URL', 'redux-framework-demo'),
1000
+ 'required' => array(
1001
+ array('amp-design-selector', '=' , '3'),
1002
+ array('enable-single-instagram-profile', '=' , '1')
1003
+ ),
1004
+ ),
1005
+ //#8
1006
+ array(
1007
+ 'id' => 'enable-single-VKontakte-profile',
1008
+ 'type' => 'switch',
1009
+ 'title' => __('VKontakte ', 'redux-framework-demo'),
1010
+ 'default' => 0,
1011
+ 'required' => array(
1012
+ array('amp-design-selector', '=' , '3')
1013
+ ),
1014
+ ),
1015
+ array(
1016
+ 'id' => 'enable-single-VKontakte-profile-url',
1017
+ 'type' => 'text',
1018
+ 'default' => '',
1019
+ 'title' => __('VKontakte URL', 'redux-framework-demo'),
1020
+ 'required' => array(
1021
+ array('amp-design-selector', '=' , '3'),
1022
+ array('enable-single-VKontakte-profile', '=' , '1')
1023
+ ),
1024
+ ),
1025
+ //#9
1026
+ //removed whatsapp
1027
+ //#10
1028
+ array(
1029
+ 'id' => 'enable-single-reddit-profile',
1030
+ 'type' => 'switch',
1031
+ 'title' => __('Reddit', 'redux-framework-demo'),
1032
+ 'default' => 0,
1033
+ 'required' => array(
1034
+ array('amp-design-selector', '=' , '3')
1035
+ ),
1036
+ ),
1037
+ array(
1038
+ 'id' => 'enable-single-reddit-profile-url',
1039
+ 'type' => 'text',
1040
+ 'title' => __('Reddit URL', 'redux-framework-demo'),
1041
+ 'default' => '',
1042
+ 'required' => array(
1043
+ array('amp-design-selector', '=' , '3'),
1044
+ array('enable-single-reddit-profile', '=' , '1')
1045
+ ),
1046
+ ),
1047
+ //#11
1048
+ array(
1049
+ 'id' => 'enable-single-snapchat-profile',
1050
+ 'type' => 'switch',
1051
+ 'title' => __('Snapchat ', 'redux-framework-demo'),
1052
+ 'default' => 0,
1053
+ 'required' => array(
1054
+ array('amp-design-selector', '=' , '3')
1055
+ ),
1056
+ ),
1057
+ array(
1058
+ 'id' => 'enable-single-snapchat-profile-url',
1059
+ 'type' => 'text',
1060
+ 'title' => __('Snapchat URL', 'redux-framework-demo'),
1061
+ 'default' => '',
1062
+ 'required' => array(
1063
+ array('amp-design-selector', '=' , '3'),
1064
+ array('enable-single-snapchat-profile', '=' , '1')
1065
+ ),
1066
+ ),
1067
+ //#12
1068
+ array(
1069
+ 'id' => 'enable-single-Tumblr-profile',
1070
+ 'type' => 'switch',
1071
+ 'title' => __('Tumblr', 'redux-framework-demo'),
1072
+ 'default' => 0,
1073
+ 'required' => array(
1074
+ array('amp-design-selector', '=' , '3')
1075
+ ),
1076
+ ),
1077
+ array(
1078
+ 'id' => 'enable-single-Tumblr-profile-url',
1079
+ 'type' => 'text',
1080
+ 'title' => __('Tumblr URL', 'redux-framework-demo'),
1081
+ 'default' => '',
1082
+ 'required' => array(
1083
+ array('amp-design-selector', '=' , '3'),
1084
+ array('enable-single-Tumblr-profile', '=' , '1')
1085
+ ),
1086
+ ),
1087
  )
1088
  ) );
1089
 
1171
  'id' => 'amp-translator',
1172
  'subsection' => true,
1173
  'fields' => array(
1174
+ array(
1175
+ 'id' => 'amp-translator-search-text',
1176
+ 'type' => 'text',
1177
+ 'title' => __(' You searched for: ', 'redux-framework-demo'),
1178
+ 'default' => ' You searched for: ',
1179
+ 'placeholder'=>'write here'
1180
+ ),
1181
+ array(
1182
+ 'id' => 'amp-translator-show-more-posts-text',
1183
+ 'type' => 'text',
1184
+ 'title' => __('Show more Posts', 'redux-framework-demo'),
1185
+ 'default' => 'Show more Posts',
1186
+ 'placeholder'=>'write here'
1187
+ ),
1188
+ array(
1189
+ 'id' => 'amp-translator-show-previous-posts-text',
1190
+ 'type' => 'text',
1191
+ 'title' => __('Show previous Posts', 'redux-framework-demo'),
1192
+ 'default' => 'Show previous Posts',
1193
+ 'placeholder'=>'write here'
1194
+ ),
1195
  array(
1196
  'id' => 'amp-translator-top-text',
1197
  'type' => 'text',
1269
  'default' => 'By',
1270
  'placeholder'=>'write here'
1271
  ),
1272
+ array(
1273
+ 'id' => 'amp-translator-published-by',
1274
+ 'type' => 'text',
1275
+ 'title' => __('Published by', 'redux-framework-demo'),
1276
+ 'default' => 'Published by',
1277
+ 'placeholder'=>'write here'
1278
+ ),
1279
+ array(
1280
+ 'id' => 'amp-translator-in-designthree',
1281
+ 'type' => 'text',
1282
+ 'title' => __('in', 'redux-framework-demo'),
1283
+ 'default' => 'in',
1284
+ 'placeholder'=>'write here'
1285
+ ),
1286
  array(
1287
  'id' => 'amp-translator-view-comments-text',
1288
  'type' => 'text',
1325
  'default' => 'ago',
1326
  'placeholder'=>'write here'
1327
  ),
1328
+ array(
1329
+ 'id' => 'amp-translator-archive-cat-text',
1330
+ 'type' => 'text',
1331
+ 'title' => __('Category (archive title)', 'redux-framework-demo'),
1332
+ 'default' => 'Category: ',
1333
+ 'placeholder'=>'write here'
1334
+ ),
1335
+ array(
1336
+ 'id' => 'amp-translator-archive-tag-text',
1337
+ 'type' => 'text',
1338
+ 'title' => __('Tag (archive title)', 'redux-framework-demo'),
1339
+ 'default' => 'Tag: ',
1340
+ 'placeholder'=>'write here'
1341
+ ),
1342
  )
1343
  ) );
1344
 
1408
  ) );
1409
 
1410
 
 
1411
  // Advance Settings SECTION
1412
  Redux::setSection( $opt_name, array(
1413
  'title' => __( 'Advance Settings', 'redux-framework-demo' ),
1415
  'id' => 'amp-advance',
1416
  'subsection' => true,
1417
  'fields' => array(
1418
+
 
 
 
 
 
 
1419
  array(
1420
  'id' => 'ampforwp-homepage-on-off-support',
1421
  'type' => 'switch',
1423
  'subtitle' => __('Enable/Disable Home page using this switch.', 'redux-framework-demo'),
1424
  'default' => '1'
1425
  ),
1426
+ array(
1427
+ 'id' =>'amp-on-off-support-for-non-amp-home-page',
1428
+ 'type' => 'switch',
1429
+ 'title' => __('Non-AMP HomePage link in Header and Logo', 'redux-framework-demo'),
1430
+ 'subtitle' => __('If you want users in header to go to non-AMP website from the Header, then you can enable this option', 'redux-framework-demo'),
1431
+ 'default' => 0,
1432
+ ),
1433
  array(
1434
  'id' => 'ampforwp-archive-support',
1435
  'type' => 'switch',
includes/options/redux-core/inc/fields/upload/blank.png ADDED
Binary file
includes/options/redux-core/inc/fields/upload/field_upload.js ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery, document, redux_upload, formfield:true, preview:true, tb_show, window, imgurl:true, tb_remove, $relid:true*/
2
+ /*
3
+ This is the uploader for wordpress starting from version 3.5
4
+ */
5
+ jQuery(document).ready(function(){
6
+
7
+ jQuery(".redux-opts-upload").click( function( event ) {
8
+ var activeFileUploadContext = jQuery(this).parent();
9
+ var relid = jQuery(this).attr('rel-id');
10
+ var $that = jQuery(this);
11
+ var elementID = jQuery(this).attr('id');
12
+
13
+ event.preventDefault();
14
+
15
+ // If the media frame already exists, reopen it.
16
+ /*if ( typeof(custom_file_frame)!=="undefined" ) {
17
+ custom_file_frame.open();
18
+ return;
19
+ }*/
20
+
21
+ // if its not null, its broking custom_file_frame's onselect "activeFileUploadContext"
22
+ custom_file_frame = null;
23
+
24
+ // Create the media frame.
25
+ custom_file_frame = wp.media.frames.customHeader = wp.media({
26
+ // Set the title of the modal.
27
+ title: jQuery(this).data("choose"),
28
+
29
+ // Tell the modal to show only images. Ignore if want ALL
30
+ library: {
31
+ type: 'image'
32
+ },
33
+ // Customize the submit button.
34
+ button: {
35
+ // Set the text of the button.
36
+ text: jQuery(this).data("update")
37
+ }
38
+ });
39
+
40
+ custom_file_frame.on( "select", function() {
41
+ // Grab the selected attachment.
42
+ var attachment = custom_file_frame.state().get("selection").first();
43
+
44
+ // Update value of the targetfield input with the attachment url.
45
+ jQuery('.redux-opts-screenshot',activeFileUploadContext).attr('src', attachment.attributes.url);
46
+ jQuery('#' + relid ).val(attachment.attributes.url).trigger('change');
47
+
48
+ jQuery('.redux-opts-upload',activeFileUploadContext).hide();
49
+ jQuery('.redux-opts-screenshot',activeFileUploadContext).show();
50
+ jQuery('.redux-opts-upload-remove',activeFileUploadContext).show();
51
+
52
+ toggleParallaxOption();
53
+
54
+ });
55
+
56
+ custom_file_frame.open();
57
+ });
58
+
59
+ jQuery(".redux-opts-upload-remove").click( function( event ) {
60
+ var activeFileUploadContext = jQuery(this).parent();
61
+ var relid = jQuery(this).attr('rel-id');
62
+
63
+ event.preventDefault();
64
+
65
+ jQuery('#' + relid).val('');
66
+ jQuery(this).prev().fadeIn('slow');
67
+ jQuery('.redux-opts-screenshot',activeFileUploadContext).fadeOut('slow');
68
+ jQuery(this).fadeOut('slow');
69
+
70
+ toggleParallaxOption();
71
+ });
72
+
73
+
74
+
75
+
76
+
77
+ //media upload
78
+ jQuery(".redux-opts-media-upload").click( function( event ) {
79
+ var activeFileUploadContext = jQuery(this).parent();
80
+ var relid = jQuery(this).attr('rel-id');
81
+
82
+ event.preventDefault();
83
+
84
+ // If the media frame already exists, reopen it.
85
+ /*if ( typeof(custom_file_frame)!=="undefined" ) {
86
+ custom_file_frame.open();
87
+ return;
88
+ }*/
89
+
90
+ // if its not null, its broking custom_file_frame's onselect "activeFileUploadContext"
91
+ custom_file_frame = null;
92
+
93
+ // Create the media frame.
94
+ custom_file_frame = wp.media.frames.customHeader = wp.media({
95
+ // Set the title of the modal.
96
+ title: jQuery(this).data("choose"),
97
+
98
+ // Tell the modal to show only images. Ignore if want ALL
99
+ library: {
100
+ type: 'video'
101
+ },
102
+ // Customize the submit button.
103
+ button: {
104
+ // Set the text of the button.
105
+ text: jQuery(this).data("update")
106
+ }
107
+ });
108
+
109
+ custom_file_frame.on( "select", function() {
110
+ // Grab the selected attachment.
111
+ var attachment = custom_file_frame.state().get("selection").first();
112
+
113
+ // Update value of the targetfield input with the attachment url.
114
+ jQuery('#' + relid ).val(attachment.attributes.url).trigger('change');
115
+
116
+
117
+ jQuery('#_nectar_video_embed').trigger('keyup');
118
+
119
+ jQuery('.redux-opts-media-upload',activeFileUploadContext).hide();
120
+ jQuery('.redux-opts-upload-media-remove',activeFileUploadContext).show();
121
+ });
122
+
123
+ custom_file_frame.open();
124
+ });
125
+
126
+ jQuery(".redux-opts-upload-media-remove").click( function( event ) {
127
+ var activeFileUploadContext = jQuery(this).parent();
128
+ var relid = jQuery(this).attr('rel-id');
129
+
130
+ event.preventDefault();
131
+
132
+ jQuery('#' + relid).val('');
133
+ jQuery(this).prev().fadeIn('slow');
134
+ jQuery('.redux-opts-screenshot',activeFileUploadContext).fadeOut('slow');
135
+ jQuery(this).fadeOut('slow');
136
+ });
137
+
138
+
139
+ //only show parallax when using bg image
140
+ function toggleParallaxOption(){
141
+ if(jQuery('#_nectar_header_bg').length > 0){
142
+ if(jQuery('#_nectar_header_bg').attr('value').length > 0 || jQuery('#_nectar_header_bg_color').length > 0 && jQuery('#_nectar_header_bg_color').attr('value').length > 0){
143
+ jQuery('#_nectar_header_parallax').parents('tr').show();
144
+ } else {
145
+ jQuery('#_nectar_header_parallax').parents('tr').hide();
146
+ jQuery('#_nectar_header_parallax').prop('checked', false);
147
+ }
148
+ }
149
+ }
150
+
151
+ });
includes/options/redux-core/inc/fields/upload/field_upload.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Redux_Options_upload {
3
+
4
+ /**
5
+ * Field Constructor.
6
+ *
7
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
8
+ *
9
+ * @since Redux_Options 1.0.0
10
+ */
11
+ function __construct($field = array(), $value ='', $parent = '') {
12
+ $this->field = $field;
13
+ $this->value = $value;
14
+ $this->args = $parent->args;
15
+ $this->url = $parent->url;
16
+ }
17
+
18
+ /**
19
+ * Field Render Function.
20
+ *
21
+ * Takes the vars and outputs the HTML for the field in the settings
22
+ *
23
+ * @since Redux_Options 1.0.0
24
+ */
25
+ function render() {
26
+ $class = (isset($this->field['class'])) ? $this->field['class'] : 'regular-text';
27
+ echo '<input type="hidden" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="' . $this->value . '" class="' . $class . '" />';
28
+ echo '<img class="redux-opts-screenshot" id="redux-opts-screenshot-' . $this->field['id'] . '" src="' . $this->value . '" />';
29
+ if($this->value == '') {$remove = ' style="display:none;"'; $upload = ''; } else {$remove = ''; $upload = ' style="display:none;"'; }
30
+ echo ' <a data-update="Select File" data-choose="Choose a File" href="javascript:void(0);"class="redux-opts-upload button-secondary"' . $upload . ' rel-id="' . $this->field['id'] . '">' . __('Upload', NECTAR_THEME_NAME) . '</a>';
31
+ echo ' <a href="javascript:void(0);" class="redux-opts-upload-remove"' . $remove . ' rel-id="' . $this->field['id'] . '">' . __('Remove Upload', NECTAR_THEME_NAME) . '</a>';
32
+ echo (isset($this->field['desc']) && !empty($this->field['desc'])) ? '<br/><span class="description">' . $this->field['desc'] . '</span>' : '';
33
+ }
34
+
35
+ /**
36
+ * Enqueue Function.
37
+ *
38
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
39
+ *
40
+ * @since Redux_Options 1.0.0
41
+ */
42
+ function enqueue() {
43
+
44
+ if ( floatval(get_bloginfo('version')) < "3.5" ) {
45
+ wp_enqueue_script(
46
+ 'redux-opts-field-upload-js',
47
+ Redux_OPTIONS_URL . 'fields/upload/field_upload_3_4.js',
48
+ array('jquery', 'thickbox', 'media-upload'),
49
+ time(),
50
+ true
51
+ );
52
+ wp_enqueue_style('thickbox');// thanks to https://github.com/rzepak
53
+ } else {
54
+ wp_enqueue_script(
55
+ 'redux-opts-field-upload-js',
56
+ Redux_OPTIONS_URL . 'fields/upload/field_upload.js',
57
+ array('jquery'),
58
+ time(),
59
+ true
60
+ );
61
+
62
+ }
63
+ wp_localize_script('redux-opts-field-upload-js', 'redux_upload', array('url' => $this->url.'fields/upload/blank.png'));
64
+ }
65
+ }
includes/options/redux-core/inc/fields/upload/field_upload_3_4.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery, document, redux_upload, formfield:true, preview:true, tb_show, window, imgurl:true, tb_remove, $relid:true*/
2
+ /*
3
+ This is the uploader for wordpress before version 3.5
4
+ */
5
+ jQuery(document).ready(function () {
6
+ "use strict";
7
+
8
+ /*
9
+ *
10
+ * Redux_Options_upload function
11
+ * Adds media upload functionality to the page
12
+ *
13
+ */
14
+
15
+ var header_clicked = false;
16
+ var formfield;
17
+ var preview;
18
+ var $relid;
19
+ var imgurl;
20
+
21
+ jQuery("img[src='']").attr("src", redux_upload.url);
22
+
23
+ jQuery('.redux-opts-upload').click(function () {
24
+ header_clicked = true;
25
+ formfield = jQuery(this).attr('rel-id');
26
+ preview = jQuery(this).prev('img');
27
+ tb_show('', 'media-upload.php?type=image&amp;post_id=0&amp;TB_iframe=true');
28
+ return false;
29
+ });
30
+
31
+ jQuery('.redux-opts-upload-remove').click(function () {
32
+ $relid = jQuery(this).attr('rel-id');
33
+ jQuery('#' + $relid).val('');
34
+ jQuery(this).prev().fadeIn('slow');
35
+ jQuery(this).prev().prev().fadeOut('slow', function () { jQuery(this).attr("src", redux_upload.url); });
36
+ jQuery(this).fadeOut('slow');
37
+ });
38
+
39
+ // Store original function
40
+ window.original_send_to_editor = window.send_to_editor;
41
+
42
+ window.send_to_editor = function (html) {
43
+ if (header_clicked) {
44
+ imgurl = jQuery('img', html).attr('src');
45
+ jQuery('#' + formfield).val(imgurl).trigger('change');
46
+ jQuery('#' + formfield).next().fadeIn('slow');
47
+ jQuery('#' + formfield).next().next().fadeOut('slow');
48
+ jQuery('#' + formfield).next().next().next().fadeIn('slow');
49
+ jQuery(preview).attr('src', imgurl);
50
+ tb_remove();
51
+ header_clicked = false;
52
+ } else {
53
+ window.original_send_to_editor(html);
54
+ }
55
+ }
56
+ });
includes/options/redux-core/inc/fields/upload/gallery.js ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global redux_change, wp */
2
+
3
+ /*global redux_change, redux*/
4
+
5
+
6
+
7
+ (function( $ ) {
8
+ "use strict";
9
+
10
+
11
+
12
+ $( document ).ready(
13
+ function() {
14
+ //redux.field_objects.gallery.init();
15
+ }
16
+ );
17
+
18
+
19
+
20
+
21
+ // if ( !selector ) {
22
+ var selector = $( document ).find( '.redux-container-gallery:visible' );
23
+ // }
24
+
25
+ $( selector ).each(
26
+
27
+ function() {
28
+
29
+ var el = $( this );
30
+ var parent = el;
31
+ /* if ( !el.hasClass( 'redux-field-container' ) ) {
32
+ parent = el.parents( '.redux-field-container:first' );
33
+ }
34
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
35
+ return;
36
+ }
37
+ if ( parent.hasClass( 'redux-field-init' ) ) {
38
+ parent.removeClass( 'redux-field-init' );
39
+ } else {
40
+ return;
41
+
42
+ }*/
43
+ // When the user clicks on the Add/Edit gallery button, we need to display the gallery editing
44
+ el.on(
45
+ {
46
+ click: function( event ) {
47
+
48
+ var current_gallery = $( this ).closest( 'fieldset' );
49
+
50
+ if ( event.currentTarget.id === 'clear-gallery' ) {
51
+ //remove value from input
52
+
53
+ var rmVal = current_gallery.find( '.gallery_values' ).val( '' );
54
+
55
+ //remove preview images
56
+ current_gallery.find( ".screenshot" ).html( "" );
57
+
58
+ return;
59
+
60
+ }
61
+
62
+ // Make sure the media gallery API exists
63
+ if ( typeof wp === 'undefined' || !wp.media || !wp.media.gallery ) {
64
+ return;
65
+ }
66
+ event.preventDefault();
67
+
68
+ // Activate the media editor
69
+ var $$ = $( this );
70
+
71
+ var val = current_gallery.find( '.gallery_values' ).val();
72
+ var final;
73
+
74
+ if ( !val ) {
75
+ final = '[gallery ids="0"]';
76
+ } else {
77
+ final = '[gallery ids="' + val + '"]';
78
+ }
79
+
80
+ var frame = wp.media.gallery.edit( final );
81
+
82
+ if($('body.particle-edit').length > 0) {
83
+ //edit text
84
+ $(frame.title.view.el).find('.media-frame-title h1').text('Edit Particle Shapes');
85
+ $(frame.title.view.el).find('.media-frame-menu .media-menu a:contains(Add to Gallery)').text('Add to Particle Shapes');
86
+ $(frame.title.view.el).find('.media-frame-menu .media-menu a:contains(Edit Gallery)').text('Edit');
87
+ $(frame.title.view.el).find('.media-frame-menu .media-menu a:contains(Cancel Gallery)').text('Cancel');
88
+ $(frame.title.view.el).find('.media-toolbar-primary a:contains(Update gallery)').text('Update Particle Shapes');
89
+ setTimeout(function(){ $(frame.title.view.el).find('.media-toolbar-primary a:contains(Update gallery)').text('Update Particle Shapes'); },400);
90
+ var $cssString = '.collection-settings, input[type="text"].describe, .attachment-details label[data-setting="alt"], .attachment-details label[data-setting="description"] { display: none!important;} .compat-item .label {max-width: 30%; } p.help { font-size: 12px; font-style: normal; color: #888; } .compat-item tr.compat-field-shape-bg-color, .compat-item tr.compat-field-shape-color-alpha, .compat-item tr.compat-field-shape-color-mapping, .compat-item tr.compat-field-shape-particle-color, .compat-item tr.compat-field-shape-density, .compat-item tr.compat-field-shape-max-particle-size { display: block;} ';
91
+ $('style#remove-gallery-els').remove();
92
+
93
+ var head = document.head || document.getElementsByTagName('head')[0];
94
+ var style = document.createElement('style');
95
+
96
+ style.type = 'text/css';
97
+ style.id = 'remove-gallery-els';
98
+
99
+ if (style.styleSheet){
100
+ style.styleSheet.cssText = $cssString;
101
+ } else {
102
+ style.appendChild(document.createTextNode($cssString));
103
+ }
104
+ head.appendChild(style);
105
+
106
+
107
+ $('.media-menu-item:contains(Add to Particle Shapes)').on('click',function(){
108
+ $ (frame.title.view.el).find('.media-frame-title h1, .media-frame-toolbar .media-button-insert').text('Add to Particle Shapes');
109
+ });
110
+ $('.media-menu-item:contains(Edit Particle Shapes)').on('click',function(){
111
+ $ (frame.title.view.el).find('.media-frame-title h1').text('Edit Particle Shapes');
112
+ $('.media-frame-toolbar .media-button-insert').text('Update Particle Shapes');
113
+ });
114
+ $('body').on('click','.media-frame:not(.hide-router) .attachments-browser li.attachment .attachment-preview',function(){
115
+
116
+ $(frame.title.view.el).find('.media-frame-toolbar .media-button-insert').text('Add to Particle Shapes');
117
+ $(frame.title.view.el).find('.media-frame-title h1').text('Add to Particle Shapes');
118
+ });
119
+ $('body').on('mousedown','.media-toolbar-primary .button:contains(Add to Particle Shapes)',function(){
120
+ setTimeout(function(){
121
+ $(frame.title.view.el).find('.media-frame-toolbar .media-button-insert').text('Update Particle Shapes');
122
+ $(frame.title.view.el).find('.media-frame-title h1').text('Edit Particle Shapes');
123
+ },200)
124
+
125
+ });
126
+ }
127
+
128
+ // When the gallery-edit state is updated, copy the attachment ids across
129
+ frame.state( 'gallery-edit' ).on(
130
+ 'update', function( selection ) {
131
+
132
+ //clear screenshot div so we can append new selected images
133
+ current_gallery.find( ".screenshot" ).html( "" );
134
+
135
+ //remove temp stylesheet that shows extra fields
136
+ $('style#remove-gallery-els').remove();
137
+ $('body').removeClass('particle-edit');
138
+ var element, preview_html = "", preview_img;
139
+ var ids = selection.models.map(
140
+ function( e ) {
141
+ element = e.toJSON();
142
+ preview_img = typeof element.sizes.thumbnail !== 'undefined' ? element.sizes.thumbnail.url : element.url;
143
+ preview_html = "<img class='redux-option-image' src='" + preview_img + "' alt='' />";
144
+ current_gallery.find( ".screenshot" ).append( preview_html );
145
+
146
+ return e.id;
147
+ }
148
+ );
149
+
150
+ current_gallery.find( '.gallery_values' ).val( ids.join( ',' ) );
151
+ //redux_change( current_gallery.find( '.gallery_values' ) );
152
+
153
+ }
154
+ );
155
+
156
+ return false;
157
+ }
158
+ }, '.gallery-attachments'
159
+ );
160
+ }
161
+ );
162
+
163
+
164
+ })( jQuery );
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.7.2
7
- Stable tag: 0.9.41
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -29,11 +29,12 @@ AMP for WP automatically adds Accelerated Mobile Pages (Google AMP Project) func
29
 
30
  = Features: =
31
 
 
32
  * NEW - Disqus Comments Support
33
  * NEW - Google Tag Manager Support
34
  * NEW - Page, Category & Tags Support Added
35
  * NEW - Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
36
- * NEW - Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
37
  * Custom Post Type Support
38
  * Star Ratings
39
  * Drag & Drop Page builder Added
@@ -125,6 +126,13 @@ You can contact me using this url: http://ampforwp.com/contact/
125
 
126
  == Changelog ==
127
 
 
 
 
 
 
 
 
128
  = 0.9.41 =
129
  * View more details at https://ampforwp.com/disqus-comments-in-amp/
130
  * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
4
  Donate link: https://www.paypal.me/Kaludi/5
5
  Requires at least: 3.0
6
  Tested up to: 4.7.2
7
+ Stable tag: 0.9.42
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
29
 
30
  = Features: =
31
 
32
+ * NEW - Design 3 [Watch the Video Overview](https://www.youtube.com/watch?v=ub1pwskt3Rc)
33
  * NEW - Disqus Comments Support
34
  * NEW - Google Tag Manager Support
35
  * NEW - Page, Category & Tags Support Added
36
  * NEW - Custom AMP Editor - Which allows you to override your Content that you had written in Post or page, so you can add the different content just for AMP.
37
+ * Mobile Redirection - More than 50% of your traffic is from mobile and you aren’t doing anything to improve their user experience, which means you are falling behind on SEO and it can result in lower SERPS. Lightning fast mobile version means faster User experience means more engagement which directly results in the lower bounce rate.
38
  * Custom Post Type Support
39
  * Star Ratings
40
  * Drag & Drop Page builder Added
126
 
127
  == Changelog ==
128
 
129
+ = 0.9.42 =
130
+ * View more details at https://ampforwp.com/design-three-update/
131
+ * Design 3 was released – Video Overview along with new options and features. View the video overview at: https://www.youtube.com/watch?v=ub1pwskt3Rc [Major Feature]
132
+ * Ticket #517 – Added Upload field into Redux core [3rd party Compatiblity]
133
+ * Ticket#529 Controls for archive titles added [Improvement]
134
+ * Ticket #548 Jetpack photon code removed
135
+
136
  = 0.9.41 =
137
  * View more details at https://ampforwp.com/disqus-comments-in-amp/
138
  * Disqus Comments in AMP Support Added [New Feature] - This feature can be enabled from Dashboard > AMP Options > Disqus Comments
templates/customizer/assets/customizer-control.js CHANGED
@@ -42,4 +42,17 @@ jQuery( document ).ready( function($) {
42
  $( this ).parents( 'ul.ampforwp-design-multicheck-list' ).find( 'input.ampforwp-design-multicheck' ).val( this_checkboxes_values ).trigger( 'change' );
43
 
44
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  });
42
  $( this ).parents( 'ul.ampforwp-design-multicheck-list' ).find( 'input.ampforwp-design-multicheck' ).val( this_checkboxes_values ).trigger( 'change' );
43
 
44
  });
45
+
46
+ var current_active_design = ampforwp_customizer_settings.design_type;
47
+ if ( current_active_design == 1 ) {
48
+
49
+ $('#customize-control-amp_header_color').show();
50
+ $('#customize-control-amp_header_background_color').show();
51
+ $('#customize-control-amp_color_scheme').show();
52
+
53
+ } else {
54
+ $('#customize-control-amp_header_color').hide();
55
+ $('#customize-control-amp_header_background_color').hide();
56
+ $('#customize-control-amp_color_scheme').hide();
57
+ }
58
  });
templates/customizer/customizer.php CHANGED
@@ -26,13 +26,24 @@ class AMPFORWP_Customizer_Design_Contols extends AMP_Customizer_Design_Settings
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();
@@ -53,16 +64,30 @@ class AMPFORWP_Customizer_Design_Contols extends AMP_Customizer_Design_Settings
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 ) {
@@ -73,7 +98,8 @@ class AMPFORWP_Customizer_Design_Contols extends AMP_Customizer_Design_Settings
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
 
@@ -206,6 +232,11 @@ class AMPFORWP_Customizer_Design_Contols extends AMP_Customizer_Design_Settings
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
  }
26
  'capability' => 'manage_options',
27
  'priority' => 10,
28
  )
29
+ );
30
+
31
+ // $wp_customize->add_setting(
32
+ // 'ampforwp_design[amp_design_type]', /* option name */
33
+ // array(
34
+ // 'default' => '3',
35
+ // 'transport' => 'postMessage',
36
+ // 'type' => 'option',
37
+ // 'capability' => 'manage_options',
38
+ // 'priority' => 10,
39
+ // )
40
+ // );
41
 
42
  }
43
 
44
  public function register_customizer_ui( $wp_customize ) {
45
  /* Load custom controls */
46
+ require_once( AMPFORWP_PLUGIN_DIR . 'templates/customizer/customizer-controls.php' );
47
 
48
  /* Add Control for the settings. */
49
  $choices = array();
64
  )
65
  )
66
  );
67
+
68
+ // Current AMP Design
69
+ // $wp_customize->add_control( 'ampforwp_design[amp_design_type]', array(
70
+ // 'settings' => 'ampforwp_design[amp_design_type]',
71
+ // 'label' => __( 'Current AMP Design', 'ampforwp' ),
72
+ // 'section' => 'amp_design',
73
+ // 'type' => 'select',
74
+ // 'priority' => 30,
75
+ // 'choices' => array(
76
+ // '1' => 'one',
77
+ // '2' => 'two',
78
+ // '3' => 'three' ),
79
+ // ));
80
  }
81
 
82
  public static function enqueue_customizer_preview_scripts() {
83
+
84
+ wp_register_script( 'ampforwp-customizer-design-preview', plugin_dir_url( __FILE__ ) . 'assets/customizer-preview.js', array( 'amp-customizer' ), false, true );
85
+ global $redux_builder_amp;
86
+ $ampforwp_customizer_settings = array( 'design_type' => $redux_builder_amp['amp-design-selector'] );
87
+
88
+ wp_localize_script( 'ampforwp-customizer-design-preview', 'ampforwp_customizer_settings', $ampforwp_customizer_settings );
89
+
90
+ wp_enqueue_script( 'ampforwp-customizer-design-preview' );
91
  }
92
 
93
  public static function append_settings( $settings ) {
98
  $theme_colors = self::get_colors_for_color_scheme( $settings['color_scheme'] );
99
 
100
  return array_merge( $settings, $theme_colors, array(
101
+ 'link_color' => $settings['header_background_color'],
102
+ // 'amp_design_type' => $settings['ampforwp_design[amp_design_type]'],
103
  ) );
104
  }
105
 
232
  /* CSS */
233
  wp_register_style( 'ampforwp-share-customize', AMPFORWP_SHARE_URL . 'assets/customizer-control.css' );
234
 
235
+ /* JS */
236
+ wp_register_script( 'ampforwp-share-customize', AMPFORWP_SHARE_URL . 'assets/customizer-control.js', array( 'jquery', 'jquery-ui-sortable', 'customize-controls' ) );
237
+
238
+ global $redux_builder_amp;
239
+ $ampforwp_customizer_settings = array( 'design_type' => $redux_builder_amp['amp-design-selector'] );
240
+
241
+ wp_localize_script( 'ampforwp-share-customize', 'ampforwp_customizer_settings', $ampforwp_customizer_settings );
242
  }
templates/design-manager/design-1/elements/meta-taxonomy.php CHANGED
@@ -7,10 +7,10 @@
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
- if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
11
- echo ('<span><a href="'.get_category_link($cat->term_taxonomy_id).'" > '. $cat->name .'</a></span>');
12
  } else {
13
- echo ('<span><a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)). AMP_QUERY_VAR .'" > '. $cat->name .'</a></span>');
14
  }
15
  } ?>
16
  </div>
@@ -24,10 +24,11 @@
24
  global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .' ', 'amp' ));
25
  }
26
  foreach ($ampforwp_tags as $tag) {
27
- if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
28
- echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'">'.$tag->name .'</a></span>');
 
29
  } else {
30
- echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'amp" >'.$tag->name .'</a></span>');
31
  }
32
  }
33
  if($redux_builder_amp['amp-rtl-select-option']) {
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
+ if($redux_builder_amp['ampforwp-archive-support']){
11
+ echo ('<span><a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)). AMP_QUERY_VAR .'" > '. $cat->name .'</a></span>');
12
  } else {
13
+ echo '<span>'. $cat->name .'</span>';
14
  }
15
  } ?>
16
  </div>
24
  global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-tags-text'] .' ', 'amp' ));
25
  }
26
  foreach ($ampforwp_tags as $tag) {
27
+ if($redux_builder_amp['ampforwp-archive-support']){
28
+ echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'amp" >'.$tag->name .'</a></span>');
29
+
30
  } else {
31
+ echo ('<span>'.$tag->name.'</span>');
32
  }
33
  }
34
  if($redux_builder_amp['amp-rtl-select-option']) {
templates/design-manager/design-1/footer.php CHANGED
@@ -10,9 +10,14 @@ global $redux_builder_amp;
10
  global $post;
11
  $ampforwp_backto_nonamp = untrailingslashit(get_permalink( $post->ID )).'?nonamp=1' ;
12
  }
 
 
 
 
13
  if( is_archive() ) {
14
  global $wp;
15
  $ampforwp_backto_nonamp = esc_url( untrailingslashit(home_url( $wp->request )).'?nonamp=1' );
 
16
  }
17
  ?>
18
  <footer class="amp-wp-footer">
10
  global $post;
11
  $ampforwp_backto_nonamp = untrailingslashit(get_permalink( $post->ID )).'?nonamp=1' ;
12
  }
13
+ if ( is_page() ){
14
+ global $post;
15
+ $ampforwp_backto_nonamp = untrailingslashit(get_permalink( $post->ID )).'?nonamp=1';
16
+ }
17
  if( is_archive() ) {
18
  global $wp;
19
  $ampforwp_backto_nonamp = esc_url( untrailingslashit(home_url( $wp->request )).'?nonamp=1' );
20
+ $ampforwp_backto_nonamp = preg_replace('/\/amp\?nonamp=1/','?nonamp=1',$ampforwp_backto_nonamp);
21
  }
22
  ?>
23
  <footer class="amp-wp-footer">
templates/design-manager/design-1/header-bar.php CHANGED
@@ -8,9 +8,15 @@
8
  <?php
9
  }else{
10
  ?>
11
- <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . AMP_QUERY_VAR; ?>">
 
12
 
13
- <?php }?>
 
 
 
 
 
14
 
15
  <?php if (true == ($redux_builder_amp['opt-media']['url'])) { ?>
16
  <amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="190" height="36" alt="logo" class="amp-logo"></amp-img>
@@ -24,8 +30,17 @@
24
  ?>
25
  <a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>">
26
  <?php }else{ ?>
 
 
 
27
  <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . AMP_QUERY_VAR; ?>">
28
- <?php } ?>
 
 
 
 
 
 
29
  <?php $site_icon_url = $this->get( 'site_icon_url' );
30
  if ( $site_icon_url ) : ?>
31
  <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
8
  <?php
9
  }else{
10
  ?>
11
+ <?php global $redux_builder_amp; if($redux_builder_amp['ampforwp-homepage-on-off-support']) { ?>
12
+ <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . AMP_QUERY_VAR; ?>">
13
 
14
+ <?php } else { ?>
15
+
16
+ <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ).'?nonamp=1'); ?>">
17
+
18
+ <?php }
19
+ }?>
20
 
21
  <?php if (true == ($redux_builder_amp['opt-media']['url'])) { ?>
22
  <amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="190" height="36" alt="logo" class="amp-logo"></amp-img>
30
  ?>
31
  <a href="<?php echo esc_url( $this->get( 'home_url' ) ); ?>">
32
  <?php }else{ ?>
33
+
34
+ <?php global $redux_builder_amp; if($redux_builder_amp['ampforwp-homepage-on-off-support']) { ?>
35
+
36
  <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) ) . AMP_QUERY_VAR; ?>">
37
+
38
+ <?php } else {?>
39
+
40
+ <a href="<?php echo esc_url( trailingslashit( $this->get( 'home_url' ) ) .'?nonamp=1'); ?>">
41
+
42
+ <?php }
43
+ } ?>
44
  <?php $site_icon_url = $this->get( 'site_icon_url' );
45
  if ( $site_icon_url ) : ?>
46
  <amp-img src="<?php echo esc_url( $site_icon_url ); ?>" width="32" height="32" class="amp-wp-site-icon"></amp-img>
templates/design-manager/design-2/elements/meta-info.php CHANGED
@@ -29,10 +29,10 @@
29
  ?>
30
  </span>
31
  <?php foreach ($ampforwp_categories as $cat ) {
32
- if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
33
- echo ('<span><a href="'.get_category_link($cat->term_taxonomy_id).'" >'.$cat->name .'</a></span>');
34
  } else {
35
- echo ('<span><a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)).'amp" >'.$cat->name .'</a></span>');
36
  }
37
  }
38
 
29
  ?>
30
  </span>
31
  <?php foreach ($ampforwp_categories as $cat ) {
32
+ if($redux_builder_amp['ampforwp-archive-support']){
33
+ echo ('<span><a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)).'amp" >'.$cat->name .'</a></span>');
34
  } else {
35
+ echo ('<span>'.$cat->name .'</span>');
36
  }
37
  }
38
 
templates/design-manager/design-2/elements/meta-taxonomy.php CHANGED
@@ -10,10 +10,10 @@
10
  }
11
 
12
  foreach ($ampforwp_tags as $tag) {
13
- if($redux_builder_amp['ampforwp-amp-on-off-catgs-tags']){
14
- echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'">'.$tag->name .'</a></span>');
15
  } else {
16
- echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'amp" >'.$tag->name .'</a></span>');
17
  }
18
  }
19
 
10
  }
11
 
12
  foreach ($ampforwp_tags as $tag) {
13
+ if($redux_builder_amp['ampforwp-archive-support']){
14
+ echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'amp" >'.$tag->name .'</a></span>');
15
  } else {
16
+ echo ('<span>'.$tag->name .'</span>');
17
  }
18
  }
19
 
templates/design-manager/design-2/footer.php CHANGED
@@ -16,6 +16,7 @@
16
  if( is_archive() ) {
17
  global $wp;
18
  $ampforwp_backto_nonamp = esc_url( untrailingslashit(home_url( $wp->request )).'?nonamp=1' );
 
19
  }
20
  ?>
21
  <footer class="container">
@@ -23,7 +24,7 @@
23
  <p><a href="#header"> <?php echo esc_html( $redux_builder_amp['amp-translator-top-text'] ); ?></a> <?php
24
  //24. Added an options button for switching on/off link to non amp page
25
  if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') {
26
- if ( $ampforwp_backto_nonamp ) { ?> | <a href="<?php echo $ampforwp_backto_nonamp; ?>"><?php echo esc_html( $redux_builder_amp['amp-translator-non-amp-page-text'] ) ;?> </a> <?php }
27
  } ?>
28
  </p>
29
  <p>
16
  if( is_archive() ) {
17
  global $wp;
18
  $ampforwp_backto_nonamp = esc_url( untrailingslashit(home_url( $wp->request )).'?nonamp=1' );
19
+ $ampforwp_backto_nonamp = preg_replace('/\/amp\?nonamp=1/','?nonamp=1',$ampforwp_backto_nonamp);
20
  }
21
  ?>
22
  <footer class="container">
24
  <p><a href="#header"> <?php echo esc_html( $redux_builder_amp['amp-translator-top-text'] ); ?></a> <?php
25
  //24. Added an options button for switching on/off link to non amp page
26
  if($redux_builder_amp['amp-footer-link-non-amp-page']=='1') {
27
+ if ( $ampforwp_backto_nonamp ) { ?> | <a href="<?php echo $ampforwp_backto_nonamp; ?>"><?php echo esc_html( $redux_builder_amp['amp-translator-non-amp-page-text'] ) ;?> </a> <?php }
28
  } ?>
29
  </p>
30
  <p>
templates/design-manager/design-2/header-bar.php CHANGED
@@ -6,8 +6,11 @@
6
 
7
  if ($redux_builder_amp['amp-on-off-support-for-non-amp-home-page']) {
8
  $ampforwp_home_url = untrailingslashit( get_bloginfo('url') ).'?nonamp=1';
9
- }else{
10
- $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) . AMP_QUERY_VAR;
 
 
 
11
  }
12
  ?>
13
 
6
 
7
  if ($redux_builder_amp['amp-on-off-support-for-non-amp-home-page']) {
8
  $ampforwp_home_url = untrailingslashit( get_bloginfo('url') ).'?nonamp=1';
9
+ }else{ global $redux_builder_amp; if($redux_builder_amp['ampforwp-homepage-on-off-support']) {
10
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) . AMP_QUERY_VAR;
11
+ } else {
12
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) .'?nonamp=1';
13
+ }
14
  }
15
  ?>
16
 
templates/design-manager/design-3/archive.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
7
+ <?php
8
+ global $redux_builder_amp;
9
+ if ( is_home() || is_front_page() || ( is_archive() && $redux_builder_amp['ampforwp-archive-support'] ) ){
10
+ global $wp;
11
+ $current_archive_url = home_url( $wp->request );
12
+ $amp_url = trailingslashit($current_archive_url);
13
+ $remove = '/'. AMP_QUERY_VAR;
14
+ $amp_url = str_replace($remove, '', $amp_url) ;
15
+ } ?>
16
+ <link rel="canonical" href="<?php echo $amp_url ?>">
17
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
18
+ <?php do_action( 'amp_post_template_head', $this ); ?>
19
+
20
+ <style amp-custom>
21
+ <?php $this->load_parts( array( 'style' ) ); ?>
22
+ <?php do_action( 'amp_post_template_css', $this ); ?>
23
+ </style>
24
+ </head>
25
+ <body class="amp_home_body archives_body">
26
+ <?php $this->load_parts( array( 'header-bar' ) ); ?>
27
+
28
+ <?php do_action( 'ampforwp_after_header', $this );
29
+
30
+ if ( get_query_var( 'paged' ) ) {
31
+ $paged = get_query_var('paged');
32
+ } elseif ( get_query_var( 'page' ) ) {
33
+ $paged = get_query_var('page');
34
+ } else {
35
+ $paged = 1;
36
+ }
37
+
38
+ ?>
39
+
40
+ <main>
41
+ <?php
42
+
43
+ $exclude_ids = get_option('ampforwp_exclude_post');
44
+
45
+ $q = new WP_Query( array(
46
+ 'post_type' => 'post',
47
+ 'orderby' => 'date',
48
+ 'offset' => esc_attr($fn_offset),
49
+ 'ignore_sticky_posts' => 1,
50
+ 'paged' => esc_attr($paged),
51
+ 'post__not_in' => $exclude_ids,
52
+ 'has_password' => false ,
53
+ 'post_status'=> 'publish'
54
+ ) ); ?>
55
+
56
+ <?php if ( is_archive() ) {
57
+ the_archive_title( '<h3 class="amp-wp-content page-title">', '</h3>' );
58
+ the_archive_description( '<div class="amp-wp-content taxonomy-description">', '</div>' );
59
+ } ?>
60
+
61
+ <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
62
+ $ampforwp_amp_post_url = trailingslashit( get_permalink() ) . AMP_QUERY_VAR ; ?>
63
+
64
+ <div class="amp-wp-content amp-loop-list">
65
+ <?php if ( has_post_thumbnail() ) { ?>
66
+ <?php
67
+ $thumb_id = get_post_thumbnail_id();
68
+ $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium', true);
69
+ $thumb_url = $thumb_url_array[0];
70
+ ?>
71
+ <div class="home-post_image"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><amp-img layout="responsive" src=<?php echo $thumb_url ?> width=450 height=270 ></amp-img></a></div>
72
+ <?php } ?>
73
+
74
+ <div class="amp-wp-post-content">
75
+ <ul class="amp-wp-tags">
76
+ <?php foreach((get_the_category()) as $category) { ?>
77
+ <li><?php echo $category->cat_name ?></li>
78
+ <?php } ?>
79
+ </ul>
80
+ <h2 class="amp-wp-title"> <a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"> <?php the_title(); ?></a></h2>
81
+
82
+
83
+ <?php
84
+ if(has_excerpt()){
85
+ $content = get_the_excerpt();
86
+ }else{
87
+ $content = get_the_content();
88
+ }
89
+ ?>
90
+ <p><?php echo wp_trim_words( $content , '15' ); ?></p>
91
+ <div class="featured_time"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></div>
92
+
93
+ </div>
94
+ <div class="cb"></div>
95
+ </div>
96
+
97
+ <?php endwhile; ?>
98
+
99
+ <div class="amp-wp-content pagination-holder">
100
+
101
+
102
+ <div id="pagination">
103
+ <div class="next"><?php next_posts_link( $redux_builder_amp['amp-translator-show-more-posts-text'] , 0 ) ?></div>
104
+ <?php if ( $paged > 1 ) { ?>
105
+ <div class="prev"><?php previous_posts_link( $redux_builder_amp['amp-translator-show-previous-posts-text'] ); ?></div>
106
+ <?php } ?>
107
+ <div class="clearfix"></div>
108
+ </div>
109
+ </div>
110
+
111
+ <?php endif; ?>
112
+ <?php wp_reset_postdata(); ?>
113
+ </main>
114
+ <?php do_action( 'amp_post_template_above_footer', $this ); ?>
115
+ <?php $this->load_parts( array( 'footer' ) ); ?>
116
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
117
+ </body>
118
+ </html>
templates/design-manager/design-3/elements/comments.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $redux_builder_amp;
3
+ if (!comments_open() || $redux_builder_amp['ampforwp-disqus-comments-support']) {
4
+ return;
5
+ }
6
+ ?>
7
+ <div class="ampforwp-comment-wrapper">
8
+ <?php
9
+ global $redux_builder_amp;
10
+ // Gather comments for a specific page/post
11
+ $postID = get_the_ID();
12
+ $comments = get_comments(array(
13
+ 'post_id' => $postID,
14
+ 'status' => 'approve' //Change this to the type of comments to be displayed
15
+ ));
16
+ if ( $comments ) { ?>
17
+ <div class="amp-wp-content comments_list">
18
+ <h3><?php global $redux_builder_amp; echo $redux_builder_amp['amp-translator-view-comments-text'] ?></h3>
19
+ <ul>
20
+ <?php
21
+ // Display the list of comments
22
+ function ampforwp_custom_translated_comment($comment, $args, $depth){
23
+ $GLOBALS['comment'] = $comment;
24
+ global $redux_builder_amp;
25
+ ?>
26
+ <li id="li-comment-<?php comment_ID() ?>"
27
+ <?php comment_class(); ?> >
28
+ <article id="comment-<?php comment_ID(); ?>" class="comment-body">
29
+ <footer class="comment-meta">
30
+ <div class="comment-author vcard">
31
+ <?php
32
+ printf(__('<b class="fn">%s</b> <span class="says">'.$redux_builder_amp['amp-translator-says-text'].':</span>'), get_comment_author_link()) ?>
33
+ </div>
34
+ <!-- .comment-author -->
35
+ <div class="comment-metadata">
36
+ <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>">
37
+ <?php
38
+ printf(__('%1$s '.$redux_builder_amp['amp-translator-at-text'].' %2$s'), get_comment_date(), get_comment_time())
39
+ ?>
40
+ </a>
41
+ <?php edit_comment_link(__('('.$redux_builder_amp['amp-translator-Edit-text'].')'),' ','') ?>
42
+ </div>
43
+ <!-- .comment-metadata -->
44
+ </footer>
45
+ <!-- .comment-meta -->
46
+ <div class="comment-content">
47
+ <p><?php
48
+ $pattern = "~[^a-zA-Z0-9_ !@#$%^&*();\\\/|<>\"'+.,:?=-]~";
49
+ $emoji_content = get_comment_text();
50
+ $emoji_free_comments = preg_replace($pattern,'',$emoji_content);
51
+ echo $emoji_free_comments; ?>
52
+ </p>
53
+ </div>
54
+ <!-- .comment-content -->
55
+ </article>
56
+ <!-- .comment-body -->
57
+ </li>
58
+ <!-- #comment-## -->
59
+ <?php
60
+ }// end of ampforwp_custom_translated_comment()
61
+
62
+ wp_list_comments( array(
63
+ 'per_page' => 10, //Allow comment pagination
64
+ 'style' => 'li',
65
+ 'type' => 'comment',
66
+ 'max_depth' => 5,
67
+ 'avatar_size' => 0,
68
+ 'callback' => 'ampforwp_custom_translated_comment',
69
+ 'reverse_top_level' => true //Show the latest comments at the top of the list
70
+ ), $comments); ?>
71
+ </ul>
72
+ </div>
73
+ <div class="comment-button-wrapper">
74
+ <a href="<?php echo get_permalink().'?nonamp=1'.'#commentform' ?>"><?php esc_html_e( $redux_builder_amp['amp-translator-leave-a-comment-text'] ); ?></a>
75
+ </div><?php
76
+ } else {
77
+ global $redux_builder_amp ;
78
+ if (!comments_open()) {
79
+ return;
80
+ } ?>
81
+ <div class="comment-button-wrapper">
82
+ <a href="<?php echo get_permalink().'?nonamp=1'.'#commentform' ?>"><?php esc_html_e( $redux_builder_amp['amp-translator-leave-a-comment-text'] ); ?></a>
83
+ </div>
84
+ <?php } ?>
85
+ </div>
templates/design-manager/design-3/elements/content.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="amp-wp-article-content">
2
+
3
+ <!--Post Content here-->
4
+ <div class="amp-wp-content the_content">
5
+
6
+ <?php do_action('ampforwp_before_post_content') //Post before Content here ?>
7
+
8
+ <?php
9
+ $amp_custom_content_enable = get_post_meta( $this->get( 'post_id' ) , 'ampforwp_custom_content_editor_checkbox', true);
10
+
11
+ // Normal Front Page Content
12
+ if ( ! $amp_custom_content_enable ) {
13
+ echo $this->get( 'post_amp_content' ); // amphtml content; no kses
14
+ } else {
15
+ // Custom/Alternative AMP content added through post meta
16
+ echo $this->get( 'ampforwp_amp_content' );
17
+ }
18
+
19
+ // echo $this->get( 'post_amp_content' ); // amphtml content; no kses
20
+ ?>
21
+
22
+ <?php do_action('ampforwp_after_post_content') ; //Post After Content here ?>
23
+
24
+ </div>
25
+ <!--Post Content Ends here-->
26
+
27
+ <!--Post Next-Previous Links-->
28
+ <?php global $redux_builder_amp;
29
+ if($redux_builder_amp['enable-single-next-prev']) { ?>
30
+ <div class="amp-wp-content post-pagination-meta">
31
+ <div id="pagination">
32
+ <?php $next_post = get_next_post();
33
+ if (!empty( $next_post )) { ?>
34
+ <span>Next Read:</span> <a href="<?php echo trailingslashit(get_permalink( $next_post->ID )) . AMP_QUERY_VAR; ?>"><?php echo $next_post->post_title; ?> &raquo;</a> <?php
35
+ } ?>
36
+ </div>
37
+ </div>
38
+ <?php } ?>
39
+ <!--Post Next-Previous Links End here-->
40
+
41
+ </div>
templates/design-manager/design-3/elements/featured-image.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-3/elements/meta-info.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="amp-wp-content 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 ) ); ?>
8
+ <div class="amp-wp-meta amp-wp-byline">
9
+ <span class="amp-wp-author author vcard"><?php echo esc_html( $post_author->display_name ); ?></span>
10
+
11
+ <?php $ampforwp_categories = get_the_terms( $this->ID, 'category' );
12
+ if ( $ampforwp_categories ) : ?>
13
+ <span class="amp-wp-meta amp-wp-tax-category ampforwp-tax-category">
14
+ <?php global $redux_builder_amp;
15
+ //if RTL is OFF
16
+ if(!$redux_builder_amp['amp-rtl-select-option']) {
17
+ global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-in-designthree'] .' ', 'amp' )); } ?>
18
+ <?php foreach ($ampforwp_categories as $cat ) {
19
+ if($redux_builder_amp['ampforwp-archive-support']){
20
+ echo ('<span><a href="'.trailingslashit(get_category_link($cat->term_taxonomy_id)).'amp" >'.$cat->name .'</a></span>');
21
+ } else {
22
+ echo ('<span>'.$cat->name .'</span>');
23
+ }
24
+ }
25
+ //if RTL is ON
26
+ if($redux_builder_amp['amp-rtl-select-option']) {
27
+ global $redux_builder_amp; printf( __($redux_builder_amp['amp-translator-categories-text'] .' ', 'amp' )); } ?>
28
+ </span>
29
+ <?php endif; ?>
30
+
31
+ </div>
32
+ <?php endif; ?>
33
+
34
+
35
+ </ul>
36
+ </div>
37
+ </div>
templates/design-manager/design-3/elements/meta-taxonomy.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="amp-wp-content amp-wp-article-tags amp-wp-article-category ampforwp-meta-taxonomy ">
2
+ <?php global $redux_builder_amp;
3
+ $ampforwp_tags= get_the_terms( $this->ID, 'post_tag' );
4
+ if ( $ampforwp_tags && ! is_wp_error( $ampforwp_tags ) ) :?>
5
+ <div class="amp-wp-meta amp-wp-content ampforwp-tax-tag">
6
+ <?php foreach ($ampforwp_tags as $tag) {
7
+ if($redux_builder_amp['ampforwp-archive-support']){
8
+ echo ('<span><a href="'.trailingslashit(get_tag_link($tag->term_taxonomy_id)).'amp" >'. $tag->name .'</a></span>');
9
+ } else {
10
+ echo '<span>'. $tag->name .'</span>';
11
+ }
12
+ } ?>
13
+ </div>
14
+ <?php endif;?>
15
+ </div>
16
+ <div class="amp-wp-content amp_author_area ampforwp-meta-taxonomy">
17
+ <div class="amp-wp-content amp_author_area_wrapper">
18
+ <?php $post_author = $this->get( 'post_author' );
19
+ if ( $post_author ) {
20
+
21
+ $author_avatar_url = get_avatar_url( $post_author->user_email, array( 'size' => 70 ) );
22
+ if ( $author_avatar_url ) { ?>
23
+ <amp-img src="<?php echo $author_avatar_url; ?>" width="70" height="70" layout="fixed"></amp-img>
24
+ <?php
25
+ } ?>
26
+ <strong><?php echo esc_html( $post_author->display_name ); ?></strong>: <?php echo esc_html( $post_author->description ); ?>
27
+ <?php } ?>
28
+ </div>
29
+ </div>
templates/design-manager/design-3/elements/related-posts.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $post, $redux_builder_amp;
3
+ $string_number_of_related_posts = $redux_builder_amp['ampforwp-number-of-related-posts']; $int_number_of_related_posts = round(abs(floatval($string_number_of_related_posts)));
4
+
5
+ // declaring this variable here to prevent debug errors
6
+ $args = null;
7
+
8
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==2){
9
+ $categories = get_the_category($post->ID);
10
+ if ($categories) {
11
+ $category_ids = array();
12
+ foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
13
+ $args=array(
14
+ 'category__in' => $category_ids,
15
+ 'post__not_in' => array($post->ID),
16
+ 'posts_per_page'=> $int_number_of_related_posts,
17
+ 'ignore_sticky_posts'=>1,
18
+ 'has_password' => false ,
19
+ 'post_status'=> 'publish'
20
+ );
21
+ }
22
+ } //end of block for categories
23
+ //code block for tags
24
+ if($redux_builder_amp['ampforwp-single-select-type-of-related']==1) {
25
+ $ampforwp_tags = get_the_tags($post->ID);
26
+ if ($ampforwp_tags) {
27
+ $tag_ids = array();
28
+ foreach($ampforwp_tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
29
+ $args=array(
30
+ 'tag__in' => $tag_ids,
31
+ 'post__not_in' => array($post->ID),
32
+ 'posts_per_page'=> $int_number_of_related_posts,
33
+ 'ignore_sticky_posts'=>1,
34
+ 'has_password' => false ,
35
+ 'post_status'=> 'publish'
36
+ );
37
+ }
38
+ }//end of block for tags
39
+ $my_query = new wp_query( $args );
40
+ if( $my_query->have_posts() ) { ?>
41
+ <div class="amp-wp-content relatedpost">
42
+ <div class="related_posts">
43
+ <ol class="clearfix">
44
+ <h3><?php echo esc_html( $redux_builder_amp['amp-translator-related-text'] ); ?></h3>
45
+ <?php
46
+ while( $my_query->have_posts() ) {
47
+ $my_query->the_post();
48
+ $related_post_permalink = get_permalink();
49
+ $related_post_permalink = trailingslashit($related_post_permalink);
50
+ $related_post_permalink = $related_post_permalink . AMP_QUERY_VAR ;;
51
+ ?>
52
+ <li class="<?php if ( has_post_thumbnail() ) { echo'has_related_thumbnail'; } else { echo 'no_related_thumbnail'; } ?>">
53
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">
54
+ <?php
55
+ $thumb_id_2 = get_post_thumbnail_id();
56
+ $thumb_url_array_2 = wp_get_attachment_image_src($thumb_id_2, 'thumbnail', true);
57
+ $thumb_url_2 = $thumb_url_array_2[0];
58
+ ?>
59
+
60
+ <?php if ( has_post_thumbnail() ) { ?>
61
+ <amp-img src="<?php echo esc_url( $thumb_url_2 ); ?>" width="150" height="150" layout="responsive"></amp-img>
62
+ <?php } ?>
63
+ </a>
64
+ <div class="related_link">
65
+ <a href="<?php echo esc_url( $related_post_permalink ); ?>"><?php the_title(); ?></a>
66
+ <?php if(has_excerpt()){
67
+ $content = get_the_excerpt();
68
+ }else{
69
+ $content = get_the_content();
70
+ }
71
+ ?>
72
+ <p><?php echo wp_trim_words( $content , '15' ); ?></p>
73
+ </div>
74
+ </li>
75
+ <?php
76
+ }
77
+
78
+ } ?>
79
+ </ol>
80
+ </div>
81
+ </div> <?php
82
+ wp_reset_postdata();
83
+ //related posts code ends here
84
+ ?>
templates/design-manager/design-3/elements/simple-comment-button.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $redux_builder_amp;
3
+ if (!comments_open() || $redux_builder_amp['ampforwp-disqus-comments-support']) {
4
+ return;
5
+ } ?>
6
+ <div class="comment-button-wrapper ampforwp-comment-button">
7
+ <a href="<?php echo get_permalink().'?nonamp=1'.'#commentform' ?>"><?php esc_html_e( $redux_builder_amp['amp-translator-leave-a-comment-text'] ); ?></a>
8
+ </div>
templates/design-manager/design-3/elements/social-icons.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $redux_builder_amp; ?>
2
+ <div class="amp-wp-content ampforwp-social-icons-wrapper ampforwp-social-icons">
3
+ <i class="icono-share"></i>
4
+ <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
5
+ <amp-social-share type="facebook" data-param-app_id="<?php echo $redux_builder_amp['amp-facebook-app-id']; ?>" width="40" height="40"></amp-social-share>
6
+ <?php } ?>
7
+ <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
8
+ <amp-social-share type="twitter" width="40" height="40" data-param-url="CANONICAL_URL"
9
+ ></amp-social-share>
10
+ <?php } ?>
11
+ <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
12
+ <amp-social-share type="gplus" width="40" height="40"></amp-social-share>
13
+ <?php } ?>
14
+ <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
15
+ <amp-social-share type="email" width="40" height="40"></amp-social-share>
16
+ <?php } ?>
17
+ <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
18
+ <amp-social-share type="pinterest" width="40" height="40"></amp-social-share>
19
+ <?php } ?>
20
+ <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
21
+ <amp-social-share type="linkedin" width="40" height="40"></amp-social-share>
22
+ <?php } ?>
23
+ <?php if($redux_builder_amp['enable-single-whatsapp-share'] == true) { ?>
24
+ <a href="whatsapp://send?text=<?php echo get_the_permalink();?>">
25
+ <div class="whatsapp-share-icon">
26
+ <amp-img src="data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgOTAgOTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDkwIDkwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggaWQ9IldoYXRzQXBwIiBkPSJNOTAsNDMuODQxYzAsMjQuMjEzLTE5Ljc3OSw0My44NDEtNDQuMTgyLDQzLjg0MWMtNy43NDcsMC0xNS4wMjUtMS45OC0yMS4zNTctNS40NTVMMCw5MGw3Ljk3NS0yMy41MjIgICBjLTQuMDIzLTYuNjA2LTYuMzQtMTQuMzU0LTYuMzQtMjIuNjM3QzEuNjM1LDE5LjYyOCwyMS40MTYsMCw0NS44MTgsMEM3MC4yMjMsMCw5MCwxOS42MjgsOTAsNDMuODQxeiBNNDUuODE4LDYuOTgyICAgYy0yMC40ODQsMC0zNy4xNDYsMTYuNTM1LTM3LjE0NiwzNi44NTljMCw4LjA2NSwyLjYyOSwxNS41MzQsNy4wNzYsMjEuNjFMMTEuMTA3LDc5LjE0bDE0LjI3NS00LjUzNyAgIGM1Ljg2NSwzLjg1MSwxMi44OTEsNi4wOTcsMjAuNDM3LDYuMDk3YzIwLjQ4MSwwLDM3LjE0Ni0xNi41MzMsMzcuMTQ2LTM2Ljg1N1M2Ni4zMDEsNi45ODIsNDUuODE4LDYuOTgyeiBNNjguMTI5LDUzLjkzOCAgIGMtMC4yNzMtMC40NDctMC45OTQtMC43MTctMi4wNzYtMS4yNTRjLTEuMDg0LTAuNTM3LTYuNDEtMy4xMzgtNy40LTMuNDk1Yy0wLjk5My0wLjM1OC0xLjcxNy0wLjUzOC0yLjQzOCwwLjUzNyAgIGMtMC43MjEsMS4wNzYtMi43OTcsMy40OTUtMy40Myw0LjIxMmMtMC42MzIsMC43MTktMS4yNjMsMC44MDktMi4zNDcsMC4yNzFjLTEuMDgyLTAuNTM3LTQuNTcxLTEuNjczLTguNzA4LTUuMzMzICAgYy0zLjIxOS0yLjg0OC01LjM5My02LjM2NC02LjAyNS03LjQ0MWMtMC42MzEtMS4wNzUtMC4wNjYtMS42NTYsMC40NzUtMi4xOTFjMC40ODgtMC40ODIsMS4wODQtMS4yNTUsMS42MjUtMS44ODIgICBjMC41NDMtMC42MjgsMC43MjMtMS4wNzUsMS4wODItMS43OTNjMC4zNjMtMC43MTcsMC4xODItMS4zNDQtMC4wOS0xLjg4M2MtMC4yNy0wLjUzNy0yLjQzOC01LjgyNS0zLjM0LTcuOTc3ICAgYy0wLjkwMi0yLjE1LTEuODAzLTEuNzkyLTIuNDM2LTEuNzkyYy0wLjYzMSwwLTEuMzU0LTAuMDktMi4wNzYtMC4wOWMtMC43MjIsMC0xLjg5NiwwLjI2OS0yLjg4OSwxLjM0NCAgIGMtMC45OTIsMS4wNzYtMy43ODksMy42NzYtMy43ODksOC45NjNjMCw1LjI4OCwzLjg3OSwxMC4zOTcsNC40MjIsMTEuMTEzYzAuNTQxLDAuNzE2LDcuNDksMTEuOTIsMTguNSwxNi4yMjMgICBDNTguMiw2NS43NzEsNTguMiw2NC4zMzYsNjAuMTg2LDY0LjE1NmMxLjk4NC0wLjE3OSw2LjQwNi0yLjU5OSw3LjMxMi01LjEwN0M2OC4zOTgsNTYuNTM3LDY4LjM5OCw1NC4zODYsNjguMTI5LDUzLjkzOHoiIGZpbGw9IiNGRkZGRkYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K" width="16" height="16" />
27
+ </div>
28
+ </a>
29
+ <?php } ?>
30
+ </div>
templates/design-manager/design-3/elements/title.php ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <header class="amp-wp-content 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-3/fonts/icomoon.eot ADDED
Binary file
templates/design-manager/design-3/fonts/icomoon.svg ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
+ <glyph unicode="&#xf099;" glyph-name="twitter" horiz-adv-x="951" d="M925.714 717.714c-25.143-36.571-56.571-69.143-92.571-95.429 0.571-8 0.571-16 0.571-24 0-244-185.714-525.143-525.143-525.143-104.571 0-201.714 30.286-283.429 82.857 14.857-1.714 29.143-2.286 44.571-2.286 86.286 0 165.714 29.143 229.143 78.857-81.143 1.714-149.143 54.857-172.571 128 11.429-1.714 22.857-2.857 34.857-2.857 16.571 0 33.143 2.286 48.571 6.286-84.571 17.143-148 91.429-148 181.143v2.286c24.571-13.714 53.143-22.286 83.429-23.429-49.714 33.143-82.286 89.714-82.286 153.714 0 34.286 9.143 65.714 25.143 93.143 90.857-112 227.429-185.143 380.571-193.143-2.857 13.714-4.571 28-4.571 42.286 0 101.714 82.286 184.571 184.571 184.571 53.143 0 101.143-22.286 134.857-58.286 41.714 8 81.714 23.429 117.143 44.571-13.714-42.857-42.857-78.857-81.143-101.714 37.143 4 73.143 14.286 106.286 28.571z" />
11
+ <glyph unicode="&#xf09a;" glyph-name="facebook, facebook-f" horiz-adv-x="602" d="M548 944v-150.857h-89.714c-70.286 0-83.429-33.714-83.429-82.286v-108h167.429l-22.286-169.143h-145.143v-433.714h-174.857v433.714h-145.714v169.143h145.714v124.571c0 144.571 88.571 223.429 217.714 223.429 61.714 0 114.857-4.571 130.286-6.857z" />
12
+ <glyph unicode="&#xf0d2;" glyph-name="pinterest" horiz-adv-x="878" d="M877.714 438.857c0-242.286-196.571-438.857-438.857-438.857-43.429 0-84.571 6.286-124.571 18.286 16.571 26.286 35.429 60 44.571 93.714 0 0 5.143 19.429 30.857 120.571 14.857-29.143 59.429-54.857 106.857-54.857 141.143 0 237.143 128.571 237.143 301.143 0 129.714-110.286 251.429-278.286 251.429-208 0-313.143-149.714-313.143-274.286 0-75.429 28.571-142.857 89.714-168 9.714-4 18.857 0 21.714 11.429 2.286 7.429 6.857 26.857 9.143 34.857 2.857 11.429 1.714 14.857-6.286 24.571-17.714 21.143-29.143 48-29.143 86.286 0 110.857 82.857 210.286 216 210.286 117.714 0 182.857-72 182.857-168.571 0-126.286-56-233.143-139.429-233.143-45.714 0-80 37.714-69.143 84.571 13.143 55.429 38.857 115.429 38.857 155.429 0 36-19.429 66.286-59.429 66.286-46.857 0-84.571-48.571-84.571-113.714 0 0 0-41.714 14.286-69.714-48-203.429-56.571-238.857-56.571-238.857-8-33.143-8.571-70.286-7.429-101.143-154.857 68-262.857 222.286-262.857 402.286 0 242.286 196.571 438.857 438.857 438.857s438.857-196.571 438.857-438.857z" />
13
+ <glyph unicode="&#xf0d5;" glyph-name="google-plus" horiz-adv-x="1317" d="M821.143 429.143c0-239.429-160.571-409.143-402.286-409.143-231.429 0-418.857 187.429-418.857 418.857s187.429 418.857 418.857 418.857c113.143 0 207.429-41.143 280.571-109.714l-113.714-109.143c-30.857 29.714-85.143 64.571-166.857 64.571-142.857 0-259.429-118.286-259.429-264.571s116.571-264.571 259.429-264.571c165.714 0 228 119.429 237.714 180.571h-237.714v144h395.429c4-21.143 6.857-42.286 6.857-69.714zM1316.571 498.857v-120h-119.429v-119.429h-120v119.429h-119.429v120h119.429v119.429h120v-119.429h119.429z" />
14
+ <glyph unicode="&#xf0e1;" glyph-name="linkedin" horiz-adv-x="878" d="M199.429 593.714v-566.286h-188.571v566.286h188.571zM211.429 768.571c0.571-54.286-40.571-97.714-106.286-97.714v0h-1.143c-63.429 0-104 43.429-104 97.714 0 55.429 42.286 97.714 106.286 97.714 64.571 0 104.571-42.286 105.143-97.714zM877.714 352v-324.571h-188v302.857c0 76-27.429 128-95.429 128-52 0-82.857-34.857-96.571-68.571-4.571-12.571-6.286-29.143-6.286-46.286v-316h-188c2.286 513.143 0 566.286 0 566.286h188v-82.286h-1.143c24.571 38.857 69.143 95.429 170.857 95.429 124 0 216.571-81.143 216.571-254.857z" />
15
+ <glyph unicode="&#xf16a;" glyph-name="youtube-play" d="M406.286 306.286l276.571 142.857-276.571 144.571v-287.429zM512 798.857c215.429 0 358.286-10.286 358.286-10.286 20-2.286 64-2.286 102.857-43.429 0 0 31.429-30.857 40.571-101.714 10.857-82.857 10.286-165.714 10.286-165.714v-77.714s0.571-82.857-10.286-165.714c-9.143-70.286-40.571-101.714-40.571-101.714-38.857-40.571-82.857-40.571-102.857-42.857 0 0-142.857-10.857-358.286-10.857v0c-266.286 2.286-348 10.286-348 10.286-22.857 4-74.286 2.857-113.143 43.429 0 0-31.429 31.429-40.571 101.714-10.857 82.857-10.286 165.714-10.286 165.714v77.714s-0.571 82.857 10.286 165.714c9.143 70.857 40.571 101.714 40.571 101.714 38.857 41.143 82.857 41.143 102.857 43.429 0 0 142.857 10.286 358.286 10.286v0z" />
16
+ <glyph unicode="&#xf16d;" glyph-name="instagram" horiz-adv-x="878" d="M585.143 438.857c0 80.571-65.714 146.286-146.286 146.286s-146.286-65.714-146.286-146.286 65.714-146.286 146.286-146.286 146.286 65.714 146.286 146.286zM664 438.857c0-124.571-100.571-225.143-225.143-225.143s-225.143 100.571-225.143 225.143 100.571 225.143 225.143 225.143 225.143-100.571 225.143-225.143zM725.714 673.143c0-29.143-23.429-52.571-52.571-52.571s-52.571 23.429-52.571 52.571 23.429 52.571 52.571 52.571 52.571-23.429 52.571-52.571zM438.857 798.857c-64 0-201.143 5.143-258.857-17.714-20-8-34.857-17.714-50.286-33.143s-25.143-30.286-33.143-50.286c-22.857-57.714-17.714-194.857-17.714-258.857s-5.143-201.143 17.714-258.857c8-20 17.714-34.857 33.143-50.286s30.286-25.143 50.286-33.143c57.714-22.857 194.857-17.714 258.857-17.714s201.143-5.143 258.857 17.714c20 8 34.857 17.714 50.286 33.143s25.143 30.286 33.143 50.286c22.857 57.714 17.714 194.857 17.714 258.857s5.143 201.143-17.714 258.857c-8 20-17.714 34.857-33.143 50.286s-30.286 25.143-50.286 33.143c-57.714 22.857-194.857 17.714-258.857 17.714zM877.714 438.857c0-60.571 0.571-120.571-2.857-181.143-3.429-70.286-19.429-132.571-70.857-184s-113.714-67.429-184-70.857c-60.571-3.429-120.571-2.857-181.143-2.857s-120.571-0.571-181.143 2.857c-70.286 3.429-132.571 19.429-184 70.857s-67.429 113.714-70.857 184c-3.429 60.571-2.857 120.571-2.857 181.143s-0.571 120.571 2.857 181.143c3.429 70.286 19.429 132.571 70.857 184s113.714 67.429 184 70.857c60.571 3.429 120.571 2.857 181.143 2.857s120.571 0.571 181.143-2.857c70.286-3.429 132.571-19.429 184-70.857s67.429-113.714 70.857-184c3.429-60.571 2.857-120.571 2.857-181.143z" />
17
+ <glyph unicode="&#xf173;" glyph-name="tumblr" horiz-adv-x="624" d="M539.429 191.428l45.714-135.429c-17.143-25.714-94.857-54.857-164.571-56-207.429-3.429-285.714 147.429-285.714 253.714v310.857h-96v122.857c144 52 178.857 182.286 186.857 256.571 0.571 4.571 4.571 6.857 6.857 6.857h139.429v-242.286h190.286v-144h-190.857v-296c0-40 14.857-95.429 91.429-93.714 25.143 0.571 58.857 8 76.571 16.571z" />
18
+ <glyph unicode="&#xf189;" glyph-name="vk" horiz-adv-x="1119" d="M1095.429 653.714c8.571-23.429-18.286-78.286-85.714-168-110.857-147.429-122.857-133.714-31.429-218.857 88-81.714 106.286-121.143 109.143-126.286 0 0 36.571-64-40.571-64.571l-146.286-2.286c-31.429-6.286-73.143 22.286-73.143 22.286-54.857 37.714-106.286 135.429-146.286 122.857 0 0-41.143-13.143-40-101.143 0.571-18.857-8.571-29.143-8.571-29.143s-10.286-10.857-30.286-12.571h-65.714c-144.571-9.143-272 124-272 124s-139.429 144-261.714 431.429c-8 18.857 0.571 28 0.571 28s8.571 10.857 32.571 10.857l156.571 1.143c14.857-2.286 25.143-10.286 25.143-10.286s9.143-6.286 13.714-18.286c25.714-64 58.857-122.286 58.857-122.286 57.143-117.714 96-137.714 118.286-125.714 0 0 29.143 17.714 22.857 160-2.286 51.429-16.571 74.857-16.571 74.857-13.143 17.714-37.714 22.857-48.571 24.571-8.571 1.143 5.714 21.714 24.571 30.857 28 13.714 77.714 14.286 136.571 13.714 46.286-0.571 59.429-3.429 77.143-7.429 54.286-13.143 36-63.429 36-184.571 0-38.857-7.429-93.143 20.571-110.857 12-8 41.714-1.143 114.857 123.429 0 0 34.286 59.429 61.143 128.571 4.571 12.571 14.286 17.714 14.286 17.714s9.143 5.143 21.714 3.429l164.571 1.143c49.714 6.286 57.714-16.571 57.714-16.571z" />
19
+ <glyph unicode="&#xf232;" glyph-name="whatsapp" horiz-adv-x="878" d="M562.857 394.286c9.714 0 102.857-48.571 106.857-55.429 1.143-2.857 1.143-6.286 1.143-8.571 0-14.286-4.571-30.286-9.714-43.429-13.143-32-66.286-52.571-98.857-52.571-27.429 0-84 24-108.571 35.429-81.714 37.143-132.571 100.571-181.714 173.143-21.714 32-41.143 71.429-40.571 110.857v4.571c1.143 37.714 14.857 64.571 42.286 90.286 8.571 8 17.714 12.571 29.714 12.571 6.857 0 13.714-1.714 21.143-1.714 15.429 0 18.286-4.571 24-19.429 4-9.714 33.143-87.429 33.143-93.143 0-21.714-39.429-46.286-39.429-59.429 0-2.857 1.143-5.714 2.857-8.571 12.571-26.857 36.571-57.714 58.286-78.286 26.286-25.143 54.286-41.714 86.286-57.714 4-2.286 8-4 12.571-4 17.143 0 45.714 55.429 60.571 55.429zM446.857 91.428c197.714 0 358.857 161.143 358.857 358.857s-161.143 358.857-358.857 358.857-358.857-161.143-358.857-358.857c0-75.429 24-149.143 68.571-210.286l-45.143-133.143 138.286 44c58.286-38.286 127.429-59.429 197.143-59.429zM446.857 881.143c237.714 0 430.857-193.143 430.857-430.857s-193.143-430.857-430.857-430.857c-72.571 0-144.571 18.286-208.571 53.714l-238.286-76.571 77.714 231.429c-40.571 66.857-61.714 144-61.714 222.286 0 237.714 193.143 430.857 430.857 430.857z" />
20
+ <glyph unicode="&#xf281;" glyph-name="reddit-alien" d="M1024 467.428c0-44.571-25.143-82.857-62.286-101.714 4.571-17.714 6.857-36 6.857-54.857 0-180.571-204-326.857-455.429-326.857-250.857 0-454.857 146.286-454.857 326.857 0 18.286 2.286 36.571 6.286 53.714-38.286 18.857-64.571 57.714-64.571 102.857 0 62.857 50.857 113.714 113.714 113.714 32.571 0 61.714-13.714 82.857-36 77.143 53.714 180 88.571 294.286 92.571l66.286 297.714c2.286 10.286 13.143 17.143 23.429 14.857l210.857-46.286c13.714 27.429 42.857 46.857 76 46.857 47.429 0 85.714-38.286 85.714-85.143 0-47.429-38.286-85.714-85.714-85.714-46.857 0-85.143 38.286-85.143 85.143l-190.857 42.286-59.429-269.714c114.857-3.429 218.857-37.714 296.571-91.429 20.571 21.714 49.714 34.857 81.714 34.857 62.857 0 113.714-50.857 113.714-113.714zM238.857 353.714c0-47.429 38.286-85.714 85.143-85.714 47.429 0 85.714 38.286 85.714 85.714 0 46.857-38.286 85.143-85.714 85.143-46.857 0-85.143-38.286-85.143-85.143zM701.714 150.857c8.571 8.571 8.571 21.143 0 29.714-8 8-21.143 8-29.143 0-34.286-34.857-108-46.857-160.571-46.857s-126.286 12-160.571 46.857c-8 8-21.143 8-29.143 0-8.571-8-8.571-21.143 0-29.714 54.286-54.286 158.857-58.286 189.714-58.286s135.429 4 189.714 58.286zM700 268c46.857 0 85.143 38.286 85.143 85.714 0 46.857-38.286 85.143-85.143 85.143-47.429 0-85.714-38.286-85.714-85.143 0-47.429 38.286-85.714 85.714-85.714z" />
21
+ <glyph unicode="&#xf2ac;" glyph-name="snapchat-ghost" horiz-adv-x="951" d="M484.571 877.714c102.857 1.143 188-56.571 230.857-149.143 13.143-28 15.429-71.429 15.429-102.286 0-36.571-2.857-72.571-5.143-109.143 4.571-2.286 10.857-4 16-4 20.571 0 37.714 15.429 58.286 15.429 19.429 0 47.429-13.714 47.429-36.571 0-54.857-114.857-44.571-114.857-92.571 0-8.571 3.429-16.571 6.857-24.571 27.429-60 79.429-117.714 141.143-143.429 14.857-6.286 29.714-9.714 45.714-13.143 10.286-2.286 16-9.714 16-20 0-38.857-98.857-54.857-125.143-58.857-11.429-17.714-2.857-59.429-33.143-59.429-23.429 0-46.857 7.429-72 7.429-12 0-24-0.571-35.429-2.857-68-11.429-90.857-84.571-202.286-84.571-107.429 0-133.143 73.143-199.429 84.571-12 2.286-24 2.857-36 2.857-25.714 0-50.286-8.571-70.857-8.571-32 0-22.286 42.286-34.286 60.571-26.286 4-125.143 20-125.143 58.857 0 10.286 5.714 17.714 16 20 16 3.429 30.857 6.857 45.714 13.143 61.143 25.143 114.286 83.429 141.143 143.429 3.429 8 6.857 16 6.857 24.571 0 48-115.429 38.857-115.429 92 0 22.286 26.286 36.571 46.286 36.571 17.714 0 35.429-14.857 57.714-14.857 6.286 0 12.571 1.143 18.286 4-2.286 36-5.143 72-5.143 108.571 0 30.857 2.286 74.857 15.429 102.857 50.286 108.571 135.429 148 249.143 149.143z" />
22
+ </font></defs></svg>
templates/design-manager/design-3/fonts/icomoon.ttf ADDED
Binary file
templates/design-manager/design-3/fonts/icomoon.woff ADDED
Binary file
templates/design-manager/design-3/footer.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $redux_builder_amp;
2
+ wp_reset_postdata();
3
+
4
+ $ampforwp_backto_nonamp = " ";
5
+ if ( is_home() ) {
6
+ $ampforwp_backto_nonamp = home_url();
7
+ }
8
+ if ( is_single() ){
9
+ global $post;
10
+ $ampforwp_backto_nonamp = get_permalink( $post->ID );
11
+ }
12
+ if ( is_page() ){
13
+ global $post;
14
+ $ampforwp_backto_nonamp = get_permalink( $post->ID );
15
+ }
16
+ if( is_archive() ) {
17
+ global $wp;
18
+ $ampforwp_backto_nonamp = esc_url( home_url( $wp->request ) );
19
+ }
20
+ ?>
21
+ <footer class="footer_wrapper container">
22
+ <div id="footer">
23
+ <div class="footer_menu">
24
+ <?php wp_nav_menu( array( 'theme_location' => 'amp-footer-menu' ) ); ?>
25
+ </div>
26
+ <div class="social_icons">
27
+ <ul>
28
+
29
+
30
+ <?php global $redux_builder_amp;
31
+ if( $redux_builder_amp['enable-single-twittter-profile'] && $redux_builder_amp['enable-single-twittter-profile-url'] !== '') { ?>
32
+ <a href="<?php echo $redux_builder_amp['enable-single-twittter-profile-url']; ?>" target ="_blank"><li class="icon-twitter"></li></a>
33
+ <?php } ?>
34
+
35
+ <?php global $redux_builder_amp;
36
+ if( $redux_builder_amp['enable-single-facebook-profile'] && $redux_builder_amp['enable-single-facebook-profile-url'] !== '') { ?>
37
+ <a href="<?php echo $redux_builder_amp['enable-single-facebook-profile-url']; ?>" target ="_blank"><li class="icon-facebook"></li></a>
38
+ <?php } ?>
39
+
40
+ <?php global $redux_builder_amp;
41
+ if( $redux_builder_amp['enable-single-pintrest-profile'] && $redux_builder_amp['enable-single-pintrest-profile-url'] !== '') { ?>
42
+ <a href="<?php echo $redux_builder_amp['enable-single-pintrest-profile-url']; ?>" target ="_blank"><li class="icon-pinterest"></li></a>
43
+ <?php } ?>
44
+
45
+ <?php global $redux_builder_amp;
46
+ if( $redux_builder_amp['enable-single-google-plus-profile'] && $redux_builder_amp['enable-single-google-plus-profile-url'] !== '') { ?>
47
+ <a href="<?php echo $redux_builder_amp['enable-single-google-plus-profile-url']; ?>" target ="_blank"><li class="icon-google-plus"></li></a>
48
+ <?php } ?>
49
+
50
+ <?php global $redux_builder_amp;
51
+ if( $redux_builder_amp['enable-single-linkdin-profile'] && $redux_builder_amp['enable-single-linkdin-profile-url'] !== '') { ?>
52
+ <a href="<?php echo $redux_builder_amp['enable-single-linkdin-profile-url']; ?>" target ="_blank"><li class="icon-linkedin"></li></a>
53
+ <?php } ?>
54
+
55
+ <?php global $redux_builder_amp;
56
+ if( $redux_builder_amp['enable-single-youtube-profile'] && $redux_builder_amp['enable-single-youtube-profile-url'] !== '') { ?>
57
+ <a href="<?php echo $redux_builder_amp['enable-single-youtube-profile-url']; ?>" target ="_blank"><li class="icon-youtube-play"></li></a>
58
+ <?php } ?>
59
+
60
+ <?php global $redux_builder_amp;
61
+ if( $redux_builder_amp['enable-single-instagram-profile'] && $redux_builder_amp['enable-single-instagram-profile-url'] !== '') { ?>
62
+ <a href="<?php echo $redux_builder_amp['enable-single-instagram-profile-url']; ?>" target ="_blank"> <li class="icon-instagram"></li></a>
63
+ <?php } ?>
64
+
65
+ <?php global $redux_builder_amp;
66
+ if( $redux_builder_amp['enable-single-reddit-profile'] && $redux_builder_amp['enable-single-reddit-profile-url'] !== '') { ?>
67
+ <a href="<?php echo $redux_builder_amp['enable-single-reddit-profile-url']; ?>" target ="_blank"><li class="icon-reddit-alien"></li></a>
68
+ <?php } ?>
69
+
70
+ <?php global $redux_builder_amp;
71
+ if( $redux_builder_amp['enable-single-VKontakte-profile'] && $redux_builder_amp['enable-single-VKontakte-profile-url'] !== '') { ?>
72
+ <a href="<?php echo $redux_builder_amp['enable-single-VKontakte-profile-url']; ?>" target ="_blank"><li class="icon-vk"></li></a>
73
+ <?php } ?>
74
+
75
+ <?php global $redux_builder_amp;
76
+ if( $redux_builder_amp['enable-single-snapchat-profile'] && $redux_builder_amp['enable-single-snapchat-profile-url'] !== '') { ?>
77
+ <a href="<?php echo $redux_builder_amp['enable-single-snapchat-profile-url']; ?>" target ="_blank"><li class="icon-snapchat-ghost"></li></a>
78
+ <?php } ?>
79
+
80
+ <?php global $redux_builder_amp;
81
+ if( $redux_builder_amp['enable-single-Tumblr-profile'] && $redux_builder_amp['enable-single-Tumblr-profile-url'] !== '') { ?>
82
+ <a href="<?php echo $redux_builder_amp['enable-single-Tumblr-profile-url']; ?>" target ="_blank"><li class="icon-tumblr"></li></a>
83
+ <?php } ?>
84
+
85
+ </ul>
86
+ </div>
87
+ <p class="rightslink">
88
+ <?php
89
+ global $allowed_html;
90
+ echo wp_kses($redux_builder_amp['amp-translator-footer-text'],$allowed_html) ;
91
+ ?>
92
+ </p>
93
+ <?php global $redux_builder_amp; if( $redux_builder_amp['amp-design-3-credit-link'] ) { ?>
94
+ <p class="poweredby">
95
+ <a href="https://ampforwp.com">Powered by AMPforWP</a>
96
+ <p>
97
+ <?php } ?>
98
+ </div>
99
+ </footer>
100
+ </div><!--Design3 Ends-->
101
+
102
+ <?php global $redux_builder_amp; if( $redux_builder_amp['amp-design-3-search-feature'] ) { ?>
103
+ <amp-lightbox id="search-icon" layout="nodisplay">
104
+ <?php ampforwp_the_search_form() ?>
105
+ <button on="tap:search-icon.close" class="closebutton">X</button>
106
+ <i class="icono-cross"></i>
107
+ </amp-lightbox>
108
+ <?php } ?>
109
+ <?php do_action('ampforwp_global_after_footer'); ?>
templates/design-manager/design-3/frontpage.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php global $redux_builder_amp;
2
+ $post_id = $redux_builder_amp['amp-frontpage-select-option-pages'];
3
+ $template = new AMP_Post_Template( $post_id );?>
4
+ <!doctype html>
5
+ <html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( 'html_tag_attributes' ) ); ?>>
6
+ <head>
7
+ <meta charset="utf-8">
8
+ <link rel="canonical" href="<?php
9
+ $ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
10
+ echo get_permalink( $ID ) ?>">
11
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
12
+ <?php do_action( 'amp_post_template_head', $this ); ?>
13
+ <?php
14
+ $amp_custom_content_enable = get_post_meta($template->data['post_id'], 'ampforwp_custom_content_editor_checkbox', true);
15
+ if ( $amp_custom_content_enable ) {
16
+ $amp_component_scripts = $template->data['amp_component_scripts'];
17
+ foreach ($amp_component_scripts as $ampforwp_service => $ampforwp_js_file) { ?>
18
+ <script custom-element="<?php echo $ampforwp_service; ?>" src="<?php echo $ampforwp_js_file; ?>" async></script> <?php
19
+ }
20
+ } ?>
21
+ <style amp-custom>
22
+ <?php $this->load_parts( array( 'style' ) ); ?>
23
+ <?php do_action( 'amp_post_template_css', $this ); ?>
24
+ </style>
25
+ </head>
26
+ <body class="single-post">
27
+ <?php $this->load_parts( array( 'header-bar' ) ); ?>
28
+
29
+ <header class="amp-wp-article-header ampforwp-title">
30
+ <h1 class="amp-wp-title">
31
+ <?php global $redux_builder_amp;
32
+ $ID = $redux_builder_amp['amp-frontpage-select-option-pages'];
33
+ if( $redux_builder_amp['ampforwp-title-on-front-page'] ) {
34
+ echo get_the_title( $ID ) ;
35
+ }
36
+ ?>
37
+ </h1>
38
+ </header>
39
+
40
+ <?php do_action( 'ampforwp_after_header', $this ); ?>
41
+
42
+ <main>
43
+ <div class="amp-wp-content the_content"> <?php
44
+
45
+ // Normal Front Page Content
46
+ if ( ! $amp_custom_content_enable ) {
47
+ echo $template->data['post_amp_content'];
48
+ } else {
49
+ // Custom/Alternative AMP content added through post meta
50
+ echo $template->data['ampforwp_amp_content'];
51
+ }
52
+
53
+ do_action( 'ampforwp_after_post_content', $this ); ?>
54
+
55
+ </div>
56
+
57
+ <div class="amp-wp-content post-pagination-meta">
58
+ <?php $this->load_parts( apply_filters( 'amp_post_template_meta_parts', array( 'meta-taxonomy' ) ) ); ?>
59
+ </div>
60
+
61
+ <?php if($redux_builder_amp['enable-single-social-icons'] == true) { ?>
62
+ <div class="sticky_social">
63
+ <?php if($redux_builder_amp['enable-single-facebook-share'] == true) { ?>
64
+ <amp-social-share type="facebook" width="50" height="28"></amp-social-share>
65
+ <?php } ?>
66
+ <?php if($redux_builder_amp['enable-single-twitter-share'] == true) { ?>
67
+ <amp-social-share type="twitter" width="50" height="28"></amp-social-share>
68
+ <?php } ?>
69
+ <?php if($redux_builder_amp['enable-single-gplus-share'] == true) { ?>
70
+ <amp-social-share type="gplus" width="50" height="28"></amp-social-share>
71
+ <?php } ?>
72
+ <?php if($redux_builder_amp['enable-single-email-share'] == true) { ?>
73
+ <amp-social-share type="email" width="50" height="28"></amp-social-share>
74
+ <?php } ?>
75
+ <?php if($redux_builder_amp['enable-single-pinterest-share'] == true) { ?>
76
+ <amp-social-share type="pinterest" width="50" height="28"></amp-social-share>
77
+ <?php } ?>
78
+ <?php if($redux_builder_amp['enable-single-linkedin-share'] == true) { ?>
79
+ <amp-social-share type="linkedin" width="50" height="28"></amp-social-share>
80
+ <?php } ?>
81
+ </div>
82
+ <?php } ?>
83
+ </main>
84
+ <?php do_action( 'amp_post_template_above_footer', $this ); ?>
85
+ <?php $this->load_parts( array( 'footer' ) ); ?>
86
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
87
+ </body>
88
+ </html>
templates/design-manager/design-3/functions.php ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ global $redux_builder_amp;
3
+ // Slide in Menu
4
+ class AMPforWP_Menu_Walker extends Walker_Nav_Menu {
5
+ protected $accordion_started = FALSE;
6
+ protected $accordion_childs_started = FALSE;
7
+ public function start_lvl( &$output, $depth = 0, $args = array() ) {
8
+ }
9
+ public function end_lvl( &$output, $depth = 0, $args = array() ) {
10
+
11
+ if ( $this->accordion_childs_started ) {
12
+ $this->end_accordion_child_wrapper( $output, $depth );
13
+ }
14
+
15
+ if ( $this->accordion_started ) {
16
+ $this->end_accordion( $output, $depth );
17
+ }
18
+
19
+ }
20
+ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
21
+
22
+ $args = apply_filters( 'nav_menu_item_args', $args, $item, $depth );
23
+
24
+ $classes = empty( $item->classes ) ? array() : (array) $item->classes;
25
+ $classes[] = 'menu-item-' . $item->ID;
26
+
27
+ $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args, $depth ) );
28
+ $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
29
+
30
+ if ( $this->has_children ) {
31
+ add_theme_support('ampforwp-has-nav-child', true);
32
+
33
+ $this->start_accordion( $output, $depth );
34
+
35
+ $output .= '<h6 ' . $class_names . '>';
36
+ $output .= $this->get_anchor_tag( $item, $depth, $args, $id );
37
+ $output .= '</h6>';
38
+
39
+ $this->start_accordion_child_wrapper( $output, $depth );
40
+
41
+ } else {
42
+
43
+ $output .= '<li ' . $class_names . '>';
44
+ $output .= $this->get_anchor_tag( $item, $depth, $args, $id );
45
+ $output .= '</li>';
46
+
47
+ }
48
+
49
+ }
50
+
51
+
52
+ public function end_el( &$output, $item, $depth = 0, $args = array() ) {
53
+ }
54
+ public function start_accordion( &$output, $depth = 0 ) {
55
+
56
+ $output .= "<amp-accordion><section>";
57
+
58
+ $this->accordion_started = TRUE;
59
+ $this->enqueue_accordion = TRUE;
60
+ }
61
+ public function end_accordion( &$output, $depth = 0 ) {
62
+
63
+ $output .= "</section></amp-accordion>";
64
+
65
+ $this->accordion_started = FALSE;
66
+ }
67
+ public function start_accordion_child_wrapper( &$output, $depth = 0 ) {
68
+
69
+ $output .= "\n<div>\n";
70
+
71
+ $this->accordion_childs_started = TRUE;
72
+ }
73
+ public function end_accordion_child_wrapper( &$output, $depth = 0 ) {
74
+
75
+ $output .= "</div>\n";
76
+
77
+ $this->accordion_childs_started = FALSE;
78
+ }
79
+ public function get_anchor_tag( $item, $depth, $args, $id ) {
80
+
81
+ $current_el = '';
82
+
83
+ parent::start_el( $current_el, $item, $depth, $args, $id );
84
+
85
+ // Unwrap li tag
86
+ if ( preg_match( '#<\s*li\s* [^>]* > (.+) #ix', $current_el, $matched ) ) {
87
+ return $matched[1];
88
+ }
89
+
90
+ return $this->make_anchor_tag( $item, $args, $depth );
91
+ }
92
+
93
+ protected function make_anchor_tag( $item, $args, $depth ) {
94
+
95
+ $atts = array();
96
+ $atts['title'] = ! empty( $item->attr_title ) ? $item->attr_title : '';
97
+ $atts['target'] = ! empty( $item->target ) ? $item->target : '';
98
+ $atts['rel'] = ! empty( $item->xfn ) ? $item->xfn : '';
99
+ $atts['href'] = ! empty( $item->url ) ? $item->url : '';
100
+
101
+ $atts = apply_filters( 'nav_menu_link_attributes', $atts, $item, $args, $depth );
102
+
103
+ $attributes = '';
104
+ foreach ( $atts as $attr => $value ) {
105
+ if ( ! empty( $value ) ) {
106
+ $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
107
+ $attributes .= ' ' . $attr . '="' . $value . '"';
108
+ }
109
+ }
110
+ $title = apply_filters( 'the_title', $item->title, $item->ID );
111
+ $title = apply_filters( 'nav_menu_item_title', $title, $item, $args, $depth );
112
+ $item_output = $args->before;
113
+ $item_output .= '<a' . $attributes . '>';
114
+ $item_output .= $args->link_before . $title . $args->link_after;
115
+ $item_output .= '</a>';
116
+ $item_output .= $args->after;
117
+ return $item_output;
118
+ }
119
+ }
120
+
121
+ // Add required Fonts for Design 3
122
+ add_filter( 'amp_post_template_data', 'ampforwp_add_design3_required_fonts' );
123
+ function ampforwp_add_design3_required_fonts( $data ) {
124
+
125
+ $data['font_urls']['roboto_slab_pt_serif'] = 'https://fonts.googleapis.com/css?family=Roboto+Slab:400,700|PT+Serif:400,700';
126
+ unset($data['font_urls']['merriweather']);
127
+
128
+ return $data;
129
+
130
+ }
131
+
132
+ // Add required Javascripts for Design 3
133
+ add_filter( 'amp_post_template_data', 'ampforwp_add_design3_required_scripts' );
134
+ function ampforwp_add_design3_required_scripts( $data ) {
135
+ global $redux_builder_amp;
136
+
137
+ // Add Scripts only when Search is Enabled
138
+ if( $redux_builder_amp['amp-design-3-search-feature'] ) {
139
+ if ( empty( $data['amp_component_scripts']['amp-lightbox'] ) ) {
140
+ $data['amp_component_scripts']['amp-lightbox'] = 'https://cdn.ampproject.org/v0/amp-lightbox-0.1.js';
141
+ }
142
+ if ( empty( $data['amp_component_scripts']['amp-form'] ) ) {
143
+ $data['amp_component_scripts']['amp-form'] = 'https://cdn.ampproject.org/v0/amp-form-0.1.js';
144
+ }
145
+ }
146
+ // Add Scripts only when AMP Menu is Enabled
147
+ if( has_nav_menu( 'amp-menu' ) ) {
148
+ if ( empty( $data['amp_component_scripts']['amp-accordion'] ) ) {
149
+ $data['amp_component_scripts']['amp-accordion'] = 'https://cdn.ampproject.org/v0/amp-accordion-0.1.js';
150
+ }
151
+ }
152
+ // Add Scripts only when Homepage AMP Featured Slider is Enabled
153
+ if( is_home() ) {
154
+
155
+ if ( $redux_builder_amp['amp-design-3-featured-slider'] == 1 ) {
156
+
157
+ if ( empty( $data['amp_component_scripts']['amp-carousel'] ) ) {
158
+ $data['amp_component_scripts']['amp-carousel'] = 'https://cdn.ampproject.org/v0/amp-carousel-0.1.js';
159
+ }
160
+ }
161
+ }
162
+ return $data;
163
+ }
164
+
165
+ // Search Form
166
+ function ampforwp_get_search_form() {
167
+ $form = '<form role="search" method="get" id="searchform" class="searchform" target="_top" action="' . get_bloginfo('url') .'">
168
+ <div>
169
+ <label class="screen-reader-text" for="s">' . _x( 'Type your search query and hit enter:', 'label' ) . '</label>
170
+ <input type="text" placeholder="AMP" value="1" name="amp" class="hide" id="ampsomething" />
171
+ <input type="text" placeholder="Type here" value="' . get_search_query() . '" name="s" id="s" />
172
+ <input type="submit" id="searchsubmit" value="'. esc_attr_x( 'Search', 'submit button' ) .'" />
173
+ </div>
174
+ </form>';
175
+ return $form;
176
+ }
177
+ function ampforwp_the_search_form() {
178
+ echo ampforwp_get_search_form();
179
+ }
templates/design-manager/design-3/header-bar.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <amp-sidebar id='sidebar'
2
+ layout="nodisplay"
3
+ side="left">
4
+ <?php global $redux_builder_amp; ?>
5
+ <div class="toggle-navigationv2">
6
+
7
+ <?php
8
+ if( has_nav_menu( 'amp-menu' ) ) { ?>
9
+ <div class="navigation_heading"><?php echo esc_html( $redux_builder_amp['amp-translator-navigate-text'] ); ?></div>
10
+ <?php
11
+ wp_nav_menu( array(
12
+ 'theme_location' => 'amp-menu',
13
+ 'walker' => new AMPforWP_Menu_Walker()
14
+ ) );
15
+ }
16
+ ?>
17
+ <div class="social_icons">
18
+ <ul>
19
+
20
+ <?php global $redux_builder_amp;
21
+ if( $redux_builder_amp['enable-single-twittter-profile'] && $redux_builder_amp['enable-single-twittter-profile-url'] !== '') { ?>
22
+ <a href="<?php echo $redux_builder_amp['enable-single-twittter-profile-url']; ?>" target ="_blank"><li class="icon-twitter"></li></a>
23
+ <?php } ?>
24
+
25
+ <?php global $redux_builder_amp;
26
+ if( $redux_builder_amp['enable-single-facebook-profile'] && $redux_builder_amp['enable-single-facebook-profile-url'] !== '') { ?>
27
+ <a href="<?php echo $redux_builder_amp['enable-single-facebook-profile-url']; ?>" target ="_blank"><li class="icon-facebook"></li></a>
28
+ <?php } ?>
29
+
30
+ <?php global $redux_builder_amp;
31
+ if( $redux_builder_amp['enable-single-pintrest-profile'] && $redux_builder_amp['enable-single-pintrest-profile-url'] !== '') { ?>
32
+ <a href="<?php echo $redux_builder_amp['enable-single-pintrest-profile-url']; ?>" target ="_blank"><li class="icon-pinterest"></li></a>
33
+ <?php } ?>
34
+
35
+ <?php global $redux_builder_amp;
36
+ if( $redux_builder_amp['enable-single-google-plus-profile'] && $redux_builder_amp['enable-single-google-plus-profile-url'] !== '') { ?>
37
+ <a href="<?php echo $redux_builder_amp['enable-single-google-plus-profile-url']; ?>" target ="_blank"><li class="icon-google-plus"></li></a>
38
+ <?php } ?>
39
+
40
+ <?php global $redux_builder_amp;
41
+ if( $redux_builder_amp['enable-single-linkdin-profile'] && $redux_builder_amp['enable-single-linkdin-profile-url'] !== '') { ?>
42
+ <a href="<?php echo $redux_builder_amp['enable-single-linkdin-profile-url']; ?>" target ="_blank"><li class="icon-linkedin"></li></a>
43
+ <?php } ?>
44
+
45
+ <?php global $redux_builder_amp;
46
+ if( $redux_builder_amp['enable-single-youtube-profile'] && $redux_builder_amp['enable-single-youtube-profile-url'] !== '') { ?>
47
+ <a href="<?php echo $redux_builder_amp['enable-single-youtube-profile-url']; ?>" target ="_blank"><li class="icon-youtube-play"></li></a>
48
+ <?php } ?>
49
+
50
+ <?php global $redux_builder_amp;
51
+ if( $redux_builder_amp['enable-single-instagram-profile'] && $redux_builder_amp['enable-single-instagram-profile-url'] !== '') { ?>
52
+ <a href="<?php echo $redux_builder_amp['enable-single-instagram-profile-url']; ?>" target ="_blank"> <li class="icon-instagram"></li></a>
53
+ <?php } ?>
54
+
55
+ <?php global $redux_builder_amp;
56
+ if( $redux_builder_amp['enable-single-reddit-profile'] && $redux_builder_amp['enable-single-reddit-profile-url'] !== '') { ?>
57
+ <a href="<?php echo $redux_builder_amp['enable-single-reddit-profile-url']; ?>" target ="_blank"><li class="icon-reddit-alien"></li></a>
58
+ <?php } ?>
59
+
60
+ <?php global $redux_builder_amp;
61
+ if( $redux_builder_amp['enable-single-VKontakte-profile'] && $redux_builder_amp['enable-single-VKontakte-profile-url'] !== '') { ?>
62
+ <a href="<?php echo $redux_builder_amp['enable-single-VKontakte-profile-url']; ?>" target ="_blank"><li class="icon-vk"></li></a>
63
+ <?php } ?>
64
+
65
+
66
+ <?php global $redux_builder_amp;
67
+ if( $redux_builder_amp['enable-single-snapchat-profile'] && $redux_builder_amp['enable-single-snapchat-profile-url'] !== '') { ?>
68
+ <a href="<?php echo $redux_builder_amp['enable-single-snapchat-profile-url']; ?>" target ="_blank"><li class="icon-snapchat-ghost"></li></a>
69
+ <?php } ?>
70
+
71
+ <?php global $redux_builder_amp;
72
+ if( $redux_builder_amp['enable-single-Tumblr-profile'] && $redux_builder_amp['enable-single-Tumblr-profile-url'] !== '') { ?>
73
+ <a href="<?php echo $redux_builder_amp['enable-single-Tumblr-profile-url']; ?>" target ="_blank"><li class="icon-tumblr"></li></a>
74
+ <?php } ?>
75
+
76
+ </ul>
77
+ </div>
78
+ </div>
79
+ </amp-sidebar>
80
+
81
+ <div id="designthree" class="designthree main_container">
82
+ <header class="container">
83
+ <div id="headerwrap">
84
+ <div id="header">
85
+ <div class="hamburgermenu">
86
+ <button class="toast pull-left" on='tap:sidebar.toggle'><span></span></button>
87
+ </div>
88
+ <div class="headerlogo">
89
+ <?php global $redux_builder_amp;
90
+ if ($redux_builder_amp['amp-on-off-support-for-non-amp-home-page']) {
91
+ $ampforwp_home_url = untrailingslashit( get_bloginfo('url') ).'?nonamp=1';
92
+ }else{ global $redux_builder_amp; if($redux_builder_amp['ampforwp-homepage-on-off-support']) {
93
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) . AMP_QUERY_VAR;
94
+ } else {
95
+ $ampforwp_home_url = trailingslashit( get_bloginfo('url') ) .'?nonamp=1';
96
+ }
97
+ }
98
+ ?>
99
+ <?php if ( true == ($redux_builder_amp['opt-media']['url']) ) { ?>
100
+ <a href="<?php echo esc_url( $ampforwp_home_url ); ?>">
101
+ <amp-img src="<?php echo $redux_builder_amp['opt-media']['url']; ?>" width="190" height="36" alt="logo" class="amp-logo"></amp-img>
102
+ </a>
103
+ <?php } else { ?>
104
+ <h1><a href="<?php echo esc_url( $ampforwp_home_url ); ?>"><?php bloginfo('name'); ?></a></h1>
105
+ <?php } ?>
106
+ </div>
107
+ <?php global $redux_builder_amp; if( $redux_builder_amp['amp-design-3-search-feature'] ) { ?>
108
+ <div class="searchmenu"><button on="tap:search-icon"><i class="icono-search"></i></button> </div>
109
+ <?php } ?>
110
+ </div>
111
+ </div>
112
+ </header>
templates/design-manager/design-3/index.php ADDED
@@ -0,0 +1,170 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
7
+ <?php
8
+ global $redux_builder_amp;
9
+ if ( is_home() || is_front_page() || ( is_archive() && $redux_builder_amp['ampforwp-archive-support'] ) ){
10
+ global $wp;
11
+ $current_archive_url = home_url( $wp->request );
12
+ $amp_url = trailingslashit($current_archive_url);
13
+ $remove = '/'. AMP_QUERY_VAR;
14
+ $amp_url = str_replace($remove, '', $amp_url) ;
15
+ } ?>
16
+ <link rel="canonical" href="<?php echo $amp_url ?>">
17
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
18
+ <?php do_action( 'amp_post_template_head', $this ); ?>
19
+
20
+ <style amp-custom>
21
+ <?php $this->load_parts( array( 'style' ) ); ?>
22
+ <?php do_action( 'amp_post_template_css', $this ); ?>
23
+ </style>
24
+ </head>
25
+ <body class="amp_home_body">
26
+ <?php $this->load_parts( array( 'header-bar' ) ); ?>
27
+
28
+ <?php do_action( 'ampforwp_after_header', $this );
29
+
30
+ if ( get_query_var( 'paged' ) ) {
31
+ $paged = get_query_var('paged');
32
+ } elseif ( get_query_var( 'page' ) ) {
33
+ $paged = get_query_var('page');
34
+ } else {
35
+ $paged = 1;
36
+ }
37
+
38
+ ?>
39
+
40
+ <?php global $redux_builder_amp; if( $redux_builder_amp['amp-design-3-featured-slider'] == 1 && $paged === 1 ) { ?>
41
+ <div class="amp-featured-wrapper">
42
+ <div class="amp-featured-area">
43
+ <amp-carousel width="450"
44
+ height="270" layout="responsive"
45
+ type="slides" autoplay
46
+ delay="4000">
47
+ <?php
48
+ global $redux_builder_amp;
49
+ if( $redux_builder_amp['amp-design-3-category-selector'] ){
50
+ $args = array(
51
+ 'cat' => $redux_builder_amp['amp-design-3-category-selector'],
52
+ 'posts_per_page' => 4,
53
+ 'has_password' => false ,
54
+ 'post_status'=> 'publish'
55
+ );
56
+ } else {
57
+ //if user does not give a category
58
+ $args = array(
59
+ 'posts_per_page' => 4,
60
+ 'has_password' => false ,
61
+ 'post_status'=> 'publish'
62
+ );
63
+ }
64
+
65
+ $category_posts = new WP_Query($args);
66
+ if($category_posts->have_posts()) :
67
+ while($category_posts->have_posts()) :
68
+ $category_posts->the_post();
69
+ ?>
70
+ <div>
71
+ <?php if ( has_post_thumbnail() ) { ?>
72
+ <?php
73
+ $thumb_id = get_post_thumbnail_id();
74
+ $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium_large', true);
75
+ $thumb_url = $thumb_url_array[0];
76
+ ?>
77
+ <amp-img src=<?php echo $thumb_url ?> width=450 height=270></amp-img>
78
+ <?php } ?>
79
+ <a href="<?php the_permalink(); ?>/amp">
80
+ <div class="featured_title">
81
+ <div class="featured_time"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></div>
82
+ <h1><?php the_title() ?></h1>
83
+ </div>
84
+ </a>
85
+ </div>
86
+ <?php endwhile; else: ?><?php endif; ?>
87
+ </amp-carousel>
88
+ </div>
89
+ </div>
90
+ <?php } ?>
91
+
92
+ <main>
93
+ <?php
94
+
95
+ $exclude_ids = get_option('ampforwp_exclude_post');
96
+
97
+ $q = new WP_Query( array(
98
+ 'post_type' => 'post',
99
+ 'orderby' => 'date',
100
+ 'offset' => esc_attr($fn_offset),
101
+ 'ignore_sticky_posts' => 1,
102
+ 'paged' => esc_attr($paged),
103
+ 'post__not_in' => $exclude_ids,
104
+ 'has_password' => false,
105
+ 'post_status'=> 'publish'
106
+ ) ); ?>
107
+
108
+ <?php if ( is_archive() ) {
109
+ the_archive_title( '<h3 class="page-title">', '</h3>' );
110
+ the_archive_description( '<div class="taxonomy-description">', '</div>' );
111
+ } ?>
112
+
113
+ <?php if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post();
114
+ $ampforwp_amp_post_url = trailingslashit( get_permalink() ) . AMP_QUERY_VAR ; ?>
115
+
116
+ <div class="amp-wp-content amp-loop-list <?php if ( has_post_thumbnail() ) { } else{?>amp-loop-list-noimg<?php } ?>">
117
+ <?php if ( has_post_thumbnail() ) { ?>
118
+ <?php
119
+ $thumb_id = get_post_thumbnail_id();
120
+ $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium', true);
121
+ $thumb_url = $thumb_url_array[0];
122
+ ?>
123
+ <div class="home-post_image"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><amp-img layout="responsive" src=<?php echo $thumb_url ?> width=450 height=270 ></amp-img></a></div>
124
+ <?php } ?>
125
+
126
+ <div class="amp-wp-post-content">
127
+ <ul class="amp-wp-tags">
128
+ <?php foreach((get_the_category()) as $category) { ?>
129
+ <li><?php echo $category->cat_name ?></li>
130
+ <?php } ?>
131
+ </ul>
132
+ <h2 class="amp-wp-title"> <a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"> <?php the_title(); ?></a></h2>
133
+
134
+
135
+ <?php
136
+ if(has_excerpt()){
137
+ $content = get_the_excerpt();
138
+ }else{
139
+ $content = get_the_content();
140
+ }
141
+ ?>
142
+ <p><?php echo wp_trim_words( $content , '15' ); ?></p>
143
+ <div class="featured_time"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></div>
144
+
145
+ </div>
146
+ <div class="cb"></div>
147
+ </div>
148
+
149
+ <?php endwhile; ?>
150
+
151
+ <div class="amp-wp-content pagination-holder">
152
+
153
+
154
+ <div id="pagination">
155
+ <div class="next"><?php next_posts_link( $redux_builder_amp['amp-translator-show-more-posts-text'] , 0 ) ?></div>
156
+ <?php if ( $paged > 1 ) { ?>
157
+ <div class="prev"><?php previous_posts_link( $redux_builder_amp['amp-translator-show-previous-posts-text'] ); ?></div>
158
+ <?php } ?>
159
+ <div class="clearfix"></div>
160
+ </div>
161
+ </div>
162
+
163
+ <?php endif; ?>
164
+ <?php wp_reset_postdata(); ?>
165
+ </main>
166
+ <?php do_action( 'amp_post_template_above_footer', $this ); ?>
167
+ <?php $this->load_parts( array( 'footer' ) ); ?>
168
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
169
+ </body>
170
+ </html>
templates/design-manager/design-3/search.php ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
7
+ <?php
8
+ global $redux_builder_amp;
9
+ if ( is_home() || is_front_page() || is_search() ){
10
+ $current_search_url =trailingslashit(get_home_url())."?s=".get_search_query();
11
+ $amp_url = untrailingslashit($current_search_url);
12
+ } ?>
13
+ <link rel="canonical" href="<?php echo $amp_url ?>">
14
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
15
+ <?php do_action( 'amp_post_template_head', $this ); ?>
16
+
17
+ <style amp-custom>
18
+ <?php $this->load_parts( array( 'style' ) ); ?>
19
+ <?php do_action( 'amp_post_template_css', $this ); ?>
20
+ </style>
21
+ </head>
22
+ <body class="amp_home_body archives_body">
23
+ <?php $this->load_parts( array( 'header-bar' ) ); ?>
24
+
25
+ <?php do_action( 'ampforwp_after_header', $this ); ?>
26
+
27
+
28
+
29
+ <main>
30
+ <?php
31
+ if ( get_query_var( 'paged' ) ) {
32
+ $paged = get_query_var('paged');
33
+ } elseif ( get_query_var( 'page' ) ) {
34
+ $paged = get_query_var('page');
35
+ } else {
36
+ $paged = 1;
37
+ }
38
+
39
+ $exclude_ids = get_option('ampforwp_exclude_post');
40
+
41
+ $q = new WP_Query( array(
42
+ 'post_type' => 'post',
43
+ 'orderby' => 'date',
44
+ 's' => get_search_query() ,
45
+ 'ignore_sticky_posts' => 1,
46
+ 'paged' => esc_attr($paged),
47
+ 'post__not_in' => $exclude_ids,
48
+ 'has_password' => false ,
49
+ 'post_status'=> 'publish'
50
+ ) ); ?>
51
+
52
+
53
+
54
+ <?php global $redux_builder_amp; ?>
55
+ <h3 class="amp-wp-content page-title"><?php echo $redux_builder_amp['amp-translator-search-text'] . ' ' . get_search_query();?> </h3>
56
+
57
+ <?php if ( $q->have_posts() ) : while ( $q->have_posts() ) : $q->the_post();
58
+ $ampforwp_amp_post_url = trailingslashit( get_permalink() ) . AMP_QUERY_VAR ; ?>
59
+
60
+ <div class="amp-wp-content amp-loop-list">
61
+ <?php if ( has_post_thumbnail() ) { ?>
62
+ <?php
63
+ $thumb_id = get_post_thumbnail_id();
64
+ $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'medium', true);
65
+ $thumb_url = $thumb_url_array[0];
66
+ ?>
67
+ <div class="home-post_image"><a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"><amp-img layout="responsive" src=<?php echo $thumb_url ?> width=450 height=270 ></amp-img></a></div>
68
+ <?php } ?>
69
+
70
+ <div class="amp-wp-post-content">
71
+ <ul class="amp-wp-tags">
72
+ <?php foreach((get_the_category()) as $category) { ?>
73
+ <li><?php echo $category->cat_name ?></li>
74
+ <?php } ?>
75
+ </ul>
76
+ <h2 class="amp-wp-title"> <a href="<?php echo esc_url( $ampforwp_amp_post_url ); ?>"> <?php the_title(); ?></a></h2>
77
+
78
+
79
+ <?php
80
+ if(has_excerpt()){
81
+ $content = get_the_excerpt();
82
+ }else{
83
+ $content = get_the_content();
84
+ }
85
+ ?>
86
+ <p><?php echo wp_trim_words( $content , '15' ); ?></p>
87
+ <div class="featured_time"><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></div>
88
+
89
+ </div>
90
+ <div class="cb"></div>
91
+ </div>
92
+
93
+ <?php endwhile; ?>
94
+
95
+ <div class="amp-wp-content pagination-holder">
96
+
97
+
98
+ <div id="pagination">
99
+ <div class="next"><?php next_posts_link( $redux_builder_amp['amp-translator-show-more-posts-text'] , 0 ) ?></div>
100
+ <?php if ( $paged > 1 ) { ?>
101
+ <div class="prev"><?php previous_posts_link( $redux_builder_amp['amp-translator-show-previous-posts-text'] ); ?></div>
102
+ <?php } ?>
103
+ <div class="clearfix"></div>
104
+ </div>
105
+ </div>
106
+ <?php else : ?>
107
+ <div class="amp-wp-content">
108
+ Sorry No posts Found for <?php echo get_search_query(); ?>
109
+ </div>
110
+
111
+ <?php endif; ?>
112
+ <?php wp_reset_postdata(); ?>
113
+ </main>
114
+ <?php do_action( 'amp_post_template_above_footer', $this ); ?>
115
+ <?php $this->load_parts( array( 'footer' ) ); ?>
116
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
117
+ </body>
118
+ </html>
templates/design-manager/design-3/single.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <link rel="dns-prefetch" href="https://cdn.ampproject.org">
7
+ <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
8
+ <?php do_action( 'amp_post_template_head', $this ); ?>
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 <?php if(is_page()){ echo'amp-single-page'; };?>">
15
+ <?php $this->load_parts( array( 'header-bar' ) ); ?>
16
+
17
+ <?php do_action( 'ampforwp_after_header', $this ); ?>
18
+ <main>
19
+ <article class="amp-wp-article">
20
+ <?php do_action('ampforwp_post_before_design_elements') ?>
21
+
22
+ <?php $this->load_parts( apply_filters( 'ampforwp_design_elements', array( 'empty-filter' ) ) ); ?>
23
+ <?php do_action('ampforwp_post_after_design_elements') ?>
24
+ </article>
25
+ </main>
26
+ <?php do_action( 'amp_post_template_above_footer', $this ); ?>
27
+ <?php $this->load_parts( array( 'footer' ) ); ?>
28
+ <?php do_action( 'amp_post_template_footer', $this ); ?>
29
+ </body>
30
+ </html>
templates/design-manager/design-3/style.php ADDED
@@ -0,0 +1,1326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('amp_post_template_css', 'ampforwp_additional_style_input_2');
3
+ function ampforwp_additional_style_input_2( $amp_template ) {
4
+ global $redux_builder_amp;
5
+ $get_customizer = new AMP_Post_Template( $post_id );
6
+ // Get content width
7
+ $content_max_width = absint( $get_customizer->get( 'content_max_width' ) );
8
+ // Get template colors
9
+ $theme_color = $get_customizer->get_customizer_setting( 'theme_color' );
10
+ $text_color = $get_customizer->get_customizer_setting( 'text_color' );
11
+ $muted_text_color = $get_customizer->get_customizer_setting( 'muted_text_color' );
12
+ $border_color = $get_customizer->get_customizer_setting( 'border_color' );
13
+ $link_color = $get_customizer->get_customizer_setting( 'link_color' );
14
+ $header_background_color = $get_customizer->get_customizer_setting( 'header_background_color' );
15
+ $header_color = $get_customizer->get_customizer_setting( 'header_color' );
16
+ ?>
17
+
18
+ /* Global Styling */
19
+ body{
20
+ font: 16px/1.4 Sans-serif;
21
+ }
22
+ a {
23
+ color: #312C7E;
24
+ text-decoration: none
25
+ }
26
+ .clearfix, .cb{
27
+ clear: both
28
+ }
29
+
30
+ /* Template Styles */
31
+ .amp-wp-content, .amp-wp-title-bar div {
32
+ <?php if ( $content_max_width > 0 ) : ?>
33
+ max-width: <?php echo sprintf( '%dpx', $content_max_width ); ?>;
34
+ margin: 0 auto;
35
+ <?php endif; ?>
36
+ }
37
+
38
+ /* Slide Navigation code */
39
+ .nav_container{
40
+ padding: 18px 15px;
41
+ background: #312C7E;
42
+ color: #fff;
43
+ text-align: center
44
+ }
45
+ amp-sidebar {
46
+ width: 280px;
47
+ background: #131313;
48
+ font-family: 'Roboto Slab', serif;
49
+ }
50
+ .amp-sidebar-image {
51
+ line-height: 100px;
52
+ vertical-align:middle;
53
+ }
54
+ .amp-close-image {
55
+ top: 15px;
56
+ left: 225px;
57
+ cursor: pointer;
58
+ }
59
+ .navigation_heading{
60
+ padding: 20px 20px 15px 20px;
61
+ color: #aaa;
62
+ font-size: 10px;
63
+ font-family: sans-serif;
64
+ text-transform: uppercase;
65
+ letter-spacing: 1px;
66
+ border-bottom: 1px solid #555;
67
+ display: inline-block;
68
+ width: 100%;
69
+ }
70
+ amp-accordion>section[expanded]>:nth-child(n){
71
+ background:#666;
72
+ }
73
+ amp-accordion>section[expanded]>:nth-child(n) li:last-child{
74
+ margin-bottom:10px
75
+ }
76
+ amp-accordion>section[expanded]>:nth-child(n) li{
77
+ animation: openingmenu .3s normal forwards ease-in-out;
78
+ -webkit-transform: translate3d(0, 0, 60%) scale(1);
79
+ transform: translate3d(0, 0, 60%) scale(1);
80
+ }
81
+ @keyframes openingmenu {
82
+ 0% {
83
+ padding:0px;
84
+ }
85
+ 100% {
86
+ padding:0px 0px 0px 10px;
87
+
88
+ }
89
+ }
90
+
91
+ @keyframes closingmenu {
92
+ 0% {
93
+ padding:0px 0px 0px 20px;
94
+ }
95
+ 100% {
96
+ padding:0px;
97
+ }
98
+ }
99
+ .toggle-navigationv2 ul {
100
+ list-style-type: none;
101
+ margin: 15px 0 0 0;
102
+ padding: 0;
103
+ }
104
+ .toggle-navigationv2 ul li a{
105
+ padding: 10px 15px 10px 20px;
106
+ display: inline-block;
107
+ font-size: 14px;
108
+ color:#eee;
109
+ width:100%
110
+ }
111
+ amp-accordion>section[expanded] li a{
112
+ padding: 8px 15px 8px 20px;
113
+ font-size: 14px;
114
+ }
115
+ amp-accordion>section[expanded] li a:before{
116
+ content: "\25b8";
117
+ left: -7px;
118
+ top: -2px;
119
+ position: relative;
120
+ font-size: 10px;
121
+ color: #a9a9a9;
122
+ }
123
+ .toggle-navigationv2 ul li a:hover,.toggle-navigationv2 ul h6:hover{
124
+ transition: 1s all;
125
+ background: #666;
126
+ color: #fff;
127
+ }
128
+ .toggle-navigationv2 ul h6{
129
+ padding: 10px 15px 10px 20px;
130
+ background: #131313;
131
+ border:0;
132
+ font-size: 14px;
133
+ font-weight:normal;
134
+ }
135
+ .toggle-navigationv2 ul h6 a:after{
136
+ position: absolute;
137
+ right: 20px;
138
+ top: 0;
139
+ color: #999;
140
+ font-size: 13px;
141
+ line-height: 38px;
142
+ transition: 1s all;
143
+ transform:rotate(-90deg);
144
+ content: '\25be';
145
+ }
146
+ .toggle-navigationv2 ul h6 a{
147
+ color:#eee;
148
+ }
149
+ .toggle-navigationv2 section[expanded] h6 a:after{
150
+ content: '\25be';
151
+ font-size: 13px;
152
+ transform:rotate(0);
153
+ transition: 1s all;
154
+ color:#ccc
155
+ }
156
+ .toggle-navigationv2 section[expanded] h6{
157
+ transition: 1s all;
158
+ background:#666
159
+ }
160
+ .toggle-navigationv2 .social_icons{
161
+ margin-top: 25px;
162
+ border-top: 1px solid #555;
163
+ padding: 25px 0px;
164
+ color: #fff;
165
+ width: 100%;
166
+ }
167
+ .menu-all-pages-container:after{
168
+ content: "";
169
+ clear: both
170
+ }
171
+ .toggle-text{
172
+ color: #fff;
173
+ font-size: 12px;
174
+ text-transform: uppercase;
175
+ letter-spacing: 3px;
176
+ display: inherit;
177
+ text-align: center;
178
+ }
179
+ .toggle-text:before{
180
+ content: "...";
181
+ font-size: 32px;
182
+ position: ;
183
+ font-family: georgia;
184
+ line-height: 0px;
185
+ margin-left: 0px;
186
+ letter-spacing: 1px;
187
+ top: -3px;
188
+ position: relative;
189
+ padding-right: 10px;
190
+ }
191
+ .nav_container:hover + .toggle-navigation,
192
+ .toggle-navigation:hover,
193
+ .toggle-navigation:active,
194
+ .toggle-navigation:focus{
195
+ display: inline-block;
196
+ width: 100%;
197
+ }
198
+
199
+
200
+ /* Pagination */
201
+ .amp-wp-content.pagination-holder {
202
+ background: none;
203
+ padding: 0;
204
+ box-shadow: none;
205
+ height: auto;
206
+ min-height: auto;
207
+ }
208
+ #pagination{
209
+ width: 100%;
210
+ margin-top: 20px;
211
+ }
212
+ #pagination .next, #pagination .prev{ margin: 0px 6% 10px 6%; }
213
+ #pagination .next a, #pagination .prev a{
214
+ opacity:0.9;
215
+ background: #f42f42;
216
+ width: 100%;
217
+ color: #fff;
218
+ display: inline-block;
219
+ text-align: center;
220
+ font-size: 16px;
221
+ line-height: 1;
222
+ padding: 18px 0%;
223
+ border-radius: 4px;
224
+ }
225
+ /* Sticky Social bar in Single */
226
+
227
+ .sticky_social{
228
+ width: 100%;
229
+ bottom: 0;
230
+ display: block;
231
+ left: 0;
232
+ box-shadow: 0px 4px 7px #000;
233
+ background: #fff;
234
+ padding: 7px 0px 0px 0px;
235
+ position: fixed;
236
+ margin: 0;
237
+ z-index: 10;
238
+ text-align: center;
239
+ }
240
+ .whatsapp-share-icon {
241
+ height: 40px;
242
+ display: inline-block;
243
+ background: #5cbe4a;
244
+ margin: 0;
245
+ }
246
+
247
+ .sticky_social .whatsapp-share-icon {
248
+ padding: 4px 0px 14px 0px;
249
+ height: 10px;
250
+ top: -4px;
251
+ position: relative;
252
+ }
253
+ /* Header */
254
+ #header{
255
+ background: #fff;
256
+ text-align: center;
257
+ height:50px;
258
+ box-shadow:0 0 32px rgba(0,0,0,.15);
259
+ }
260
+ header{
261
+ padding-bottom:50px;
262
+ }
263
+ #headerwrap{
264
+ position: fixed;
265
+ z-index:1000;
266
+ width: 100%;
267
+ }
268
+ #header h1{
269
+ text-align: center;
270
+ font-size: 16px;
271
+ left: -20px;
272
+ position: relative;
273
+ font-weight: bold;
274
+ line-height: 53px;
275
+ padding: 0;
276
+ margin: 0;
277
+ text-transform: uppercase;
278
+ }
279
+
280
+ main .amp-wp-content{
281
+ font-size: 18px;
282
+ line-height: 29px;
283
+ color:#111
284
+ }
285
+ .single-post main .amp-wp-article-content h1{ font-size:2em}
286
+ .single-post main .amp-wp-article-content h1,
287
+ .single-post main .amp-wp-article-content h2,
288
+ .single-post main .amp-wp-article-content h3,
289
+ .single-post main .amp-wp-article-content h4,
290
+ .single-post main .amp-wp-article-content h5,
291
+ .single-post main .amp-wp-article-content h6{
292
+ font-family: 'Roboto Slab', serif;
293
+ margin: 0px 0px 5px 0px;
294
+ line-height: 1.6;
295
+ }
296
+ .home-post_image {
297
+ float: left;
298
+ width:33%;
299
+ padding-right: 2%;
300
+ }
301
+ .amp-wp-title {
302
+ margin-top: 0px;
303
+ }
304
+ h2.amp-wp-title {
305
+ font-family: 'Roboto Slab', serif;
306
+ font-weight: 700;
307
+ font-size: 20px;
308
+ margin-bottom: 7px;
309
+ line-height: 1.3;
310
+ }
311
+ h2.amp-wp-title a{
312
+ color: #000;
313
+ }
314
+ .amp-wp-tags{ list-style-type: none;
315
+ padding: 0;
316
+ margin: 0 0 9px 0;
317
+ display: inline-flex; }
318
+ .amp-wp-tags li{
319
+ display: inline;
320
+ background: #F6F6F6;
321
+ color: #9e9e9e;
322
+ line-height: 1;
323
+ border-radius: 50px;
324
+ padding: 8px 18px;
325
+ font-size: 12px;
326
+ margin-right: 8px;
327
+ top: -3px;
328
+ position: relative;
329
+ }
330
+ .amp-loop-list{ position:relative; border-bottom: 1px solid #ededed;
331
+ padding: 25px 15px 25px 15px }
332
+ body .amp-loop-list-noimg .amp-wp-post-content{
333
+ width:100%
334
+ }
335
+ .amp-loop-list .amp-wp-post-content{
336
+ float: left;
337
+ width: 65%;
338
+ }
339
+ .amp-loop-list .featured_time{
340
+ color:#b3b3b3;
341
+ padding-left:0
342
+ }
343
+ .amp-wp-post-content p{
344
+ color: grey;
345
+ line-height: 1.5;
346
+ font-size: 14px;
347
+ margin: 8px 0 10px;
348
+ font-family:'PT Serif', serif
349
+ }
350
+ /* Footer */
351
+ #footer{
352
+ background: #151515;
353
+ color: #eee;
354
+ font-size: 13px;
355
+ text-align: center;
356
+ letter-spacing: 0.2px;
357
+ padding: 35px 0 35px 0;
358
+ margin-top: 30px;
359
+ }
360
+ #footer a{ color:#fff }
361
+ #footer p:first-child{
362
+ margin-bottom: 12px;
363
+ }
364
+ #footer .social_icons{
365
+ margin: 0px 20px 25px 20px;
366
+ border-bottom: 1px solid #3c3c3c;
367
+ padding-bottom: 25px;
368
+ }
369
+ #footer p{
370
+ margin: 0
371
+ }
372
+ .rightslink{
373
+ font-size:13px;
374
+ color:#999
375
+ }
376
+ .poweredby{ padding-top:10px;
377
+ font-size:10px;
378
+ }
379
+ #footer .poweredby a{
380
+ color:#666
381
+ }
382
+ .footer_menu ul{
383
+ list-style-type: none;
384
+ padding: 0;
385
+ text-align: center;
386
+ margin: 0px 20px 25px 20px;
387
+ line-height: 27px;
388
+ font-size: 13px
389
+ }
390
+ .footer_menu ul li{
391
+ display:inline;
392
+ margin:0 10px;
393
+ }
394
+ .footer_menu ul li:first-child{
395
+ margin-left:0
396
+ }
397
+ .footer_menu ul li:last-child{
398
+ margin-right:0
399
+ }
400
+ /* Single */
401
+ .single-post main{
402
+ margin: 20px 17px 17px 17px;
403
+ }
404
+ .amp-wp-article-content{
405
+ font-family:'PT Serif', serif;
406
+ }
407
+ .single-post .post-featured-img,
408
+ .single-post .amp-wp-article-content amp-img{
409
+ margin:0 -17px 17px -17px
410
+ }
411
+ .ampforwp-title{
412
+ padding: 0px 0px 0px 0px;
413
+ margin-top: 50px;
414
+ }
415
+ .comment-button-wrapper{
416
+ margin-bottom: 50px;
417
+ margin-top: 30px;
418
+ text-align:center
419
+ }
420
+ .comment-button-wrapper a{
421
+ color: #fff;
422
+ background: #312c7e;
423
+ font-size: 14px;
424
+ padding: 12px 22px 12px 22px;
425
+ font-family: 'Roboto Slab', serif;
426
+ border-radius: 2px;
427
+ text-transform: uppercase;
428
+ letter-spacing: 1px;
429
+ }
430
+ h1.amp-wp-title {
431
+ margin: 0;
432
+ color: #333333;
433
+ font-size: 48px;
434
+ line-height: 58px;
435
+ font-family: 'Roboto Slab', serif;
436
+ }
437
+ .post-pagination-meta{
438
+ min-height:75px
439
+ }
440
+ .single-post .post-pagination-meta{
441
+ font-size:15px;
442
+ font-family:sans-serif;
443
+ min-height:auto;
444
+ margin-top:-5px;
445
+ line-height:26px;
446
+ }
447
+ .single-post .post-pagination-meta span{
448
+ font-weight:bold
449
+ }
450
+ .single-post .amp_author_area .amp_author_area_wrapper{
451
+ display: inline-block;
452
+ width: 100%;
453
+ line-height: 1.4;
454
+ margin-top: 22px;
455
+ font-size: 16px;
456
+ color:#333;
457
+ font-family: sans-serif;
458
+ }
459
+ .single-post .amp_author_area amp-img{
460
+ margin: 0;
461
+ float: left;
462
+ margin-right: 12px;
463
+ border-radius: 60px;
464
+ }
465
+ .amp-wp-article-tags .ampforwp-tax-tag, .amp-wp-article-tags .ampforwp-tax-tag a{
466
+ font-size: 12px;
467
+ color: #555;
468
+ font-family: sans-serif;
469
+ margin: 20px 0 0 0;
470
+ }
471
+
472
+ .amp-wp-article-tags span{
473
+ background: #eeeeee;
474
+ margin-right: 10px;
475
+ padding: 5px 12px 5px 12px;
476
+ border-radius: 3px;
477
+ }
478
+ .ampforwp-social-icons{
479
+ margin-bottom: 28px;
480
+ margin-top: 25px;
481
+ height: 40px;
482
+ }
483
+ .ampforwp-social-icons amp-social-share{
484
+ border-radius:60px;
485
+ background-size:22px;
486
+ margin-right:6px;
487
+ }
488
+ .ampforwp-social-icons-wrapper .whatsapp-share-icon{
489
+ padding: 11px 12px 9px 12px;
490
+ top: -13px;
491
+ position: relative;
492
+ line-height:1;
493
+ height: 20px;
494
+ border-radius: 60px;
495
+ }
496
+ .amp-wp-tax-tag {
497
+ list-style: none;
498
+ display: inline-block;
499
+ }
500
+ figure{
501
+ margin: 0 0 20px 0;
502
+ }
503
+ figcaption{
504
+ font-size: 11px;
505
+ margin-bottom: 11px;
506
+ background: #eee;
507
+ padding: 6px 8px;
508
+ }
509
+ .single-post figcaption{
510
+ margin-top: -17px;
511
+ margin-left: -17px;
512
+ margin-right: -17px;
513
+ }
514
+ .amp-wp-byline amp-img {
515
+ display: none;
516
+ }
517
+
518
+ .amp-wp-author{
519
+ margin-right: 1px;
520
+ }
521
+ .amp-wp-meta, .amp-wp-meta a {
522
+ font-size: 13px;
523
+ color: #acacac;
524
+ margin: 20px 0px 45px 0px;
525
+ padding: 0;
526
+ }
527
+ .amp-ad-wrapper {
528
+ text-align: center
529
+ }
530
+ .the_content p{
531
+ margin-top: 0px;
532
+ margin-bottom: 30px;
533
+ }
534
+ .amp-wp-tax-tag{
535
+
536
+ }
537
+ main .amp-wp-content.featured-image-content {
538
+ padding: 0px;
539
+ border: 0;
540
+ margin-bottom: 0;
541
+ box-shadow: none
542
+ }
543
+ .archives_body main{ margin-top:30px }
544
+ /* Related Posts */
545
+ main .amp-wp-content.relatedpost {
546
+ background: none;
547
+ box-shadow: none;
548
+ padding:0px 0 0 0;
549
+ margin:1.8em auto 1.5em auto
550
+ }
551
+ .single-post .related_posts h3, .single-post .comments_list h3 {
552
+ font-size: 20px;
553
+ color: #777;
554
+ font-family:'Roboto Slab', serif;
555
+ border-bottom: 1px solid #eee;
556
+ font-weight: 400;
557
+ padding-bottom: 1px;
558
+ margin-bottom: 10px;
559
+ }
560
+
561
+ .related_posts ol{
562
+ list-style-type:none;
563
+ margin:0;
564
+ padding:0
565
+ }
566
+ .related_posts ol li{
567
+ display:inline-block;
568
+ width:100%;
569
+ margin-bottom: 12px;
570
+ padding: 0px;
571
+ }
572
+ .related_posts .related_link a{
573
+ color: #444;
574
+ font-size: 16px;
575
+ font-family: 'Roboto Slab', serif;
576
+ font-weight: 600;
577
+ }
578
+ .related_posts ol li amp-img{
579
+ width:100px;
580
+ float:left;
581
+ margin-right:15px
582
+ }
583
+ .related_posts ol li p{
584
+ font-size: 12px;
585
+ color: #999;
586
+ line-height: 1.2;
587
+ margin: 12px 0 0 0;
588
+ }
589
+ .no_related_thumbnail{
590
+ padding: 15px 18px;
591
+ }
592
+ .no_related_thumbnail .related_link{
593
+ margin: 16px 18px 20px 19px;
594
+ }
595
+ /* Comments */
596
+ .comment-body .comment-content{
597
+ font-family:'PT Serif', serif;
598
+ margin-top: 2px;
599
+ }
600
+ main .amp-wp-content.comments_list {
601
+ background: none;
602
+ box-shadow: none;
603
+ padding:0
604
+ }
605
+ .comments_list div{
606
+ display:inline-block;
607
+ }
608
+ .comments_list ul{
609
+ margin:0;
610
+ padding:0
611
+ }
612
+ .comments_list ul.children{
613
+ padding-bottom:10px;
614
+ margin-left: 3%;
615
+ width: 96%;
616
+ }
617
+ .comments_list ul li p{
618
+ margin:0;
619
+ font-size:16px;
620
+ clear:both;
621
+ padding-top:5px;
622
+ }
623
+ .comments_list ul li{
624
+ font-size: 12px;
625
+ list-style-type: none;
626
+ margin-bottom: 22px;
627
+ padding-bottom: 20px;
628
+ max-width: 1000px;
629
+ border-bottom: 1px solid #eee;
630
+ }
631
+ .comments_list ul ul li {
632
+ border-left: 2px solid #eee;
633
+ padding-left: 15px;
634
+ border-bottom: 0;
635
+ padding-bottom: 0px;
636
+ }
637
+ .comments_list ul li .comment-body .comment-author{
638
+ margin-right:5px
639
+ }
640
+ .comment-author{ float:left }
641
+ .single-post footer.comment-meta{
642
+ color:#666;
643
+ padding-bottom: 0;
644
+ }
645
+ .comment-metadata a{ color:#888 }
646
+ .comments_list li li{
647
+ margin: 20px 20px 10px 20px;
648
+ background: #f7f7f7;
649
+ box-shadow: none;
650
+ border: 1px solid #eee;
651
+ }
652
+ .comments_list li li li{
653
+ margin:20px 20px 10px 20px
654
+ }
655
+ /* ADS */
656
+ .amp_ad_1{
657
+ margin-top: 15px;
658
+ margin-bottom: 10px;
659
+ }
660
+ .single-post .amp_ad_1{
661
+ margin-bottom: -15px;
662
+ }
663
+ .amp-ad-2{ margin-bottom: -5px; margin-top: 20px; }
664
+ html .single-post .ampforwp-incontent-ad-1 {
665
+ margin-bottom: 10px;
666
+ }
667
+ .amp-ad-3{
668
+ margin-bottom:10px;
669
+ }
670
+ .amp-ad-4{
671
+ margin-top:2px;
672
+ }
673
+ /* Notifications */
674
+ #amp-user-notification1 p {
675
+ display: inline-block;
676
+ }
677
+ amp-user-notification {
678
+ padding: 5px;
679
+ text-align: center;
680
+ background: #fff;
681
+ border-top: 1px solid;
682
+ }
683
+ amp-user-notification button {
684
+ padding: 8px 10px;
685
+ background: #000;
686
+ color: #fff;
687
+ margin-left: 5px;
688
+ border: 0;
689
+ }
690
+ amp-user-notification button:hover {
691
+ cursor: pointer
692
+ }
693
+ .amp-wp-content blockquote {
694
+ background-color: #fff;
695
+ border-left: 3px solid;
696
+ margin: 0;
697
+ padding: 15px 20px;
698
+ background: #f3f3f3;
699
+ }
700
+ .amp-wp-content blockquote p{
701
+ margin-bottom:0
702
+ }
703
+ pre {
704
+ white-space: pre-wrap;
705
+ }
706
+
707
+
708
+ #designthree{
709
+ background-color: #FFF;
710
+ overflow: visible;
711
+ /* animation: closing .3s normal forwards ease-in-out,closingFix .6s normal forwards ease-in-out;
712
+ -webkit-transform-origin: right center;
713
+ transform-origin: right center;*/
714
+ }
715
+ /* Sidebar */
716
+ #sidebar[aria-hidden="false"]+#designthree {
717
+ max-height: 100vh;
718
+ overflow: hidden;
719
+ animation: opening .3s normal forwards ease-in-out;
720
+ -webkit-transform: translate3d(60%, 0, 0) scale(0.8);
721
+ transform: translate3d(60%, 0, 0) scale(0.8);
722
+ }
723
+ @keyframes opening {
724
+ 0% {
725
+ transform: translate3d(0, 0, 0) scale(1);
726
+ }
727
+ 100% {
728
+ transform: translate3d(60%, 0, 0) scale(0.8);
729
+ }
730
+ }
731
+
732
+ @keyframes closing {
733
+ 0% {
734
+ transform: translate3d(60%, 0, 0) scale(0.8);
735
+ }
736
+ 100% {
737
+ transform: translate3d(0, 0, 0) scale(1);
738
+ }
739
+ }
740
+
741
+ @keyframes closingFix {
742
+ 0% {
743
+ max-height: 100vh;
744
+ overflow: hidden;
745
+ }
746
+ 100% {
747
+ max-height: none;
748
+ overflow: visible;
749
+ }
750
+ }
751
+
752
+ .hamburgermenu{
753
+ float:left;
754
+ position:relative;
755
+ z-index: 9999;
756
+ }
757
+ .searchmenu{
758
+ margin-right: 15px;
759
+ margin-top: 11px;
760
+ position: absolute;
761
+ top: 0;
762
+ right: 0;
763
+ }
764
+ .searchmenu button{
765
+ background:transparent;
766
+ border:none
767
+ }
768
+ .headerlogo{
769
+ text-align:center
770
+ }
771
+ .headerlogo amp-img{
772
+ margin-top:6px
773
+ }
774
+ .headerlogo a{
775
+ color:#F42;
776
+ }
777
+ /*Navigation Menu*/
778
+ .toast {
779
+ display: block;
780
+ position: relative;
781
+ height: 50px;
782
+ padding-left: 20px;
783
+ padding-right: 15px;
784
+ width: 49px;
785
+ background:none;
786
+ border:0
787
+ }
788
+
789
+ .toast:after,
790
+ .toast:before,
791
+ .toast span {
792
+ position: absolute;
793
+ display: block;
794
+ width: 19px;
795
+ height: 2px;
796
+ border-radius: 2px;
797
+ background-color: #F42;
798
+ -webkit-transform: translate3d(0, 0, 0) rotate(0deg);
799
+ transform: translate3d(0, 0, 0) rotate(0deg);
800
+ }
801
+
802
+ .toast:after,
803
+ .toast:before {
804
+ content: '';
805
+ left: 20px;
806
+ -webkit-transition: all ease-in .4s;
807
+ transition: all ease-in .4s;
808
+ }
809
+
810
+ .toast span {
811
+ opacity: 1;
812
+ top: 24px;
813
+ -webkit-transition: all ease-in-out .4s;
814
+ transition: all ease-in-out .4s;
815
+ }
816
+
817
+ .toast:before {
818
+ top: 17px;
819
+ }
820
+
821
+ .toast:after {
822
+ top: 31px;
823
+ }
824
+
825
+ #sidebar[aria-hidden="false"]+#designthree .toast span {
826
+ opacity: 0;
827
+ -webkit-transform: translate3d(200%, 0, 0);
828
+ transform: translate3d(200%, 0, 0);
829
+ }
830
+
831
+ #sidebar[aria-hidden="false"]+#designthree .toast:before {
832
+ -webkit-transform-origin: left bottom;
833
+ transform-origin: left bottom;
834
+ -webkit-transform: rotate(43deg);
835
+ transform: rotate(43deg);
836
+ }
837
+
838
+ #sidebar[aria-hidden="false"]+#designthree .toast:after {
839
+ -webkit-transform-origin: left top;
840
+ transform-origin: left top;
841
+ -webkit-transform: rotate(-43deg);
842
+ transform: rotate(-43deg);
843
+ }
844
+
845
+ /* CSS3 icon */
846
+ [class*=icono-] {
847
+ display: inline-block;
848
+ vertical-align: middle;
849
+ position: relative;
850
+ font-style: normal;
851
+ color: #f42;
852
+ text-align: left;
853
+ text-indent: -9999px;
854
+ direction: ltr
855
+ }
856
+ [class*=icono-]:after, [class*=icono-]:before {
857
+ content: '';
858
+ pointer-events: none;
859
+ }
860
+ .icono-search {
861
+ -webkit-transform: translateX(-50%);
862
+ -ms-transform: translateX(-50%);
863
+ transform: translateX(-50%)
864
+ }
865
+ .icono-share {
866
+ height: 9px;
867
+ position: relative;
868
+ width: 9px;
869
+ color: #dadada;
870
+ border-radius: 50%;
871
+ box-shadow: inset 0 0 0 32px, 22px -11px 0 0, 22px 11px 0 0;
872
+ top: -15px;
873
+ margin-right: 35px;
874
+ }
875
+ .icono-share:after, .icono-share:before {
876
+ position: absolute;
877
+ width: 24px;
878
+ height: 1px;
879
+ box-shadow: inset 0 0 0 32px;
880
+ left: 0;
881
+ }
882
+ .icono-share:before {
883
+ top: 0px;
884
+ -webkit-transform: rotate(-25deg);
885
+ -ms-transform: rotate(-25deg);
886
+ transform: rotate(-25deg);
887
+ }
888
+ .icono-share:after {
889
+ top: 8px;
890
+ -webkit-transform: rotate(25deg);
891
+ -ms-transform: rotate(25deg);
892
+ transform: rotate(25deg);
893
+ }
894
+ .icono-search {
895
+ border: 1px solid;
896
+ width: 10px;
897
+ height: 10px;
898
+ border-radius: 50%;
899
+ -webkit-transform: rotate(45deg);
900
+ -ms-transform: rotate(45deg);
901
+ transform: rotate(45deg);
902
+ margin: 4px 4px 8px 8px;
903
+ }
904
+ .icono-search:before{
905
+ position: absolute;
906
+ left: 50%;
907
+ -webkit-transform: rotate(270deg);
908
+ -ms-transform: rotate(270deg);
909
+ transform: rotate(270deg);
910
+ width: 2px;
911
+ height: 9px;
912
+ box-shadow: inset 0 0 0 32px;
913
+ top: 0px;
914
+ border-radius: 0 0 1px 1px;
915
+ left: 14px;
916
+ }
917
+ .closebutton{
918
+ background: transparent;
919
+ border: 0;
920
+ color: rgba(255, 255, 255, 0.7);
921
+ border: 1px solid rgba(255, 255, 255, 0.7);
922
+ border-radius: 30px;
923
+ width: 32px;
924
+ height: 32px;
925
+ font-size: 12px;
926
+ text-align: center;
927
+ position: absolute;
928
+ top: 12px;
929
+ right: 20px;
930
+ outline:none
931
+ }
932
+ amp-lightbox{
933
+ background: rgba(0, 0, 0,0.85);
934
+ }
935
+ .searchform label{
936
+ color: #f7f7f7;
937
+ display: block;
938
+ font-size: 10px;
939
+ letter-spacing: 0.3px;
940
+ line-height: 0;
941
+ opacity:0.6
942
+ }
943
+ .searchform{
944
+ background: transparent;
945
+ left: 20%;
946
+ position: absolute;
947
+ top: 35%;
948
+ width: 60%;
949
+ max-width: 100%;
950
+ transition-delay: 0.5s;
951
+ }
952
+ .searchform input{
953
+ background: transparent;
954
+ border: 1px solid #666;
955
+ color: #f7f7f7;
956
+ font-size: 14px;
957
+ font-weight: 400;
958
+ line-height: 1;
959
+ letter-spacing: 0.3px;
960
+ text-transform: capitalize;
961
+ padding: 20px 0px 20px 30px;
962
+ margin-top: 15px;
963
+ width: 100%;
964
+ }
965
+ #searchsubmit{display:none}
966
+
967
+ /* AMP carousel */
968
+ .amp-carousel-button-prev,
969
+ .amp-carousel-button-next{
970
+ top:30px;border-radius:60px;
971
+ }
972
+ .amp-featured-wrapper{
973
+ background:#333
974
+ }
975
+ .amp-featured-area{
976
+ margin: 0 auto;
977
+ max-width: 450px;
978
+ max-height: 270px;
979
+ }
980
+ .amp-carousel-slide h1 {
981
+ font-size: 30px;
982
+ font-family: 'PT Serif', serif;
983
+ margin: 0;
984
+ font-weight: normal;
985
+ line-height: 38px;
986
+ color: #fff;
987
+ padding: 10px 20px 20px 20px;
988
+ }
989
+ .amp-carousel-slide amp-img:before{
990
+ z-index:100;
991
+ bottom: 0;
992
+ content: "";
993
+ display: block;
994
+ height: 100%;
995
+ position: absolute;
996
+ width: 100%;
997
+ background: -webkit-gradient(linear, 50% 0%, 50% 75%, color-stop(0%, rgba(0,0,0,0)), color-stop(150%, #000000)) repeat scroll 0 0 rgba(0,0,0,0.2);
998
+ background: -webkit-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0);
999
+ background: -moz-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0);
1000
+ background: -o-linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0);
1001
+ background: linear-gradient(rgba(0,0,0,0),#000000 75%) repeat scroll 0 0 rgba(0,0,0,0);
1002
+ }
1003
+ .featured_title{
1004
+ position:absolute;
1005
+ z-index:110;
1006
+ bottom:0
1007
+ }
1008
+ .featured_time{
1009
+ font-size: 12px;
1010
+ color: #fff;
1011
+ opacity: 0.8;
1012
+ padding-left: 20px;
1013
+ }
1014
+ .featured_meta{
1015
+ color:#acacac;
1016
+ font-size:12px;
1017
+ margin:0 15px;
1018
+ }
1019
+ .featured_meta_left{
1020
+ float:left
1021
+ }
1022
+ .featured_meta_right{
1023
+ float:right
1024
+ }
1025
+
1026
+
1027
+ /* Responsive */
1028
+
1029
+ @media screen and (min-width:1034px){
1030
+ .single-post figcaption{
1031
+ margin: -17px 17px 0 -17px;
1032
+ }
1033
+ }
1034
+ @media screen and (max-width: 768px) {
1035
+ .ampforwp-title{ margin-top: 30px; }
1036
+ .amp-wp-meta{ margin:10px 0px 15px 0px }
1037
+ .home-post_image{ width: 40%; }
1038
+ .amp-loop-list .amp-wp-post-content{ width: 58%; }
1039
+ .amp-loop-list .featured_time{line-height:1}
1040
+ .single-post main .amp-wp-content h1{ line-height:1.4; font-size: 30px;}
1041
+ }
1042
+
1043
+ @media screen and (max-width: 600px) {
1044
+ .amp-loop-list .amp-wp-tags{display:none}
1045
+ }
1046
+ @media screen and (max-width: 530px) {
1047
+ .home-post_image{ width: 35%; }
1048
+ .amp-loop-list .amp-wp-post-content{ width: 63%; }
1049
+ .amp-wp-post-content p{ font-size: 12px; }
1050
+ .related_posts ol li p{
1051
+ line-height: 1.6;
1052
+ margin: 7px 0 0 0;
1053
+ }
1054
+ .comments_list ul li .comment-body{
1055
+ width:auto
1056
+ }
1057
+ }
1058
+ @media screen and (max-width: 425px) {
1059
+ .home-post_image{
1060
+ /* width: 125px;*/
1061
+ width: 31.6%;
1062
+ overflow: hidden;
1063
+ height: 100px;
1064
+ /* margin-right: 13px; */
1065
+ margin-right: 3%;
1066
+ }
1067
+ .home-post_image amp-img{ width: 144%;
1068
+ left: -20%; }
1069
+
1070
+ h2.amp-wp-title{ margin-bottom: 7px; line-height: 1.31578947; font-size: 19px;
1071
+ position:relative;top:-3px }
1072
+
1073
+ h2.amp-wp-title a{ color:#262626}
1074
+ .amp-loop-list{padding:25px 15px 22px 15px}
1075
+ .amp-loop-list .amp-wp-post-content{ width: 63%; }
1076
+ .amp-loop-list .amp-wp-post-content p,
1077
+ .related_posts .related_link p{
1078
+ display:none
1079
+ }
1080
+ .related_posts .related_link a{
1081
+ font-size: 18px;
1082
+ line-height: 1.7;
1083
+ }
1084
+ .ampforwp-tax-category{
1085
+ padding-bottom:0
1086
+ }
1087
+ .amp-wp-byline{
1088
+ padding:0
1089
+ }
1090
+ .related_posts .related_link a {
1091
+ font-size: 17px;
1092
+ line-height: 1.5;
1093
+ }
1094
+ .ampforwp-title{ margin-top: 24px; }
1095
+ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 26px;}
1096
+ .icono-share{display:none}
1097
+ .ampforwp-social-icons amp-social-share{ margin-right: 3px;}
1098
+ main .amp-wp-content{ font-size: 16px; line-height: 26px;}
1099
+ .single-post .amp_author_area .amp_author_area_wrapper{font-size:13px;}
1100
+ }
1101
+ @media screen and (max-width: 400px) {
1102
+ .amp-wp-title{
1103
+ font-size: 19px;
1104
+ }
1105
+ }
1106
+ @media screen and (max-width: 375px) {
1107
+ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 24px;}
1108
+ .home-post_image{ height: 79px; }
1109
+ .amp-carousel-slide h1{
1110
+ font-size: 28px;
1111
+ line-height: 32px;
1112
+ }
1113
+ #pagination .next a, #pagination .prev a{
1114
+ color: #666;
1115
+ font-size: 14px;
1116
+ padding: 15px 0px;
1117
+ margin-top: -5px;
1118
+ }
1119
+ .related_posts h3, .comments_list h3{
1120
+ margin-top:15px;
1121
+ }
1122
+ #pagination .next{
1123
+ margin-bottom:15px;
1124
+ }
1125
+ .related_posts .related_link a {
1126
+ font-size: 15px;
1127
+ line-height: 1.6;
1128
+ }
1129
+ }
1130
+ @media screen and (max-width: 340px) {
1131
+ .single-post main .amp-wp-content h1{ line-height: 1.3; font-size: 22px;}
1132
+ .amp-loop-list {
1133
+ padding: 20px 15px 18px 15px;
1134
+ }
1135
+ h2.amp-wp-title{
1136
+ line-height: 1.31578947;
1137
+ font-size: 17px;
1138
+ }
1139
+ .related_posts .related_link a {
1140
+ font-size: 15px;
1141
+ }
1142
+ .the_content .amp-ad-wrapper{
1143
+ text-align: center;
1144
+ margin-left: -13px;
1145
+ }
1146
+ }
1147
+ @media screen and (max-width: 320px) {
1148
+ .related_posts .related_link a {
1149
+ font-size: 13px;
1150
+ }
1151
+ .ampforwp-social-icons amp-social-share{ margin-right: 1px; }
1152
+
1153
+ }
1154
+
1155
+ <?php if($redux_builder_amp['amp-rtl-select-option'] == true) { ?>
1156
+ /* RTL Start */
1157
+ /* RTL End */
1158
+ <?php } ?>
1159
+
1160
+ /* Style Modifer */
1161
+ <?php $color = $redux_builder_amp['opt-color-rgba']['color']; ?>
1162
+ a {
1163
+ color: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
1164
+ }
1165
+ .amp-wp-content blockquote{
1166
+ border-color:<?php echo sanitize_hex_color( $header_background_color ); ?>;;
1167
+ }
1168
+ .nav_container, .comment-button-wrapper a {
1169
+ background: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
1170
+ }
1171
+ .nav_container a{
1172
+ color:<?php echo sanitize_hex_color( $header_color ); ?>
1173
+ }
1174
+ amp-user-notification {
1175
+ border-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
1176
+ }
1177
+ amp-user-notification button {
1178
+ background-color: <?php echo sanitize_hex_color( $header_background_color ); ?>;;
1179
+ }
1180
+ <?php if( $redux_builder_amp['enable-single-social-icons'] == true ) { ?>
1181
+ .single-post footer {
1182
+ padding-bottom: 41px;
1183
+ }
1184
+ <?php } ?>
1185
+ /**/
1186
+ .single-post amp-img.alignleft{
1187
+ margin-right: 15px;
1188
+ margin-bottom:5px;
1189
+ float: left;
1190
+ }
1191
+ .single-post amp-img.alignright{
1192
+ float:right;
1193
+ margin-left: 15px;
1194
+ margin-bottom:5px;
1195
+ }
1196
+ .single-post amp-img.aligncenter{
1197
+ text-align:center;
1198
+ margin: 0 auto
1199
+ }
1200
+ .amp-wp-author:before{
1201
+ content: " <?php global $redux_builder_amp; echo $redux_builder_amp['amp-translator-published-by']; ?> ";
1202
+ }
1203
+ .ampforwp-tax-category span:last-child:after {
1204
+ content: ' ';
1205
+ }
1206
+ .ampforwp-tax-category span:after{
1207
+ content: ', ';
1208
+ }
1209
+
1210
+ .amp-wp-article-content img {
1211
+ max-width: 100%;
1212
+ }
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+ /* Social icons */
1220
+ @font-face {
1221
+ font-family: 'icomoon';
1222
+ src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot?b9qrme');
1223
+ src: url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.eot?b9qrme#iefix') format('embedded-opentype'),
1224
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.ttf?b9qrme') format('truetype'),
1225
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.woff?b9qrme') format('woff'),
1226
+ url('<?php echo plugin_dir_url(__FILE__) ?>fonts/icomoon.svg?b9qrme#icomoon') format('svg');
1227
+ font-weight: normal;
1228
+ font-style: normal;
1229
+ }
1230
+
1231
+ [class^="icon-"], [class*=" icon-"] {
1232
+ font-family: 'icomoon';
1233
+ speak: none;
1234
+ font-style: normal;
1235
+ font-weight: normal;
1236
+ font-variant: normal;
1237
+ text-transform: none;
1238
+ line-height: 1;
1239
+
1240
+ /* Better Font Rendering =========== */
1241
+ -webkit-font-smoothing: antialiased;
1242
+ -moz-osx-font-smoothing: grayscale;
1243
+ }
1244
+
1245
+ .icon-twitter:before {
1246
+ content: "\f099";background:#1da1f2
1247
+ }
1248
+ .icon-facebook:before {
1249
+ content: "\f09a";background:#3b5998
1250
+ }
1251
+ .icon-facebook-f:before {
1252
+ content: "\f09a";background:#3b5998
1253
+ }
1254
+ .icon-pinterest:before {
1255
+ content: "\f0d2";background:#bd081c
1256
+ }
1257
+ .icon-google-plus:before {
1258
+ content: "\f0d5";background:#dd4b39
1259
+ }
1260
+ .icon-linkedin:before {
1261
+ content: "\f0e1";background:#0077b5
1262
+ }
1263
+ .icon-youtube-play:before {
1264
+ content: "\f16a";background:#cd201f
1265
+ }
1266
+ .icon-instagram:before {
1267
+ content: "\f16d";background:#c13584
1268
+ }
1269
+ .icon-tumblr:before {
1270
+ content: "\f173";background:#35465c
1271
+ }
1272
+ .icon-vk:before {
1273
+ content: "\f189";background:#45668e
1274
+ }
1275
+ .icon-whatsapp:before {
1276
+ content: "\f232";background:#075e54
1277
+ }
1278
+ .icon-reddit-alien:before {
1279
+ content: "\f281";background:#ff4500
1280
+ }
1281
+ .icon-snapchat-ghost:before {
1282
+ content: "\f2ac"; background:#fffc00
1283
+ }
1284
+ .social_icons{
1285
+ font-size: 15px;
1286
+ display: inline-block;
1287
+ }
1288
+ .social_icons ul{
1289
+ list-style-type:none;
1290
+ padding:0;margin:0;
1291
+ text-align:center
1292
+ }
1293
+ .social_icons li{
1294
+ display:inline-block;
1295
+ margin:5px;
1296
+ }
1297
+ .social_icons li:before{
1298
+ color:#fff;
1299
+ padding: 10px;
1300
+ display: inline-block;
1301
+ border-radius: 70px;
1302
+ width: 18px;
1303
+ height: 18px;
1304
+ line-height: 20px;
1305
+ text-align: center;
1306
+ }
1307
+ #ampsomething { display: none; }
1308
+ #header{ background:<?php echo $redux_builder_amp['amp-opt-color-rgba-headercolor']['color']; ?> }
1309
+ .nav_container, .comment-button-wrapper a , #pagination .next a, #pagination .prev a, .toast:after, .toast:before, .toast span{
1310
+ background: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?> ;
1311
+ }
1312
+ .headerlogo a, [class*=icono-]{ color: <?php echo $redux_builder_amp['amp-opt-color-rgba-colorscheme']['color']; ?> }
1313
+ #pagination .next a, #pagination .prev a , #pagination .next a, #pagination .prev a , .comment-button-wrapper a {
1314
+ color: <?php echo $redux_builder_amp['amp-opt-color-rgba-font']['color']; ?> ;
1315
+ }
1316
+ <?php if( !has_nav_menu( 'amp-menu' ) ) { ?>
1317
+ .toggle-navigationv2 .social_icons {
1318
+ border-top: 0px;
1319
+ }
1320
+ .toggle-navigationv2 a {
1321
+ color:#fff;
1322
+ }
1323
+ <?php } ?>
1324
+ /* Custom Style Code */
1325
+ <?php echo $redux_builder_amp['css_editor'];
1326
+ } ?>
templates/features.php CHANGED
@@ -43,6 +43,10 @@
43
  33. Google tag manager support added
44
  34. social share boost compatibility Ticket #387
45
  35. Disqus Comments Support
 
 
 
 
46
  */
47
  // Adding AMP-related things to the main theme
48
  global $redux_builder_amp;
@@ -144,7 +148,12 @@
144
  $amp_url = $new_url . $impode_url ;
145
  }
146
 
147
- if( $supported_amp_post_types ) {
 
 
 
 
 
148
  printf( '<link rel="amphtml" href="%s" />', esc_url( $amp_url ) );
149
  }
150
 
@@ -190,6 +199,13 @@
190
  $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/archive.php';
191
  }
192
 
 
 
 
 
 
 
 
193
  // Custom Single file
194
  if ( is_single() || is_page() ) {
195
 
@@ -355,6 +371,10 @@
355
 
356
  // Above Footer Global
357
  add_action('amp_post_template_footer','ampforwp_footer_advert',8);
 
 
 
 
358
 
359
  function ampforwp_footer_advert() {
360
  global $redux_builder_amp;
@@ -877,7 +897,7 @@ add_action( 'template_redirect', 'ampforwp_remove_print_scripts' );
877
 
878
  // 19. Remove Canonical tags
879
  function ampforwp_amp_remove_actions() {
880
- if ( is_home() || is_front_page() || is_archive() ) {
881
  remove_action( 'amp_post_template_head', 'amp_post_template_add_canonical' );
882
  }
883
  }
@@ -1165,7 +1185,7 @@ add_action('amp_init','social_sharing_removal_code', 9);
1165
 
1166
 
1167
  //35. Disqus Comments Support
1168
- add_action('ampforwp_post_after_design_elements','ampforwp_add_disqus_support');
1169
  function ampforwp_add_disqus_support() {
1170
 
1171
  global $redux_builder_amp;
@@ -1181,7 +1201,7 @@ function ampforwp_add_disqus_support() {
1181
 
1182
  $disqus_url = $disqus_script_host_url.'?disqus_title='.$post_slug.'&url='.get_permalink().'&disqus_name='. esc_url( $redux_builder_amp['ampforwp-disqus-comments-name'] ) ."/embed.js" ;
1183
  ?>
1184
- <section class="post-comments amp-wp-article-content amp-disqus-comments" id="comments">
1185
  <amp-iframe
1186
  height="350"
1187
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
@@ -1203,10 +1223,43 @@ function ampforwp_add_disqus_scripts( $data ) {
1203
  return $data;
1204
  }
1205
 
1206
- //ref https://ethitter.com/2013/07/disable-jetpacks-photon-module-in-specific-situations/
1207
- add_action('amp_init','ampforwp_photon_remove');
1208
- function ampforwp_photon_remove(){
1209
- if ( class_exists( 'Jetpack_Photon' ) ) {
1210
- $photon_removed = remove_filter( 'image_downsize', array( Jetpack_Photon::instance(), 'filter_image_downsize' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1211
  }
 
 
 
 
 
 
 
 
 
 
 
 
1212
  }
43
  33. Google tag manager support added
44
  34. social share boost compatibility Ticket #387
45
  35. Disqus Comments Support
46
+ 36. remove photon support in AMP
47
+ 37. compatibility with wp-html-compression
48
+ 38. Extra Design Specific Features
49
+ 39. #529 editable archives
50
  */
51
  // Adding AMP-related things to the main theme
52
  global $redux_builder_amp;
148
  $amp_url = $new_url . $impode_url ;
149
  }
150
 
151
+ if( is_search() ) {
152
+ $current_search_url =trailingslashit(get_home_url())."?amp=1&s=".get_search_query();
153
+ $amp_url = untrailingslashit($current_search_url);
154
+ }
155
+
156
+ if( $supported_amp_post_types) {
157
  printf( '<link rel="amphtml" href="%s" />', esc_url( $amp_url ) );
158
  }
159
 
199
  $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/archive.php';
200
  }
201
 
202
+ if ( $redux_builder_amp['amp-design-selector'] == 3) {
203
+ if ( is_search() && $redux_builder_amp['amp-design-3-search-feature'] ) {
204
+
205
+ $file = AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/search.php';
206
+ }
207
+ }
208
+
209
  // Custom Single file
210
  if ( is_single() || is_page() ) {
211
 
371
 
372
  // Above Footer Global
373
  add_action('amp_post_template_footer','ampforwp_footer_advert',8);
374
+ add_action('amp_post_template_above_footer','ampforwp_footer_advert',10);
375
+ if ( $redux_builder_amp['amp-design-selector'] == 3) {
376
+ remove_action('amp_post_template_footer','ampforwp_footer_advert',8);
377
+ }
378
 
379
  function ampforwp_footer_advert() {
380
  global $redux_builder_amp;
897
 
898
  // 19. Remove Canonical tags
899
  function ampforwp_amp_remove_actions() {
900
+ if ( is_home() || is_front_page() || is_archive() || is_search() ) {
901
  remove_action( 'amp_post_template_head', 'amp_post_template_add_canonical' );
902
  }
903
  }
1185
 
1186
 
1187
  //35. Disqus Comments Support
1188
+ add_action('ampforwp_post_after_design_elements','ampforwp_add_disqus_support');
1189
  function ampforwp_add_disqus_support() {
1190
 
1191
  global $redux_builder_amp;
1201
 
1202
  $disqus_url = $disqus_script_host_url.'?disqus_title='.$post_slug.'&url='.get_permalink().'&disqus_name='. esc_url( $redux_builder_amp['ampforwp-disqus-comments-name'] ) ."/embed.js" ;
1203
  ?>
1204
+ <section class="amp-wp-content post-comments amp-wp-article-content amp-disqus-comments" id="comments">
1205
  <amp-iframe
1206
  height="350"
1207
  sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"
1223
  return $data;
1224
  }
1225
 
1226
+ //36. remove photon support in AMP
1227
+ //add_action('amp_init','ampforwp_photon_remove');
1228
+ //function ampforwp_photon_remove(){
1229
+ // if ( class_exists( 'Jetpack' ) ) {
1230
+ // add_filter( 'jetpack_photon_development_mode', 'ampforwp_diable_photon' );
1231
+ // }
1232
+ //}
1233
+ //
1234
+ //function ampforwp_diable_photon() {
1235
+ // return true;
1236
+ //}
1237
+
1238
+ //37. compatibility with wp-html-compression
1239
+ function ampforwp_copat_wp_html_compression() {
1240
+ remove_action('template_redirect', 'wp_html_compression_start', -1);
1241
+ remove_action('get_header', 'wp_html_compression_start');
1242
+ }
1243
+ add_action('amp_init','ampforwp_copat_wp_html_compression');
1244
+
1245
+ //38. Extra Design Specific Features
1246
+ add_action('pre_amp_render_post','ampforwp_add_extra_functions',12);
1247
+ function ampforwp_add_extra_functions(){
1248
+ global $redux_builder_amp;
1249
+ if ( $redux_builder_amp['amp-design-selector'] == 3) {
1250
+
1251
+ require AMPFORWP_PLUGIN_DIR . '/templates/design-manager/design-'. ampforwp_design_selector() .'/functions.php';
1252
  }
1253
+ }
1254
+
1255
+ //39. #529 editable archives
1256
+ add_filter( 'get_the_archive_title', 'ampforwp_editable_archvies_title' );
1257
+ function ampforwp_editable_archvies_title($title) {
1258
+ global $redux_builder_amp;
1259
+ if ( is_category() ) {
1260
+ $title = single_cat_title( $redux_builder_amp['amp-translator-archive-cat-text'], false );
1261
+ } elseif ( is_tag() ) {
1262
+ $title = single_tag_title( $redux_builder_amp['amp-translator-archive-tag-text'], false );
1263
+ }
1264
+ return $title;
1265
  }