AMP for WP – Accelerated Mobile Pages - Version 0.7.6

Version Description

  • Google Adsense Support Added with AMP-Ad
  • Wrong Homepage rel amphtml bug fixed
Download this release

Release Info

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

Code changes from version 0.7.5 to 0.7.6

Files changed (27) hide show
  1. README.md +9 -4
  2. accelerated-moblie-pages.php +13 -4
  3. options/options-init.php +212 -13
  4. options/redux-framework/assets/css/redux-admin.css +34 -0
  5. options/redux-framework/inc/fields/image_select/field_image_select.css +1 -0
  6. options/redux-framework/inc/fields/image_select/field_image_select.js +119 -0
  7. options/redux-framework/inc/fields/image_select/field_image_select.min.js +1 -0
  8. options/redux-framework/inc/fields/image_select/field_image_select.php +274 -0
  9. options/redux-framework/inc/fields/image_select/field_image_select.scss +62 -0
  10. options/redux-framework/inc/fields/select/elusive-icons.php +312 -0
  11. options/redux-framework/inc/fields/select/field_select.css +1 -0
  12. options/redux-framework/inc/fields/select/field_select.js +87 -0
  13. options/redux-framework/inc/fields/select/field_select.min.js +1 -0
  14. options/redux-framework/inc/fields/select/field_select.php +180 -0
  15. options/redux-framework/inc/fields/select/field_select.scss +9 -0
  16. options/redux-framework/inc/fields/switch/field_switch.css +1 -0
  17. options/redux-framework/inc/fields/switch/field_switch.js +91 -0
  18. options/redux-framework/inc/fields/switch/field_switch.min.js +1 -0
  19. options/redux-framework/inc/fields/switch/field_switch.php +79 -0
  20. options/redux-framework/inc/fields/switch/field_switch.scss +68 -0
  21. options/redux-framework/inc/fields/switch/slider-control.png +0 -0
  22. options/redux-framework/inc/fields/switch/switch.gif +0 -0
  23. readme.txt +9 -4
  24. themes/default/footer.php +20 -0
  25. themes/default/functions.php +9 -0
  26. themes/default/header.php +25 -3
  27. themes/default/single.php +45 -2
README.md CHANGED
@@ -4,10 +4,10 @@ https://wordpress.org/plugins/accelerated-mobile-pages/
4
 
5
  === AMP - Accelerated Mobile Pages ===
6
  Contributors: mohammed_kaludi, ahmedkaludi
7
- Tags: amp, accelerated mobile pages, mobile, amp project, google amp, amp wp
8
  Requires at least: 3.0
9
  Tested up to: 4.5.3
10
- Stable tag: 0.7.5
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -22,6 +22,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
22
  **Features:**
23
 
24
  * Automatically integrate AMP to your website
 
25
  * Google Analytics Support
26
  * User Friendly Theme Options Panel
27
  * Unlimited Color Scheme
@@ -35,7 +36,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
35
  * Great Support & Active Development
36
 
37
 
38
- **NOTE: Next Big Update of this plugin will be released on 7th September 2016.
39
 
40
 
41
  **How to test if AMP is working or not?**
@@ -133,4 +134,8 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
133
  * Color Scheme Feature Added
134
  * User friendly Options Panel Added
135
  * iFrame support Added
136
- * Few Minor Bugs Fixed
 
 
 
 
4
 
5
  === AMP - Accelerated Mobile Pages ===
6
  Contributors: mohammed_kaludi, ahmedkaludi
7
+ Tags: amp, accelerated mobile pages, mobile, amp project, google amp, amp wp, google
8
  Requires at least: 3.0
9
  Tested up to: 4.5.3
10
+ Stable tag: 0.7.6
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
22
  **Features:**
23
 
24
  * Automatically integrate AMP to your website
25
+ * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
26
  * Google Analytics Support
27
  * User Friendly Theme Options Panel
28
  * Unlimited Color Scheme
36
  * Great Support & Active Development
37
 
38
 
39
+ **NOTE: Next Big Update of this plugin will be released before 7th September 2016.
40
 
41
 
42
  **How to test if AMP is working or not?**
134
  * Color Scheme Feature Added
135
  * User friendly Options Panel Added
136
  * iFrame support Added
137
+ * Few Minor Bugs Fixed
138
+
139
+ = 0.7.6 =
140
+ * Google Adsense Support Added with AMP-Ad
141
+ * Wrong Homepage rel amphtml bug fixed
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: Accelerated Mobile Pages for WordPress
6
- Version: 0.7.5
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://AhmedKaludi.com/
9
  License: GPL2
@@ -31,12 +31,21 @@ if ( class_exists( 'Ampwp_core' ) ) {
31
  * Add "amphtml" in the main theme to target it to the AMP page
32
  */
33
 
34
- function add_rel_info() {
35
  $amp_url = trailingslashit( get_permalink() );
36
  ?>
37
- <link rel="amphtml" href="<?php echo $amp_url; ?>?amp" />
 
 
 
 
38
  <?php }
39
- add_action( 'wp_head', 'add_rel_info' );
 
 
 
 
 
40
 
41
 
42
  // Registering Custom AMP menu for this plugin
3
  Plugin Name: Accelerated Mobile Pages
4
  Plugin URI: https://wordpress.org/plugins/accelerated-mobile-pages/
5
  Description: Accelerated Mobile Pages for WordPress
6
+ Version: 0.7.6
7
  Author: Ahmed Kaludi, Mohammed Kaludi
8
  Author URI: http://AhmedKaludi.com/
9
  License: GPL2
31
  * Add "amphtml" in the main theme to target it to the AMP page
32
  */
33
 
34
+ function add_rel_info() {
35
  $amp_url = trailingslashit( get_permalink() );
36
  ?>
37
+
38
+ <?php // TO DO: Add support for archives, and other parts and stuff..
39
+ if ( is_home() ) { ?>
40
+ <link rel="amphtml" href="<?php echo get_home_url(); ?>?amp" />
41
+ <?php } else { ?><link rel="amphtml" href="<?php echo $amp_url; ?>?amp" />
42
  <?php }
43
+ }
44
+
45
+ // This is not the blog posts index
46
+ add_action( 'wp_head', 'add_rel_info' );
47
+
48
+
49
 
50
 
51
  // Registering Custom AMP menu for this plugin
options/options-init.php CHANGED
@@ -28,7 +28,7 @@
28
  'page_slug' => 'amp_options',
29
  'page_title' => 'Accelerated Mobile Pages Options',
30
  'update_notice' => false,
31
- 'intro_text' => '<a href="https://wordpress.org/support/plugin/accelerated-mobile-pages" target="_blank">Support Forum</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/faq/" target="_blank">FAQ</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/changelog/" target="_blank">Change Log</a> | <a href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages" target="_blank">Reviews</a>',
32
  'footer_text' => '',
33
  'admin_bar' => TRUE,
34
  'menu_type' => 'menu',
@@ -188,21 +188,33 @@
188
  'url' => true,
189
  'title' => __('Logo', 'redux-framework-demo'),
190
  //'desc' => __('', 'redux-framework-demo'),
191
- 'subtitle' => __('Upload a logo for the AMP version. Recommend logo size is: 190x36', 'redux-framework-demo'),
192
  // 'default' => array(
193
  // 'url'=>'http://s.wordpress.org/style/images/codeispoetry.png'
194
  // ),
195
- ),
196
- array(
197
- 'id' => 'ga-feild',
198
- 'type' => 'text',
199
- 'title' => __( 'Google Analytics', 'redux-framework-demo' ),
200
- 'subtitle' => __( '', 'redux-framework-demo' ),
201
- 'desc' => __( 'Enter your Google Analytics ID. Example: UA-XXXXX-Y.', 'redux-framework-demo' ),
202
- 'default' => 'UA-XXXXX-Y',
203
- ),
204
-
205
-
 
 
 
 
 
 
 
 
 
 
 
 
206
 
207
  array(
208
  'id' => 'opt-color-rgba',
@@ -246,6 +258,193 @@ array(
246
 
247
  ) );
248
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  Redux::setSection( $opt_name, array(
250
  'title' => __( 'Custom CSS Editor', 'redux-framework-demo' ),
251
  // 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
28
  'page_slug' => 'amp_options',
29
  'page_title' => 'Accelerated Mobile Pages Options',
30
  'update_notice' => false,
31
+ 'intro_text' => '<a href="https://wordpress.org/support/plugin/accelerated-mobile-pages" target="_blank">Need Help? Support Forum</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/faq/" target="_blank">FAQ</a> | <a href="https://wordpress.org/plugins/accelerated-mobile-pages/changelog/" target="_blank">Change Log</a> | <a href="https://wordpress.org/support/view/plugin-reviews/accelerated-mobile-pages" target="_blank">Reviews</a>',
32
  'footer_text' => '',
33
  'admin_bar' => TRUE,
34
  'menu_type' => 'menu',
188
  'url' => true,
189
  'title' => __('Logo', 'redux-framework-demo'),
190
  //'desc' => __('', 'redux-framework-demo'),
191
+ 'desc' => __('Upload a logo for the AMP version. Recommend logo size is: 190x36', 'redux-framework-demo'),
192
  // 'default' => array(
193
  // 'url'=>'http://s.wordpress.org/style/images/codeispoetry.png'
194
  // ),
195
+ ),
196
+
197
+ //$fields = array(
198
+ // 'id' => 'opt-switch',
199
+ // 'type' => 'switch',
200
+ // 'title' => __('Switch On', 'redux-framework-demo'),
201
+ // 'subtitle' => __('Look, it\'s on!', 'redux-framework-demo'),
202
+ // 'default' => true
203
+ //),
204
+
205
+
206
+ //
207
+ //
208
+ array(
209
+ 'id' => 'ga-feild',
210
+ 'type' => 'text',
211
+ 'title' => __( 'Google Analytics', 'redux-framework-demo' ),
212
+ 'subtitle' => __( '', 'redux-framework-demo' ),
213
+ 'desc' => __( 'Enter your Google Analytics ID. Example: UA-XXXXX-Y.', 'redux-framework-demo' ),
214
+ 'default' => 'UA-XXXXX-Y',
215
+ ),
216
+ //
217
+ //
218
 
219
  array(
220
  'id' => 'opt-color-rgba',
258
 
259
  ) );
260
 
261
+ // ADS SECTION
262
+ Redux::setSection( $opt_name, array(
263
+ 'title' => __( 'Advertisement', 'redux-framework-demo' ),
264
+ 'desc' => __( 'The First and Only plugin to be the Adsense AMP-AD compatible!'),
265
+ 'id' => 'amp-ads',
266
+ 'subsection' => true,
267
+ 'fields' => array(
268
+ array(
269
+ 'id'=>'enable-amp-ads-1',
270
+ 'type' => 'switch',
271
+ 'title' => __('AD #1', 'redux-framework-demo'),
272
+ "default" => 0,
273
+ 'subtitle' => __('Below the Header (SiteWide)', 'redux-framework-demo'),
274
+ 'true' => 'Enabled',
275
+ 'false' => 'Disabled',
276
+ ),
277
+
278
+ array(
279
+ 'id' => 'enable-amp-ads-select-1',
280
+ 'type' => 'select',
281
+ 'title' => __('AD Size', 'redux-framework-demo'),
282
+ 'required' => array('enable-amp-ads-1', '=' , '1'),
283
+ // Must provide key => value pairs for select options
284
+ 'options' => array(
285
+ '1' => '300x250',
286
+ '2' => '336x280',
287
+ '3' => '728x90',
288
+ '4' => '300x600',
289
+ '5' => '320x100'
290
+ ),
291
+ 'default' => '2',
292
+ ),
293
+
294
+ array(
295
+ 'id'=>'enable-amp-ads-text-feild-client-1',
296
+ 'type' => 'text',
297
+ 'required' => array('enable-amp-ads-1', '=' , '1'),
298
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
299
+ 'desc'=> __('Enter the Data Ad Client (data-ad-client) from the adsense ad code. e.g. ca-pub-2005682797531342', 'redux-framework-demo'),
300
+ 'default' => ''
301
+ ),
302
+ array(
303
+ 'id' => 'enable-amp-ads-text-feild-slot-1',
304
+ 'type' => 'text',
305
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
306
+ 'desc'=> __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. e.g. 7046626912', 'redux-framework-demo'),
307
+ 'default' => '',
308
+ 'required' => array('enable-amp-ads-1', '=' , '1'),
309
+ ),
310
+
311
+ //2 ad start
312
+ array(
313
+ 'id'=>'enable-amp-ads-2',
314
+ 'type' => 'switch',
315
+ 'title' => __('AD #2', 'redux-framework-demo'),
316
+ "default" => 0,
317
+ 'subtitle' => __('Below the Post title (Single Post)', 'redux-framework-demo'),
318
+ 'true' => 'Enabled',
319
+ 'false' => 'Disabled',
320
+ ),
321
+
322
+ array(
323
+ 'id' => 'enable-amp-ads-select-2',
324
+ 'type' => 'select',
325
+ 'title' => __('AD Size', 'redux-framework-demo'),
326
+ 'required' => array('enable-amp-ads-2', '=' , '1'),
327
+ // Must provide key => value pairs for select options
328
+ 'options' => array(
329
+ '1' => '300x250',
330
+ '2' => '336x280',
331
+ '3' => '728x90',
332
+ '4' => '300x600',
333
+ '5' => '320x100'
334
+ ),
335
+ 'default' => '2',
336
+ ),
337
+
338
+ array(
339
+ 'id'=>'enable-amp-ads-text-feild-client-2',
340
+ 'type' => 'text',
341
+ 'required' => array('enable-amp-ads-2', '=' , '1'),
342
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
343
+ 'desc'=> __('Enter the Data Ad Client (data-ad-client) from the adsense ad code. e.g. ca-pub-2005682797531342', 'redux-framework-demo'),
344
+ 'default' => ''
345
+ ),
346
+ array(
347
+ 'id' => 'enable-amp-ads-text-feild-slot-2',
348
+ 'type' => 'text',
349
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
350
+ 'desc'=> __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. e.g. 7046626912', 'redux-framework-demo'),
351
+ 'default' => '',
352
+ 'required' => array('enable-amp-ads-2', '=' , '1'),
353
+ ),
354
+ // 2 ad end
355
+ //3 ad start
356
+ array(
357
+ 'id'=>'enable-amp-ads-3',
358
+ 'type' => 'switch',
359
+ 'title' => __('AD #3', 'redux-framework-demo'),
360
+ "default" => 0,
361
+ 'subtitle' => __('Below the Post Content (Single Post)', 'redux-framework-demo'),
362
+ 'true' => 'Enabled',
363
+ 'false' => 'Disabled',
364
+ ),
365
+
366
+ array(
367
+ 'id' => 'enable-amp-ads-select-3',
368
+ 'type' => 'select',
369
+ 'title' => __('AD Size', 'redux-framework-demo'),
370
+ 'required' => array('enable-amp-ads-3', '=' , '1'),
371
+ // Must provide key => value pairs for select options
372
+ 'options' => array(
373
+ '1' => '300x250',
374
+ '2' => '336x280',
375
+ '3' => '728x90',
376
+ '4' => '300x600',
377
+ '5' => '320x100'
378
+ ),
379
+ 'default' => '2',
380
+ ),
381
+
382
+ array(
383
+ 'id'=>'enable-amp-ads-text-feild-client-3',
384
+ 'type' => 'text',
385
+ 'required' => array('enable-amp-ads-3', '=' , '1'),
386
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
387
+ 'desc'=> __('Enter the Data Ad Client (data-ad-client) from the adsense ad code. e.g. ca-pub-2005682797531342', 'redux-framework-demo'),
388
+ 'default' => ''
389
+ ),
390
+ array(
391
+ 'id' => 'enable-amp-ads-text-feild-slot-3',
392
+ 'type' => 'text',
393
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
394
+ 'desc'=> __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. e.g. 7046626912', 'redux-framework-demo'),
395
+ 'default' => '',
396
+ 'required' => array('enable-amp-ads-3', '=' , '1'),
397
+ ),
398
+ // 3 ad end
399
+ //4 ad start
400
+ array(
401
+ 'id'=>'enable-amp-ads-4',
402
+ 'type' => 'switch',
403
+ 'title' => __('AD #4', 'redux-framework-demo'),
404
+ "default" => 0,
405
+ 'subtitle' => __('Below the Footer (SiteWide)', 'redux-framework-demo'),
406
+ 'true' => 'Enabled',
407
+ 'false' => 'Disabled',
408
+ ),
409
+
410
+ array(
411
+ 'id' => 'enable-amp-ads-select-4',
412
+ 'type' => 'select',
413
+ 'title' => __('AD Size', 'redux-framework-demo'),
414
+ 'required' => array('enable-amp-ads-4', '=' , '1'),
415
+ // Must provide key => value pairs for select options
416
+ 'options' => array(
417
+ '1' => '300x250',
418
+ '2' => '336x280',
419
+ '3' => '728x90',
420
+ '4' => '300x600',
421
+ '5' => '320x100'
422
+ ),
423
+ 'default' => '2',
424
+ ),
425
+
426
+ array(
427
+ 'id'=>'enable-amp-ads-text-feild-client-4',
428
+ 'type' => 'text',
429
+ 'required' => array('enable-amp-ads-4', '=' , '1'),
430
+ 'title' => __('Data AD Client', 'redux-framework-demo'),
431
+ 'desc'=> __('Enter the Data Ad Client (data-ad-client) from the adsense ad code. e.g. ca-pub-2005682797531342', 'redux-framework-demo'),
432
+ 'default' => ''
433
+ ),
434
+ array(
435
+ 'id' => 'enable-amp-ads-text-feild-slot-4',
436
+ 'type' => 'text',
437
+ 'title' => __('Data AD Slot', 'redux-framework-demo'),
438
+ 'desc'=> __('Enter the Data Ad Slot (data-ad-slot) from the adsense ad code. e.g. 7046626912', 'redux-framework-demo'),
439
+ 'default' => '',
440
+ 'required' => array('enable-amp-ads-4', '=' , '1'),
441
+ )
442
+ // 3 ad end
443
+ ),
444
+
445
+ ) );
446
+
447
+ // CSS
448
  Redux::setSection( $opt_name, array(
449
  'title' => __( 'Custom CSS Editor', 'redux-framework-demo' ),
450
  // 'desc' => __( 'For full documentation on this field, visit: ', 'redux-framework-demo' ) . '<a href="http://docs.reduxframework.com/core/fields/textarea/" target="_blank">http://docs.reduxframework.com/core/fields/textarea/</a>',
options/redux-framework/assets/css/redux-admin.css CHANGED
@@ -105,4 +105,38 @@
105
  color: #666;
106
  margin-bottom: 5px;
107
  margin-top: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  }
105
  color: #666;
106
  margin-bottom: 5px;
107
  margin-top: 5px;
108
+ }
109
+ .redux-container-switch .cb-enable{
110
+ border-radius: 20px 0px 0px 20px !important;
111
+ padding: 5px 13px 5px 15px !important
112
+
113
+ }
114
+ .redux-container-switch .cb-disable{
115
+ border-radius: 0px 20px 20px 0px !important;
116
+ padding: 5px 17px 5px 10px !important;
117
+ }
118
+ .admin-color-fresh .redux-container-switch .cb-disable, .admin-color-fresh .redux-container-switch .cb-enable, .admin-color-fresh .ui-state-default, .admin-color-fresh .ui-widget-content .ui-state-default, .admin-color-fresh .ui-widget-header .ui-state-default, .wp-customizer .redux-container-switch .cb-disable, .wp-customizer .redux-container-switch .cb-enable, .wp-customizer .ui-state-default, .wp-customizer .ui-widget-content .ui-state-default, .wp-customizer .ui-widget-header .ui-state-default{
119
+ border: 0;
120
+ background: #f2f2f2 !important;
121
+ color: #777;
122
+ }
123
+ .redux-container-switch .switch-options{
124
+ text-transform: uppercase;
125
+ font-size: 11px;
126
+ letter-spacing: 1.2px;
127
+ }
128
+ .admin-color-fresh .redux-container-switch .cb-enable.selected, .admin-color-fresh .redux-field-container .ui-buttonset .ui-state-active, .wp-customizer .redux-container-switch .cb-enable.selected, .wp-customizer .redux-field-container .ui-buttonset .ui-state-active {
129
+ background: #4452a7 !important;
130
+ box-shadow: none !important;
131
+ border: 0 !important;
132
+ }
133
+ .admin-color-fresh .redux-container-switch .cb-disable.selected{
134
+ background: #303f9f !important;
135
+ color: #fff;
136
+ box-shadow: none !important;
137
+ border: 0 !important;
138
+
139
+ }
140
+ .wp-customizer .redux-container-switch .cb-disable.selected{
141
+ background: red !important
142
  }
options/redux-framework/inc/fields/image_select/field_image_select.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-image_select .redux-table-container{display:table;table-layout:fixed;width:100%}.redux-container-image_select .redux-image-select{margin:0 !important}.redux-container-image_select .redux-image-select .tiles{display:block;background-color:#FFF;background-repeat:repeat;width:40px;height:40px}.redux-container-image_select .redux-image-select img,.redux-container-image_select .redux-image-select .tiles{border-color:#d9d9d9}.redux-container-image_select .redux-image-select li:last-child{margin-bottom:0}.redux-container-image_select .redux-image-select input[type='radio']{display:none}.redux-container-image_select .redux-image-select-presets img{width:100%}.redux-container-image_select ul.redux-image-select li{margin:0 10px 3px 10px;display:inline-block;padding:2px 2px;padding-left:0}.redux-container-image_select .redux-image-select-selected{background-color:#f9f9f9}.redux-container-image_select .redux-image-select img,.redux-container-image_select .redux-image-select-selected img,.redux-container-image_select .redux-image-select .tiles,.redux-container-image_select .redux-image-select-selected .tiles{border-width:4px;border-style:solid}.redux-container-image_select .redux-image-select-selected .tiles,.redux-container-image_select .redux-image-select-selected .tiles{border-color:#7a7a7a}
options/redux-framework/inc/fields/image_select/field_image_select.js ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global confirm, redux, redux_change */
2
+
3
+ /*global redux_change, redux*/
4
+
5
+ (function( $ ) {
6
+ "use strict";
7
+
8
+ redux.field_objects = redux.field_objects || {};
9
+ redux.field_objects.image_select = redux.field_objects.image_select || {};
10
+
11
+ $( document ).ready(
12
+ function() {
13
+ //redux.field_objects.image_select.init();
14
+ }
15
+ );
16
+
17
+ redux.field_objects.image_select.init = function( selector ) {
18
+
19
+ if ( !selector ) {
20
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-image_select:visible' );
21
+ }
22
+
23
+ $( selector ).each(
24
+ function() {
25
+ var el = $( this );
26
+ var parent = el;
27
+ if ( !el.hasClass( 'redux-field-container' ) ) {
28
+ parent = el.parents( '.redux-field-container:first' );
29
+ }
30
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
31
+ return;
32
+ }
33
+ if ( parent.hasClass( 'redux-field-init' ) ) {
34
+ parent.removeClass( 'redux-field-init' );
35
+ } else {
36
+ return;
37
+ }
38
+ // On label click, change the input and class
39
+ el.find( '.redux-image-select label img, .redux-image-select label .tiles' ).click(
40
+ function( e ) {
41
+ var id = $( this ).closest( 'label' ).attr( 'for' );
42
+
43
+ $( this ).parents( "fieldset:first" ).find( '.redux-image-select-selected' ).removeClass( 'redux-image-select-selected' ).find( "input[type='radio']" ).attr(
44
+ "checked", false
45
+ );
46
+ $( this ).closest( 'label' ).find( 'input[type="radio"]' ).prop( 'checked' );
47
+
48
+ if ( $( this ).closest( 'label' ).hasClass( 'redux-image-select-preset-' + id ) ) { // If they clicked on a preset, import!
49
+ e.preventDefault();
50
+
51
+ var presets = $( this ).closest( 'label' ).find( 'input' );
52
+ var data = presets.data( 'presets' );
53
+ var merge = presets.data( 'merge' );
54
+
55
+ if( merge !== undefined && merge !== null ) {
56
+ if( $.type( merge ) === 'string' ) {
57
+ merge = merge.split('|');
58
+ }
59
+
60
+ $.each(data, function( index, value ) {
61
+ if( ( merge === true || $.inArray( index, merge ) != -1 ) && $.type( redux.options[index] ) === 'object' ) {
62
+ data[index] = $.extend(redux.options[index], data[index]);
63
+ }
64
+ });
65
+ }
66
+
67
+ if ( presets !== undefined && presets !== null ) {
68
+ var answer = confirm( redux.args.preset_confirm );
69
+
70
+ if ( answer ) {
71
+ el.find( 'label[for="' + id + '"]' ).addClass( 'redux-image-select-selected' ).find( "input[type='radio']" ).attr(
72
+ "checked", true
73
+ );
74
+ window.onbeforeunload = null;
75
+ if ( $( '#import-code-value' ).length === 0 ) {
76
+ $( this ).append( '<textarea id="import-code-value" style="display:none;" name="' + redux.args.opt_name + '[import_code]">' + JSON.stringify( data ) + '</textarea>' );
77
+ } else {
78
+ $( '#import-code-value' ).val( JSON.stringify( data ) );
79
+ }
80
+ if ( $( '#publishing-action #publish' ).length !== 0 ) {
81
+ $( '#publish' ).click();
82
+ } else {
83
+ $( '#redux-import' ).click();
84
+ }
85
+ }
86
+ } else {
87
+ }
88
+
89
+ return false;
90
+ } else {
91
+ el.find( 'label[for="' + id + '"]' ).addClass( 'redux-image-select-selected' ).find( "input[type='radio']" ).attr(
92
+ "checked", true
93
+ ).trigger('change');
94
+
95
+ redux_change( $( this ).closest( 'label' ).find( 'input[type="radio"]' ) );
96
+ }
97
+ }
98
+ );
99
+
100
+ // Used to display a full image preview of a tile/pattern
101
+ el.find( '.tiles' ).qtip(
102
+ {
103
+ content: {
104
+ text: function( event, api ) {
105
+ return "<img src='" + $( this ).attr( 'rel' ) + "' style='max-width:150px;' alt='' />";
106
+ },
107
+ },
108
+ style: 'qtip-tipsy',
109
+ position: {
110
+ my: 'top center', // Position my top left...
111
+ at: 'bottom center', // at the bottom right of...
112
+ }
113
+ }
114
+ );
115
+ }
116
+ );
117
+
118
+ };
119
+ })( jQuery );
options/redux-framework/inc/fields/image_select/field_image_select.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.image_select=redux.field_objects.image_select||{},a(document).ready(function(){}),redux.field_objects.image_select.init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-image_select:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".redux-image-select label img, .redux-image-select label .tiles").click(function(c){var d=a(this).closest("label").attr("for");if(a(this).parents("fieldset:first").find(".redux-image-select-selected").removeClass("redux-image-select-selected").find("input[type='radio']").attr("checked",!1),a(this).closest("label").find('input[type="radio"]').prop("checked"),a(this).closest("label").hasClass("redux-image-select-preset-"+d)){c.preventDefault();var e=a(this).closest("label").find("input"),f=e.data("presets"),g=e.data("merge");if(void 0!==g&&null!==g&&("string"===a.type(g)&&(g=g.split("|")),a.each(f,function(b,c){g!==!0&&-1==a.inArray(b,g)||"object"!==a.type(redux.options[b])||(f[b]=a.extend(redux.options[b],f[b]))})),void 0!==e&&null!==e){var h=confirm(redux.args.preset_confirm);h&&(b.find('label[for="'+d+'"]').addClass("redux-image-select-selected").find("input[type='radio']").attr("checked",!0),window.onbeforeunload=null,0===a("#import-code-value").length?a(this).append('<textarea id="import-code-value" style="display:none;" name="'+redux.args.opt_name+'[import_code]">'+JSON.stringify(f)+"</textarea>"):a("#import-code-value").val(JSON.stringify(f)),0!==a("#publishing-action #publish").length?a("#publish").click():a("#redux-import").click())}return!1}b.find('label[for="'+d+'"]').addClass("redux-image-select-selected").find("input[type='radio']").attr("checked",!0).trigger("change"),redux_change(a(this).closest("label").find('input[type="radio"]'))}),b.find(".tiles").qtip({content:{text:function(b,c){return"<img src='"+a(this).attr("rel")+"' style='max-width:150px;' alt='' />"}},style:"qtip-tipsy",position:{my:"top center",at:"bottom center"}}))})}}(jQuery);
options/redux-framework/inc/fields/image_select/field_image_select.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ * You should have received a copy of the GNU General Public License
13
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14
+ *
15
+ * @package ReduxFramework
16
+ * @subpackage Field_Images
17
+ * @author Daniel J Griffiths (Ghost1227)
18
+ * @author Dovy Paukstys
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if ( ! defined( 'ABSPATH' ) ) {
24
+ exit;
25
+ }
26
+
27
+ // Don't duplicate me!
28
+ if ( ! class_exists( 'ReduxFramework_image_select' ) ) {
29
+
30
+ /**
31
+ * Main ReduxFramework_image_select class
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ class ReduxFramework_image_select {
36
+
37
+ /**
38
+ * Field Constructor.
39
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return void
44
+ */
45
+ function __construct( $field = array(), $value = '', $parent ) {
46
+ $this->parent = $parent;
47
+ $this->field = $field;
48
+ $this->value = $value;
49
+ }
50
+
51
+ /**
52
+ * Field Render Function.
53
+ * Takes the vars and outputs the HTML for the field in the settings
54
+ *
55
+ * @since 1.0.0
56
+ * @access public
57
+ * @return void
58
+ */
59
+ public function render() {
60
+
61
+ if ( ! empty( $this->field['options'] ) ) {
62
+ echo '<div class="redux-table-container">';
63
+ echo '<ul class="redux-image-select">';
64
+
65
+ $x = 1;
66
+
67
+ foreach ( $this->field['options'] as $k => $v ) {
68
+
69
+ if ( ! is_array( $v ) ) {
70
+ $v = array( 'img' => $v );
71
+ }
72
+
73
+ if ( ! isset( $v['title'] ) ) {
74
+ $v['title'] = '';
75
+ }
76
+
77
+ if ( ! isset( $v['alt'] ) ) {
78
+ $v['alt'] = $v['title'];
79
+ }
80
+
81
+ if ( ! isset( $v['class'] ) ) {
82
+ $v['class'] = '';
83
+ }
84
+
85
+ $style = '';
86
+
87
+ if ( ! empty( $this->field['width'] ) ) {
88
+ $style .= 'width: ' . $this->field['width'];
89
+
90
+ if ( is_numeric( $this->field['width'] ) ) {
91
+ $style .= 'px';
92
+ }
93
+
94
+ $style .= ';';
95
+ } else {
96
+ $style .= " width: 100%; ";
97
+ }
98
+
99
+ if ( ! empty( $this->field['height'] ) ) {
100
+ $style .= 'height: ' . $this->field['height'];
101
+
102
+ if ( is_numeric( $this->field['height'] ) ) {
103
+ $style .= 'px';
104
+ }
105
+
106
+ $style .= ';';
107
+ }
108
+
109
+ $theValue = $k;
110
+ if ( ! empty( $this->field['tiles'] ) && $this->field['tiles'] == true ) {
111
+ $theValue = $v['img'];
112
+ }
113
+
114
+ $selected = ( checked( $this->value, $theValue, false ) != '' ) ? ' redux-image-select-selected' : '';
115
+
116
+ $presets = '';
117
+ $is_preset = false;
118
+
119
+ $this->field['class'] .= ' noUpdate ';
120
+ if ( isset( $this->field['presets'] ) && $this->field['presets'] !== false ) {
121
+ $this->field['class'] = trim($this->field['class']);
122
+ if ( ! isset( $v['presets'] ) ) {
123
+ $v['presets'] = array();
124
+ }
125
+
126
+ if ( ! is_array( $v['presets'] ) ) {
127
+ $v['presets'] = json_decode( $v['presets'], true );
128
+ }
129
+
130
+ // Only highlight the preset if it's the same
131
+ if ( $selected ) {
132
+ if ( empty( $v['presets'] ) ) {
133
+ $selected = false;
134
+ } else {
135
+ foreach ( $v['presets'] as $pk => $pv ) {
136
+ if ( isset( $v['merge'] ) && $v['merge'] !== false ) {
137
+ if( ( $v['merge'] === true || in_array( $pk, $v['merge'] ) ) && is_array( $this->parent->options[ $pk ] ) ) {
138
+ $pv = array_merge( $this->parent->options[ $pk ], $pv );
139
+ }
140
+ }
141
+
142
+ if ( empty( $pv ) && isset( $this->parent->options[ $pk ] ) && ! empty( $this->parent->options[ $pk ] ) ) {
143
+ $selected = false;
144
+ } else if ( ! empty( $pv ) && ! isset( $this->parent->options[ $pk ] ) ) {
145
+ $selected = false;
146
+ } else if ( isset( $this->parent->options[ $pk ] ) && $this->parent->options[ $pk ] != $pv ) {
147
+ $selected = false;
148
+ }
149
+
150
+ if ( ! $selected ) { // We're still not using the same preset. Let's unset that shall we?
151
+ $this->value = "";
152
+ break;
153
+ }
154
+ }
155
+ }
156
+ }
157
+
158
+ $v['presets']['redux-backup'] = 1;
159
+
160
+ $presets = ' data-presets="' . htmlspecialchars( json_encode( $v['presets'] ), ENT_QUOTES, 'UTF-8' ) . '"';
161
+ $is_preset = true;
162
+
163
+ $this->field['class'] = trim( $this->field['class'] ) . ' redux-presets';
164
+ }
165
+
166
+ $is_preset_class = $is_preset ? '-preset-' : ' ';
167
+
168
+ $merge = '';
169
+ if ( isset( $v['merge'] ) && $v['merge'] !== false ) {
170
+ $merge = is_array( $v['merge'] ) ? implode( '|', $v['merge'] ) : 'true';
171
+ $merge = ' data-merge="' . htmlspecialchars( $merge, ENT_QUOTES, 'UTF-8' ) . '"';
172
+ }
173
+
174
+ echo '<li class="redux-image-select">';
175
+ echo '<label class="' . $selected . ' redux-image-select' . $is_preset_class . $this->field['id'] . '_' . $x . '" for="' . $this->field['id'] . '_' . ( array_search( $k, array_keys( $this->field['options'] ) ) + 1 ) . '">';
176
+
177
+ echo '<input type="radio" class="' . $this->field['class'] . '" id="' . $this->field['id'] . '_' . ( array_search( $k, array_keys( $this->field['options'] ) ) + 1 ) . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" value="' . $theValue . '" ' . checked( $this->value, $theValue, false ) . $presets . $merge . '/>';
178
+ if ( ! empty( $this->field['tiles'] ) && $this->field['tiles'] == true ) {
179
+ echo '<span class="tiles ' . $v['class'] . '" style="background-image: url(' . $v['img'] . ');" rel="' . $v['img'] . '"">&nbsp;</span>';
180
+ } else {
181
+ echo '<img src="' . $v['img'] . '" alt="' . $v['alt'] . '" class="' . $v['class'] . '" style="' . $style . '"' . $presets . $merge . ' />';
182
+ }
183
+
184
+ if ( $v['title'] != '' ) {
185
+ echo '<br /><span>' . $v['title'] . '</span>';
186
+ }
187
+
188
+ echo '</label>';
189
+ echo '</li>';
190
+
191
+ $x ++;
192
+ }
193
+
194
+ echo '</ul>';
195
+ echo '</div>';
196
+ }
197
+ }
198
+
199
+ /**
200
+ * Enqueue Function.
201
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
202
+ *
203
+ * @since 1.0.0
204
+ * @access public
205
+ * @return void
206
+ */
207
+ public function enqueue() {
208
+
209
+ wp_enqueue_script(
210
+ 'redux-field-image-select-js',
211
+ ReduxFramework::$_url . 'inc/fields/image_select/field_image_select' . Redux_Functions::isMin() . '.js',
212
+ array( 'jquery', 'redux-js' ),
213
+ time(),
214
+ true
215
+ );
216
+
217
+ if ($this->parent->args['dev_mode']) {
218
+ wp_enqueue_style(
219
+ 'redux-field-image-select-css',
220
+ ReduxFramework::$_url . 'inc/fields/image_select/field_image_select.css',
221
+ array(),
222
+ time(),
223
+ 'all'
224
+ );
225
+ }
226
+ }
227
+
228
+ public function getCSS( $mode = '' ) {
229
+ $css = '';
230
+ $value = $this->value;
231
+
232
+ $output = '';
233
+ if ( ! empty( $value ) && ! is_array($value) ) {
234
+ switch ( $mode ) {
235
+ case 'background-image':
236
+ $output = "background-image: url('" . $value . "');";
237
+ break;
238
+
239
+ default:
240
+ $output = $mode . ": " . $value . ";";
241
+ }
242
+ }
243
+
244
+ $css .= $output;
245
+
246
+ return $css;
247
+ }
248
+
249
+ public function output() {
250
+ $mode = ( isset( $this->field['mode'] ) && ! empty( $this->field['mode'] ) ? $this->field['mode'] : 'background-image' );
251
+
252
+ if ( ( ! isset( $this->field['output'] ) || ! is_array( $this->field['output'] ) ) && ( ! isset( $this->field['compiler'] ) ) ) {
253
+ return;
254
+ }
255
+
256
+ $style = $this->getCSS( $mode );
257
+
258
+ if ( ! empty( $style ) ) {
259
+
260
+ if ( ! empty( $this->field['output'] ) && is_array( $this->field['output'] ) ) {
261
+ $keys = implode( ",", $this->field['output'] );
262
+ $style = $keys . "{" . $style . '}';
263
+ $this->parent->outputCSS .= $style;
264
+ }
265
+
266
+ if ( ! empty( $this->field['compiler'] ) && is_array( $this->field['compiler'] ) ) {
267
+ $keys = implode( ",", $this->field['compiler'] );
268
+ $style = $keys . "{" . $style . '}';
269
+ $this->parent->compilerCSS .= $style;
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }
options/redux-framework/inc/fields/image_select/field_image_select.scss ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-image_select {
2
+ .redux-table-container {
3
+ display: table;
4
+ table-layout: fixed;
5
+ width: 100%;
6
+ }
7
+
8
+ .redux-image-select {
9
+ margin: 0 !important;
10
+
11
+ .tiles {
12
+ display: block;
13
+ background-color: #FFF;
14
+ background-repeat: repeat;
15
+ width: 40px;
16
+ height: 40px;
17
+ }
18
+
19
+ img,
20
+ .tiles {
21
+ border-color: #d9d9d9;
22
+ }
23
+
24
+ li:last-child {
25
+ margin-bottom: 0;
26
+ }
27
+
28
+ input[type='radio'] {
29
+ display: none;
30
+ }
31
+ }
32
+
33
+ .redux-image-select-presets img {
34
+ width: 100%;
35
+ }
36
+
37
+ ul.redux-image-select li {
38
+ margin: 0 10px 3px 10px;
39
+ display: inline-block;
40
+ padding: 2px 2px;
41
+ padding-left: 0;
42
+ }
43
+
44
+ .redux-image-select-selected {
45
+ background-color: #f9f9f9;
46
+ }
47
+
48
+ .redux-image-select img,
49
+ .redux-image-select-selected img,
50
+ .redux-image-select .tiles,
51
+ .redux-image-select-selected .tiles {
52
+ border-width: 4px;
53
+ border-style: solid;
54
+ }
55
+
56
+ .redux-image-select-selected,
57
+ .redux-image-select-selected {
58
+ .tiles {
59
+ border-color: #7a7a7a;
60
+ }
61
+ }
62
+ }
options/redux-framework/inc/fields/select/elusive-icons.php ADDED
@@ -0,0 +1,312 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Array of Elusive Icons
4
+ // Contributed by @WhatJustHappened
5
+ // Last updated: 14 Sept. 2013
6
+ function get_font_icons() {
7
+ $elusiveIcons = array(
8
+ 'el el-address-book-alt',
9
+ 'el el-address-book',
10
+ 'el el-adjust-alt',
11
+ 'el el-adjust',
12
+ 'el el-adult',
13
+ 'el el-align-center',
14
+ 'el el-align-justify',
15
+ 'el el-align-left',
16
+ 'el el-align-right',
17
+ 'el el-arrow-down',
18
+ 'el el-arrow-left',
19
+ 'el el-arrow-right',
20
+ 'el el-arrow-up',
21
+ 'el el-asl',
22
+ 'el el-asterisk',
23
+ 'el el-backward',
24
+ 'el el-ban-circle',
25
+ 'el el-barcode',
26
+ 'el el-behance',
27
+ 'el el-bell',
28
+ 'el el-blind',
29
+ 'el el-blogger',
30
+ 'el el-bold',
31
+ 'el el-book',
32
+ 'el el-bookmark-empty',
33
+ 'el el-bookmark',
34
+ 'el el-braille',
35
+ 'el el-briefcase',
36
+ 'el el-broom',
37
+ 'el el-brush',
38
+ 'el el-bulb',
39
+ 'el el-bullhorn',
40
+ 'el el-calendar-sign',
41
+ 'el el-calendar',
42
+ 'el el-camera',
43
+ 'el el-car',
44
+ 'el el-caret-down',
45
+ 'el el-caret-left',
46
+ 'el el-caret-right',
47
+ 'el el-caret-up',
48
+ 'el el-cc',
49
+ 'el el-certificate',
50
+ 'el el-check-empty',
51
+ 'el el-check',
52
+ 'el el-chevron-down',
53
+ 'el el-chevron-left',
54
+ 'el el-chevron-right',
55
+ 'el el-chevron-up',
56
+ 'el el-child',
57
+ 'el el-circle-arrow-down',
58
+ 'el el-circle-arrow-left',
59
+ 'el el-circle-arrow-right',
60
+ 'el el-circle-arrow-up',
61
+ 'el el-cloud-alt',
62
+ 'el el-cloud',
63
+ 'el el-cog-alt',
64
+ 'el el-cog',
65
+ 'el el-cogs',
66
+ 'el el-comment-alt',
67
+ 'el el-comment',
68
+ 'el el-compass-alt',
69
+ 'el el-compass',
70
+ 'el el-credit-card',
71
+ 'el el-css',
72
+ 'el el-dashboard',
73
+ 'el el-delicious',
74
+ 'el el-deviantart',
75
+ 'el el-digg',
76
+ 'el el-download-alt',
77
+ 'el el-download',
78
+ 'el el-dribbble',
79
+ 'el el-edit',
80
+ 'el el-eject',
81
+ 'el el-envelope-alt',
82
+ 'el el-envelope',
83
+ 'el el-error-alt',
84
+ 'el el-error',
85
+ 'el el-eur',
86
+ 'el el-exclamation-sign',
87
+ 'el el-eye-close',
88
+ 'el el-eye-open',
89
+ 'el el-facebook',
90
+ 'el el-facetime-video',
91
+ 'el el-fast-backward',
92
+ 'el el-fast-forward',
93
+ 'el el-female',
94
+ 'el el-file-alt',
95
+ 'el el-file-edit-alt',
96
+ 'el el-file-edit',
97
+ 'el el-file-new-alt',
98
+ 'el el-file-new',
99
+ 'el el-file',
100
+ 'el el-film',
101
+ 'el el-filter',
102
+ 'el el-fire',
103
+ 'el el-flag-alt',
104
+ 'el el-flag',
105
+ 'el el-flickr',
106
+ 'el el-folder-close',
107
+ 'el el-folder-open',
108
+ 'el el-folder-sign',
109
+ 'el el-folder',
110
+ 'el el-font',
111
+ 'el el-fontsize',
112
+ 'el el-fork',
113
+ 'el el-forward-alt',
114
+ 'el el-forward',
115
+ 'el el-foursquare',
116
+ 'el el-friendfeed-rect',
117
+ 'el el-friendfeed',
118
+ 'el el-fullscreen',
119
+ 'el el-gbp',
120
+ 'el el-gift',
121
+ 'el el-github-text',
122
+ 'el el-github',
123
+ 'el el-glass',
124
+ 'el el-glasses',
125
+ 'el el-globe-alt',
126
+ 'el el-globe',
127
+ 'el el-googleplus',
128
+ 'el el-graph-alt',
129
+ 'el el-graph',
130
+ 'el el-group-alt',
131
+ 'el el-group',
132
+ 'el el-guidedog',
133
+ 'el el-hand-down',
134
+ 'el el-hand-left',
135
+ 'el el-hand-right',
136
+ 'el el-hand-up',
137
+ 'el el-hdd',
138
+ 'el el-headphones',
139
+ 'el el-hearing-impaired',
140
+ 'el el-heart-alt',
141
+ 'el el-heart-empty',
142
+ 'el el-heart',
143
+ 'el el-home-alt',
144
+ 'el el-home',
145
+ 'el el-hourglass',
146
+ 'el el-idea-alt',
147
+ 'el el-idea',
148
+ 'el el-inbox-alt',
149
+ 'el el-inbox-box',
150
+ 'el el-inbox',
151
+ 'el el-indent-left',
152
+ 'el el-indent-right',
153
+ 'el el-info-sign',
154
+ 'el el-instagram',
155
+ 'el el-iphone-home',
156
+ 'el el-italic',
157
+ 'el el-key',
158
+ 'el el-laptop-alt',
159
+ 'el el-laptop',
160
+ 'el el-lastfm',
161
+ 'el el-leaf',
162
+ 'el el-lines',
163
+ 'el el-link',
164
+ 'el el-linkedin',
165
+ 'el el-list-alt',
166
+ 'el el-list',
167
+ 'el el-livejournal',
168
+ 'el el-lock-alt',
169
+ 'el el-lock',
170
+ 'el el-magic',
171
+ 'el el-magnet',
172
+ 'el el-male',
173
+ 'el el-map-marker-alt',
174
+ 'el el-map-marker',
175
+ 'el el-mic-alt',
176
+ 'el el-mic',
177
+ 'el el-minus-sign',
178
+ 'el el-minus',
179
+ 'el el-move',
180
+ 'el el-music',
181
+ 'el el-myspace',
182
+ 'el el-network',
183
+ 'el el-off',
184
+ 'el el-ok-circle',
185
+ 'el el-ok-sign',
186
+ 'el el-ok',
187
+ 'el el-opensource',
188
+ 'el el-paper-clip-alt',
189
+ 'el el-paper-clip',
190
+ 'el el-path',
191
+ 'el el-pause-alt',
192
+ 'el el-pause',
193
+ 'el el-pencil-alt',
194
+ 'el el-pencil',
195
+ 'el el-person',
196
+ 'el el-phone-alt',
197
+ 'el el-phone',
198
+ 'el el-photo-alt',
199
+ 'el el-photo',
200
+ 'el el-picasa',
201
+ 'el el-picture',
202
+ 'el el-pinterest',
203
+ 'el el-plane',
204
+ 'el el-play-alt',
205
+ 'el el-play-circle',
206
+ 'el el-play',
207
+ 'el el-plus-sign',
208
+ 'el el-plus',
209
+ 'el el-podcast',
210
+ 'el el-print',
211
+ 'el el-puzzle',
212
+ 'el el-qrcode',
213
+ 'el el-question-sign',
214
+ 'el el-question',
215
+ 'el el-quotes-alt',
216
+ 'el el-quotes',
217
+ 'el el-random',
218
+ 'el el-record',
219
+ 'el el-reddit',
220
+ 'el el-refresh',
221
+ 'el el-remove-circle',
222
+ 'el el-remove-sign',
223
+ 'el el-remove',
224
+ 'el el-repeat-alt',
225
+ 'el el-repeat',
226
+ 'el el-resize-full',
227
+ 'el el-resize-horizontal',
228
+ 'el el-resize-small',
229
+ 'el el-resize-vertical',
230
+ 'el el-return-key',
231
+ 'el el-retweet',
232
+ 'el el-reverse-alt',
233
+ 'el el-road',
234
+ 'el el-rss',
235
+ 'el el-scissors',
236
+ 'el el-screen-alt',
237
+ 'el el-screen',
238
+ 'el el-screenshot',
239
+ 'el el-search-alt',
240
+ 'el el-search',
241
+ 'el el-share-alt',
242
+ 'el el-share',
243
+ 'el el-shopping-cart-sign',
244
+ 'el el-shopping-cart',
245
+ 'el el-signal',
246
+ 'el el-skype',
247
+ 'el el-slideshare',
248
+ 'el el-smiley-alt',
249
+ 'el el-smiley',
250
+ 'el el-soundcloud',
251
+ 'el el-speaker',
252
+ 'el el-spotify',
253
+ 'el el-stackoverflow',
254
+ 'el el-star-alt',
255
+ 'el el-star-empty',
256
+ 'el el-star',
257
+ 'el el-step-backward',
258
+ 'el el-step-forward',
259
+ 'el el-stop-alt',
260
+ 'el el-stop',
261
+ 'el el-stumbleupon',
262
+ 'el el-tag',
263
+ 'el el-tags',
264
+ 'el el-tasks',
265
+ 'el el-text-height',
266
+ 'el el-text-width',
267
+ 'el el-th-large',
268
+ 'el el-th-list',
269
+ 'el el-th',
270
+ 'el el-thumbs-down',
271
+ 'el el-thumbs-up',
272
+ 'el el-time-alt',
273
+ 'el el-time',
274
+ 'el el-tint',
275
+ 'el el-torso',
276
+ 'el el-trash-alt',
277
+ 'el el-trash',
278
+ 'el el-tumblr',
279
+ 'el el-twitter',
280
+ 'el el-universal-access',
281
+ 'el el-unlock-alt',
282
+ 'el el-unlock',
283
+ 'el el-upload',
284
+ 'el el-usd',
285
+ 'el el-user',
286
+ 'el el-viadeo',
287
+ 'el el-video-alt',
288
+ 'el el-video-chat',
289
+ 'el el-video',
290
+ 'el el-view-mode',
291
+ 'el el-vimeo',
292
+ 'el el-vkontakte',
293
+ 'el el-volume-down',
294
+ 'el el-volume-off',
295
+ 'el el-volume-up',
296
+ 'el el-w3c',
297
+ 'el el-warning-sign',
298
+ 'el el-website-alt',
299
+ 'el el-website',
300
+ 'el el-wheelchair',
301
+ 'el el-wordpress',
302
+ 'el el-wrench-alt',
303
+ 'el el-wrench',
304
+ 'el el-youtube',
305
+ 'el el-zoom-in',
306
+ 'el el-zoom-out'
307
+ );
308
+
309
+ return $elusiveIcons;
310
+ }
311
+
312
+ add_filter( 'redux/font-icons', 'get_font_icons' );
options/redux-framework/inc/fields/select/field_select.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-select li.ui-state-highlight{height:20px;margin-top:2px;margin-left:5px;width:64px;margin-bottom:0}
options/redux-framework/inc/fields/select/field_select.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ (function( $ ) {
4
+ "use strict";
5
+
6
+ redux.field_objects = redux.field_objects || {};
7
+ redux.field_objects.select = redux.field_objects.select || {};
8
+
9
+ redux.field_objects.select.init = function( selector ) {
10
+ if ( !selector ) {
11
+ selector = $( document ).find( '.redux-container-select:visible' );
12
+ }
13
+
14
+ $( selector ).each(
15
+ function() {
16
+ var el = $( this );
17
+ var parent = el;
18
+
19
+ if ( !el.hasClass( 'redux-field-container' ) ) {
20
+ parent = el.parents( '.redux-field-container:first' );
21
+ }
22
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
23
+ return;
24
+ }
25
+ if ( parent.hasClass( 'redux-field-init' ) ) {
26
+ parent.removeClass( 'redux-field-init' );
27
+ } else {
28
+ return;
29
+ }
30
+
31
+ el.find( 'select.redux-select-item' ).each(
32
+ function() {
33
+
34
+ var default_params = {
35
+ width: 'resolve',
36
+ triggerChange: true,
37
+ allowClear: true
38
+ };
39
+ if ( $(this).attr('multiple') == "multiple" ) {
40
+ default_params.width = "100%";
41
+ }
42
+
43
+ if ( $( this ).siblings( '.select2_params' ).size() > 0 ) {
44
+ var select2_params = $( this ).siblings( '.select2_params' ).val();
45
+ select2_params = JSON.parse( select2_params );
46
+ default_params = $.extend( {}, default_params, select2_params );
47
+ }
48
+
49
+ if ( $( this ).hasClass( 'font-icons' ) ) {
50
+ default_params = $.extend(
51
+ {}, {
52
+ formatResult: redux.field_objects.select.addIcon,
53
+ formatSelection: redux.field_objects.select.addIcon,
54
+ escapeMarkup: function( m ) {
55
+ return m;
56
+ }
57
+ }, default_params
58
+ );
59
+ }
60
+
61
+ $( this ).select2( default_params );
62
+
63
+ if ( $( this ).hasClass( 'select2-sortable' ) ) {
64
+ default_params = {};
65
+ default_params.bindOrder = 'sortableStop';
66
+ default_params.sortableOptions = {placeholder: 'ui-state-highlight'};
67
+ $( this ).select2Sortable( default_params );
68
+ }
69
+
70
+ $( this ).on(
71
+ "change", function() {
72
+ redux_change( $( $( this ) ) );
73
+ $( this ).select2SortableOrder();
74
+ }
75
+ );
76
+ }
77
+ );
78
+ }
79
+ );
80
+ };
81
+
82
+ redux.field_objects.select.addIcon = function( icon ) {
83
+ if ( icon.hasOwnProperty( 'id' ) ) {
84
+ return "<span class='elusive'><i class='" + icon.id + "'></i>" + "&nbsp;&nbsp;" + icon.text + "</span>";
85
+ }
86
+ };
87
+ })( jQuery );
options/redux-framework/inc/fields/select/field_select.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.select=redux.field_objects.select||{},redux.field_objects.select.init=function(b){b||(b=a(document).find(".redux-container-select:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find("select.redux-select-item").each(function(){var b={width:"resolve",triggerChange:!0,allowClear:!0};if("multiple"==a(this).attr("multiple")&&(b.width="100%"),a(this).siblings(".select2_params").size()>0){var c=a(this).siblings(".select2_params").val();c=JSON.parse(c),b=a.extend({},b,c)}a(this).hasClass("font-icons")&&(b=a.extend({},{formatResult:redux.field_objects.select.addIcon,formatSelection:redux.field_objects.select.addIcon,escapeMarkup:function(a){return a}},b)),a(this).select2(b),a(this).hasClass("select2-sortable")&&(b={},b.bindOrder="sortableStop",b.sortableOptions={placeholder:"ui-state-highlight"},a(this).select2Sortable(b)),a(this).on("change",function(){redux_change(a(a(this))),a(this).select2SortableOrder()})}))})},redux.field_objects.select.addIcon=function(a){return a.hasOwnProperty("id")?"<span class='elusive'><i class='"+a.id+"'></i>&nbsp;&nbsp;"+a.text+"</span>":void 0}}(jQuery);
options/redux-framework/inc/fields/select/field_select.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_select' ) ) {
9
+ class ReduxFramework_select {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since ReduxFramework 1.0.0
16
+ */
17
+ public function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since ReduxFramework 1.0.0
28
+ */
29
+ public function render() {
30
+ $sortable = ( isset( $this->field['sortable'] ) && $this->field['sortable'] ) ? ' select2-sortable"' : "";
31
+
32
+ if ( ! empty( $sortable ) ) { // Dummy proofing :P
33
+ $this->field['multi'] = true;
34
+ }
35
+
36
+ if ( ! empty( $this->field['data'] ) && empty( $this->field['options'] ) ) {
37
+ if ( empty( $this->field['args'] ) ) {
38
+ $this->field['args'] = array();
39
+ }
40
+
41
+ if ( $this->field['data'] == "elusive-icons" || $this->field['data'] == "elusive-icon" || $this->field['data'] == "elusive" ) {
42
+ $icons_file = ReduxFramework::$_dir . 'inc/fields/select/elusive-icons.php';
43
+ /**
44
+ * filter 'redux-font-icons-file}'
45
+ *
46
+ * @param array $icon_file File for the icons
47
+ */
48
+ $icons_file = apply_filters( 'redux-font-icons-file', $icons_file );
49
+
50
+ /**
51
+ * filter 'redux/{opt_name}/field/font/icons/file'
52
+ *
53
+ * @param array $icon_file File for the icons
54
+ */
55
+ $icons_file = apply_filters( "redux/{$this->parent->args['opt_name']}/field/font/icons/file", $icons_file );
56
+ if ( file_exists( $icons_file ) ) {
57
+ require_once $icons_file;
58
+ }
59
+ }
60
+
61
+ $this->field['options'] = $this->parent->get_wordpress_data( $this->field['data'], $this->field['args'] );
62
+ }
63
+
64
+ if ( ! empty( $this->field['data'] ) && ( $this->field['data'] == "elusive-icons" || $this->field['data'] == "elusive-icon" || $this->field['data'] == "elusive" ) ) {
65
+ $this->field['class'] .= " font-icons";
66
+ }
67
+ //if
68
+
69
+ if ( ! empty( $this->field['options'] ) ) {
70
+ $multi = ( isset( $this->field['multi'] ) && $this->field['multi'] ) ? ' multiple="multiple"' : "";
71
+
72
+ if ( ! empty( $this->field['width'] ) ) {
73
+ $width = ' style="' . $this->field['width'] . '"';
74
+ } else {
75
+ $width = ' style="width: 40%;"';
76
+ }
77
+
78
+ $nameBrackets = "";
79
+ if ( ! empty( $multi ) ) {
80
+ $nameBrackets = "[]";
81
+ }
82
+
83
+ $placeholder = ( isset( $this->field['placeholder'] ) ) ? esc_attr( $this->field['placeholder'] ) : __( 'Select an item', 'redux-framework' );
84
+
85
+ if ( isset( $this->field['select2'] ) ) { // if there are any let's pass them to js
86
+ $select2_params = json_encode( $this->field['select2'] );
87
+ $select2_params = htmlspecialchars( $select2_params, ENT_QUOTES );
88
+
89
+ echo '<input type="hidden" class="select2_params" value="' . $select2_params . '">';
90
+ }
91
+
92
+ if ( isset( $this->field['multi'] ) && $this->field['multi'] && isset( $this->field['sortable'] ) && $this->field['sortable'] && ! empty( $this->value ) && is_array( $this->value ) ) {
93
+ $origOption = $this->field['options'];
94
+ $this->field['options'] = array();
95
+
96
+ foreach ( $this->value as $value ) {
97
+ $this->field['options'][ $value ] = $origOption[ $value ];
98
+ }
99
+
100
+ if ( count( $this->field['options'] ) < count( $origOption ) ) {
101
+ foreach ( $origOption as $key => $value ) {
102
+ if ( ! in_array( $key, $this->field['options'] ) ) {
103
+ $this->field['options'][ $key ] = $value;
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
+ $sortable = ( isset( $this->field['sortable'] ) && $this->field['sortable'] ) ? ' select2-sortable"' : "";
110
+
111
+ echo '<select ' . $multi . ' id="' . $this->field['id'] . '-select" data-placeholder="' . $placeholder . '" name="' . $this->field['name'] . $this->field['name_suffix'] . $nameBrackets . '" class="redux-select-item ' . $this->field['class'] . $sortable . '"' . $width . ' rows="6">';
112
+ echo '<option></option>';
113
+
114
+ foreach ( $this->field['options'] as $k => $v ) {
115
+
116
+ if (is_array($v)) {
117
+ echo '<optgroup label="' . $k . '">';
118
+
119
+ foreach($v as $opt => $val) {
120
+ $this->make_option($opt, $val, $k);
121
+ }
122
+
123
+ echo '</optgroup>';
124
+
125
+ continue;
126
+ }
127
+
128
+ $this->make_option($k, $v);
129
+ }
130
+ //foreach
131
+
132
+ echo '</select>';
133
+ } else {
134
+ echo '<strong>' . __( 'No items of this type were found.', 'redux-framework' ) . '</strong>';
135
+ }
136
+ } //function
137
+
138
+ private function make_option($id, $value, $group_name = '') {
139
+ if ( is_array( $this->value ) ) {
140
+ $selected = ( is_array( $this->value ) && in_array( $id, $this->value ) ) ? ' selected="selected"' : '';
141
+ } else {
142
+ $selected = selected( $this->value, $id, false );
143
+ }
144
+
145
+ echo '<option value="' . $id . '"' . $selected . '>' . $value . '</option>';
146
+ }
147
+
148
+ /**
149
+ * Enqueue Function.
150
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
151
+ *
152
+ * @since ReduxFramework 1.0.0
153
+ */
154
+ public function enqueue() {
155
+ wp_enqueue_style( 'select2-css' );
156
+
157
+ if (isset($this->field['sortable']) && $this->field['sortable']) {
158
+ wp_enqueue_script('jquery-ui-sortable');
159
+ }
160
+
161
+ wp_enqueue_script(
162
+ 'redux-field-select-js',
163
+ ReduxFramework::$_url . 'inc/fields/select/field_select' . Redux_Functions::isMin() . '.js',
164
+ array( 'jquery', 'select2-js', 'redux-js' ),
165
+ time(),
166
+ true
167
+ );
168
+
169
+ if ($this->parent->args['dev_mode']) {
170
+ wp_enqueue_style(
171
+ 'redux-field-select-css',
172
+ ReduxFramework::$_url . 'inc/fields/select/field_select.css',
173
+ array(),
174
+ time(),
175
+ 'all'
176
+ );
177
+ }
178
+ } //function
179
+ } //class
180
+ }
options/redux-framework/inc/fields/select/field_select.scss ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ .redux-container-select {
2
+ li.ui-state-highlight {
3
+ height: 20px;
4
+ margin-top: 2px;
5
+ margin-left: 5px;
6
+ width: 64px;
7
+ margin-bottom: 0;
8
+ }
9
+ }
options/redux-framework/inc/fields/switch/field_switch.css ADDED
@@ -0,0 +1 @@
 
1
+ .redux-container-switch .switch-options{min-height:30px;margin-right:10px}.redux-container-switch .switch-options label{cursor:pointer}.redux-container-switch .switch-options input{display:none}.redux-container-switch .cb-enable,.redux-container-switch .cb-disable{padding:0 10px;border-width:1px;border-style:solid;-webkit-appearance:none;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.redux-container-switch .cb-enable span,.redux-container-switch .cb-disable span{line-height:30px;display:block;font-weight:700;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-user-select:none;user-select:none}.redux-container-switch .cb-enable,.redux-container-switch .cb-disable,.redux-container-switch .cb-enable span,.redux-container-switch .cb-disable span{display:block;float:left}.redux-container-switch .cb-enable{border-right:0;border-radius:3px 0px 0px 3px;-moz-border-radius:3px 0px 0px 3px;-webkit-border-radius:3px 0px 0px 3px}.redux-container-switch .cb-enable.selected{color:#fff}.redux-container-switch .cb-disable{border-left:0;border-radius:0px 3px 3px 0px;-moz-border-radius:0px 3px 3px 0px;-webkit-border-radius:0px 3px 3px 0px}.redux-container-switch .cb-disable.selected{color:#fff}
options/redux-framework/inc/fields/switch/field_switch.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global redux_change, redux*/
2
+
3
+ /**
4
+ * Switch
5
+ * Dependencies : jquery
6
+ * Feature added by : Smartik - http://smartik.ws/
7
+ * Date : 03.17.2013
8
+ */
9
+
10
+ (function( $ ) {
11
+ "use strict";
12
+
13
+ redux.field_objects = redux.field_objects || {};
14
+ redux.field_objects.switch = redux.field_objects.switch || {};
15
+
16
+ $( document ).ready(
17
+ function() {
18
+ //redux.field_objects.switch.init();
19
+ }
20
+ );
21
+
22
+ redux.field_objects.switch.init = function( selector ) {
23
+
24
+ if ( !selector ) {
25
+ selector = $( document ).find( ".redux-group-tab:visible" ).find( '.redux-container-switch:visible' );
26
+ }
27
+
28
+ $( selector ).each(
29
+ function() {
30
+ var el = $( this );
31
+ var parent = el;
32
+ if ( !el.hasClass( 'redux-field-container' ) ) {
33
+ parent = el.parents( '.redux-field-container:first' );
34
+ }
35
+ if ( parent.is( ":hidden" ) ) { // Skip hidden fields
36
+ return;
37
+ }
38
+ if ( parent.hasClass( 'redux-field-init' ) ) {
39
+ parent.removeClass( 'redux-field-init' );
40
+ } else {
41
+ return;
42
+ }
43
+ el.find( ".cb-enable" ).click(
44
+ function() {
45
+ if ( $( this ).hasClass( 'selected' ) ) {
46
+ return;
47
+ }
48
+
49
+ var parent = $( this ).parents( '.switch-options' );
50
+
51
+ $( '.cb-disable', parent ).removeClass( 'selected' );
52
+ $( this ).addClass( 'selected' );
53
+ $( '.checkbox-input', parent ).val( 1 ).trigger('change');
54
+
55
+ redux_change( $( '.checkbox-input', parent ) );
56
+
57
+ //fold/unfold related options
58
+ var obj = $( this );
59
+ var $fold = '.f_' + obj.data( 'id' );
60
+
61
+ el.find( $fold ).slideDown( 'normal', "swing" );
62
+ }
63
+ );
64
+
65
+ el.find( ".cb-disable" ).click(
66
+ function() {
67
+ if ( $( this ).hasClass( 'selected' ) ) {
68
+ return;
69
+ }
70
+
71
+ var parent = $( this ).parents( '.switch-options' );
72
+
73
+ $( '.cb-enable', parent ).removeClass( 'selected' );
74
+ $( this ).addClass( 'selected' );
75
+ $( '.checkbox-input', parent ).val( 0 ).trigger('change');
76
+
77
+ redux_change( $( '.checkbox-input', parent ) );
78
+
79
+ //fold/unfold related options
80
+ var obj = $( this );
81
+ var $fold = '.f_' + obj.data( 'id' );
82
+
83
+ el.find( $fold ).slideUp( 'normal', "swing" );
84
+ }
85
+ );
86
+
87
+ el.find( '.cb-enable span, .cb-disable span' ).find().attr( 'unselectable', 'on' );
88
+ }
89
+ );
90
+ };
91
+ })( jQuery );
options/redux-framework/inc/fields/switch/field_switch.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects["switch"]=redux.field_objects["switch"]||{},a(document).ready(function(){}),redux.field_objects["switch"].init=function(b){b||(b=a(document).find(".redux-group-tab:visible").find(".redux-container-switch:visible")),a(b).each(function(){var b=a(this),c=b;b.hasClass("redux-field-container")||(c=b.parents(".redux-field-container:first")),c.is(":hidden")||c.hasClass("redux-field-init")&&(c.removeClass("redux-field-init"),b.find(".cb-enable").click(function(){if(!a(this).hasClass("selected")){var c=a(this).parents(".switch-options");a(".cb-disable",c).removeClass("selected"),a(this).addClass("selected"),a(".checkbox-input",c).val(1).trigger("change"),redux_change(a(".checkbox-input",c));var d=a(this),e=".f_"+d.data("id");b.find(e).slideDown("normal","swing")}}),b.find(".cb-disable").click(function(){if(!a(this).hasClass("selected")){var c=a(this).parents(".switch-options");a(".cb-enable",c).removeClass("selected"),a(this).addClass("selected"),a(".checkbox-input",c).val(0).trigger("change"),redux_change(a(".checkbox-input",c));var d=a(this),e=".f_"+d.data("id");b.find(e).slideUp("normal","swing")}}),b.find(".cb-enable span, .cb-disable span").find().attr("unselectable","on"))})}}(jQuery);
options/redux-framework/inc/fields/switch/field_switch.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( ! defined( 'ABSPATH' ) ) {
5
+ exit;
6
+ }
7
+
8
+ if ( ! class_exists( 'ReduxFramework_switch' ) ) {
9
+ class ReduxFramework_switch {
10
+
11
+ /**
12
+ * Field Constructor.
13
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
14
+ *
15
+ * @since ReduxFramework 0.0.4
16
+ */
17
+ function __construct( $field = array(), $value = '', $parent ) {
18
+ $this->parent = $parent;
19
+ $this->field = $field;
20
+ $this->value = $value;
21
+ }
22
+
23
+ /**
24
+ * Field Render Function.
25
+ * Takes the vars and outputs the HTML for the field in the settings
26
+ *
27
+ * @since ReduxFramework 0.0.4
28
+ */
29
+ function render() {
30
+
31
+ $cb_enabled = $cb_disabled = ''; //no errors, please
32
+ //
33
+ //Get selected
34
+ if ( (int) $this->value == 1 ) {
35
+ $cb_enabled = ' selected';
36
+ } else {
37
+ $cb_disabled = ' selected';
38
+ }
39
+
40
+ //Label ON
41
+ $this->field['on'] = isset( $this->field['on'] ) ? $this->field['on'] : __( 'On', 'redux-framework' );
42
+
43
+ //Label OFF
44
+ $this->field['off'] = isset( $this->field['off'] ) ? $this->field['off'] : __( 'Off', 'redux-framework' );
45
+
46
+ echo '<div class="switch-options">';
47
+ echo '<label class="cb-enable' . $cb_enabled . '" data-id="' . $this->field['id'] . '"><span>' . $this->field['on'] . '</span></label>';
48
+ echo '<label class="cb-disable' . $cb_disabled . '" data-id="' . $this->field['id'] . '"><span>' . $this->field['off'] . '</span></label>';
49
+ echo '<input type="hidden" class="checkbox checkbox-input ' . $this->field['class'] . '" id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '" value="' . $this->value . '" />';
50
+ echo '</div>';
51
+ } //function
52
+
53
+ /**
54
+ * Enqueue Function.
55
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
56
+ *
57
+ * @since ReduxFramework 0.0.4
58
+ */
59
+ function enqueue() {
60
+ wp_enqueue_script(
61
+ 'redux-field-switch-js',
62
+ ReduxFramework::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js',
63
+ array( 'jquery', 'redux-js' ),
64
+ time(),
65
+ true
66
+ );
67
+
68
+ if ($this->parent->args['dev_mode']) {
69
+ wp_enqueue_style(
70
+ 'redux-field-switch-css',
71
+ ReduxFramework::$_url . 'inc/fields/switch/field_switch.css',
72
+ array(),
73
+ time(),
74
+ 'all'
75
+ );
76
+ }
77
+ }
78
+ }
79
+ }
options/redux-framework/inc/fields/switch/field_switch.scss ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .redux-container-switch {
2
+ .switch-options {
3
+ min-height: 30px;
4
+ margin-right: 10px;
5
+
6
+ label {
7
+ cursor: pointer;
8
+ }
9
+
10
+ input {
11
+ display: none;
12
+ }
13
+ }
14
+
15
+ .cb-enable,
16
+ .cb-disable {
17
+ padding: 0 10px;
18
+ border-width: 1px;
19
+ border-style: solid;
20
+ -webkit-appearance: none;
21
+ white-space: nowrap;
22
+ -webkit-box-sizing: border-box;
23
+ -moz-box-sizing: border-box;
24
+ box-sizing: border-box;
25
+
26
+ span {
27
+ line-height: 30px;
28
+ display: block;
29
+ font-weight: 700;
30
+ -webkit-user-select: none;
31
+ -khtml-user-select: none;
32
+ -moz-user-select: none;
33
+ -o-user-select: none;
34
+ -ms-user-select: none;
35
+ user-select: none;
36
+ }
37
+ }
38
+
39
+ .cb-enable,
40
+ .cb-disable,
41
+ .cb-enable span,
42
+ .cb-disable span {
43
+ display: block;
44
+ float: left;
45
+ }
46
+
47
+ .cb-enable {
48
+ border-right: 0;
49
+ border-radius: 3px 0px 0px 3px;
50
+ -moz-border-radius: 3px 0px 0px 3px;
51
+ -webkit-border-radius: 3px 0px 0px 3px;
52
+
53
+ &.selected {
54
+ color: #fff;
55
+ }
56
+ }
57
+
58
+ .cb-disable {
59
+ border-left: 0;
60
+ border-radius: 0px 3px 3px 0px;
61
+ -moz-border-radius: 0px 3px 3px 0px;
62
+ -webkit-border-radius: 0px 3px 3px 0px;
63
+
64
+ &.selected {
65
+ color: #fff;
66
+ }
67
+ }
68
+ }
options/redux-framework/inc/fields/switch/slider-control.png ADDED
Binary file
options/redux-framework/inc/fields/switch/switch.gif ADDED
Binary file
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === AMP - Accelerated Mobile Pages ===
2
  Contributors: mohammed_kaludi, ahmedkaludi
3
- Tags: accelerated mobile pages, amp, mobile, amp project, google amp, amp wp
4
  Requires at least: 3.0
5
  Tested up to: 4.5.3
6
- Stable tag: 0.7.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -18,6 +18,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
18
  **Features:**
19
 
20
  * Automatically integrate AMP to your website
 
21
  * Google Analytics Support
22
  * User Friendly Theme Options Panel
23
  * Unlimited Color Scheme
@@ -31,7 +32,7 @@ Automatically add Accelerated Mobile Pages (Google AMP Project) functionality on
31
  * Great Support & Active Development
32
 
33
 
34
- **NOTE: Next Big Update of this plugin will be released on 7th September 2016.
35
 
36
 
37
  **How to test if AMP is working or not?**
@@ -162,4 +163,8 @@ Please check if you have "Pretty Permalinks" enabled. If not then activate it. F
162
  * Color Scheme Feature Added
163
  * User friendly Options Panel Added
164
  * iFrame support Added
165
- * Few Minor Bugs Fixed
 
 
 
 
1
  === AMP - Accelerated Mobile Pages ===
2
  Contributors: mohammed_kaludi, ahmedkaludi
3
+ Tags: amp, accelerated mobile pages, mobile, amp project, google amp, amp wp, google
4
  Requires at least: 3.0
5
  Tested up to: 4.5.3
6
+ Stable tag: 0.7.6
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
18
  **Features:**
19
 
20
  * Automatically integrate AMP to your website
21
+ * Google Adsense (AMP-AD) Support with 4 different Ad slots across the layout! The First Plugin to have this capability.
22
  * Google Analytics Support
23
  * User Friendly Theme Options Panel
24
  * Unlimited Color Scheme
32
  * Great Support & Active Development
33
 
34
 
35
+ **NOTE: Next Big Update of this plugin will be released before 7th September 2016.
36
 
37
 
38
  **How to test if AMP is working or not?**
163
  * Color Scheme Feature Added
164
  * User friendly Options Panel Added
165
  * iFrame support Added
166
+ * Few Minor Bugs Fixed
167
+
168
+ = 0.7.6 =
169
+ * Google Adsense Support Added with AMP-Ad
170
+ * Wrong Homepage rel amphtml bug fixed
themes/default/footer.php CHANGED
@@ -1,4 +1,24 @@
1
  <?php global $redux_builder_amp; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  </main>
3
 
4
  <footer class="container">
1
  <?php global $redux_builder_amp; ?>
2
+ <?php if($redux_builder_amp['enable-amp-ads-2'] == true) : ?>
3
+ <div class="amp-ad-wrapper">
4
+ <amp-ad class="amp-ad-2"
5
+ <?php if($redux_builder_amp['enable-amp-ads-select-2'] == 1) : ?>
6
+ width=300 height=250
7
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-2'] == 2) :?>
8
+ width=336 height=280
9
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-2'] == 3) :?>
10
+ width=728 height=90
11
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-2'] == 4) :?>
12
+ width=300 height=600
13
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-2'] == 5) :?>
14
+ width=320 height=100
15
+ <?php endif?>
16
+ type="adsense"
17
+ data-ad-client="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-client-2']; ?>"
18
+ data-ad-slot="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-slot-2']; ?>">
19
+ </amp-ad>
20
+ </div>
21
+ <?php elseif ($redux_builder_amp['enable-amp-ads-2'] == false) : endif ?>
22
  </main>
23
 
24
  <footer class="container">
themes/default/functions.php CHANGED
@@ -289,6 +289,15 @@ function amp_custom_style() {
289
  max-width: 100%;
290
  height: auto;
291
  }
 
 
 
 
 
 
 
 
 
292
 
293
  @media screen and (min-width: 700px) {
294
  /*header, footer, main, footer {
289
  max-width: 100%;
290
  height: auto;
291
  }
292
+ amp-ad{ }
293
+ .amp-ad-wrapper{
294
+ text-align: center
295
+ }
296
+ .amp-ad-1{ margin-top: -18px; margin-bottom: -18px; }
297
+ .ad-1-wrapper{ margin-top: 26px;}
298
+ .amp-ad-2{ margin-top: 10px; margin-bottom: -15px; }
299
+ .amp-ad-3{ }
300
+ .amp-ad-4{ }
301
 
302
  @media screen and (min-width: 700px) {
303
  /*header, footer, main, footer {
themes/default/header.php CHANGED
@@ -3,10 +3,13 @@
3
 
4
  <head>
5
  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
 
6
  <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
7
  <script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
8
  <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
9
  <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
 
 
10
 
11
  <title>
12
  <?php
@@ -53,8 +56,7 @@
53
 
54
  <body id="<?php if ( !is_single() && !is_page() ) { ?>home<?php } ?>">
55
 
56
- <header class="container">
57
-
58
  <div id="headerwrap">
59
  <div id="header">
60
 
@@ -89,4 +91,24 @@
89
  if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. ?>
90
  <?php }
91
  } ?>
92
- <main role="main">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  <head>
5
  <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
6
+
7
  <script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
8
  <script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
9
  <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
10
  <script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
11
+ <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
12
+ <script async custom-element="amp-sticky-ad" src="https://cdn.ampproject.org/v0/amp-sticky-ad-0.1.js"></script>
13
 
14
  <title>
15
  <?php
56
 
57
  <body id="<?php if ( !is_single() && !is_page() ) { ?>home<?php } ?>">
58
 
59
+ <header class="container">
 
60
  <div id="headerwrap">
61
  <div id="header">
62
 
91
  if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. ?>
92
  <?php }
93
  } ?>
94
+ <main role="main">
95
+ <?php if($redux_builder_amp['enable-amp-ads-1'] == true) : ?>
96
+ <div class="amp-ad-wrapper">
97
+ <amp-ad class="amp-ad-1"
98
+ <?php if($redux_builder_amp['enable-amp-ads-select-1'] == 1) : ?>
99
+ width=300 height=250
100
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-1'] == 2) :?>
101
+ width=336 height=280
102
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-1'] == 3) :?>
103
+ width=728 height=90
104
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-1'] == 4) :?>
105
+ width=300 height=600
106
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-1'] == 5) :?>
107
+ width=320 height=100
108
+ <?php endif?>
109
+ type="adsense"
110
+ data-ad-client="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-client-1']; ?>"
111
+ data-ad-slot="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-slot-1']; ?>">
112
+ </amp-ad>
113
+ </div>
114
+ <?php elseif ($redux_builder_amp['enable-amp-ads-1'] == false) : endif ?>
themes/default/single.php CHANGED
@@ -3,7 +3,7 @@
3
  <div id="contentwrap">
4
  <?php if ( have_posts() ): while ( have_posts() ): the_post(); ?>
5
 
6
- <div class="postmeta">
7
  <p>By <a href="#"><?php the_author_meta( 'display_name' ); ?></a> on <?php the_time( get_option( 'date_format' ) ) ?> <span>Posted in <?php the_category( ', ' ) ?></span></p>
8
  </div>
9
 
@@ -12,6 +12,27 @@
12
  </div>
13
 
14
  <div class="post">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  <div class="sticky_social">
16
  <amp-social-share type="twitter"
17
  width="50"
@@ -35,7 +56,29 @@
35
 
36
  <?php the_content(); ?>
37
  <?php wp_link_pages( 'before=<p>&after=</p>&next_or_number=number&pagelink=Page %' ); ?>
38
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  <div id="posttags">
41
  <p><?php the_tags( 'Tags: ', ', ' ); ?></p>
3
  <div id="contentwrap">
4
  <?php if ( have_posts() ): while ( have_posts() ): the_post(); ?>
5
 
6
+ <div class="postmeta <?php if($redux_builder_amp['enable-amp-ads-1'] == true) : ?>ad-1-wrapper<?php endif ?>">
7
  <p>By <a href="#"><?php the_author_meta( 'display_name' ); ?></a> on <?php the_time( get_option( 'date_format' ) ) ?> <span>Posted in <?php the_category( ', ' ) ?></span></p>
8
  </div>
9
 
12
  </div>
13
 
14
  <div class="post">
15
+ <?php if($redux_builder_amp['enable-amp-ads-3'] == true) : ?>
16
+ <div class="amp-ad-wrapper">
17
+ <amp-ad class="amp-ad-3"
18
+ <?php if($redux_builder_amp['enable-amp-ads-select-3'] == 1) : ?>
19
+ width=300 height=250
20
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 2) :?>
21
+ width=336 height=280
22
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 3) :?>
23
+ width=728 height=90
24
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 4) :?>
25
+ width=300 height=600
26
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-3'] == 5) :?>
27
+ width=320 height=100
28
+ <?php endif?>
29
+ type="adsense"
30
+ data-ad-client="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-client-3']; ?>"
31
+ data-ad-slot="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-slot-3']; ?>">
32
+ </amp-ad>
33
+ </div>
34
+ <?php elseif ($redux_builder_amp['enable-amp-ads-3'] == false) : endif ?>
35
+
36
  <div class="sticky_social">
37
  <amp-social-share type="twitter"
38
  width="50"
56
 
57
  <?php the_content(); ?>
58
  <?php wp_link_pages( 'before=<p>&after=</p>&next_or_number=number&pagelink=Page %' ); ?>
59
+
60
+ <?php if($redux_builder_amp['enable-amp-ads-4'] == true) : ?>
61
+ <div class="amp-ad-wrapper">
62
+ <amp-ad class="amp-ad-4"
63
+ <?php if($redux_builder_amp['enable-amp-ads-select-4'] == 1) : ?>
64
+ width=300 height=250
65
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-4'] == 2) :?>
66
+ width=336 height=280
67
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-4'] == 3) :?>
68
+ width=728 height=90
69
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-4'] == 4) :?>
70
+ width=300 height=600
71
+ <?php elseif ($redux_builder_amp['enable-amp-ads-select-4'] == 5) :?>
72
+ width=320 height=100
73
+ <?php endif?>
74
+ type="adsense"
75
+ data-ad-client="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-client-4']; ?>"
76
+ data-ad-slot="<?php echo $redux_builder_amp['enable-amp-ads-text-feild-slot-4']; ?>">
77
+ </amp-ad>
78
+ </div>
79
+ <?php elseif ($redux_builder_amp['enable-amp-ads-4'] == false) : endif ?>
80
+
81
+ </div>
82
 
83
  <div id="posttags">
84
  <p><?php the_tags( 'Tags: ', ', ' ); ?></p>