Redux Framework - Version 3.0.6

Version Description

  • Hide customizer fields by default while still under development.
  • Fix Issue 123 - Language translations to actually function properly embedded as well as in the plugin.
  • Fix Issue 151 - Media field uses thumbnail not full image for preview. Also now storing the thumbnail URL. Uses the smallest available size as the thumb regardless of the name.
  • Fix Issue 147 - Option to pass params to select2. Contributed by @andreilupu. Thanks!
  • Added trim function to ace editor value to prevent whitespace before and after value keep being added
  • htmlspecialchars() value in pre editor for ace. to prevent html tags being hidden in editor and rendered in dom
  • Feature: Added optional 'add_text' argument for multi_text field so users can define button text.
  • Added consistent remove button on multi text, and used sanitize function for section id
  • Feature: Added roles as data for field data
  • Feature: Adding data layout options for multi checkbox and radio, we now have quarter, third, half, and full column layouts for these fields.
  • Feature: Eliminate REDUX_DIR and REDUX_URL constants and instead created static ReduxFramework::$url and ReduxFramework::$_dir for cleaner code. Feature: Code at bottom of sample-config.php to hide plugin activation text about a demo plugin as well as code to demo how to hide the plugin demomode link.
  • Started work on class definitions of each field and class. Preparing for the panel builder we are planning to make.
Download this release

Release Info

Developer dovyp
Plugin Icon 128x128 Redux Framework
Version 3.0.6
Comparing to
See all releases

Code changes from version 3.0.5 to 3.0.6

Files changed (42) hide show
  1. README.md +18 -16
  2. README.txt +18 -1
  3. ReduxCore/assets/css/style.css +7 -3
  4. ReduxCore/assets/css/style.less +20 -2
  5. ReduxCore/assets/js/admin.js +24 -35
  6. ReduxCore/extensions/customizer/extension_customizer.php +4 -2
  7. ReduxCore/framework.php +224 -51
  8. ReduxCore/inc/fields/ace_editor/field_ace_editor.php +5 -5
  9. ReduxCore/inc/fields/border/field_border.php +3 -3
  10. ReduxCore/inc/fields/button_set/field_button_set.php +1 -1
  11. ReduxCore/inc/fields/checkbox/field_checkbox.php +2 -1
  12. ReduxCore/inc/fields/color/field_color.php +2 -2
  13. ReduxCore/inc/fields/color_gradient/field_color_gradient.php +3 -3
  14. ReduxCore/inc/fields/date/field_date.php +1 -1
  15. ReduxCore/inc/fields/dimensions/field_dimensions.php +2 -2
  16. ReduxCore/inc/fields/editor/field_editor.php +1 -1
  17. ReduxCore/inc/fields/gallery/field_gallery.php +1 -1
  18. ReduxCore/inc/fields/group/field_group.php +3 -3
  19. ReduxCore/inc/fields/image_select/field_image_select.php +2 -2
  20. ReduxCore/inc/fields/info/field_info.php +1 -1
  21. ReduxCore/inc/fields/link_color/field_link_color.php +3 -3
  22. ReduxCore/inc/fields/media/field_media.js +41 -34
  23. ReduxCore/inc/fields/media/field_media.min.js +2 -1
  24. ReduxCore/inc/fields/media/field_media.php +8 -3
  25. ReduxCore/inc/fields/multi_text/field_multi_text.php +10 -6
  26. ReduxCore/inc/fields/radio/field_radio.php +2 -1
  27. ReduxCore/inc/fields/select/field_select.js +16 -13
  28. ReduxCore/inc/fields/select/field_select.min.js +1 -1
  29. ReduxCore/inc/fields/select/field_select.php +10 -4
  30. ReduxCore/inc/fields/slider/field_slider.php +3 -3
  31. ReduxCore/inc/fields/slides/field_slides.php +4 -4
  32. ReduxCore/inc/fields/sortable/field_sortable.php +2 -2
  33. ReduxCore/inc/fields/sorter/field_sorter.php +2 -2
  34. ReduxCore/inc/fields/spacing/field_spacing.php +7 -2
  35. ReduxCore/inc/fields/spinner/field_spinner.php +4 -4
  36. ReduxCore/inc/fields/switch/field_switch.php +2 -2
  37. ReduxCore/inc/fields/typography/field_typography.php +11 -11
  38. ReduxCore/languages/redux-framework.mo +0 -0
  39. ReduxCore/languages/redux-framework.pot +95 -59
  40. class-redux-plugin.php +24 -29
  41. redux-framework.php +1 -1
  42. sample/sample-config.php +57 -25
README.md CHANGED
@@ -4,24 +4,11 @@ Wordpress options framework which uses the [WordPress Settings API](http://codex
4
 
5
  ## Getting Started with Redux ##
6
 
7
- ReduxFramework has been built from the group up as a auto-updating plugin. Updates are served from the Wordpress.org plugin directory. In this way Redux can be used by Themes and Plugins multiple time through the same insance.
8
-
9
- To install the plugin, just download the master branch zip file, and install as you would any other Wordpress plugin.
10
-
11
-
12
- ## Creating a config file ##
13
-
14
- Inside the plugin directory is a `sample` folder. Copy this into your theme or plugin. DO NOT modify anything within the plugin or you will all your work at each update of the Redux Plugin.
15
-
16
- Include the `sample-config.php` file in your theme `functions.php` or plugin as follows:
17
-
18
- ```php
19
- require_once('path/to/copied/sample/sample-config.php');
20
- ```
21
-
22
- Edit ```sample-config.php``` as needed.
23
 
 
24
 
 
25
 
26
 
27
  ## Donate to the Framework ##
@@ -67,6 +54,21 @@ Send me an email at ghost1227@reduxframework.com so I can add you to our user sp
67
 
68
  ### Master ###
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  = 3.0.5 =
71
  * Fixed how Redux is initialised so it works in any and all files without hooking into the init function.
72
  * Issue #151: Added thumbnails to media and displayed those instead of full image.
4
 
5
  ## Getting Started with Redux ##
6
 
7
+ ReduxFramework has been built from the groud up to be the most flexible framework around. You can run it as an auto-updating plugin, or embed it inside your plugin or theme. It allows for multiple copies of itself within the same Wordpress instance. For a guide on getting started please refer to [http://reduxframework.com/docs/getting-started/](http://reduxframework.com/docs/getting-started/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
+ ## Please Post Reviews and Spread the Word ##
10
 
11
+ ReduxFramework has just released to the Wordpress Plugins directory. Please spread the word, tweet, and (most importantly) post reviews on http://wordpress.org/plugins/redux-framework/.
12
 
13
 
14
  ## Donate to the Framework ##
54
 
55
  ### Master ###
56
 
57
+ = 3.0.6 =
58
+ * Hide customizer fields by default while still under development.
59
+ * Fix Issue 123 - Language translations to actually function properly embedded as well as in the plugin.
60
+ * Fix Issue 151 - Media field uses thumbnail not full image for preview. Also now storing the thumbnail URL. Uses the smallest available size as the thumb regardless of the name.
61
+ * Fix Issue 147 - Option to pass params to select2. Contributed by @andreilupu. Thanks!
62
+ * Added trim function to ace editor value to prevent whitespace before and after value keep being added
63
+ * htmlspecialchars() value in pre editor for ace. to prevent html tags being hidden in editor and rendered in dom
64
+ * Feature: Added optional 'add_text' argument for multi_text field so users can define button text.
65
+ * Added consistent remove button on multi text, and used sanitize function for section id
66
+ * Feature: Added roles as data for field data
67
+ * Feature: Adding data layout options for multi checkbox and radio, we now have quarter, third, half, and full column layouts for these fields.
68
+ * Feature: Eliminate REDUX_DIR and REDUX_URL constants and instead created static ReduxFramework::$_url and ReduxFramework::$_dir for cleaner code.
69
+ Feature: Code at bottom of sample-config.php to hide plugin activation text about a demo plugin as well as code to demo how to hide the plugin demo_mode link.
70
+ * Started work on class definitions of each field and class. Preparing for the panel builder we are planning to make.
71
+
72
  = 3.0.5 =
73
  * Fixed how Redux is initialised so it works in any and all files without hooking into the init function.
74
  * Issue #151: Added thumbnails to media and displayed those instead of full image.
README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: admin, admin interface, options, theme options, plugin options, options framework, settings
5
  Requires at least: 3.5.1
6
  Tested up to: 3.7
7
- Stable tag: 3.0.5
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -88,6 +88,8 @@ Special thanks to the following people for language translations:
88
 
89
  * German [de_DE] @Abu-Taymiyyah
90
  * Bahasa Indonesia [id_ID] @riesurya
 
 
91
 
92
  = Get Involved =
93
  Redux is an ever-changing, living system. Want to stay up to date or
@@ -137,6 +139,21 @@ That's because the real FAQ section is on our site! Please visit [http://reduxfr
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  = 3.0.5 =
141
  * Fixed how Redux is initialised so it works in any and all files without hooking into the init function.
142
  * Issue #151: Added thumbnails to media and displayed those instead of full image.
4
  Tags: admin, admin interface, options, theme options, plugin options, options framework, settings
5
  Requires at least: 3.5.1
6
  Tested up to: 3.7
7
+ Stable tag: 3.0.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
88
 
89
  * German [de_DE] @Abu-Taymiyyah
90
  * Bahasa Indonesia [id_ID] @riesurya
91
+ * Tirnovanuaurel [IT_it] [RO_ro] @tirnovanuaurel
92
+
93
 
94
  = Get Involved =
95
  Redux is an ever-changing, living system. Want to stay up to date or
139
 
140
  == Changelog ==
141
 
142
+ = 3.0.6 =
143
+ * Hide customizer fields by default while still under development.
144
+ * Fix Issue 123 - Language translations to actually function properly embedded as well as in the plugin.
145
+ * Fix Issue 151 - Media field uses thumbnail not full image for preview. Also now storing the thumbnail URL. Uses the smallest available size as the thumb regardless of the name.
146
+ * Fix Issue 147 - Option to pass params to select2. Contributed by @andreilupu. Thanks!
147
+ * Added trim function to ace editor value to prevent whitespace before and after value keep being added
148
+ * htmlspecialchars() value in pre editor for ace. to prevent html tags being hidden in editor and rendered in dom
149
+ * Feature: Added optional 'add_text' argument for multi_text field so users can define button text.
150
+ * Added consistent remove button on multi text, and used sanitize function for section id
151
+ * Feature: Added roles as data for field data
152
+ * Feature: Adding data layout options for multi checkbox and radio, we now have quarter, third, half, and full column layouts for these fields.
153
+ * Feature: Eliminate REDUX_DIR and REDUX_URL constants and instead created static ReduxFramework::$_url and ReduxFramework::$_dir for cleaner code.
154
+ Feature: Code at bottom of sample-config.php to hide plugin activation text about a demo plugin as well as code to demo how to hide the plugin demo_mode link.
155
+ * Started work on class definitions of each field and class. Preparing for the panel builder we are planning to make.
156
+
157
  = 3.0.5 =
158
  * Fixed how Redux is initialised so it works in any and all files without hooking into the init function.
159
  * Issue #151: Added thumbnails to media and displayed those instead of full image.
ReduxCore/assets/css/style.css CHANGED
@@ -44,8 +44,8 @@ a{outline:0 !important}
44
  .redux-group-tab .form-table.no-border{border-top:none}
45
  .redux-group-tab .form-table tr{border-bottom:1px solid #e7e7e7}
46
  .redux-group-tab .form-table tr:last-child{border-bottom:none}
47
- .redux-group-tab .form-table tr th,.redux-group-tab .form-table tr td{p2adding:20px 20px 40px 20px;color:#333}
48
- .redux-group-tab .form-table tr th{font-weight:bold;font-size:1.1em;width:30%}
49
  .redux-group-tab .form-table tr th span:first-child{font-weight:normal;display:block;color:#666}
50
  .redux-group-tab .form-table tr td .redux-th-warning{font-size:1em;color:#c09853;font-weight:normal;display:block}
51
  .redux-group-tab .form-table tr td .redux-field-warning{border-color:#c09853}
@@ -147,7 +147,7 @@ label.radio,label.multicheck{position:relative}
147
  #redux-main .input-append .add-on{border-top-right-radius:3px;border-bottom-right-radius:3px}
148
  #redux-main .input-prepend input{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}
149
  #redux-main .input-prepend .add-on{border-top-left-radius:3px;border-bottom-left-radius:3px}
150
- #redux-main td{padding:8px 0}
151
  #redux-main .mini,#redux-main input[type=text].mini{width:50px;text-align:center}
152
  #redux-main .upload{width:80%}
153
  .wrap{margin-top:0}
@@ -159,3 +159,7 @@ img{max-width:100%;max-height:100%}
159
  #redux-main span.description{font-style:normal}
160
  #redux-main #redux-system-info textarea{min-height:730px}
161
  #redux-main .field-desc{clear:both}
 
 
 
 
44
  .redux-group-tab .form-table.no-border{border-top:none}
45
  .redux-group-tab .form-table tr{border-bottom:1px solid #e7e7e7}
46
  .redux-group-tab .form-table tr:last-child{border-bottom:none}
47
+ .redux-group-tab .form-table tr th,.redux-group-tab .form-table tr td{color:#333}
48
+ .redux-group-tab .form-table tr th{font-weight:bold;font-size:1.1em;width:30%;padding:20px 5px 20px 0}
49
  .redux-group-tab .form-table tr th span:first-child{font-weight:normal;display:block;color:#666}
50
  .redux-group-tab .form-table tr td .redux-th-warning{font-size:1em;color:#c09853;font-weight:normal;display:block}
51
  .redux-group-tab .form-table tr td .redux-field-warning{border-color:#c09853}
147
  #redux-main .input-append .add-on{border-top-right-radius:3px;border-bottom-right-radius:3px}
148
  #redux-main .input-prepend input{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}
149
  #redux-main .input-prepend .add-on{border-top-left-radius:3px;border-bottom-left-radius:3px}
150
+ #redux-main td{padding:20px 0}
151
  #redux-main .mini,#redux-main input[type=text].mini{width:50px;text-align:center}
152
  #redux-main .upload{width:80%}
153
  .wrap{margin-top:0}
159
  #redux-main span.description{font-style:normal}
160
  #redux-main #redux-system-info textarea{min-height:730px}
161
  #redux-main .field-desc{clear:both}
162
+ #redux-main .data-full li{width:100%}
163
+ #redux-main .data-half li{width:50%;float:left}
164
+ #redux-main .data-third li{width:33.3%;float:left}
165
+ #redux-main .data-quarter li{width:25%;float:left}
ReduxCore/assets/css/style.less CHANGED
@@ -351,13 +351,13 @@ border: 1px solid #e5e5e5;
351
  }
352
  .redux-group-tab .form-table tr th,
353
  .redux-group-tab .form-table tr td{
354
- p2adding:20px 20px 40px 20px;
355
  color:#333333;
356
  }
357
  .redux-group-tab .form-table tr th{
358
  font-weight:bold;
359
  font-size:1.1em;
360
  width:30%;
 
361
  }
362
  .redux-group-tab .form-table tr th span:first-child{
363
  font-weight: normal;
@@ -866,7 +866,7 @@ label.radio, label.multicheck {
866
  }
867
 
868
  #redux-main td {
869
- padding: 8px 0;
870
  }
871
 
872
  #redux-main .mini, #redux-main input[type=text].mini {
@@ -984,3 +984,21 @@ img {
984
  #redux-main .field-desc {
985
  clear: both;
986
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  }
352
  .redux-group-tab .form-table tr th,
353
  .redux-group-tab .form-table tr td{
 
354
  color:#333333;
355
  }
356
  .redux-group-tab .form-table tr th{
357
  font-weight:bold;
358
  font-size:1.1em;
359
  width:30%;
360
+ padding:20px 5px 20px 0px;
361
  }
362
  .redux-group-tab .form-table tr th span:first-child{
363
  font-weight: normal;
866
  }
867
 
868
  #redux-main td {
869
+ padding: 20px 0;
870
  }
871
 
872
  #redux-main .mini, #redux-main input[type=text].mini {
984
  #redux-main .field-desc {
985
  clear: both;
986
  }
987
+
988
+ #redux-main .data-full li{
989
+ width: 100%;
990
+ }
991
+
992
+ #redux-main .data-half li{
993
+ width: 50%;
994
+ float: left;
995
+ }
996
+
997
+ #redux-main .data-third li{
998
+ width: 33.3%;
999
+ float: left;
1000
+ }
1001
+ #redux-main .data-quarter li{
1002
+ width: 25%;
1003
+ float: left;
1004
+ }
ReduxCore/assets/js/admin.js CHANGED
@@ -1,7 +1,6 @@
1
  /*global jQuery, document, redux_opts, confirm, relid:true, console, jsonView */
2
  (function($){
3
  'use strict';
4
-
5
  $.redux = $.redux || {}
6
 
7
  var the_body = $("body");
@@ -69,7 +68,6 @@
69
  var id = $(this).parents('.redux-field:first').data('id');
70
  if ( redux_opts.folds[ id ] ) {
71
  if ( !redux_opts.folds[ id ].parent ) {
72
-
73
  $.redux.verify_fold($(this));
74
  }
75
  }
@@ -78,7 +76,6 @@
78
 
79
  the_body.on('change', '#redux-main select, #redux-main radio, #redux-main input[type=checkbox], #redux-main input[type=hidden]', function(e){
80
  $.redux.check_dependencies(e,this);
81
-
82
  });
83
  }
84
 
@@ -529,9 +526,9 @@ jQuery(document).ready(function($) {
529
  jQuery('#redux-export-link-value').toggle('fade');
530
  });
531
 
532
- /**
533
- Show the sticky header bar and notes!
534
- **/
535
  var stickyHeight = jQuery('#redux-footer').height();
536
  jQuery('#redux-sticky-padder').css({
537
  height: stickyHeight
@@ -569,36 +566,13 @@ jQuery(document).ready(function($) {
569
  jQuery('.redux-save').click(function() {
570
  window.onbeforeunload = null;
571
  });
572
- /*
573
- // Markdown Viewer for Theme Documentation
574
- if ($('#theme_docs_section_group').length !== 0) {
575
- var converter = new Showdown.converter();
576
- var text = jQuery('#theme_docs_section_group').html();
577
- text = converter.makeHtml(text);
578
- jQuery('#theme_docs_section_group').html(text);
579
- }
580
- */
581
- // Hide the fold elements on load
582
-
583
- /*jQuery('.fold').each(function() {
584
- jQuery(this).parents("tr:first").addClass('hiddenFold');
585
- jQuery(this).parents("tr:first").hide();
586
- });*/
587
-
588
-
589
-
590
- /*jQuery( ".fold" ).promise().done(function() {
591
- // Hide the fold elements on load
592
- jQuery('.foldParent').each(function() {
593
- var id = jQuery(this).parents('.redux-field:first').data('id');
594
- if ( redux_opts.folds[ id ] ) {
595
- if ( !redux_opts.folds[ id ].parent ) {
596
- //verify_fold( jQuery( this ) );
597
- }
598
- }
599
- });
600
- });*/
601
 
 
 
 
602
  $('#consolePrintObject').on('click', function() {
603
  console.log(jQuery.parseJSON(jQuery("#redux-object-json").html()));
604
  });
@@ -606,7 +580,13 @@ jQuery(document).ready(function($) {
606
  if (typeof jsonView === 'function') {
607
  jsonView('#redux-object-json', '#redux-object-browser');
608
  }
 
 
 
609
 
 
 
 
610
  // Display errors on page load
611
  if (redux_opts.errors !== undefined) {
612
  jQuery("#redux-field-errors span").html(redux_opts.errors.total);
@@ -633,9 +613,15 @@ jQuery(document).ready(function($) {
633
  });
634
  });
635
  }
 
 
 
636
 
637
 
638
 
 
 
 
639
  //jQuery( ".redux-section-tabs" ).tabs();
640
  jQuery('.redux-section-tabs div').hide();
641
  jQuery('.redux-section-tabs div:first').show();
@@ -649,6 +635,9 @@ jQuery(document).ready(function($) {
649
  jQuery(currentTab).fadeIn();
650
  return false;
651
  });
 
 
 
652
 
653
 
654
  });
1
  /*global jQuery, document, redux_opts, confirm, relid:true, console, jsonView */
2
  (function($){
3
  'use strict';
 
4
  $.redux = $.redux || {}
5
 
6
  var the_body = $("body");
68
  var id = $(this).parents('.redux-field:first').data('id');
69
  if ( redux_opts.folds[ id ] ) {
70
  if ( !redux_opts.folds[ id ].parent ) {
 
71
  $.redux.verify_fold($(this));
72
  }
73
  }
76
 
77
  the_body.on('change', '#redux-main select, #redux-main radio, #redux-main input[type=checkbox], #redux-main input[type=hidden]', function(e){
78
  $.redux.check_dependencies(e,this);
 
79
  });
80
  }
81
 
526
  jQuery('#redux-export-link-value').toggle('fade');
527
  });
528
 
529
+ /**
530
+ BEGIN Sticky footer bar
531
+ **/
532
  var stickyHeight = jQuery('#redux-footer').height();
533
  jQuery('#redux-sticky-padder').css({
534
  height: stickyHeight
566
  jQuery('.redux-save').click(function() {
567
  window.onbeforeunload = null;
568
  });
569
+ /**
570
+ END Sticky footer bar
571
+ **/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
+ /**
574
+ BEGIN dev_mode commands
575
+ **/
576
  $('#consolePrintObject').on('click', function() {
577
  console.log(jQuery.parseJSON(jQuery("#redux-object-json").html()));
578
  });
580
  if (typeof jsonView === 'function') {
581
  jsonView('#redux-object-json', '#redux-object-browser');
582
  }
583
+ /**
584
+ END dev_mode commands
585
+ **/
586
 
587
+ /**
588
+ BEGIN error and warning notices
589
+ **/
590
  // Display errors on page load
591
  if (redux_opts.errors !== undefined) {
592
  jQuery("#redux-field-errors span").html(redux_opts.errors.total);
613
  });
614
  });
615
  }
616
+ /**
617
+ END error and warning notices
618
+ **/
619
 
620
 
621
 
622
+ /**
623
+ BEGIN Control the tabs of the site to the left. Eventually (perhaps) across the top too.
624
+ **/
625
  //jQuery( ".redux-section-tabs" ).tabs();
626
  jQuery('.redux-section-tabs div').hide();
627
  jQuery('.redux-section-tabs div:first').show();
635
  jQuery(currentTab).fadeIn();
636
  return false;
637
  });
638
+ /**
639
+ END Control the tabs of the site to the left. Eventually (perhaps) across the top too.
640
+ **/
641
 
642
 
643
  });
ReduxCore/extensions/customizer/extension_customizer.php CHANGED
@@ -53,6 +53,10 @@ if( !class_exists( 'ReduxFramework_extension_customizer' ) ) {
53
  if ($pagenow !== "customize.php" && $pagenow !== "admin-ajax.php") {
54
  return;
55
  }
 
 
 
 
56
 
57
  parent::__construct( $parent->sections, $parent->args, $parent->extra_tabs );
58
 
@@ -64,8 +68,6 @@ if( !class_exists( 'ReduxFramework_extension_customizer' ) ) {
64
  customize_controls_print_styles
65
  customize_controls_print_scripts
66
  customize_controls_print_footer_scripts
67
-
68
-
69
  */
70
 
71
  add_action( 'admin_init', array( &$this, '_enqueue' ), 30 ); // Customizer control scripts
53
  if ($pagenow !== "customize.php" && $pagenow !== "admin-ajax.php") {
54
  return;
55
  }
56
+
57
+ if ($parent->args['customizer'] === false) {
58
+ return;
59
+ }
60
 
61
  parent::__construct( $parent->sections, $parent->args, $parent->extra_tabs );
62
 
68
  customize_controls_print_styles
69
  customize_controls_print_scripts
70
  customize_controls_print_footer_scripts
 
 
71
  */
72
 
73
  add_action( 'admin_init', array( &$this, '_enqueue' ), 30 ); // Customizer control scripts
ReduxCore/framework.php CHANGED
@@ -16,7 +16,7 @@
16
  *
17
  * @package ReduxFramework
18
  * @author ReduxFramework Team
19
- * @version 3.0.5
20
  */
21
 
22
  // Exit if accessed directly
@@ -27,30 +27,6 @@ if( !defined( 'ABSPATH' ) ) exit;
27
  // Don't duplicate me!
28
  if( !class_exists( 'ReduxFramework' ) ) {
29
 
30
- define('REDUX_VERSION', '3.0.5');
31
-
32
- // Windows-proof constants: replace backward by forward slashes
33
- // Thanks to: https://github.com/peterbouwmeester
34
- /** @noinspection PhpUndefinedFunctionInspection */
35
- $fslashed_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
36
- $fslashed_abs = trailingslashit( str_replace( '\\', '/', ABSPATH ) );
37
- // Fix for when Wordpress is not in the wp-content directory
38
- if (strpos($fslashed_dir,$fslashed_abs) === false) {
39
- $parts = explode('/', $fslashed_abs);
40
- $test = str_replace('/'.max($parts), '', $fslashed_abs);
41
- if (strpos($fslashed_dir,$test) !== false) {
42
- $fslashed_abs = $test;
43
- }
44
- }
45
-
46
- // Framework base directory
47
- if( !defined( 'REDUX_DIR') )
48
- define( 'REDUX_DIR', $fslashed_dir );
49
-
50
- // Framework base URL
51
- if( !defined( 'REDUX_URL' ) )
52
- define( 'REDUX_URL', site_url( str_replace( $fslashed_abs, '', $fslashed_dir ) ) );
53
-
54
  /**
55
  * Main ReduxFramework class
56
  *
@@ -58,10 +34,182 @@ if( !class_exists( 'ReduxFramework' ) ) {
58
  */
59
  class ReduxFramework {
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  // Protected vars
62
  // These two are actually really unnecessary and should be deprecated
63
  protected $framework_url = 'http://www.reduxframework.com/';
64
- protected $framework_version = REDUX_VERSION;
65
 
66
  public $instance = null;
67
 
@@ -93,13 +241,14 @@ if( !class_exists( 'ReduxFramework' ) ) {
93
  * @return void
94
  */
95
  public function __construct( $sections = array(), $args = array(), $extra_tabs = array() ) {
 
96
  // Create defaults array
97
  $defaults = array();
98
 
99
  $defaults['opt_name'] = ''; // Must be defined by theme/plugin
100
  $defaults['google_api_key'] = ''; // Must be defined to add google fonts to the typography module
101
  $defaults['last_tab'] = '0';
102
- $defaults['menu_icon'] = REDUX_URL . 'assets/img/menu_icon.png';
103
  if (defined('MP6')) {
104
  $defaults['menu_icon'] = '';
105
  }
@@ -116,11 +265,11 @@ if( !class_exists( 'ReduxFramework' ) ) {
116
  $defaults['show_import_export'] = true;
117
  $defaults['dev_mode'] = false;
118
  $defaults['system_info'] = false;
119
- $defaults['footer_credit'] = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . ' <a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . $this->framework_version . '</span>';
120
  $defaults['help_tabs'] = array();
121
  $defaults['help_sidebar'] = ''; // __( '', 'redux-framework' );
122
  $defaults['database'] = ''; // possible: options, theme_mods, theme_mods_expanded, transient
123
- $defaults['customizer'] = true; // setting to true forces get_theme_mod_expanded
124
  $defaults['global_variable'] = '';
125
  $defaults['output'] = true; // Dynamically generate CSS
126
  /** @noinspection PhpUndefinedConstantInspection */
@@ -153,9 +302,6 @@ if( !class_exists( 'ReduxFramework' ) ) {
153
 
154
  $this->extra_tabs = $extra_tabs;
155
 
156
- // Options page
157
- add_action( 'admin_menu', array( &$this, '_internationalization' ) );
158
-
159
  // Set option with defaults
160
  add_action( 'init', array( &$this, '_set_default_options' ) );
161
 
@@ -174,10 +320,23 @@ if( !class_exists( 'ReduxFramework' ) ) {
174
  // Hook into the WP feeds for downloading exported settings
175
  add_action( 'do_feed_reduxopts-' . $this->args['opt_name'], array( &$this, '_download_options' ), 1, 1 );
176
 
 
 
 
177
  }
178
 
 
 
 
 
 
179
  public function _internationalization() {
180
- load_plugin_textdomain('redux-framework', false, basename( dirname( __FILE__ ) ) . '/languages' );
 
 
 
 
 
181
  }
182
 
183
  public function get_instance() {
@@ -371,6 +530,16 @@ if( !class_exists( 'ReduxFramework' ) ) {
371
  foreach($font_icons as $k) {
372
  $data[$k] = $k;
373
  }
 
 
 
 
 
 
 
 
 
 
374
  }else if ($type == "callback") {
375
  $data = call_user_func($args[0]);
376
  }//if
@@ -711,7 +880,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
711
  if( isset( $field['type'] ) ) {
712
  $field_class = 'ReduxFramework_' . $field['type'];
713
  if( !class_exists( $field_class ) ) {
714
- $class_file = apply_filters( 'redux-typeclass-load', REDUX_DIR . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
715
  if( $class_file ) {
716
  /** @noinspection PhpIncludeInspection */
717
  require_once( $class_file );
@@ -749,7 +918,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
749
 
750
  wp_register_style(
751
  'redux-css',
752
- REDUX_URL . 'assets/css/style.css',
753
  array( 'farbtastic' ),
754
  time(),
755
  'all'
@@ -757,7 +926,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
757
 
758
  wp_register_style(
759
  'redux-elusive-icon',
760
- REDUX_URL . 'assets/css/vendor/elusive-icons/elusive-webfont.css',
761
  array(),
762
  time(),
763
  'all'
@@ -765,7 +934,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
765
 
766
  wp_register_style(
767
  'redux-elusive-icon-ie7',
768
- REDUX_URL . 'assets/css/vendor/elusive-icons/elusive-webfont-ie7.css',
769
  array(),
770
  time(),
771
  'all'
@@ -773,7 +942,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
773
 
774
  wp_register_style(
775
  'select2-css',
776
- REDUX_URL . 'assets/js/vendor/select2/select2.css',
777
  array(),
778
  time(),
779
  'all'
@@ -783,7 +952,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
783
 
784
  wp_register_style(
785
  'jquery-ui-css',
786
- apply_filters( 'redux-ui-theme', REDUX_URL . 'assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.css' ),
787
  '',
788
  time(),
789
  'all'
@@ -800,7 +969,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
800
  if ( $this->args['dev_mode'] === true) { // Pretty object output
801
  wp_enqueue_script(
802
  'json-view-js',
803
- REDUX_URL . 'assets/js/vendor/jsonview.min.js',
804
  array( 'jquery' ),
805
  time(),
806
  true
@@ -809,8 +978,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
809
 
810
  wp_enqueue_script(
811
  'redux-js',
812
- //REDUX_URL . 'assets/js/admin.js',// DEBUG ONLY
813
- REDUX_URL . 'assets/js/admin.min.js',
814
  array( 'jquery','jquery-cookie' ),
815
  time(),
816
  true
@@ -818,7 +987,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
818
 
819
  wp_enqueue_script(
820
  'jquery-cookie',
821
- REDUX_URL . 'assets/js/vendor/cookie.js',
822
  array( 'jquery' ),
823
  time(),
824
  true
@@ -826,7 +995,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
826
 
827
  wp_register_script(
828
  'select2-js',
829
- REDUX_URL . 'assets/js/vendor/select2/select2.min.js',
830
  array( 'jquery' ),
831
  time(),
832
  true
@@ -834,7 +1003,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
834
 
835
  wp_register_script(
836
  'jquery-tipsy',
837
- REDUX_URL . 'assets/js/vendor/jquery.tipsy.js',
838
  array( 'jquery' ),
839
  time(),
840
  true
@@ -842,7 +1011,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
842
 
843
  wp_register_script(
844
  'jquery-numeric',
845
- REDUX_URL . 'assets/js/vendor/jquery.numeric.js ',
846
  array( 'jquery' ),
847
  time(),
848
  true
@@ -909,7 +1078,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
909
  $field_class = 'ReduxFramework_' . $field['type'];
910
 
911
  if( !class_exists( $field_class ) ) {
912
- $class_file = apply_filters( 'redux-typeclass-load', REDUX_DIR . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
913
 
914
  if( $class_file ) {
915
  /** @noinspection PhpIncludeInspection */
@@ -1048,7 +1217,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
1048
  }
1049
 
1050
  if ( empty( $section['id'] ) ) {
1051
- $section['id'] = strtolower( str_replace( " ", "", $section['title'] ) );
 
1052
  }
1053
 
1054
  // DOVY! Replace $k with $section['id'] when ready
@@ -1154,7 +1324,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
1154
 
1155
  if (get_transient( 'redux-compiler-' . $this->args['opt_name'] ) ) {
1156
  delete_transient( 'redux-compiler-' . $this->args['opt_name'] );
1157
- do_action('redux-compiler-' . $this->args['opt_name'], $this->options );
1158
  }
1159
 
1160
  }
@@ -1321,7 +1491,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
1321
  $validate = 'Redux_Validation_' . $field['validate'];
1322
 
1323
  if( !class_exists( $validate ) ) {
1324
- $class_file = apply_filters( 'redux-validateclass-load', REDUX_DIR . 'inc/validation/' . $field['validate'] . '/validation_' . $field['validate'] . '.php', $validate );
1325
 
1326
  if( $class_file ) {
1327
  /** @noinspection PhpIncludeInspection */
@@ -1773,7 +1943,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
1773
  $field_class = 'ReduxFramework_' . $field['type'];
1774
 
1775
  if( !class_exists( $field_class ) ) {
1776
- $class_file = apply_filters( 'redux-typeclass-load', REDUX_DIR . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
1777
 
1778
  if( $class_file ) {
1779
  /** @noinspection PhpIncludeInspection */
@@ -1925,5 +2095,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
1925
  return $data_string;
1926
  }
1927
  } // class
 
 
1928
  } // if
1929
 
 
16
  *
17
  * @package ReduxFramework
18
  * @author ReduxFramework Team
19
+ * @version 3.0.6
20
  */
21
 
22
  // Exit if accessed directly
27
  // Don't duplicate me!
28
  if( !class_exists( 'ReduxFramework' ) ) {
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Main ReduxFramework class
32
  *
34
  */
35
  class ReduxFramework {
36
 
37
+ public static $_version = '3.0.6';
38
+ public static $_dir;
39
+ public static $_url;
40
+ public static $_properties;
41
+
42
+ static function init() {
43
+ // Windows-proof constants: replace backward by forward slashes
44
+ // Thanks to: @peterbouwmeester
45
+ /** @noinspection PhpUndefinedFunctionInspection */
46
+ $fslashed_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
47
+ $fslashed_abs = trailingslashit( str_replace( '\\', '/', ABSPATH ) );
48
+ // Fix for when Wordpress is not in the wp-content directory
49
+ if (strpos($fslashed_dir,$fslashed_abs) === false) {
50
+ $parts = explode('/', $fslashed_abs);
51
+ $test = str_replace('/'.max($parts), '', $fslashed_abs);
52
+ if (strpos($fslashed_dir,$test) !== false) {
53
+ $fslashed_abs = $test;
54
+ }
55
+ }
56
+
57
+ self::$_dir = $fslashed_dir;
58
+ self::$_url = site_url( str_replace( $fslashed_abs, '', $fslashed_dir ) );
59
+
60
+ /**
61
+ Still need to port these.
62
+
63
+ $defaults['footer_credit'] = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . ' <a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . self::$_version . '</span>';
64
+ $defaults['help_tabs'] = array();
65
+ $defaults['help_sidebar'] = ''; // __( '', 'redux-framework' );
66
+ $defaults['database'] = ''; // possible: options, theme_mods, theme_mods_expanded, transient
67
+ $defaults['customizer'] = false; // setting to true forces get_theme_mod_expanded
68
+ $defaults['global_variable'] = '';
69
+ $defaults['output'] = true; // Dynamically generate CSS
70
+ $defaults['transient_time'] = 60 * MINUTE_IN_SECONDS;
71
+
72
+ // The defaults are set so it will preserve the old behavior.
73
+ $defaults['default_show'] = false; // If true, it shows the default value
74
+ $defaults['default_mark'] = ''; // What to print by the field's title if the value shown is default
75
+ */
76
+
77
+ self::$_properties = array(
78
+ 'args' => array(
79
+ 'opt_name' => array(
80
+ 'required',
81
+ 'data_type'=>'string',
82
+ 'label'=>'Option Name',
83
+ 'desc'=>'Must be defined by theme/plugin. Is the unique key allowing multiple instance of Redux within a single Wordpress instance.',
84
+ 'default'=>''
85
+ ),
86
+ 'google_api_key' => array(
87
+ 'data_type'=>'string',
88
+ 'label'=>'Google Web Fonts API Key',
89
+ 'desc'=>'Key used to request Google Webfonts. Google fonts are omitted without this.',
90
+ 'default'=>''
91
+ ),
92
+ 'last_tab' => array( // Do we need this?
93
+ 'data_type'=>'string',
94
+ 'label'=>'Last Tab',
95
+ 'desc'=>'Last tab used.',
96
+ 'default'=>'0'
97
+ ),
98
+ 'menu_icon' => array(
99
+ 'data_type'=>'string',
100
+ 'label'=>'Default Menu Icon',
101
+ 'desc'=>'Default menu icon used by sections when one is not specified.',
102
+ 'default'=> self::$_url . 'assets/img/menu_icon.png'
103
+ ),
104
+
105
+ 'menu_title' => array(
106
+ 'data_type'=>'string',
107
+ 'label'=>'Menu Title',
108
+ 'desc'=>'Label displayed when the admin menu is available.',
109
+ 'default'=> __( 'Options', 'redux-framework' )
110
+ ),
111
+ 'page_title' => array(
112
+ 'data_type'=>'string',
113
+ 'label'=>'Page Title',
114
+ 'desc'=>'Title used on the panel page.',
115
+ 'default'=> __( 'Options', 'redux-framework' )
116
+ ),
117
+ 'page_icon' => array(
118
+ 'data_type'=>'string',
119
+ 'label'=>'Page Title',
120
+ 'desc'=>'Icon class to be used on the options page.',
121
+ 'default'=> 'icon-themes'
122
+ ),
123
+ 'page_slug' => array(
124
+ 'required',
125
+ 'data_type'=>'string',
126
+ 'label'=>'Page Slug',
127
+ 'desc'=>'Slug used to access options panel.',
128
+ 'default'=> '_options'
129
+ ),
130
+ 'page_cap' => array(
131
+ 'required',
132
+ 'data_type'=>'string',
133
+ 'label'=>'Page Capabilities',
134
+ 'desc'=>'Permissions needed to access the options panel.',
135
+ 'default'=> 'manage_options'
136
+ ),
137
+ 'page_cap' => array(
138
+ 'required',
139
+ 'type'=>'string',
140
+ 'label'=>'Page Capabilities',
141
+ 'desc'=>'Permissions needed to access the options panel.',
142
+ 'default'=> 'manage_options'
143
+ ),
144
+ 'page_type' => array(
145
+ 'required',
146
+ 'data_type' => 'varchar',
147
+ 'label' => 'Page Type',
148
+ 'desc' => 'Specify if the admin menu should appear or not.',
149
+ 'default' => 'menu',
150
+ 'form' => array('type' => 'select', 'options' => array('menu' => 'Admin Menu', 'submenu' => 'Submenu Only')),
151
+ 'validation' => array('required'),
152
+ ),
153
+ 'page_parent' => array(
154
+ 'required',
155
+ 'data_type' => 'varchar',
156
+ 'label' => 'Page Parent',
157
+ 'desc' => 'Specify if the admin menu should appear or not.',
158
+ 'default' => 'themes.php',
159
+ 'form' => array('type' => 'select', 'options' => array('index.php' => 'Dashboard', 'edit.php' => 'Posts', 'upload.php' => 'Media', 'link-manager.php' => 'Links', 'edit.php?post_type=page' => 'pages', 'edit-comments.php' => 'Comments', 'themes.php' => 'Appearance', 'plugins.php' => 'Plugins', 'users.php' => 'Users', 'tools.php' => 'Tools', 'options-general.php' => 'Settings', )),
160
+ 'validation' => array('required'),
161
+ ),
162
+ 'page_position' => array(
163
+ 'type'=>'int',
164
+ 'label'=>'Page Position',
165
+ 'desc'=>'Location where this menu item will appear in the admin menu. Warning, beware of overrides.',
166
+ 'default'=> null
167
+ ),
168
+ 'enqueue' => array(
169
+ 'required',
170
+ 'data_type'=>'boolen',
171
+ 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
172
+ 'label'=>'Enqueue Files',
173
+ 'desc'=>'Global shut-off for custom CSS enqueing by the framework',
174
+ 'default'=>true
175
+ ),
176
+ 'allow_sub_menu' => array(
177
+ 'data_type'=>'boolen',
178
+ 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
179
+ 'label'=>'Allow Submenu',
180
+ 'desc'=>'Turn on or off the submenu that will typically be shown under Appearance.',
181
+ 'default'=>true
182
+ ),
183
+ 'show_import_export' => array(
184
+ 'data_type'=>'boolen',
185
+ 'form' => array('type' => 'radio', 'options' => array(true => 'Show', false => 'Hide')),
186
+ 'label'=>'Show Import/Export',
187
+ 'desc'=>'Show/Hide the import/export tab.',
188
+ 'default'=>true
189
+ ),
190
+ 'dev_mode' => array(
191
+ 'data_type'=>'boolen',
192
+ 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
193
+ 'label'=>'Developer Mode',
194
+ 'desc'=>'Turn on or off the dev mode tab.',
195
+ 'default'=>false
196
+ ),
197
+ 'system_info' => array(
198
+ 'data_type'=>'boolen',
199
+ 'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
200
+ 'label'=>'System Info',
201
+ 'desc'=>'Turn on or off the system info tab.',
202
+ 'default'=>false
203
+ ),
204
+ ),
205
+ );
206
+
207
+
208
+ }
209
+
210
  // Protected vars
211
  // These two are actually really unnecessary and should be deprecated
212
  protected $framework_url = 'http://www.reduxframework.com/';
 
213
 
214
  public $instance = null;
215
 
241
  * @return void
242
  */
243
  public function __construct( $sections = array(), $args = array(), $extra_tabs = array() ) {
244
+
245
  // Create defaults array
246
  $defaults = array();
247
 
248
  $defaults['opt_name'] = ''; // Must be defined by theme/plugin
249
  $defaults['google_api_key'] = ''; // Must be defined to add google fonts to the typography module
250
  $defaults['last_tab'] = '0';
251
+ $defaults['menu_icon'] = self::$_url . 'assets/img/menu_icon.png';
252
  if (defined('MP6')) {
253
  $defaults['menu_icon'] = '';
254
  }
265
  $defaults['show_import_export'] = true;
266
  $defaults['dev_mode'] = false;
267
  $defaults['system_info'] = false;
268
+ $defaults['footer_credit'] = '<span id="footer-thankyou">' . __( 'Options panel created using', 'redux-framework') . ' <a href="' . $this->framework_url . '" target="_blank">' . __('Redux Framework', 'redux-framework') . '</a> v' . self::$_version . '</span>';
269
  $defaults['help_tabs'] = array();
270
  $defaults['help_sidebar'] = ''; // __( '', 'redux-framework' );
271
  $defaults['database'] = ''; // possible: options, theme_mods, theme_mods_expanded, transient
272
+ $defaults['customizer'] = false; // setting to true forces get_theme_mod_expanded
273
  $defaults['global_variable'] = '';
274
  $defaults['output'] = true; // Dynamically generate CSS
275
  /** @noinspection PhpUndefinedConstantInspection */
302
 
303
  $this->extra_tabs = $extra_tabs;
304
 
 
 
 
305
  // Set option with defaults
306
  add_action( 'init', array( &$this, '_set_default_options' ) );
307
 
320
  // Hook into the WP feeds for downloading exported settings
321
  add_action( 'do_feed_reduxopts-' . $this->args['opt_name'], array( &$this, '_download_options' ), 1, 1 );
322
 
323
+ // Load plugin text domain
324
+ add_action( 'wp_loaded', array( &$this, '_internationalization' ) );
325
+
326
  }
327
 
328
+ /**
329
+ * Load the plugin text domain for translation.
330
+ *
331
+ * @since 3.0.5
332
+ */
333
  public function _internationalization() {
334
+
335
+ $domain = 'redux-framework';
336
+ $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
337
+ load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
338
+ load_textdomain( $domain, dirname( __FILE__ ) . '/languages/' . $domain . '-' . $locale . '.mo' );
339
+
340
  }
341
 
342
  public function get_instance() {
530
  foreach($font_icons as $k) {
531
  $data[$k] = $k;
532
  }
533
+ }else if ($type == "roles") {
534
+ global $wp_roles;
535
+ $data = $wp_roles->get_names();
536
+ }else if ($type == "capabilities") {
537
+ global $wp_roles;
538
+ foreach( $wp_roles->roles as $role ){
539
+ foreach( $role['capabilities'] as $key => $cap ){
540
+ $data[$key] = ucwords(str_replace('_', ' ', $key));
541
+ }
542
+ }
543
  }else if ($type == "callback") {
544
  $data = call_user_func($args[0]);
545
  }//if
880
  if( isset( $field['type'] ) ) {
881
  $field_class = 'ReduxFramework_' . $field['type'];
882
  if( !class_exists( $field_class ) ) {
883
+ $class_file = apply_filters( 'redux-typeclass-load', self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
884
  if( $class_file ) {
885
  /** @noinspection PhpIncludeInspection */
886
  require_once( $class_file );
918
 
919
  wp_register_style(
920
  'redux-css',
921
+ self::$_url . 'assets/css/style.css',
922
  array( 'farbtastic' ),
923
  time(),
924
  'all'
926
 
927
  wp_register_style(
928
  'redux-elusive-icon',
929
+ self::$_url . 'assets/css/vendor/elusive-icons/elusive-webfont.css',
930
  array(),
931
  time(),
932
  'all'
934
 
935
  wp_register_style(
936
  'redux-elusive-icon-ie7',
937
+ self::$_url . 'assets/css/vendor/elusive-icons/elusive-webfont-ie7.css',
938
  array(),
939
  time(),
940
  'all'
942
 
943
  wp_register_style(
944
  'select2-css',
945
+ self::$_url . 'assets/js/vendor/select2/select2.css',
946
  array(),
947
  time(),
948
  'all'
952
 
953
  wp_register_style(
954
  'jquery-ui-css',
955
+ apply_filters( 'redux-ui-theme', self::$_url . 'assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.css' ),
956
  '',
957
  time(),
958
  'all'
969
  if ( $this->args['dev_mode'] === true) { // Pretty object output
970
  wp_enqueue_script(
971
  'json-view-js',
972
+ self::$_url . 'assets/js/vendor/jsonview.min.js',
973
  array( 'jquery' ),
974
  time(),
975
  true
978
 
979
  wp_enqueue_script(
980
  'redux-js',
981
+ //self::$_url . 'assets/js/admin.js',// DEBUG ONLY
982
+ self::$_url . 'assets/js/admin.min.js',
983
  array( 'jquery','jquery-cookie' ),
984
  time(),
985
  true
987
 
988
  wp_enqueue_script(
989
  'jquery-cookie',
990
+ self::$_url . 'assets/js/vendor/cookie.js',
991
  array( 'jquery' ),
992
  time(),
993
  true
995
 
996
  wp_register_script(
997
  'select2-js',
998
+ self::$_url . 'assets/js/vendor/select2/select2.min.js',
999
  array( 'jquery' ),
1000
  time(),
1001
  true
1003
 
1004
  wp_register_script(
1005
  'jquery-tipsy',
1006
+ self::$_url . 'assets/js/vendor/jquery.tipsy.js',
1007
  array( 'jquery' ),
1008
  time(),
1009
  true
1011
 
1012
  wp_register_script(
1013
  'jquery-numeric',
1014
+ self::$_url . 'assets/js/vendor/jquery.numeric.js ',
1015
  array( 'jquery' ),
1016
  time(),
1017
  true
1078
  $field_class = 'ReduxFramework_' . $field['type'];
1079
 
1080
  if( !class_exists( $field_class ) ) {
1081
+ $class_file = apply_filters( 'redux-typeclass-load', self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
1082
 
1083
  if( $class_file ) {
1084
  /** @noinspection PhpIncludeInspection */
1217
  }
1218
 
1219
  if ( empty( $section['id'] ) ) {
1220
+ //$section['id'] = strtolower( str_replace( " ", "", $section['title'] ) );
1221
+ $section['id'] = sanitize_html_class( $section['title'] );
1222
  }
1223
 
1224
  // DOVY! Replace $k with $section['id'] when ready
1324
 
1325
  if (get_transient( 'redux-compiler-' . $this->args['opt_name'] ) ) {
1326
  delete_transient( 'redux-compiler-' . $this->args['opt_name'] );
1327
+ do_action( 'redux-compiler-' . $this->args['opt_name'], $this->options );
1328
  }
1329
 
1330
  }
1491
  $validate = 'Redux_Validation_' . $field['validate'];
1492
 
1493
  if( !class_exists( $validate ) ) {
1494
+ $class_file = apply_filters( 'redux-validateclass-load', self::$_dir . 'inc/validation/' . $field['validate'] . '/validation_' . $field['validate'] . '.php', $validate );
1495
 
1496
  if( $class_file ) {
1497
  /** @noinspection PhpIncludeInspection */
1943
  $field_class = 'ReduxFramework_' . $field['type'];
1944
 
1945
  if( !class_exists( $field_class ) ) {
1946
+ $class_file = apply_filters( 'redux-typeclass-load', self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
1947
 
1948
  if( $class_file ) {
1949
  /** @noinspection PhpIncludeInspection */
2095
  return $data_string;
2096
  }
2097
  } // class
2098
+ ReduxFramework::init();
2099
+
2100
  } // if
2101
 
2102
+
ReduxCore/inc/fields/ace_editor/field_ace_editor.php CHANGED
@@ -10,7 +10,7 @@ class ReduxFramework_ace_editor {
10
  */
11
  function __construct($field = array(), $value ='', $parent) {
12
  $this->field = $field;
13
- $this->value = $value;
14
  $this->args = $parent->args;
15
  if( !isset($this->field['mode']) ){
16
  $this->field['mode'] = 'javascript';
@@ -36,7 +36,7 @@ class ReduxFramework_ace_editor {
36
  <textarea name="<?php echo $name; ?>" id="<?php echo $this->field['id']; ?>-textarea" class="ace-editor" data-editor="<?php echo $this->field['id']; ?>-editor" data-mode="<?php echo $this->field['mode']; ?>" data-theme="<?php echo $this->field['theme']; ?>">
37
  <?php echo $this->value; ?>
38
  </textarea>
39
- <pre id="<?php echo $this->field['id']; ?>-editor" class="ace-editor-area"><?php echo $this->value; ?></pre>
40
  </div>
41
  <?php
42
 
@@ -55,20 +55,20 @@ class ReduxFramework_ace_editor {
55
 
56
  wp_enqueue_style(
57
  'redux-field-ace-editor-css',
58
- REDUX_URL . 'inc/fields/ace_editor/field_ace_editor.css',
59
  time(),
60
  true
61
  );
62
  wp_register_script(
63
  'ace-editor',
64
- REDUX_URL . 'inc/fields/ace_editor/ace-min-noconflict/ace.js',
65
  array( 'jquery' ),
66
  time(),
67
  true
68
  );
69
  wp_enqueue_script(
70
  'redux-field-ace-editor-js',
71
- REDUX_URL . 'inc/fields/ace_editor/field_ace_editor.js',
72
  array( 'ace-editor' ),
73
  time(),
74
  true
10
  */
11
  function __construct($field = array(), $value ='', $parent) {
12
  $this->field = $field;
13
+ $this->value = trim($value);
14
  $this->args = $parent->args;
15
  if( !isset($this->field['mode']) ){
16
  $this->field['mode'] = 'javascript';
36
  <textarea name="<?php echo $name; ?>" id="<?php echo $this->field['id']; ?>-textarea" class="ace-editor" data-editor="<?php echo $this->field['id']; ?>-editor" data-mode="<?php echo $this->field['mode']; ?>" data-theme="<?php echo $this->field['theme']; ?>">
37
  <?php echo $this->value; ?>
38
  </textarea>
39
+ <pre id="<?php echo $this->field['id']; ?>-editor" class="ace-editor-area"><?php echo htmlspecialchars ($this->value); ?></pre>
40
  </div>
41
  <?php
42
 
55
 
56
  wp_enqueue_style(
57
  'redux-field-ace-editor-css',
58
+ ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor.css',
59
  time(),
60
  true
61
  );
62
  wp_register_script(
63
  'ace-editor',
64
+ ReduxFramework::$_url . 'inc/fields/ace_editor/ace-min-noconflict/ace.js',
65
  array( 'jquery' ),
66
  time(),
67
  true
68
  );
69
  wp_enqueue_script(
70
  'redux-field-ace-editor-js',
71
+ ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor.js',
72
  array( 'ace-editor' ),
73
  time(),
74
  true
ReduxCore/inc/fields/border/field_border.php CHANGED
@@ -135,7 +135,7 @@ if( !class_exists( 'ReduxFramework_border' ) ) {
135
 
136
  wp_enqueue_script(
137
  'redux-field-color-js',
138
- REDUX_URL . 'inc/fields/color/field_color.min.js',
139
  array( 'jquery', 'wp-color-picker' ),
140
  time(),
141
  true
@@ -143,14 +143,14 @@ if( !class_exists( 'ReduxFramework_border' ) ) {
143
 
144
  wp_enqueue_style(
145
  'redux-field-color-css',
146
- REDUX_URL . 'inc/fields/color/field_color.css',
147
  time(),
148
  true
149
  );
150
 
151
  wp_enqueue_style(
152
  'redux-field-border-css',
153
- REDUX_URL . 'inc/fields/border/field_border.css',
154
  time(),
155
  true
156
  );
135
 
136
  wp_enqueue_script(
137
  'redux-field-color-js',
138
+ ReduxFramework::$_url . 'inc/fields/color/field_color.min.js',
139
  array( 'jquery', 'wp-color-picker' ),
140
  time(),
141
  true
143
 
144
  wp_enqueue_style(
145
  'redux-field-color-css',
146
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
147
  time(),
148
  true
149
  );
150
 
151
  wp_enqueue_style(
152
  'redux-field-border-css',
153
+ ReduxFramework::$_url . 'inc/fields/border/field_border.css',
154
  time(),
155
  true
156
  );
ReduxCore/inc/fields/button_set/field_button_set.php CHANGED
@@ -90,7 +90,7 @@ if( !class_exists( 'ReduxFramework_button_set' ) ) {
90
 
91
  wp_enqueue_script(
92
  'redux-field-button-set-js',
93
- REDUX_URL . 'inc/fields/button_set/field_button_set.min.js',
94
  array( 'jquery', 'jquery-ui-core', 'jquery-ui-dialog' ),
95
  time(),
96
  true
90
 
91
  wp_enqueue_script(
92
  'redux-field-button-set-js',
93
+ ReduxFramework::$_url . 'inc/fields/button_set/field_button_set.min.js',
94
  array( 'jquery', 'jquery-ui-core', 'jquery-ui-dialog' ),
95
  time(),
96
  true
ReduxCore/inc/fields/checkbox/field_checkbox.php CHANGED
@@ -55,6 +55,7 @@ if( !class_exists( 'ReduxFramework_checkbox' ) ) {
55
  }
56
  $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
57
  }
 
58
 
59
  }
60
 
@@ -71,7 +72,7 @@ if( !class_exists( 'ReduxFramework_checkbox' ) ) {
71
  public function render() {
72
 
73
  if( !empty( $this->field['options'] ) && ( is_array( $this->field['options'] ) || is_array( $this->field['default'] ) ) ) {
74
- echo '<ul>';
75
  if ( !isset( $this->value ) ) {
76
  $this->value = array();
77
  }
55
  }
56
  $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
57
  }
58
+ $this->field['data_class'] = ( isset($this->field['multi_layout']) ) ? 'data-'.$this->field['multi_layout'] : 'data-full';
59
 
60
  }
61
 
72
  public function render() {
73
 
74
  if( !empty( $this->field['options'] ) && ( is_array( $this->field['options'] ) || is_array( $this->field['default'] ) ) ) {
75
+ echo '<ul class="'.$this->field['data_class'].'">';
76
  if ( !isset( $this->value ) ) {
77
  $this->value = array();
78
  }
ReduxCore/inc/fields/color/field_color.php CHANGED
@@ -89,7 +89,7 @@ if( !class_exists( 'ReduxFramework_color' ) ) {
89
 
90
  wp_enqueue_script(
91
  'redux-field-color-js',
92
- REDUX_URL . 'inc/fields/color/field_color.min.js',
93
  array( 'jquery', 'wp-color-picker' ),
94
  time(),
95
  true
@@ -97,7 +97,7 @@ if( !class_exists( 'ReduxFramework_color' ) ) {
97
 
98
  wp_enqueue_style(
99
  'redux-field-color-css',
100
- REDUX_URL . 'inc/fields/color/field_color.css',
101
  time(),
102
  true
103
  );
89
 
90
  wp_enqueue_script(
91
  'redux-field-color-js',
92
+ ReduxFramework::$_url . 'inc/fields/color/field_color.min.js',
93
  array( 'jquery', 'wp-color-picker' ),
94
  time(),
95
  true
97
 
98
  wp_enqueue_style(
99
  'redux-field-color-css',
100
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
101
  time(),
102
  true
103
  );
ReduxCore/inc/fields/color_gradient/field_color_gradient.php CHANGED
@@ -106,7 +106,7 @@ if( !class_exists( 'ReduxFramework_color_gradient' ) ) {
106
 
107
  wp_enqueue_script(
108
  'redux-field-color-js',
109
- REDUX_URL . 'inc/fields/color/field_color.min.js',
110
  array( 'jquery', 'wp-color-picker' ),
111
  time(),
112
  true
@@ -114,14 +114,14 @@ if( !class_exists( 'ReduxFramework_color_gradient' ) ) {
114
 
115
  wp_enqueue_style(
116
  'redux-field-color-js',
117
- REDUX_URL . 'inc/fields/color/field_color.css',
118
  time(),
119
  true
120
  );
121
 
122
  wp_enqueue_style(
123
  'redux-field-color-css',
124
- REDUX_URL . 'inc/fields/color/field_color.css',
125
  time(),
126
  true
127
  );
106
 
107
  wp_enqueue_script(
108
  'redux-field-color-js',
109
+ ReduxFramework::$_url . 'inc/fields/color/field_color.min.js',
110
  array( 'jquery', 'wp-color-picker' ),
111
  time(),
112
  true
114
 
115
  wp_enqueue_style(
116
  'redux-field-color-js',
117
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
118
  time(),
119
  true
120
  );
121
 
122
  wp_enqueue_style(
123
  'redux-field-color-css',
124
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
125
  time(),
126
  true
127
  );
ReduxCore/inc/fields/date/field_date.php CHANGED
@@ -78,7 +78,7 @@ if( !class_exists( 'ReduxFramework_date' ) ) {
78
  public function enqueue() {
79
  wp_enqueue_script(
80
  'redux-field-date-js',
81
- REDUX_URL . 'inc/fields/date/field_date.min.js',
82
  array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ),
83
  time(),
84
  true
78
  public function enqueue() {
79
  wp_enqueue_script(
80
  'redux-field-date-js',
81
+ ReduxFramework::$_url . 'inc/fields/date/field_date.min.js',
82
  array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ),
83
  time(),
84
  true
ReduxCore/inc/fields/dimensions/field_dimensions.php CHANGED
@@ -148,7 +148,7 @@ class ReduxFramework_dimensions extends ReduxFramework{
148
 
149
  wp_enqueue_script(
150
  'redux-field-dimensions-js',
151
- REDUX_URL.'inc/fields/dimensions/field_dimensions.min.js',
152
  array('jquery', 'select2-js', 'jquery-numeric'),
153
  time(),
154
  true
@@ -156,7 +156,7 @@ class ReduxFramework_dimensions extends ReduxFramework{
156
 
157
  wp_enqueue_style(
158
  'redux-field-dimensions-css',
159
- REDUX_URL.'inc/fields/dimensions/field_dimensions.css',
160
  time(),
161
  true
162
  );
148
 
149
  wp_enqueue_script(
150
  'redux-field-dimensions-js',
151
+ ReduxFramework::$_url.'inc/fields/dimensions/field_dimensions.min.js',
152
  array('jquery', 'select2-js', 'jquery-numeric'),
153
  time(),
154
  true
156
 
157
  wp_enqueue_style(
158
  'redux-field-dimensions-css',
159
+ ReduxFramework::$_url.'inc/fields/dimensions/field_dimensions.css',
160
  time(),
161
  true
162
  );
ReduxCore/inc/fields/editor/field_editor.php CHANGED
@@ -87,7 +87,7 @@ if( !class_exists( 'ReduxFramework_editor' ) ) {
87
 
88
  wp_enqueue_style(
89
  'redux-field-editor-css',
90
- REDUX_URL . 'inc/fields/editor/field_editor.css',
91
  time(),
92
  true
93
  );
87
 
88
  wp_enqueue_style(
89
  'redux-field-editor-css',
90
+ ReduxFramework::$_url . 'inc/fields/editor/field_editor.css',
91
  time(),
92
  true
93
  );
ReduxCore/inc/fields/gallery/field_gallery.php CHANGED
@@ -99,7 +99,7 @@ if (!class_exists('ReduxFramework_gallery')) {
99
  }
100
 
101
  wp_enqueue_script(
102
- 'redux-field-gallery-js', REDUX_URL . 'inc/fields/gallery/field_gallery.js', array('jquery', 'wp-color-picker'), time(), true
103
  );
104
 
105
  }
99
  }
100
 
101
  wp_enqueue_script(
102
+ 'redux-field-gallery-js', ReduxFramework::$_url . 'inc/fields/gallery/field_gallery.js', array('jquery', 'wp-color-picker'), time(), true
103
  );
104
 
105
  }
ReduxCore/inc/fields/group/field_group.php CHANGED
@@ -154,11 +154,11 @@ if (!class_exists('ReduxFramework_group')) {
154
  */
155
  public function enqueue() {
156
  wp_enqueue_script(
157
- 'redux-field-group-js', REDUX_URL . 'inc/fields/group/field_group.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker'), time(), true
158
  );
159
 
160
  wp_enqueue_style(
161
- 'redux-field-group-css', REDUX_URL . 'inc/fields/group/field_group.css', time(), true
162
  );
163
  }
164
 
@@ -166,7 +166,7 @@ if (!class_exists('ReduxFramework_group')) {
166
  $field_class = 'ReduxFramework_' . $field_type;
167
 
168
  if (!class_exists($field_class)) {
169
- $class_file = apply_filters('redux-typeclass-load', REDUX_DIR . 'inc/fields/' . $field_type . '/field_' . $field_type . '.php', $field_class);
170
 
171
  if ($class_file) {
172
  /** @noinspection PhpIncludeInspection */
154
  */
155
  public function enqueue() {
156
  wp_enqueue_script(
157
+ 'redux-field-group-js', ReduxFramework::$_url . 'inc/fields/group/field_group.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker'), time(), true
158
  );
159
 
160
  wp_enqueue_style(
161
+ 'redux-field-group-css', ReduxFramework::$_url . 'inc/fields/group/field_group.css', time(), true
162
  );
163
  }
164
 
166
  $field_class = 'ReduxFramework_' . $field_type;
167
 
168
  if (!class_exists($field_class)) {
169
+ $class_file = apply_filters('redux-typeclass-load', ReduxFramework::$_dir . 'inc/fields/' . $field_type . '/field_' . $field_type . '.php', $field_class);
170
 
171
  if ($class_file) {
172
  /** @noinspection PhpIncludeInspection */
ReduxCore/inc/fields/image_select/field_image_select.php CHANGED
@@ -157,7 +157,7 @@ if( !class_exists( 'ReduxFramework_image_select' ) ) {
157
 
158
  wp_enqueue_script(
159
  'redux-field-image-select-js',
160
- REDUX_URL . 'inc/fields/image_select/field_image_select.min.js',
161
  array( 'jquery' ),
162
  time(),
163
  true
@@ -167,7 +167,7 @@ if( !class_exists( 'ReduxFramework_image_select' ) ) {
167
 
168
  wp_enqueue_style(
169
  'redux-field-image-select-css',
170
- REDUX_URL . 'inc/fields/image_select/field_image_select.css',
171
  time(),
172
  true
173
  );
157
 
158
  wp_enqueue_script(
159
  'redux-field-image-select-js',
160
+ ReduxFramework::$_url . 'inc/fields/image_select/field_image_select.min.js',
161
  array( 'jquery' ),
162
  time(),
163
  true
167
 
168
  wp_enqueue_style(
169
  'redux-field-image-select-css',
170
+ ReduxFramework::$_url . 'inc/fields/image_select/field_image_select.css',
171
  time(),
172
  true
173
  );
ReduxCore/inc/fields/info/field_info.php CHANGED
@@ -127,7 +127,7 @@ if( !class_exists( 'ReduxFramework_info' ) ) {
127
 
128
  wp_enqueue_style(
129
  'redux-field-info-css',
130
- REDUX_URL . 'inc/fields/info/field_info.css',
131
  time(),
132
  true
133
  );
127
 
128
  wp_enqueue_style(
129
  'redux-field-info-css',
130
+ ReduxFramework::$_url . 'inc/fields/info/field_info.css',
131
  time(),
132
  true
133
  );
ReduxCore/inc/fields/link_color/field_link_color.php CHANGED
@@ -112,7 +112,7 @@ if( !class_exists( 'ReduxFramework_link_color' ) ) {
112
 
113
  wp_enqueue_script(
114
  'redux-field-color-js',
115
- REDUX_URL . 'inc/fields/color/field_color.min.js',
116
  array( 'jquery', 'wp-color-picker' ),
117
  time(),
118
  true
@@ -120,14 +120,14 @@ if( !class_exists( 'ReduxFramework_link_color' ) ) {
120
 
121
  wp_enqueue_style(
122
  'redux-field-color-js',
123
- REDUX_URL . 'inc/fields/color/field_color.css',
124
  time(),
125
  true
126
  );
127
 
128
  wp_enqueue_style(
129
  'redux-field-color-css',
130
- REDUX_URL . 'inc/fields/color/field_color.css',
131
  time(),
132
  true
133
  );
112
 
113
  wp_enqueue_script(
114
  'redux-field-color-js',
115
+ ReduxFramework::$_url . 'inc/fields/color/field_color.min.js',
116
  array( 'jquery', 'wp-color-picker' ),
117
  time(),
118
  true
120
 
121
  wp_enqueue_style(
122
  'redux-field-color-js',
123
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
124
  time(),
125
  true
126
  );
127
 
128
  wp_enqueue_style(
129
  'redux-field-color-css',
130
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
131
  time(),
132
  true
133
  );
ReduxCore/inc/fields/media/field_media.js CHANGED
@@ -1,34 +1,5 @@
1
  /* global redux_change, wp */
2
- (function($){
3
- "use strict";
4
-
5
- $.redux = $.redux || {};
6
-
7
- $(document).ready(function () {
8
- $.redux.media();
9
- });
10
 
11
- /**
12
- * Media Uploader
13
- * Dependencies : jquery, wp media uploader
14
- * Feature added by : Smartik - http://smartik.ws/
15
- * Date : 05.28.2013
16
- */
17
- $.redux.media = function(){
18
- // Remove the image button
19
- $('.remove-image, .remove-file').unbind('click').on('click', function() {
20
- redux_remove_file( $(this).closest('fieldset') );
21
- redux_change($(this).closest('fieldset:first').find('.upload'));
22
- });
23
-
24
- // Upload media button
25
- $('.media_upload_button').unbind().on('click', function( event ) {
26
- redux_add_file(event, $(this).closest('fieldset'));
27
- redux_change($(this).closest('fieldset:first').find('.upload'));
28
- });
29
- }
30
-
31
- })(jQuery);
32
 
33
  // Add a file via the wp.media function
34
  function redux_add_file(event, selector) {
@@ -80,12 +51,17 @@ function redux_add_file(event, selector) {
80
  selector.find('.upload-height').val(attachment.attributes.height);
81
  selector.find('.upload-width').val(attachment.attributes.width);
82
  var thumbSrc = attachment.attributes.url;
83
- if (typeof attachment.attributes.sizes.thumbnail.url != 'undefined') {
84
  thumbSrc = attachment.attributes.sizes.thumbnail.url;
85
- } else if (typeof attachment.attributes.sizes.small.url != 'undefined') {
86
- thumbSrc = attachment.attributes.sizes.small.url;
87
- } else if (typeof attachment.attributes.sizes.medium.url != 'undefined') {
88
- thumbSrc = attachment.attributes.sizes.medium.url;
 
 
 
 
 
89
  }
90
  selector.find('.upload-thumbnail').val(thumbSrc);
91
  if ( attachment.attributes.type === 'image' && !selector.find('.upload').hasClass('noPreview') ) {
@@ -129,3 +105,34 @@ function redux_remove_file(selector) {
129
  }
130
 
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /* global redux_change, wp */
 
 
 
 
 
 
 
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
  // Add a file via the wp.media function
5
  function redux_add_file(event, selector) {
51
  selector.find('.upload-height').val(attachment.attributes.height);
52
  selector.find('.upload-width').val(attachment.attributes.width);
53
  var thumbSrc = attachment.attributes.url;
54
+ if (typeof attachment.attributes.sizes.thumbnail.url !== 'undefined') {
55
  thumbSrc = attachment.attributes.sizes.thumbnail.url;
56
+ } else {
57
+ var height = attachment.attributes.height;
58
+ for (var key in attachment.attributes.sizes) {
59
+ var object = attachment.attributes.sizes[key];
60
+ if (object.height < height) {
61
+ height = object.height;
62
+ thumbSrc = object.url;
63
+ }
64
+ }
65
  }
66
  selector.find('.upload-thumbnail').val(thumbSrc);
67
  if ( attachment.attributes.type === 'image' && !selector.find('.upload').hasClass('noPreview') ) {
105
  }
106
 
107
  }
108
+
109
+ (function($){
110
+ "use strict";
111
+
112
+ $.redux = $.redux || {};
113
+
114
+ $(document).ready(function () {
115
+ $.redux.media();
116
+ });
117
+
118
+ /**
119
+ * Media Uploader
120
+ * Dependencies : jquery, wp media uploader
121
+ * Feature added by : Smartik - http://smartik.ws/
122
+ * Date : 05.28.2013
123
+ */
124
+ $.redux.media = function(){
125
+ // Remove the image button
126
+ $('.remove-image, .remove-file').unbind('click').on('click', function() {
127
+ redux_remove_file( $(this).closest('fieldset') );
128
+ redux_change($(this).closest('fieldset:first').find('.upload'));
129
+ });
130
+
131
+ // Upload media button
132
+ $('.media_upload_button').unbind().on('click', function( event ) {
133
+ redux_add_file(event, $(this).closest('fieldset'));
134
+ redux_change($(this).closest('fieldset:first').find('.upload'));
135
+ });
136
+ };
137
+
138
+ })(jQuery);
ReduxCore/inc/fields/media/field_media.min.js CHANGED
@@ -1 +1,2 @@
1
- /* global redux_change, wp */function redux_add_file(e,t){e.preventDefault();var n,r=jQuery(this);if(n){n.open();return}n=wp.media({multiple:!1,library:{type:"image"},title:r.data("choose"),button:{text:r.data("update")}});n.on("select",function(){var e=n.state().get("selection").first();n.close();if(e.attributes.type!=="image")return;t.find(".upload").val(e.attributes.url).trigger("check_dependencies",t.find(".upload"));t.find(".upload-id").val(e.attributes.id);t.find(".upload-height").val(e.attributes.height);t.find(".upload-width").val(e.attributes.width);var r=e.attributes.url;typeof e.attributes.sizes.thumbnail.url!="undefined"?r=e.attributes.sizes.thumbnail.url:typeof e.attributes.sizes.small.url!="undefined"?r=e.attributes.sizes.small.url:typeof e.attributes.sizes.medium.url!="undefined"&&(r=e.attributes.sizes.medium.url);t.find(".upload-thumbnail").val(r);e.attributes.type==="image"&&!t.find(".upload").hasClass("noPreview")&&t.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+r+'">').slideDown("fast");t.find(".remove-image").removeClass("hide");t.find(".redux-background-properties").slideDown()});n.open()}function redux_remove_file(e){if(!e.find(".remove-image").addClass("hide"))return;redux_change(jQuery("#"+e.attr("rel")));e.find(".remove-image").addClass("hide");e.find(".upload").val("").trigger("check_dependencies",e.find(".upload"));e.find(".upload-id").val("");e.find(".upload-height").val("");e.find(".upload-width").val("");e.find(".redux-background-properties").hide();var t=e.find(".screenshot");t.slideUp();e.find(".remove-file").unbind();jQuery(".section-upload .upload-notice").length>0&&jQuery(".media_upload_button").remove()}(function(e){"use strict";e.redux=e.redux||{};e(document).ready(function(){e.redux.media()});e.redux.media=function(){e(".remove-image, .remove-file").unbind("click").on("click",function(){redux_remove_file(e(this).closest("fieldset"));redux_change(e(this).closest("fieldset:first").find(".upload"))});e(".media_upload_button").unbind().on("click",function(t){redux_add_file(t,e(this).closest("fieldset"));redux_change(e(this).closest("fieldset:first").find(".upload"))})}})(jQuery);
 
1
+ /* global redux_change, wp */// Add a file via the wp.media function
2
+ function redux_add_file(e,t){e.preventDefault();var n,r=jQuery(this);if(n){n.open();return}n=wp.media({multiple:!1,library:{type:"image"},title:r.data("choose"),button:{text:r.data("update")}});n.on("select",function(){var e=n.state().get("selection").first();n.close();if(e.attributes.type!=="image")return;t.find(".upload").val(e.attributes.url).trigger("check_dependencies",t.find(".upload"));t.find(".upload-id").val(e.attributes.id);t.find(".upload-height").val(e.attributes.height);t.find(".upload-width").val(e.attributes.width);var r=e.attributes.url;if(typeof e.attributes.sizes.thumbnail.url!="undefined")r=e.attributes.sizes.thumbnail.url;else{var i=e.attributes.height;for(var s in e.attributes.sizes){var o=e.attributes.sizes[s];if(o.height<i){i=o.height;r=o.url}}}t.find(".upload-thumbnail").val(r);e.attributes.type==="image"&&!t.find(".upload").hasClass("noPreview")&&t.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+r+'">').slideDown("fast");t.find(".remove-image").removeClass("hide");t.find(".redux-background-properties").slideDown()});n.open()}function redux_remove_file(e){if(!e.find(".remove-image").addClass("hide"))return;redux_change(jQuery("#"+e.attr("rel")));e.find(".remove-image").addClass("hide");e.find(".upload").val("").trigger("check_dependencies",e.find(".upload"));e.find(".upload-id").val("");e.find(".upload-height").val("");e.find(".upload-width").val("");e.find(".redux-background-properties").hide();var t=e.find(".screenshot");t.slideUp();e.find(".remove-file").unbind();jQuery(".section-upload .upload-notice").length>0&&jQuery(".media_upload_button").remove()}(function(e){"use strict";e.redux=e.redux||{};e(document).ready(function(){e.redux.media()});e.redux.media=function(){e(".remove-image, .remove-file").unbind("click").on("click",function(){redux_remove_file(e(this).closest("fieldset"));redux_change(e(this).closest("fieldset:first").find(".upload"))});e(".media_upload_button").unbind().on("click",function(t){redux_add_file(t,e(this).closest("fieldset"));redux_change(e(this).closest("fieldset:first").find(".upload"))})}})(jQuery);
ReduxCore/inc/fields/media/field_media.php CHANGED
@@ -123,7 +123,12 @@ if( !class_exists( 'ReduxFramework_media' ) ) {
123
  }
124
 
125
  if ( empty( $this->value['thumbnail'] ) && !empty( $this->value['url'] ) ) { // Just in case
126
- $this->value['thumbnail'] = $this->value['url'];
 
 
 
 
 
127
  }
128
 
129
  echo '<div class="' . $hide . 'screenshot">';
@@ -169,7 +174,7 @@ if( !class_exists( 'ReduxFramework_media' ) ) {
169
 
170
  wp_enqueue_script(
171
  'redux-field-media-js',
172
- REDUX_URL . 'inc/fields/media/field_media.js',
173
  array( 'jquery', 'wp-color-picker' ),
174
  time(),
175
  true
@@ -177,7 +182,7 @@ if( !class_exists( 'ReduxFramework_media' ) ) {
177
 
178
  wp_enqueue_style(
179
  'redux-field-media-css',
180
- REDUX_URL . 'inc/fields/media/field_media.css',
181
  time(),
182
  true
183
  );
123
  }
124
 
125
  if ( empty( $this->value['thumbnail'] ) && !empty( $this->value['url'] ) ) { // Just in case
126
+ if ( !empty( $this->value['id'] ) ) {
127
+ $image = wp_get_attachment_image_src( $this->value['id'], array(150, 150) );
128
+ $this->value['thumbnail'] = $image[0];
129
+ } else {
130
+ $this->value['thumbnail'] = $this->value['url'];
131
+ }
132
  }
133
 
134
  echo '<div class="' . $hide . 'screenshot">';
174
 
175
  wp_enqueue_script(
176
  'redux-field-media-js',
177
+ ReduxFramework::$_url . 'inc/fields/media/field_media.js',
178
  array( 'jquery', 'wp-color-picker' ),
179
  time(),
180
  true
182
 
183
  wp_enqueue_style(
184
  'redux-field-media-css',
185
+ ReduxFramework::$_url . 'inc/fields/media/field_media.css',
186
  time(),
187
  true
188
  );
ReduxCore/inc/fields/multi_text/field_multi_text.php CHANGED
@@ -48,6 +48,10 @@ if( !class_exists( 'ReduxFramework_multi_text' ) ) {
48
 
49
  $this->field = $field;
50
  $this->value = $value;
 
 
 
 
51
 
52
  }
53
 
@@ -69,15 +73,15 @@ if( !class_exists( 'ReduxFramework_multi_text' ) ) {
69
  if( $value != '' )
70
  echo '<li><input type="text" id="' . $this->field['id'] . '-' . $k . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][]" value="' . esc_attr( $value ) . '" class="regular-text ' . $this->field['class'] . '" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
71
  }
72
- } else {
73
- echo '<li><input type="text" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][]" value="" class="regular-text ' . $this->field['class'] . '" /> <a href="javascript:void(0);" class="button redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
74
  }
75
 
76
- echo '<li style="display:none;"><input type="text" id="' . $this->field['id'] . '" name="" value="" class="regular-text" /> <a href="javascript:void(0);" class="button redux-multi-text-remove">' . __( 'Remove', 'redux-framework') . '</a></li>';
77
 
78
  echo '</ul>';
79
 
80
- echo '<a href="javascript:void(0);" class="button button-primary redux-multi-text-add" rel-id="' . $this->field['id'] . '-ul" rel-name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][]">' . __( 'Add More', 'redux-framework') . '</a><br/>';
81
 
82
  }
83
 
@@ -94,7 +98,7 @@ if( !class_exists( 'ReduxFramework_multi_text' ) ) {
94
 
95
  wp_enqueue_script(
96
  'redux-field-multi-text-js',
97
- REDUX_URL . 'inc/fields/multi_text/field_multi_text.min.js',
98
  array( 'jquery' ),
99
  time(),
100
  true
@@ -102,7 +106,7 @@ if( !class_exists( 'ReduxFramework_multi_text' ) ) {
102
 
103
  wp_enqueue_style(
104
  'redux-field-multi-text-css',
105
- REDUX_URL.'inc/fields/multi_text/field_multi_text.css',
106
  time(),
107
  true
108
  );
48
 
49
  $this->field = $field;
50
  $this->value = $value;
51
+
52
+ $this->add_text = ( isset($this->field['add_text']) ) ? $this->field['add_text'] : __( 'Add More', 'redux-framework');
53
+
54
+ $this->show_empty = ( isset($this->field['show_empty']) ) ? $this->field['show_empty'] : true;
55
 
56
  }
57
 
73
  if( $value != '' )
74
  echo '<li><input type="text" id="' . $this->field['id'] . '-' . $k . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][]" value="' . esc_attr( $value ) . '" class="regular-text ' . $this->field['class'] . '" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
75
  }
76
+ } elseif($this->show_empty == true ) {
77
+ echo '<li><input type="text" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][]" value="" class="regular-text ' . $this->field['class'] . '" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework' ) . '</a></li>';
78
  }
79
 
80
+ echo '<li style="display:none;"><input type="text" id="' . $this->field['id'] . '" name="" value="" class="regular-text" /> <a href="javascript:void(0);" class="deletion redux-multi-text-remove">' . __( 'Remove', 'redux-framework') . '</a></li>';
81
 
82
  echo '</ul>';
83
 
84
+ echo '<a href="javascript:void(0);" class="button button-primary redux-multi-text-add" rel-id="' . $this->field['id'] . '-ul" rel-name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][]">' . $this->add_text . '</a><br/>';
85
 
86
  }
87
 
98
 
99
  wp_enqueue_script(
100
  'redux-field-multi-text-js',
101
+ ReduxFramework::$_url . 'inc/fields/multi_text/field_multi_text.min.js',
102
  array( 'jquery' ),
103
  time(),
104
  true
106
 
107
  wp_enqueue_style(
108
  'redux-field-multi-text-css',
109
+ ReduxFramework::$_url.'inc/fields/multi_text/field_multi_text.css',
110
  time(),
111
  true
112
  );
ReduxCore/inc/fields/radio/field_radio.php CHANGED
@@ -21,6 +21,7 @@ class ReduxFramework_radio extends ReduxFramework{
21
  }
22
  $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
23
  }
 
24
 
25
  }//function
26
 
@@ -37,7 +38,7 @@ class ReduxFramework_radio extends ReduxFramework{
37
 
38
  if (!empty($this->field['options'])) {
39
 
40
- echo '<ul>';
41
 
42
  foreach($this->field['options'] as $k => $v){
43
 
21
  }
22
  $this->field['options'] = $parent->get_wordpress_data($this->field['data'], $this->field['args']);
23
  }
24
+ $this->field['data_class'] = ( isset($this->field['multi_layout']) ) ? 'data-'.$this->field['multi_layout'] : 'data-full';
25
 
26
  }//function
27
 
38
 
39
  if (!empty($this->field['options'])) {
40
 
41
+ echo '<ul class="'.$this->field['data_class'].'">';
42
 
43
  foreach($this->field['options'] as $k => $v){
44
 
ReduxCore/inc/fields/select/field_select.js CHANGED
@@ -9,21 +9,24 @@
9
 
10
  $.redux.select = function(){
11
  $('.redux-select-item').each(function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  if ( $(this).hasClass('font-icons') ) {
13
- $(this).select2({
14
- width: 'resolve',
15
- triggerChange: true,
16
- allowClear: true,
17
- formatResult: addIconToSelect,
18
- formatSelection: addIconToSelect,
19
- escapeMarkup: function(m) { return m; }
20
- });
21
  } else {
22
- $(this).select2({
23
- width: 'resolve',
24
- triggerChange: true,
25
- allowClear: true
26
- });
27
  $(this).on("change", function(e) {
28
  redux_change($($(this).attr('id')));
29
  });
9
 
10
  $.redux.select = function(){
11
  $('.redux-select-item').each(function() {
12
+
13
+ var default_params = {
14
+ width: 'resolve',
15
+ triggerChange: true,
16
+ allowClear: true
17
+ };
18
+
19
+ if ( $(this).siblings('.select2_params').size() > 0 ) {
20
+ var select2_params = $(this).siblings('.select2_params').val();
21
+ select2_params = JSON.parse( select2_params );
22
+ default_params = $.extend({}, default_params, select2_params);
23
+ }
24
+
25
  if ( $(this).hasClass('font-icons') ) {
26
+ default_params = $.extend({}, {formatResult: addIconToSelect, formatSelection: addIconToSelect, escapeMarkup: function(m) { return m; } }, default_params);
27
+ $(this).select2(default_params);
 
 
 
 
 
 
28
  } else {
29
+ $(this).select2(default_params);
 
 
 
 
30
  $(this).on("change", function(e) {
31
  redux_change($($(this).attr('id')));
32
  });
ReduxCore/inc/fields/select/field_select.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";function t(e){return e.hasOwnProperty("id")?"<span class='elusive'><i class='"+e.id+"'></i>"+"&nbsp;&nbsp;"+e.id.toUpperCase()+"</span>":void 0}e.redux=e.redux||{},e(document).ready(function(){e.redux.select()}),e.redux.select=function(){e(".redux-select-item").each(function(){e(this).hasClass("font-icons")?e(this).select2({width:"resolve",triggerChange:!0,allowClear:!0,formatResult:t,formatSelection:t,escapeMarkup:function(e){return e}}):(e(this).select2({width:"resolve",triggerChange:!0,allowClear:!0}),e(this).on("change",function(){redux_change(e(e(this).attr("id")))}))})}}(jQuery);
1
+ (function(e){"use strict";function t(e){if(e.hasOwnProperty("id"))return"<span class='elusive'><i class='"+e.id+"'></i>"+"&nbsp;&nbsp;"+e.id.toUpperCase()+"</span>"}e.redux=e.redux||{};e(document).ready(function(){e.redux.select()});e.redux.select=function(){e(".redux-select-item").each(function(){var n={width:"resolve",triggerChange:!0,allowClear:!0};if(e(this).siblings(".select2_params").size()>0){var r=e(this).siblings(".select2_params").val();r=JSON.parse(r);n=e.extend({},n,r)}if(e(this).hasClass("font-icons")){n=e.extend({},{formatResult:t,formatSelection:t,escapeMarkup:function(e){return e}},n);e(this).select2(n)}else{e(this).select2(n);e(this).on("change",function(t){redux_change(e(e(this).attr("id")))})}})}})(jQuery);
ReduxCore/inc/fields/select/field_select.php CHANGED
@@ -21,7 +21,7 @@ class ReduxFramework_select extends ReduxFramework{
21
  $this->field['args'] = array();
22
  }
23
  if ($this->field['data'] == "elusive-icons" || $this->field['data'] == "elusive-icon" || $this->field['data'] == "elusive" ) {
24
- $icons_file = REDUX_DIR.'inc/fields/select/elusive-icons.php';
25
  $icons_file = apply_filters('redux-font-icons-file',$icons_file);
26
  if(file_exists($icons_file))
27
  require_once $icons_file;
@@ -65,8 +65,14 @@ class ReduxFramework_select extends ReduxFramework{
65
  }
66
 
67
  $placeholder = (isset($this->field['placeholder'])) ? esc_attr($this->field['placeholder']) : __( 'Select an item', 'redux-framework' );
68
-
69
- echo '<select'.$multi.' id="'.$this->field['id'].'-select" data-placeholder="'.$placeholder.'" name="'.$this->args['opt_name'].'['.$this->field['id'].']'.$nameBrackets.'" class="redux-select-item '.$this->field['class'].'"'.$width.' rows="6">';
 
 
 
 
 
 
70
  echo '<option></option>';
71
  foreach($this->field['options'] as $k => $v){
72
  if (is_array($this->value)) {
@@ -98,7 +104,7 @@ class ReduxFramework_select extends ReduxFramework{
98
 
99
  wp_enqueue_script(
100
  'field-select-js',
101
- REDUX_URL.'inc/fields/select/field_select.min.js',
102
  array('jquery', 'select2-js'),
103
  time(),
104
  true
21
  $this->field['args'] = array();
22
  }
23
  if ($this->field['data'] == "elusive-icons" || $this->field['data'] == "elusive-icon" || $this->field['data'] == "elusive" ) {
24
+ $icons_file = ReduxFramework::$_dir.'inc/fields/select/elusive-icons.php';
25
  $icons_file = apply_filters('redux-font-icons-file',$icons_file);
26
  if(file_exists($icons_file))
27
  require_once $icons_file;
65
  }
66
 
67
  $placeholder = (isset($this->field['placeholder'])) ? esc_attr($this->field['placeholder']) : __( 'Select an item', 'redux-framework' );
68
+
69
+ if ( isset($this->field['select2']) ) { // if there are any let's pass them to js
70
+ $select2_params = json_encode($this->field['select2']);
71
+ $select2_params = htmlspecialchars( $select2_params , ENT_QUOTES);
72
+ echo '<input type="hidden" class="select2_params" value="'. $select2_params .'">';
73
+ }
74
+
75
+ echo '<select '.$multi.' id="'.$this->field['id'].'-select" data-placeholder="'.$placeholder.'" name="'.$this->args['opt_name'].'['.$this->field['id'].']'.$nameBrackets.'" class="redux-select-item '.$this->field['class'].'"'.$width.' rows="6">';
76
  echo '<option></option>';
77
  foreach($this->field['options'] as $k => $v){
78
  if (is_array($this->value)) {
104
 
105
  wp_enqueue_script(
106
  'field-select-js',
107
+ ReduxFramework::$_url.'inc/fields/select/field_select.min.js',
108
  array('jquery', 'select2-js'),
109
  time(),
110
  true
ReduxCore/inc/fields/slider/field_slider.php CHANGED
@@ -115,7 +115,7 @@ class ReduxFramework_slider extends ReduxFramework{
115
 
116
  wp_enqueue_script(
117
  'redux-typewatch-js',
118
- REDUX_URL.'assets/js/vendor/jquery.typewatch.min.js',
119
  array('jquery'),
120
  time(),
121
  true
@@ -123,7 +123,7 @@ class ReduxFramework_slider extends ReduxFramework{
123
 
124
  wp_enqueue_script(
125
  'redux-field-slider-js',
126
- REDUX_URL.'inc/fields/slider/field_slider.min.js',
127
  array('jquery', 'jquery-numeric', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-dialog', 'redux-typewatch-js'),
128
  time(),
129
  true
@@ -131,7 +131,7 @@ class ReduxFramework_slider extends ReduxFramework{
131
 
132
  wp_enqueue_style(
133
  'redux-field-slider-css',
134
- REDUX_URL.'inc/fields/slider/field_slider.css',
135
  time(),
136
  true
137
  );
115
 
116
  wp_enqueue_script(
117
  'redux-typewatch-js',
118
+ ReduxFramework::$_url.'assets/js/vendor/jquery.typewatch.min.js',
119
  array('jquery'),
120
  time(),
121
  true
123
 
124
  wp_enqueue_script(
125
  'redux-field-slider-js',
126
+ ReduxFramework::$_url.'inc/fields/slider/field_slider.min.js',
127
  array('jquery', 'jquery-numeric', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-dialog', 'redux-typewatch-js'),
128
  time(),
129
  true
131
 
132
  wp_enqueue_style(
133
  'redux-field-slider-css',
134
+ ReduxFramework::$_url.'inc/fields/slider/field_slider.css',
135
  time(),
136
  true
137
  );
ReduxCore/inc/fields/slides/field_slides.php CHANGED
@@ -185,7 +185,7 @@ if (!class_exists('ReduxFramework_slides')) {
185
 
186
  wp_enqueue_script(
187
  'redux-field-media-js',
188
- REDUX_URL . 'inc/fields/media/field_media.js',
189
  array( 'jquery', 'wp-color-picker' ),
190
  time(),
191
  true
@@ -193,14 +193,14 @@ if (!class_exists('ReduxFramework_slides')) {
193
 
194
  wp_enqueue_style(
195
  'redux-field-media-css',
196
- REDUX_URL . 'inc/fields/media/field_media.css',
197
  time(),
198
  true
199
  );
200
 
201
  wp_enqueue_script(
202
  'redux-field-slides-js',
203
- REDUX_URL . 'inc/fields/slides/field_slides.min.js',
204
  array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker'),
205
  time(),
206
  true
@@ -217,7 +217,7 @@ if (!class_exists('ReduxFramework_slides')) {
217
 
218
  wp_enqueue_style(
219
  'redux-field-slides-css',
220
- REDUX_URL . 'inc/fields/slides/field_slides.css',
221
  time(),
222
  true
223
  );
185
 
186
  wp_enqueue_script(
187
  'redux-field-media-js',
188
+ ReduxFramework::$_url . 'inc/fields/media/field_media.js',
189
  array( 'jquery', 'wp-color-picker' ),
190
  time(),
191
  true
193
 
194
  wp_enqueue_style(
195
  'redux-field-media-css',
196
+ ReduxFramework::$_url . 'inc/fields/media/field_media.css',
197
  time(),
198
  true
199
  );
200
 
201
  wp_enqueue_script(
202
  'redux-field-slides-js',
203
+ ReduxFramework::$_url . 'inc/fields/slides/field_slides.min.js',
204
  array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker'),
205
  time(),
206
  true
217
 
218
  wp_enqueue_style(
219
  'redux-field-slides-css',
220
+ ReduxFramework::$_url . 'inc/fields/slides/field_slides.css',
221
  time(),
222
  true
223
  );
ReduxCore/inc/fields/sortable/field_sortable.php CHANGED
@@ -89,7 +89,7 @@ class ReduxFramework_sortable {
89
 
90
  wp_enqueue_script(
91
  'redux-field-sortable-js',
92
- REDUX_URL . 'inc/fields/sortable/field_sortable.min.js',
93
  array('jquery'),
94
  time(),
95
  true
@@ -98,7 +98,7 @@ class ReduxFramework_sortable {
98
 
99
  wp_enqueue_style(
100
  'redux-field-sortable-css',
101
- REDUX_URL.'inc/fields/sortable/field_sortable.css',
102
  time(),
103
  true
104
  );
89
 
90
  wp_enqueue_script(
91
  'redux-field-sortable-js',
92
+ ReduxFramework::$_url . 'inc/fields/sortable/field_sortable.min.js',
93
  array('jquery'),
94
  time(),
95
  true
98
 
99
  wp_enqueue_style(
100
  'redux-field-sortable-css',
101
+ ReduxFramework::$_url.'inc/fields/sortable/field_sortable.css',
102
  time(),
103
  true
104
  );
ReduxCore/inc/fields/sorter/field_sorter.php CHANGED
@@ -120,9 +120,9 @@ class ReduxFramework_sorter extends ReduxFramework {
120
 
121
  function enqueue() {
122
  wp_enqueue_script('jquery-ui-sortable');
123
- wp_register_script('options-sorter', REDUX_URL . 'inc/fields/sorter/field_sorter.min.js', array(
124
  'jquery'));
125
- wp_register_style('options-sorter', REDUX_URL . 'inc/fields/sorter/field_sorter.css');
126
  wp_enqueue_script('options-sorter');
127
  wp_enqueue_style('options-sorter');
128
  }
120
 
121
  function enqueue() {
122
  wp_enqueue_script('jquery-ui-sortable');
123
+ wp_register_script('options-sorter', ReduxFramework::$_url . 'inc/fields/sorter/field_sorter.min.js', array(
124
  'jquery'));
125
+ wp_register_style('options-sorter', ReduxFramework::$_url . 'inc/fields/sorter/field_sorter.css');
126
  wp_enqueue_script('options-sorter');
127
  wp_enqueue_style('options-sorter');
128
  }
ReduxCore/inc/fields/spacing/field_spacing.php CHANGED
@@ -52,6 +52,11 @@ class ReduxFramework_spacing extends ReduxFramework{
52
 
53
  $this->value = wp_parse_args( $this->value, $defaults );
54
 
 
 
 
 
 
55
  if ( !empty( $this->field['units'] ) ) {
56
  $this->value['units'] = $this->field['units'];
57
  }
@@ -189,7 +194,7 @@ class ReduxFramework_spacing extends ReduxFramework{
189
 
190
  wp_enqueue_script(
191
  'redux-field-spacing-js',
192
- REDUX_URL.'inc/fields/spacing/field_spacing.min.js',
193
  array('jquery', 'select2-js', 'jquery-numeric'),
194
  time(),
195
  true
@@ -197,7 +202,7 @@ class ReduxFramework_spacing extends ReduxFramework{
197
 
198
  wp_enqueue_style(
199
  'redux-field-spacing-css',
200
- REDUX_URL.'inc/fields/spacing/field_spacing.css',
201
  time(),
202
  true
203
  );
52
 
53
  $this->value = wp_parse_args( $this->value, $defaults );
54
 
55
+ $this->value['top'] = isset($this->value[$this->field['mode'].'-top'])?$this->value[$this->field['mode'].'-top']:$this->value['top'];
56
+ $this->value['right'] = isset($this->value[$this->field['mode'].'-right'])?$this->value[$this->field['mode'].'-right']:$this->value['right'];
57
+ $this->value['bottom'] = isset($this->value[$this->field['mode'].'-bottom'])?$this->value[$this->field['mode'].'-bottom']:$this->value['bottom'];
58
+ $this->value['left'] = isset($this->value[$this->field['mode'].'-left'])?$this->value[$this->field['mode'].'-left']:$this->value['left'];
59
+
60
  if ( !empty( $this->field['units'] ) ) {
61
  $this->value['units'] = $this->field['units'];
62
  }
194
 
195
  wp_enqueue_script(
196
  'redux-field-spacing-js',
197
+ ReduxFramework::$_url.'inc/fields/spacing/field_spacing.min.js',
198
  array('jquery', 'select2-js', 'jquery-numeric'),
199
  time(),
200
  true
202
 
203
  wp_enqueue_style(
204
  'redux-field-spacing-css',
205
+ ReduxFramework::$_url.'inc/fields/spacing/field_spacing.css',
206
  time(),
207
  true
208
  );
ReduxCore/inc/fields/spinner/field_spinner.php CHANGED
@@ -115,19 +115,19 @@ class ReduxFramework_spinner extends ReduxFramework {
115
  function enqueue() {
116
 
117
  wp_enqueue_script(
118
- 'redux-typewatch-js', REDUX_URL . 'assets/js/vendor/jquery.typewatch.min.js', array('jquery'), time(), true
119
  );
120
 
121
  wp_enqueue_script(
122
- 'redux-spinner-js', REDUX_URL . 'inc/fields/spinner/spinner_custom.js', array('jquery'), time(), true
123
  );
124
 
125
  wp_enqueue_script(
126
- 'redux-field-spinner-js', REDUX_URL . 'inc/fields/spinner/field_spinner.min.js', array('jquery', 'redux-spinner-js', 'jquery-numeric', 'jquery-ui-core', 'jquery-ui-dialog', 'redux-typewatch-js'), time(), true
127
  );
128
 
129
  wp_enqueue_style(
130
- 'redux-field-spinner-css', REDUX_URL . 'inc/fields/spinner/field_spinner.css', time(), true
131
  );
132
  }
133
 
115
  function enqueue() {
116
 
117
  wp_enqueue_script(
118
+ 'redux-typewatch-js', ReduxFramework::$_url . 'assets/js/vendor/jquery.typewatch.min.js', array('jquery'), time(), true
119
  );
120
 
121
  wp_enqueue_script(
122
+ 'redux-spinner-js', ReduxFramework::$_url . 'inc/fields/spinner/spinner_custom.js', array('jquery'), time(), true
123
  );
124
 
125
  wp_enqueue_script(
126
+ 'redux-field-spinner-js', ReduxFramework::$_url . 'inc/fields/spinner/field_spinner.min.js', array('jquery', 'redux-spinner-js', 'jquery-numeric', 'jquery-ui-core', 'jquery-ui-dialog', 'redux-typewatch-js'), time(), true
127
  );
128
 
129
  wp_enqueue_style(
130
+ 'redux-field-spinner-css', ReduxFramework::$_url . 'inc/fields/spinner/field_spinner.css', time(), true
131
  );
132
  }
133
 
ReduxCore/inc/fields/switch/field_switch.php CHANGED
@@ -70,7 +70,7 @@ class ReduxFramework_switch extends ReduxFramework{
70
 
71
  wp_enqueue_script(
72
  'redux-field-switch-js',
73
- REDUX_URL.'inc/fields/switch/field_switch.min.js',
74
  array('jquery'),
75
  time(),
76
  true
@@ -78,7 +78,7 @@ class ReduxFramework_switch extends ReduxFramework{
78
 
79
  wp_enqueue_style(
80
  'redux-field-switch-css',
81
- REDUX_URL.'inc/fields/switch/field_switch.css',
82
  time(),
83
  true
84
  );
70
 
71
  wp_enqueue_script(
72
  'redux-field-switch-js',
73
+ ReduxFramework::$_url.'inc/fields/switch/field_switch.min.js',
74
  array('jquery'),
75
  time(),
76
  true
78
 
79
  wp_enqueue_style(
80
  'redux-field-switch-css',
81
+ ReduxFramework::$_url.'inc/fields/switch/field_switch.css',
82
  time(),
83
  true
84
  );
ReduxCore/inc/fields/typography/field_typography.php CHANGED
@@ -136,12 +136,12 @@ class ReduxFramework_typography extends ReduxFramework{
136
 
137
  echo '</optgroup>';
138
 
139
- if( !file_exists( REDUX_DIR.'inc/fields/typography/googlefonts.html' ) ) {
140
  $this->getGoogleFonts($wp_filesystem);
141
  }
142
 
143
- if( file_exists( REDUX_DIR.'inc/fields/typography/googlefonts.html' )) {
144
- echo $wp_filesystem->get_contents(REDUX_DIR.'inc/fields/typography/googlefonts.html');
145
  }
146
  }
147
 
@@ -307,7 +307,7 @@ class ReduxFramework_typography extends ReduxFramework{
307
 
308
  wp_enqueue_script(
309
  'redux-field-color-js',
310
- REDUX_URL . 'inc/fields/color/field_color.min.js',
311
  array( 'jquery', 'wp-color-picker' ),
312
  time(),
313
  true
@@ -315,14 +315,14 @@ class ReduxFramework_typography extends ReduxFramework{
315
 
316
  wp_enqueue_style(
317
  'redux-field-color-css',
318
- REDUX_URL . 'inc/fields/color/field_color.css',
319
  time(),
320
  true
321
  );
322
 
323
  wp_enqueue_script(
324
  'redux-field-typography-js',
325
- REDUX_URL.'inc/fields/typography/field_typography.min.js',
326
  array('jquery', 'wp-color-picker', 'redux-field-color-js', 'select2-js', 'jquery-numeric'),
327
  time(),
328
  true
@@ -330,7 +330,7 @@ class ReduxFramework_typography extends ReduxFramework{
330
 
331
  wp_enqueue_style(
332
  'redux-field-typography-css',
333
- REDUX_URL.'inc/fields/typography/field_typography.css',
334
  time(),
335
  true
336
  );
@@ -481,7 +481,7 @@ class ReduxFramework_typography extends ReduxFramework{
481
 
482
  if (empty($_SESSION['googleArray'])) :
483
  */
484
- if( !file_exists( REDUX_DIR.'inc/fields/typography/googlefonts.json' ) ) {
485
  $result = wp_remote_get( 'https://www.googleapis.com/webfonts/v1/webfonts?key='.$this->parent->args['google_api_key']);
486
  if ($result['response']['code'] == 200) {
487
  $result = json_decode($result['body']);
@@ -494,7 +494,7 @@ class ReduxFramework_typography extends ReduxFramework{
494
 
495
  if ( !empty( $googleArray ) ) {
496
  $wp_filesystem->put_contents(
497
- REDUX_DIR.'inc/fields/typography/googlefonts.json',
498
  json_encode($googleArray),
499
  FS_CHMOD_FILE // predefined mode settings for WP files
500
  );
@@ -503,7 +503,7 @@ class ReduxFramework_typography extends ReduxFramework{
503
  }//if
504
  }//if
505
  if (empty($googleArray)) {
506
- $googleArray = json_decode($wp_filesystem->get_contents(REDUX_DIR.'inc/fields/typography/googlefonts.json' ), true );
507
  }
508
  $gfonts = '<optgroup label="'.__('Google Webfonts', 'redux-framework').'">';
509
  foreach ($googleArray as $i => $face) {
@@ -516,7 +516,7 @@ class ReduxFramework_typography extends ReduxFramework{
516
  }
517
 
518
  $wp_filesystem->put_contents(
519
- REDUX_DIR.'inc/fields/typography/googlefonts.html',
520
  $gfonts,
521
  FS_CHMOD_FILE // predefined mode settings for WP files
522
  );
136
 
137
  echo '</optgroup>';
138
 
139
+ if( !file_exists( ReduxFramework::$_dir.'inc/fields/typography/googlefonts.html' ) ) {
140
  $this->getGoogleFonts($wp_filesystem);
141
  }
142
 
143
+ if( file_exists( ReduxFramework::$_dir.'inc/fields/typography/googlefonts.html' )) {
144
+ echo $wp_filesystem->get_contents(ReduxFramework::$_dir.'inc/fields/typography/googlefonts.html');
145
  }
146
  }
147
 
307
 
308
  wp_enqueue_script(
309
  'redux-field-color-js',
310
+ ReduxFramework::$_url . 'inc/fields/color/field_color.min.js',
311
  array( 'jquery', 'wp-color-picker' ),
312
  time(),
313
  true
315
 
316
  wp_enqueue_style(
317
  'redux-field-color-css',
318
+ ReduxFramework::$_url . 'inc/fields/color/field_color.css',
319
  time(),
320
  true
321
  );
322
 
323
  wp_enqueue_script(
324
  'redux-field-typography-js',
325
+ ReduxFramework::$_url.'inc/fields/typography/field_typography.min.js',
326
  array('jquery', 'wp-color-picker', 'redux-field-color-js', 'select2-js', 'jquery-numeric'),
327
  time(),
328
  true
330
 
331
  wp_enqueue_style(
332
  'redux-field-typography-css',
333
+ ReduxFramework::$_url.'inc/fields/typography/field_typography.css',
334
  time(),
335
  true
336
  );
481
 
482
  if (empty($_SESSION['googleArray'])) :
483
  */
484
+ if( !file_exists( ReduxFramework::$_dir.'inc/fields/typography/googlefonts.json' ) ) {
485
  $result = wp_remote_get( 'https://www.googleapis.com/webfonts/v1/webfonts?key='.$this->parent->args['google_api_key']);
486
  if ($result['response']['code'] == 200) {
487
  $result = json_decode($result['body']);
494
 
495
  if ( !empty( $googleArray ) ) {
496
  $wp_filesystem->put_contents(
497
+ ReduxFramework::$_dir.'inc/fields/typography/googlefonts.json',
498
  json_encode($googleArray),
499
  FS_CHMOD_FILE // predefined mode settings for WP files
500
  );
503
  }//if
504
  }//if
505
  if (empty($googleArray)) {
506
+ $googleArray = json_decode($wp_filesystem->get_contents(ReduxFramework::$_dir.'inc/fields/typography/googlefonts.json' ), true );
507
  }
508
  $gfonts = '<optgroup label="'.__('Google Webfonts', 'redux-framework').'">';
509
  foreach ($googleArray as $i => $face) {
516
  }
517
 
518
  $wp_filesystem->put_contents(
519
+ ReduxFramework::$_dir.'inc/fields/typography/googlefonts.html',
520
  $gfonts,
521
  FS_CHMOD_FILE // predefined mode settings for WP files
522
  );
ReduxCore/languages/redux-framework.mo CHANGED
Binary file
ReduxCore/languages/redux-framework.pot CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Redux Framework\n"
4
- "POT-Creation-Date: 2013-10-24 11:09-0700\n"
5
- "PO-Revision-Date: 2013-10-24 11:09-0700\n"
6
  "Last-Translator: Dovy Paukstys <dovy@reduxframework.com>\n"
7
  "Language-Team: ReduxFramework <language@reduxframework.com>\n"
8
  "Language: en_US\n"
@@ -20,7 +20,7 @@ msgstr ""
20
  "X-Poedit-SearchPath-1: ReduxCore/languages\n"
21
  "X-Poedit-SearchPath-2: .\n"
22
 
23
- #: ReduxCore/framework.php:105 ReduxCore/framework.php:107
24
  msgid "Options"
25
  msgstr ""
26
 
@@ -32,143 +32,147 @@ msgstr ""
32
  msgid "Redux Framework"
33
  msgstr ""
34
 
35
- #: ReduxCore/framework.php:641 ReduxCore/framework.php:642
36
- #: ReduxCore/framework.php:1503
37
  msgid "Import / Export"
38
  msgstr ""
39
 
40
- #: ReduxCore/framework.php:663 ReduxCore/framework.php:664
41
- #: ReduxCore/framework.php:1533 ReduxCore/framework.php:1640
42
  msgid "Options Object"
43
  msgstr ""
44
 
45
- #: ReduxCore/framework.php:674 ReduxCore/framework.php:675
46
- #: ReduxCore/framework.php:1547 ReduxCore/framework.php:1660
47
  msgid "System Info"
48
  msgstr ""
49
 
50
- #: ReduxCore/framework.php:848
51
- #: ReduxCore/extensions/customizer/extension_customizer.php:309
52
- #: ReduxCore/extensions/customizer/extension_customizer.php:340
53
  msgid "You have changes that are not saved. Would you like to save them now?"
54
  msgstr ""
55
 
56
- #: ReduxCore/framework.php:849
57
- #: ReduxCore/extensions/customizer/extension_customizer.php:310
58
- #: ReduxCore/extensions/customizer/extension_customizer.php:341
59
  msgid "Are you sure? Resetting will loose all custom values."
60
  msgstr ""
61
 
62
- #: ReduxCore/framework.php:850
63
- #: ReduxCore/extensions/customizer/extension_customizer.php:311
64
- #: ReduxCore/extensions/customizer/extension_customizer.php:342
65
  msgid ""
66
  "Your current options will be replaced with the values of this preset. Would "
67
  "you like to proceed?"
68
  msgstr ""
69
 
70
- #: ReduxCore/framework.php:1114
71
  msgid "Default"
72
  msgstr ""
73
 
74
- #: ReduxCore/framework.php:1377
75
  msgid "Warning- This options panel will not work properly without javascript!"
76
  msgstr ""
77
 
78
- #: ReduxCore/framework.php:1430
79
  msgid "Expand"
80
  msgstr ""
81
 
82
- #: ReduxCore/framework.php:1434 ReduxCore/framework.php:1691
 
 
 
 
83
  msgid "Reset to Defaults"
84
  msgstr ""
85
 
86
- #: ReduxCore/framework.php:1437 ReduxCore/framework.php:1694
87
  msgid "Working..."
88
  msgstr ""
89
 
90
- #: ReduxCore/framework.php:1444
91
  msgid "Settings Imported!"
92
  msgstr ""
93
 
94
- #: ReduxCore/framework.php:1446
95
  msgid "Settings Saved!"
96
  msgstr ""
97
 
98
- #: ReduxCore/framework.php:1450
99
  msgid "Settings have changed, you should save them!"
100
  msgstr ""
101
 
102
- #: ReduxCore/framework.php:1451
103
  msgid "error(s) were found!"
104
  msgstr ""
105
 
106
- #: ReduxCore/framework.php:1452
107
  msgid "warning(s) were found!"
108
  msgstr ""
109
 
110
- #: ReduxCore/framework.php:1584
111
  msgid "Import / Export Options"
112
  msgstr ""
113
 
114
- #: ReduxCore/framework.php:1585
115
  msgid "Import Options"
116
  msgstr ""
117
 
118
- #: ReduxCore/framework.php:1586
119
  msgid "Import from file"
120
  msgstr ""
121
 
122
- #: ReduxCore/framework.php:1586
123
  msgid "Import from URL"
124
  msgstr ""
125
 
126
- #: ReduxCore/framework.php:1591
127
  msgid ""
128
  "Input your backup file below and hit Import to restore your sites options "
129
  "from a backup."
130
  msgstr ""
131
 
132
- #: ReduxCore/framework.php:1601
133
  msgid ""
134
  "Input the URL to another sites options set and hit Import to load the "
135
  "options from that site."
136
  msgstr ""
137
 
138
- #: ReduxCore/framework.php:1608
139
  msgid "Import"
140
  msgstr ""
141
 
142
- #: ReduxCore/framework.php:1608
143
  msgid ""
144
  "WARNING! This will overwrite all existing option values, please proceed with "
145
  "caution!"
146
  msgstr ""
147
 
148
- #: ReduxCore/framework.php:1611
149
  msgid "Export Options"
150
  msgstr ""
151
 
152
- #: ReduxCore/framework.php:1613
153
  msgid ""
154
  "Here you can copy/download your current option settings. Keep this safe as "
155
  "you can use it as a backup should anything go wrong, or you can use it to "
156
  "restore your settings on this site (or any other site)."
157
  msgstr ""
158
 
159
- #: ReduxCore/framework.php:1617
160
  msgid "Copy"
161
  msgstr ""
162
 
163
- #: ReduxCore/framework.php:1617
164
  msgid "Download"
165
  msgstr ""
166
 
167
- #: ReduxCore/framework.php:1617
168
  msgid "Copy Link"
169
  msgstr ""
170
 
171
- #: ReduxCore/framework.php:1649
172
  msgid "Show Object in Javascript Console Object"
173
  msgstr ""
174
 
@@ -180,6 +184,12 @@ msgstr ""
180
  msgid "Border style"
181
  msgstr ""
182
 
 
 
 
 
 
 
183
  #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:73
184
  msgid "From "
185
  msgstr ""
@@ -188,18 +198,18 @@ msgstr ""
188
  msgid "To "
189
  msgstr ""
190
 
191
- #: ReduxCore/inc/fields/dimensions/field_dimensions.php:70
192
  msgid "Width"
193
  msgstr ""
194
 
195
- #: ReduxCore/inc/fields/dimensions/field_dimensions.php:84
196
  msgid "height"
197
  msgstr ""
198
 
199
- #: ReduxCore/inc/fields/dimensions/field_dimensions.php:94
200
- #: ReduxCore/inc/fields/dimensions/field_dimensions.php:95
201
- #: ReduxCore/inc/fields/spacing/field_spacing.php:126
202
- #: ReduxCore/inc/fields/spacing/field_spacing.php:127
203
  msgid "Units"
204
  msgstr ""
205
 
@@ -235,13 +245,17 @@ msgstr ""
235
  msgid "Active"
236
  msgstr ""
237
 
238
- #: ReduxCore/inc/fields/media/field_media.php:133
 
 
 
 
239
  #: ReduxCore/inc/fields/slides/field_slides.php:110
240
  #: ReduxCore/inc/fields/slides/field_slides.php:151
241
  msgid "Upload"
242
  msgstr ""
243
 
244
- #: ReduxCore/inc/fields/media/field_media.php:139
245
  #: ReduxCore/inc/fields/multi_text/field_multi_text.php:70
246
  #: ReduxCore/inc/fields/multi_text/field_multi_text.php:73
247
  #: ReduxCore/inc/fields/multi_text/field_multi_text.php:76
@@ -266,32 +280,45 @@ msgstr ""
266
  msgid "Select an item"
267
  msgstr ""
268
 
269
- #: ReduxCore/inc/fields/select/field_select.php:81
270
  msgid "No items of this type were found."
271
  msgstr ""
272
 
 
 
 
 
 
273
  #: ReduxCore/inc/fields/slides/field_slides.php:129
274
  #: ReduxCore/inc/fields/slides/field_slides.php:166
275
  msgid "Delete Slide"
276
  msgstr ""
277
 
 
 
 
 
 
 
 
 
278
  #: ReduxCore/inc/fields/slides/field_slides.php:169
279
  msgid "Add Slide"
280
  msgstr ""
281
 
282
- #: ReduxCore/inc/fields/spacing/field_spacing.php:83
283
  msgid "Top"
284
  msgstr ""
285
 
286
- #: ReduxCore/inc/fields/spacing/field_spacing.php:94
287
  msgid "Right"
288
  msgstr ""
289
 
290
- #: ReduxCore/inc/fields/spacing/field_spacing.php:105
291
  msgid "Bottom"
292
  msgstr ""
293
 
294
- #: ReduxCore/inc/fields/spacing/field_spacing.php:116
295
  msgid "Left"
296
  msgstr ""
297
 
@@ -299,6 +326,10 @@ msgstr ""
299
  msgid "Font family"
300
  msgstr ""
301
 
 
 
 
 
302
  #: ReduxCore/inc/fields/typography/field_typography.php:163
303
  #: ReduxCore/inc/fields/typography/field_typography.php:167
304
  msgid "Font style"
@@ -344,7 +375,12 @@ msgstr ""
344
  msgid "Font color"
345
  msgstr ""
346
 
 
 
 
 
347
  #: ReduxCore/inc/validation/color/validation_color.php:15
 
348
  msgid "This field must be a valid color value."
349
  msgstr ""
350
 
@@ -380,18 +416,18 @@ msgstr ""
380
  msgid "You must provide a valid URL for this option."
381
  msgstr ""
382
 
383
- #: class-redux-plugin.php:246
384
  msgid "Redux Framework has an embedded demo."
385
  msgstr ""
386
 
387
- #: class-redux-plugin.php:246
388
  msgid "Click here to activate the sample config file."
389
  msgstr ""
390
 
391
- #: class-redux-plugin.php:339
392
  msgid "Deactivate Demo Mode"
393
  msgstr ""
394
 
395
- #: class-redux-plugin.php:341
396
  msgid "Activate Demo Mode"
397
  msgstr ""
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Redux Framework\n"
4
+ "POT-Creation-Date: 2013-11-02 00:57-0700\n"
5
+ "PO-Revision-Date: 2013-11-02 00:57-0700\n"
6
  "Last-Translator: Dovy Paukstys <dovy@reduxframework.com>\n"
7
  "Language-Team: ReduxFramework <language@reduxframework.com>\n"
8
  "Language: en_US\n"
20
  "X-Poedit-SearchPath-1: ReduxCore/languages\n"
21
  "X-Poedit-SearchPath-2: .\n"
22
 
23
+ #: ReduxCore/framework.php:106 ReduxCore/framework.php:108
24
  msgid "Options"
25
  msgstr ""
26
 
32
  msgid "Redux Framework"
33
  msgstr ""
34
 
35
+ #: ReduxCore/framework.php:659 ReduxCore/framework.php:660
36
+ #: ReduxCore/framework.php:1525
37
  msgid "Import / Export"
38
  msgstr ""
39
 
40
+ #: ReduxCore/framework.php:681 ReduxCore/framework.php:682
41
+ #: ReduxCore/framework.php:1555 ReduxCore/framework.php:1662
42
  msgid "Options Object"
43
  msgstr ""
44
 
45
+ #: ReduxCore/framework.php:692 ReduxCore/framework.php:693
46
+ #: ReduxCore/framework.php:1569 ReduxCore/framework.php:1682
47
  msgid "System Info"
48
  msgstr ""
49
 
50
+ #: ReduxCore/framework.php:863
51
+ #: ReduxCore/extensions/customizer/extension_customizer.php:311
52
+ #: ReduxCore/extensions/customizer/extension_customizer.php:342
53
  msgid "You have changes that are not saved. Would you like to save them now?"
54
  msgstr ""
55
 
56
+ #: ReduxCore/framework.php:864
57
+ #: ReduxCore/extensions/customizer/extension_customizer.php:312
58
+ #: ReduxCore/extensions/customizer/extension_customizer.php:343
59
  msgid "Are you sure? Resetting will loose all custom values."
60
  msgstr ""
61
 
62
+ #: ReduxCore/framework.php:865
63
+ #: ReduxCore/extensions/customizer/extension_customizer.php:313
64
+ #: ReduxCore/extensions/customizer/extension_customizer.php:344
65
  msgid ""
66
  "Your current options will be replaced with the values of this preset. Would "
67
  "you like to proceed?"
68
  msgstr ""
69
 
70
+ #: ReduxCore/framework.php:1130
71
  msgid "Default"
72
  msgstr ""
73
 
74
+ #: ReduxCore/framework.php:1399
75
  msgid "Warning- This options panel will not work properly without javascript!"
76
  msgstr ""
77
 
78
+ #: ReduxCore/framework.php:1452
79
  msgid "Expand"
80
  msgstr ""
81
 
82
+ #: ReduxCore/framework.php:1454 ReduxCore/framework.php:1711
83
+ msgid "Save Changes"
84
+ msgstr ""
85
+
86
+ #: ReduxCore/framework.php:1456 ReduxCore/framework.php:1713
87
  msgid "Reset to Defaults"
88
  msgstr ""
89
 
90
+ #: ReduxCore/framework.php:1459 ReduxCore/framework.php:1716
91
  msgid "Working..."
92
  msgstr ""
93
 
94
+ #: ReduxCore/framework.php:1466
95
  msgid "Settings Imported!"
96
  msgstr ""
97
 
98
+ #: ReduxCore/framework.php:1468
99
  msgid "Settings Saved!"
100
  msgstr ""
101
 
102
+ #: ReduxCore/framework.php:1472
103
  msgid "Settings have changed, you should save them!"
104
  msgstr ""
105
 
106
+ #: ReduxCore/framework.php:1473
107
  msgid "error(s) were found!"
108
  msgstr ""
109
 
110
+ #: ReduxCore/framework.php:1474
111
  msgid "warning(s) were found!"
112
  msgstr ""
113
 
114
+ #: ReduxCore/framework.php:1606
115
  msgid "Import / Export Options"
116
  msgstr ""
117
 
118
+ #: ReduxCore/framework.php:1607
119
  msgid "Import Options"
120
  msgstr ""
121
 
122
+ #: ReduxCore/framework.php:1608
123
  msgid "Import from file"
124
  msgstr ""
125
 
126
+ #: ReduxCore/framework.php:1608
127
  msgid "Import from URL"
128
  msgstr ""
129
 
130
+ #: ReduxCore/framework.php:1613
131
  msgid ""
132
  "Input your backup file below and hit Import to restore your sites options "
133
  "from a backup."
134
  msgstr ""
135
 
136
+ #: ReduxCore/framework.php:1623
137
  msgid ""
138
  "Input the URL to another sites options set and hit Import to load the "
139
  "options from that site."
140
  msgstr ""
141
 
142
+ #: ReduxCore/framework.php:1630
143
  msgid "Import"
144
  msgstr ""
145
 
146
+ #: ReduxCore/framework.php:1630
147
  msgid ""
148
  "WARNING! This will overwrite all existing option values, please proceed with "
149
  "caution!"
150
  msgstr ""
151
 
152
+ #: ReduxCore/framework.php:1633
153
  msgid "Export Options"
154
  msgstr ""
155
 
156
+ #: ReduxCore/framework.php:1635
157
  msgid ""
158
  "Here you can copy/download your current option settings. Keep this safe as "
159
  "you can use it as a backup should anything go wrong, or you can use it to "
160
  "restore your settings on this site (or any other site)."
161
  msgstr ""
162
 
163
+ #: ReduxCore/framework.php:1639
164
  msgid "Copy"
165
  msgstr ""
166
 
167
+ #: ReduxCore/framework.php:1639
168
  msgid "Download"
169
  msgstr ""
170
 
171
+ #: ReduxCore/framework.php:1639
172
  msgid "Copy Link"
173
  msgstr ""
174
 
175
+ #: ReduxCore/framework.php:1671
176
  msgid "Show Object in Javascript Console Object"
177
  msgstr ""
178
 
184
  msgid "Border style"
185
  msgstr ""
186
 
187
+ #: ReduxCore/inc/fields/color/field_color.php:72
188
+ #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:81
189
+ #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:91
190
+ msgid "Transparent"
191
+ msgstr ""
192
+
193
  #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:73
194
  msgid "From "
195
  msgstr ""
198
  msgid "To "
199
  msgstr ""
200
 
201
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:85
202
  msgid "Width"
203
  msgstr ""
204
 
205
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:101
206
  msgid "height"
207
  msgstr ""
208
 
209
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:111
210
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:112
211
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:151
212
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:152
213
  msgid "Units"
214
  msgstr ""
215
 
245
  msgid "Active"
246
  msgstr ""
247
 
248
+ #: ReduxCore/inc/fields/media/field_media.php:112
249
+ msgid "None media selected"
250
+ msgstr ""
251
+
252
+ #: ReduxCore/inc/fields/media/field_media.php:144
253
  #: ReduxCore/inc/fields/slides/field_slides.php:110
254
  #: ReduxCore/inc/fields/slides/field_slides.php:151
255
  msgid "Upload"
256
  msgstr ""
257
 
258
+ #: ReduxCore/inc/fields/media/field_media.php:150
259
  #: ReduxCore/inc/fields/multi_text/field_multi_text.php:70
260
  #: ReduxCore/inc/fields/multi_text/field_multi_text.php:73
261
  #: ReduxCore/inc/fields/multi_text/field_multi_text.php:76
280
  msgid "Select an item"
281
  msgstr ""
282
 
283
+ #: ReduxCore/inc/fields/select/field_select.php:87
284
  msgid "No items of this type were found."
285
  msgstr ""
286
 
287
+ #: ReduxCore/inc/fields/slides/field_slides.php:122
288
+ #: ReduxCore/inc/fields/slides/field_slides.php:159
289
+ msgid "Description"
290
+ msgstr ""
291
+
292
  #: ReduxCore/inc/fields/slides/field_slides.php:129
293
  #: ReduxCore/inc/fields/slides/field_slides.php:166
294
  msgid "Delete Slide"
295
  msgstr ""
296
 
297
+ #: ReduxCore/inc/fields/slides/field_slides.php:158
298
+ msgid "Title"
299
+ msgstr ""
300
+
301
+ #: ReduxCore/inc/fields/slides/field_slides.php:160
302
+ msgid "URL"
303
+ msgstr ""
304
+
305
  #: ReduxCore/inc/fields/slides/field_slides.php:169
306
  msgid "Add Slide"
307
  msgstr ""
308
 
309
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:105
310
  msgid "Top"
311
  msgstr ""
312
 
313
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:116
314
  msgid "Right"
315
  msgstr ""
316
 
317
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:130
318
  msgid "Bottom"
319
  msgstr ""
320
 
321
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:141
322
  msgid "Left"
323
  msgstr ""
324
 
326
  msgid "Font family"
327
  msgstr ""
328
 
329
+ #: ReduxCore/inc/fields/typography/field_typography.php:106
330
+ msgid "Standard Fonts"
331
+ msgstr ""
332
+
333
  #: ReduxCore/inc/fields/typography/field_typography.php:163
334
  #: ReduxCore/inc/fields/typography/field_typography.php:167
335
  msgid "Font style"
375
  msgid "Font color"
376
  msgstr ""
377
 
378
+ #: ReduxCore/inc/fields/typography/field_typography.php:508
379
+ msgid "Google Webfonts"
380
+ msgstr ""
381
+
382
  #: ReduxCore/inc/validation/color/validation_color.php:15
383
+ #: ReduxCore/inc/validation/color_rgba/validation_color_rgba.php:15
384
  msgid "This field must be a valid color value."
385
  msgstr ""
386
 
416
  msgid "You must provide a valid URL for this option."
417
  msgstr ""
418
 
419
+ #: class-redux-plugin.php:242
420
  msgid "Redux Framework has an embedded demo."
421
  msgstr ""
422
 
423
+ #: class-redux-plugin.php:242
424
  msgid "Click here to activate the sample config file."
425
  msgstr ""
426
 
427
+ #: class-redux-plugin.php:319
428
  msgid "Deactivate Demo Mode"
429
  msgstr ""
430
 
431
+ #: class-redux-plugin.php:321
432
  msgid "Activate Demo Mode"
433
  msgstr ""
class-redux-plugin.php CHANGED
@@ -104,9 +104,6 @@ class ReduxFrameworkPlugin {
104
  $this->options = get_option( 'ReduxFrameworkPlugin', $defaults );
105
  }
106
 
107
- // Load plugin text domain
108
- add_action( 'wp_loaded', array( $this, 'load_plugin_textdomain' ) );
109
-
110
  add_action( 'wp_loaded', array( $this, 'redux_options_toggle_check' ) );
111
 
112
  // Activate plugin when new blog is added
@@ -114,7 +111,8 @@ class ReduxFrameworkPlugin {
114
 
115
  add_action('admin_notices', array( $this, 'admin_notices' ) );
116
 
117
- add_filter( 'plugin_row_meta', array($this, 'ts_plugin_meta_links'), 10, 2 );
 
118
 
119
  if ( !class_exists( 'Redux_Framework' ) && file_exists( dirname( __FILE__ ) . '/ReduxCore/framework.php' ) ) {
120
  require_once( dirname( __FILE__ ) . '/ReduxCore/framework.php' );
@@ -266,22 +264,6 @@ class ReduxFrameworkPlugin {
266
  delete_option('ReduxFrameworkPlugin_ACTIVATED_NOTICES');
267
  }
268
 
269
- /**
270
- * Load the plugin text domain for translation.
271
- *
272
- * @since 1.0.0
273
- */
274
- public function load_plugin_textdomain() {
275
-
276
- $domain = $this->plugin_slug;
277
- $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
278
-
279
- load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
280
- load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/ReduxCore/languages' );
281
-
282
- }
283
-
284
-
285
  /**
286
  * Turn on or off
287
  *
@@ -296,7 +278,6 @@ class ReduxFrameworkPlugin {
296
  if ( $_GET['ReduxFrameworkPlugin'] == 'demo') {
297
  if ( $this->options['demo'] == false ) {
298
  $this->options['demo'] = true;
299
- //$url = admin_url( 'admin.php?page=redux_sample_options');
300
  } else {
301
  $this->options['demo'] = false;
302
  }
@@ -328,7 +309,25 @@ class ReduxFrameworkPlugin {
328
  */
329
  }
330
 
331
- function ts_plugin_meta_links( $links, $file ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  if ( strpos($file,'redux-framework.php') === false ) {
333
  return $links;
334
  }
@@ -349,17 +348,13 @@ class ReduxFrameworkPlugin {
349
  $extra .='</span>';
350
 
351
  $plugin = str_replace('class-redux-plugin', 'redux-framework', plugin_basename(__FILE__));
352
- $array = array( '<a href="https://github.com/ReduxCore/ReduxFramework" target="_blank">Github Repo</a>', '<a href="https://github.com/ReduxFramework/ReduxFramework/issues/" target="_blank">Issue Tracker</a>'.$extra );
353
  // create link
354
  if ( $file == $plugin ) {
355
- return array_merge(
356
- $links,
357
- $array
358
- );
359
  }
360
  return $links;
361
 
362
- }
363
 
364
 
365
- }
104
  $this->options = get_option( 'ReduxFrameworkPlugin', $defaults );
105
  }
106
 
 
 
 
107
  add_action( 'wp_loaded', array( $this, 'redux_options_toggle_check' ) );
108
 
109
  // Activate plugin when new blog is added
111
 
112
  add_action('admin_notices', array( $this, 'admin_notices' ) );
113
 
114
+ add_filter( 'plugin_row_meta', array($this, 'plugin_meta_links'), null, 2 );
115
+ add_filter( 'plugin_row_meta', array($this, 'plugin_meta_demo_mode_link'), null, 2 );
116
 
117
  if ( !class_exists( 'Redux_Framework' ) && file_exists( dirname( __FILE__ ) . '/ReduxCore/framework.php' ) ) {
118
  require_once( dirname( __FILE__ ) . '/ReduxCore/framework.php' );
264
  delete_option('ReduxFrameworkPlugin_ACTIVATED_NOTICES');
265
  }
266
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  /**
268
  * Turn on or off
269
  *
278
  if ( $_GET['ReduxFrameworkPlugin'] == 'demo') {
279
  if ( $this->options['demo'] == false ) {
280
  $this->options['demo'] = true;
 
281
  } else {
282
  $this->options['demo'] = false;
283
  }
309
  */
310
  }
311
 
312
+ function plugin_meta_links( $links, $file ) {
313
+ if ( strpos($file,'redux-framework.php') === false ) {
314
+ return $links;
315
+ }
316
+
317
+ $plugin = str_replace('class-redux-plugin', 'redux-framework', plugin_basename(__FILE__));
318
+ $array = array( '<a href="https://github.com/ReduxCore/ReduxFramework" target="_blank">Github Repo</a>', '<a href="https://github.com/ReduxFramework/ReduxFramework/issues/" target="_blank">Issue Tracker</a>' );
319
+ // create link
320
+ if ( $file == $plugin ) {
321
+ return array_merge(
322
+ $links,
323
+ $array
324
+ );
325
+ }
326
+ return $links;
327
+
328
+ }
329
+
330
+ function plugin_meta_demo_mode_link( $links, $file ) {
331
  if ( strpos($file,'redux-framework.php') === false ) {
332
  return $links;
333
  }
348
  $extra .='</span>';
349
 
350
  $plugin = str_replace('class-redux-plugin', 'redux-framework', plugin_basename(__FILE__));
 
351
  // create link
352
  if ( $file == $plugin ) {
353
+ $links[count($links)-1] .= $extra;
 
 
 
354
  }
355
  return $links;
356
 
357
+ }
358
 
359
 
360
+ }
redux-framework.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin URI: http://wordpress.org/plugins/redux-framework/
17
  * Github URI: https://github.com/ReduxFramework/ReduxFramework
18
  * Description: Redux is a simple, truly extensible options framework for WordPress themes and plugins.
19
- * Version: 3.0.5
20
  * Author: Redux Team
21
  * Author URI: http://reduxframework.com
22
  * Text Domain: redux-framework
16
  * Plugin URI: http://wordpress.org/plugins/redux-framework/
17
  * Github URI: https://github.com/ReduxFramework/ReduxFramework
18
  * Description: Redux is a simple, truly extensible options framework for WordPress themes and plugins.
19
+ * Version: 3.0.6
20
  * Author: Redux Team
21
  * Author URI: http://reduxframework.com
22
  * Text Domain: redux-framework
sample/sample-config.php CHANGED
@@ -137,12 +137,12 @@ $args['google_api_key'] = 'AIzaSyAX_2L_UzCDPEnAHTG7zhESRVpMPS4ssII';
137
  $args['share_icons']['twitter'] = array(
138
  'link' => 'http://twitter.com/ghost1227',
139
  'title' => 'Follow me on Twitter',
140
- 'img' => REDUX_URL . 'assets/img/social/Twitter.png'
141
  );
142
  $args['share_icons']['linked_in'] = array(
143
  'link' => 'http://www.linkedin.com/profile/view?id=52559281',
144
  'title' => 'Find me on LinkedIn',
145
- 'img' => REDUX_URL . 'assets/img/social/LinkedIn.png'
146
  );
147
 
148
  // Enable the import/export feature.
@@ -246,8 +246,8 @@ $args['footer_text'] = __('<p>This text is displayed below the options panel. It
246
  $sections = array();
247
 
248
  //Background Patterns Reader
249
- $sample_patterns_path = REDUX_DIR . '../sample/patterns/';
250
- $sample_patterns_url = REDUX_URL . '../sample/patterns/';
251
  $sample_patterns = array();
252
 
253
  if ( is_dir( $sample_patterns_path ) ) :
@@ -421,8 +421,8 @@ $sections[] = array(
421
  'default' => 0,
422
  'desc'=> __('This allows you to set a json string or array to override multiple preferences in your theme.', 'redux-framework-demo'),
423
  'options' => array(
424
- '1' => array('alt' => 'Preset 1', 'img' => REDUX_URL.'../sample/presets/preset1.png', 'presets'=>array('switch-on'=>1,'switch-off'=>1, 'switch-custom'=>1)),
425
- '2' => array('alt' => 'Preset 2', 'img' => REDUX_URL.'../sample/presets/preset2.png', 'presets'=>'{"slider1":"1", "slider2":"0", "switch-on":"0"}'),
426
  ),
427
  ),
428
  array(
@@ -473,12 +473,12 @@ $sections[] = array(
473
  'title' => __('Main Layout', 'redux-framework-demo'),
474
  'subtitle' => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'redux-framework-demo'),
475
  'options' => array(
476
- '1' => array('alt' => '1 Column', 'img' => REDUX_URL.'assets/img/1col.png'),
477
- '2' => array('alt' => '2 Column Left', 'img' => REDUX_URL.'assets/img/2cl.png'),
478
- '3' => array('alt' => '2 Column Right', 'img' => REDUX_URL.'assets/img/2cr.png'),
479
- '4' => array('alt' => '3 Column Middle', 'img' => REDUX_URL.'assets/img/3cm.png'),
480
- '5' => array('alt' => '3 Column Left', 'img' => REDUX_URL.'assets/img/3cl.png'),
481
- '6' => array('alt' => '3 Column Right', 'img' => REDUX_URL.'assets/img/3cr.png')
482
  ),
483
  'default' => '2'
484
  ),
@@ -832,12 +832,12 @@ $sections[] = array(
832
  'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
833
  'desc' => __('This uses some of the built in images, you can use them for layout options.', 'redux-framework-demo'),
834
  'options' => array(
835
- '1' => array('alt' => '1 Column', 'img' => REDUX_URL.'assets/img/1col.png'),
836
- '2' => array('alt' => '2 Column Left', 'img' => REDUX_URL.'assets/img/2cl.png'),
837
- '3' => array('alt' => '2 Column Right', 'img' => REDUX_URL.'assets/img/2cr.png'),
838
- '4' => array('alt' => '3 Column Middle', 'img' => REDUX_URL.'assets/img/3cm.png'),
839
- '5' => array('alt' => '3 Column Left', 'img' => REDUX_URL.'assets/img/3cl.png'),
840
- '6' => array('alt' => '3 Column Right', 'img' => REDUX_URL.'assets/img/3cr.png')
841
  ),//Must provide key => value(array:title|img) pairs for radio options
842
  'default' => '2'
843
  ),
@@ -1001,6 +1001,23 @@ $sections[] = array(
1001
  'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
1002
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
1003
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1004
  array(
1005
  'id'=>'select-elusive',
1006
  'type' => 'select',
@@ -1011,8 +1028,8 @@ $sections[] = array(
1011
  ),
1012
  )
1013
  );
1014
-
1015
-
1016
  $tabs = array();
1017
 
1018
  if (function_exists('wp_get_theme')){
@@ -1041,7 +1058,7 @@ $theme_info .= '</div>';
1041
 
1042
  if(file_exists(dirname(__FILE__).'/README.md')){
1043
  $tabs['theme_docs'] = array(
1044
- 'icon' => REDUX_URL.'assets/img/glyphicons/glyphicons_071_book.png',
1045
  'title' => __('Documentation', 'redux-framework-demo'),
1046
  'content' => file_get_contents(dirname(__FILE__).'/README.md')
1047
  );
@@ -1268,10 +1285,25 @@ add_action('redux-compiler-redux-sample-file', 'testCompiler');
1268
 
1269
  /**
1270
 
1271
- Use this function to hide the activation notice telling users about a sample panel.
1272
 
1273
  **/
1274
- function removeReduxAdminNotice() {
1275
- delete_option('REDUX_FRAMEWORK_PLUGIN_ACTIVATED_NOTICES');
1276
  }
1277
- add_action('redux_framework_plugin_admin_notice', 'removeReduxAdminNotice');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  $args['share_icons']['twitter'] = array(
138
  'link' => 'http://twitter.com/ghost1227',
139
  'title' => 'Follow me on Twitter',
140
+ 'img' => ReduxFramework::$_url . 'assets/img/social/Twitter.png'
141
  );
142
  $args['share_icons']['linked_in'] = array(
143
  'link' => 'http://www.linkedin.com/profile/view?id=52559281',
144
  'title' => 'Find me on LinkedIn',
145
+ 'img' => ReduxFramework::$_url . 'assets/img/social/LinkedIn.png'
146
  );
147
 
148
  // Enable the import/export feature.
246
  $sections = array();
247
 
248
  //Background Patterns Reader
249
+ $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';
250
+ $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';
251
  $sample_patterns = array();
252
 
253
  if ( is_dir( $sample_patterns_path ) ) :
421
  'default' => 0,
422
  'desc'=> __('This allows you to set a json string or array to override multiple preferences in your theme.', 'redux-framework-demo'),
423
  'options' => array(
424
+ '1' => array('alt' => 'Preset 1', 'img' => ReduxFramework::$_url.'../sample/presets/preset1.png', 'presets'=>array('switch-on'=>1,'switch-off'=>1, 'switch-custom'=>1)),
425
+ '2' => array('alt' => 'Preset 2', 'img' => ReduxFramework::$_url.'../sample/presets/preset2.png', 'presets'=>'{"slider1":"1", "slider2":"0", "switch-on":"0"}'),
426
  ),
427
  ),
428
  array(
473
  'title' => __('Main Layout', 'redux-framework-demo'),
474
  'subtitle' => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'redux-framework-demo'),
475
  'options' => array(
476
+ '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url.'assets/img/1col.png'),
477
+ '2' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url.'assets/img/2cl.png'),
478
+ '3' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url.'assets/img/2cr.png'),
479
+ '4' => array('alt' => '3 Column Middle', 'img' => ReduxFramework::$_url.'assets/img/3cm.png'),
480
+ '5' => array('alt' => '3 Column Left', 'img' => ReduxFramework::$_url.'assets/img/3cl.png'),
481
+ '6' => array('alt' => '3 Column Right', 'img' => ReduxFramework::$_url.'assets/img/3cr.png')
482
  ),
483
  'default' => '2'
484
  ),
832
  'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
833
  'desc' => __('This uses some of the built in images, you can use them for layout options.', 'redux-framework-demo'),
834
  'options' => array(
835
+ '1' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url.'assets/img/1col.png'),
836
+ '2' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url.'assets/img/2cl.png'),
837
+ '3' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url.'assets/img/2cr.png'),
838
+ '4' => array('alt' => '3 Column Middle', 'img' => ReduxFramework::$_url.'assets/img/3cm.png'),
839
+ '5' => array('alt' => '3 Column Left', 'img' => ReduxFramework::$_url.'assets/img/3cl.png'),
840
+ '6' => array('alt' => '3 Column Right', 'img' => ReduxFramework::$_url.'assets/img/3cr.png')
841
  ),//Must provide key => value(array:title|img) pairs for radio options
842
  'default' => '2'
843
  ),
1001
  'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
1002
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
1003
  ),
1004
+ array(
1005
+ 'id'=>'select-roles',
1006
+ 'type' => 'select',
1007
+ 'data' => 'roles',
1008
+ 'title' => __('User Role Select Option', 'redux-framework-demo'),
1009
+ 'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
1010
+ 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
1011
+ ),
1012
+ array(
1013
+ 'id'=>'select-capabilities',
1014
+ 'type' => 'select',
1015
+ 'data' => 'capabilities',
1016
+ 'multi' => true,
1017
+ 'title' => __('Capabilities Select Option', 'redux-framework-demo'),
1018
+ 'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
1019
+ 'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
1020
+ ),
1021
  array(
1022
  'id'=>'select-elusive',
1023
  'type' => 'select',
1028
  ),
1029
  )
1030
  );
1031
+
1032
+
1033
  $tabs = array();
1034
 
1035
  if (function_exists('wp_get_theme')){
1058
 
1059
  if(file_exists(dirname(__FILE__).'/README.md')){
1060
  $tabs['theme_docs'] = array(
1061
+ 'icon' => ReduxFramework::$_url.'assets/img/glyphicons/glyphicons_071_book.png',
1062
  'title' => __('Documentation', 'redux-framework-demo'),
1063
  'content' => file_get_contents(dirname(__FILE__).'/README.md')
1064
  );
1285
 
1286
  /**
1287
 
1288
+ Use this code to hide the activation notice telling users about a sample panel.
1289
 
1290
  **/
1291
+ if ( class_exists('ReduxFrameworkPlugin') ) {
1292
+ //remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) );
1293
  }
1294
+
1295
+ /**
1296
+
1297
+ Use this code to hide the demo mode link from the plugin page. Only used when Redux is a plugin.
1298
+
1299
+ **/
1300
+ function removeDemoModeLink() {
1301
+ if ( class_exists('ReduxFrameworkPlugin') ) {
1302
+ remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_meta_demo_mode_link'), null, 2 );
1303
+ }
1304
+ }
1305
+ //add_action('init', 'removeDemoModeLink');
1306
+
1307
+
1308
+
1309
+