Redux Framework - Version 3.0.9

Version Description

  • Feature - Added possibility to set default icon class for all sections and tabs.
  • Feature - Make is to the WP dir can be moved elsewhere and Redux still function.
  • Added Spanish Language. Thanks @vertigo7x.
  • Fix Issue 5 - Small RGBA validation fix.
  • Fix Issue 176 - Fold by Image Select. Thanks @andreilupu.
  • Fix Issue 194 - Custom taxonomy terms in select field.
  • Fix Issue 195 - Border defaults not working.
  • Fix Issue 197 - Hidden elements were showing up on a small screen. Thanks @ThinkUpThemes.
  • Fix issue 200 - Compiler not working with media field.
  • Fix Issue 201 - Spacing field not using default values.
  • Fix Issue 202 - Dimensions field not using units.
  • Fix Issue 208 - Checkbox + Required issue.
  • Fix Issue 211 - Google Font default not working on page load.
  • Fix Issue 214 - Validation notice not working for fields.
  • Fix Issue 181/224 - Firefox 24 image resize errors.
  • Fix Issue 223 - Slides were losing the url input field for the image link.
  • Fix - Various issues in the password field.
  • Fixed various spelling issues and typos in sample-config file.
  • Initialize vars before extract() - to shut down undefined vars wargnings.
  • Various other fixes.
Download this release

Release Info

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

Code changes from version 3.0.8 to 3.0.9

Files changed (36) hide show
  1. README.md +28 -3
  2. README.txt +26 -4
  3. ReduxCore/assets/css/style.css +3 -3
  4. ReduxCore/assets/css/style.less +12 -13
  5. ReduxCore/assets/js/admin.js +20 -7
  6. ReduxCore/assets/js/admin.min.js +1 -1
  7. ReduxCore/extensions/edd/EDD_License_Handler.php +225 -0
  8. ReduxCore/extensions/edd/EDD_SL_Plugin_Updater.php +161 -0
  9. ReduxCore/extensions/edd/EDD_SL_Theme_Updater.php +139 -0
  10. ReduxCore/extensions/edd/LICENSE +674 -0
  11. ReduxCore/extensions/edd/README.md +33 -0
  12. ReduxCore/extensions/edd/extension_edd.php +163 -0
  13. ReduxCore/extensions/edd/field_edd.css +64 -0
  14. ReduxCore/extensions/edd/field_edd.js +43 -0
  15. ReduxCore/extensions/edd/field_edd.less +0 -0
  16. ReduxCore/extensions/edd/field_edd.min.js +1 -0
  17. ReduxCore/extensions/edd/field_edd.php +116 -0
  18. ReduxCore/extensions/edd/module.php +151 -0
  19. ReduxCore/framework.php +136 -91
  20. ReduxCore/inc/fields/border/field_border.php +14 -2
  21. ReduxCore/inc/fields/checkbox/field_checkbox.php +6 -4
  22. ReduxCore/inc/fields/dimensions/field_dimensions.php +0 -2
  23. ReduxCore/inc/fields/image_select/field_image_select.css +1 -0
  24. ReduxCore/inc/fields/image_select/field_image_select.js +1 -1
  25. ReduxCore/inc/fields/image_select/field_image_select.less +3 -0
  26. ReduxCore/inc/fields/password/field_password.php +91 -49
  27. ReduxCore/inc/fields/slides/field_slides.php +1 -1
  28. ReduxCore/inc/fields/sortable/field_sortable.php +20 -16
  29. ReduxCore/inc/tracking.php +12 -4
  30. ReduxCore/inc/validation/color_rgba/validation_color_rgba.php +2 -2
  31. ReduxCore/languages/README.txt +1 -0
  32. ReduxCore/languages/redux-framework-es_ES.mo +0 -0
  33. ReduxCore/languages/redux-framework-es_ES.po +864 -0
  34. class-redux-plugin.php +15 -3
  35. redux-framework.php +1 -1
  36. sample/sample-config.php +31 -16
README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Redux Options Framework
2
 
3
  WordPress options framework which uses the [WordPress Settings API](http://codex.wordpress.org/Settings_API "WordPress Settings API"), Custom Error/Validation Handling, Custom Field/Validation Types, and import/export functionality.
4
 
@@ -56,6 +56,28 @@ Send me an email at ghost1227@reduxframework.com so I can add you to our user sp
56
 
57
  ### Master ###
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  = 3.0.8 =
60
  * Version push to ensure all bugs fixes were deployed to users. Various.
61
 
@@ -80,8 +102,8 @@ Send me an email at ghost1227@reduxframework.com so I can add you to our user sp
80
  * Added consistent remove button on multi text, and used sanitize function for section id
81
  * Feature: Added roles as data for field data
82
  * Feature: Adding data layout options for multi checkbox and radio, we now have quarter, third, half, and full column layouts for these fields.
83
- * Feature: Eliminate REDUX_DIR and REDUX_URL constants and instead created static ReduxFramework::$_url and ReduxFramework::$_dir for cleaner code.
84
- 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.
85
  * Started work on class definitions of each field and class. Preparing for the panel builder we are planning to make.
86
 
87
  = 3.0.5 =
@@ -195,3 +217,6 @@ Redux is now hosted on WordPress.org! Update in order to get proper, stable upda
195
  * Made text domain a constant
196
  * Removed PHP closing tags to prevent issues with newlines
197
  * Added option to define custom start tab
 
 
 
1
+ # Redux Options Framework [![Stories in Ready](https://badge.waffle.io/ReduxFramework/ReduxFramework.png?label=ready)](https://waffle.io/ReduxFramework/ReduxFramework)
2
 
3
  WordPress options framework which uses the [WordPress Settings API](http://codex.wordpress.org/Settings_API "WordPress Settings API"), Custom Error/Validation Handling, Custom Field/Validation Types, and import/export functionality.
4
 
56
 
57
  ### Master ###
58
 
59
+ = 3.0.9 =
60
+ * Feature - Added possibility to set default icon class for all sections and tabs.
61
+ * Feature - Make is to the WP dir can be moved elsewhere and Redux still function.
62
+ * Added Spanish Language. Thanks @vertigo7x.
63
+ * Fix Issue 5 - Small RGBA validation fix.
64
+ * Fix Issue 176 - Fold by Image Select. Thanks @andreilupu.
65
+ * Fix Issue 194 - Custom taxonomy terms in select field.
66
+ * Fix Issue 195 - Border defaults not working.
67
+ * Fix Issue 197 - Hidden elements were showing up on a small screen. Thanks @ThinkUpThemes.
68
+ * Fix issue 200 - Compiler not working with media field.
69
+ * Fix Issue 201 - Spacing field not using default values.
70
+ * Fix Issue 202 - Dimensions field not using units.
71
+ * Fix Issue 208 - Checkbox + Required issue.
72
+ * Fix Issue 211 - Google Font default not working on page load.
73
+ * Fix Issue 214 - Validation notice not working for fields.
74
+ * Fix Issue 181/224 - Firefox 24 image resize errors.
75
+ * Fix Issue 223 - Slides were losing the url input field for the image link.
76
+ * Fix - Various issues in the password field.
77
+ * Fixed various spelling issues and typos in sample-config file.
78
+ * Initialize vars before extract() - to shut down undefined vars wargnings.
79
+ * Various other fixes.
80
+
81
  = 3.0.8 =
82
  * Version push to ensure all bugs fixes were deployed to users. Various.
83
 
102
  * Added consistent remove button on multi text, and used sanitize function for section id
103
  * Feature: Added roles as data for field data
104
  * Feature: Adding data layout options for multi checkbox and radio, we now have quarter, third, half, and full column layouts for these fields.
105
+ * Feature: Eliminate REDUX_DIR and REDUX_URL constants and instead created static ReduxFramework::$\_url and ReduxFramework::$\_dir for cleaner code.
106
+ * 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.
107
  * Started work on class definitions of each field and class. Preparing for the panel builder we are planning to make.
108
 
109
  = 3.0.5 =
217
  * Made text domain a constant
218
  * Removed PHP closing tags to prevent issues with newlines
219
  * Added option to define custom start tab
220
+
221
+
222
+ [![githalytics.com alpha](https://cruel-carlota.pagodabox.com/dbb3b94f2607cb4a119a7863c230a98e "githalytics.com")](http://githalytics.com/ReduxFramework/ReduxFramework)
README.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Redux Framework ===
2
- Contributors: ghost1227, dovyp
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N5AD7TSH8YA5U
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.8
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -88,8 +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
- * 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,6 +139,28 @@ That's because the real FAQ section is on our site! Please visit [http://reduxfr
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  = 3.0.8 =
143
  * Version push to ensure all bugs fixes were deployed to users. Various.
144
 
1
  === Redux Framework ===
2
+ Contributors: nohalfpixels, ghost1227, dovyp
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N5AD7TSH8YA5U
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.9
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
+ * Italian, Romanian [IT_it] [RO_ro] @tirnovanuaurel
92
+ * Spanish [es_ES] [RO_ro] @vertigo7x
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.9 =
143
+ * Feature - Added possibility to set default icon class for all sections and tabs.
144
+ * Feature - Make is to the WP dir can be moved elsewhere and Redux still function.
145
+ * Added Spanish Language. Thanks @vertigo7x.
146
+ * Fix Issue 5 - Small RGBA validation fix.
147
+ * Fix Issue 176 - Fold by Image Select. Thanks @andreilupu.
148
+ * Fix Issue 194 - Custom taxonomy terms in select field.
149
+ * Fix Issue 195 - Border defaults not working.
150
+ * Fix Issue 197 - Hidden elements were showing up on a small screen. Thanks @ThinkUpThemes.
151
+ * Fix issue 200 - Compiler not working with media field.
152
+ * Fix Issue 201 - Spacing field not using default values.
153
+ * Fix Issue 202 - Dimensions field not using units.
154
+ * Fix Issue 208 - Checkbox + Required issue.
155
+ * Fix Issue 211 - Google Font default not working on page load.
156
+ * Fix Issue 214 - Validation notice not working for fields.
157
+ * Fix Issue 181/224 - Firefox 24 image resize errors.
158
+ * Fix Issue 223 - Slides were losing the url input field for the image link.
159
+ * Fix - Various issues in the password field.
160
+ * Fixed various spelling issues and typos in sample-config file.
161
+ * Initialize vars before extract() - to shut down undefined vars wargnings.
162
+ * Various other fixes.
163
+
164
  = 3.0.8 =
165
  * Version push to ensure all bugs fixes were deployed to users. Various.
166
 
ReduxCore/assets/css/style.css CHANGED
@@ -50,7 +50,7 @@ a{outline:0 !important}
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}
52
  .redux-group-tab .form-table tr td .redux-th-error{font-size:1em;color:#b94a48;font-weight:normal;display:block}
53
- #redux-main .redux-group-tab .form-table tr td input.redux-field-error{border-color:#b94a48}
54
  .redux-group-tab .form-table tr td table.mceLayout,.redux-group-tab .form-table tr td table.mceLayout tr,.redux-group-tab .form-table tr td table.mceLayout tr td{padding:0;border-width:0}
55
  .redux-group-tab .redux-theme-data{padding:20px 0;border-top:1px solid #e7e7e7}
56
  .redux-group-tab .redux-theme-data.theme-uri,.redux-group-tab .redux-theme-data.theme-author,.redux-group-tab .redux-theme-data.theme-version{padding:0;border-width:0}
@@ -74,7 +74,7 @@ a{outline:0 !important}
74
  #redux-intro-text p{margin:0;font-family:"Lucida Grande",Sans-serif;color:#888}
75
  .mp6 #redux-container #info_bar{padding:6px 10px 6px 6px}
76
  .mp6 #redux-container #info_bar a{margin-top:2px}
77
- #redux-container #info_bar{background:#f3f3f3;border:solid #d8d8d8;border-bottom:1px solid #d8d8d8;border-width:0 1px 1px 1px;padding:6px 10px 6px 6px;text-align:right;-moz-box-shadow:inset 0 1px 0 #fcfcfc;-webkit-box-shadow:inset 0 1px 0 #fcfcfc;box-shadow:inset 0 1px 0 #fcfcfc}
78
  #redux-container #expand_options{cursor:pointer;display:block;height:22px;width:21px;float:left;font-size:0;text-indent:-9999px;margin:0 0 0 5px;border:1px solid #bbb;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}
79
  #redux-container #expand_options{background:url(../img/toggle_tabs.png) no-repeat -2px -26px}
80
  #redux-container #expand_options.expanded{background:url(../img/toggle_tabs.png) no-repeat -2px -1px}
@@ -154,7 +154,7 @@ label.radio,label.multicheck{position:relative}
154
  img{max-width:100%;max-height:100%}
155
  .showDefaults{display:block;font-weight:normal;font-size:.8em;color:#888}
156
  .select2-default{width:auto !important}
157
- @media screen and (max-width:1124px){#redux-sidebar{width:42px} #redux-main{margin-left:43px;width:auto;max-width:100%} .redux-group-tab-link-a{position:relative} .redux-group-tab-link-a i{position:inherit} .redux-group-tab-link-a span{display:none;position:absolute;top:0;left:44px;padding:12px;width:200px;background:#eee;border:1px solid #ccc;-webkit-box-shadow:2px 2px 8px rgba(0,0,0,0.2);-moz-box-shadow:2px 2px 8px rgba(0,0,0,0.2);box-shadow:2px 2px 8px rgba(0,0,0,0.2);border-width:1px 1px 1px 0;z-index:1} .redux-group-tab-link-a:hover>span{display:block} #redux-sidebar #redux-group-menu li a,#redux-sidebar #redux-group-menu li a:hover,#redux-sidebar #redux-group-menu li.active a,#redux-sidebar #redux-group-menu li.active a:hover{width:auto} table.form-table,.form-table>thead,.form-table>tbody,.form-table>tbody>tr>th,.form-table>tbody>tr>td,.form-table>tbody>tr{display:block !important;width:100% !important;padding:0 !important} .form-table>tbody>tr>th,.form-table>tbody>tr>td{padding:10px !important} .form-table>tbody>tr>th,.form-table>tbody>tr>td{padding:10px !important} .form-table>tbody>tr>th{width:35%}}@media screen and (max-width:783px){.mp6 #redux-container #info_bar{height:auto;padding-bottom:1px} .mp6 #redux-container #info_bar a{margin-top:5px}}.mp6 .icon-themes{display:none}
158
  #redux-object-browser{overflow:auto;word-wrap:break-word;max-height:600px;max-width:100%}
159
  #redux-main span.description{font-style:normal}
160
  #redux-main #redux-system-info textarea{min-height:730px}
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}
52
  .redux-group-tab .form-table tr td .redux-th-error{font-size:1em;color:#b94a48;font-weight:normal;display:block}
53
+ #redux-main .redux-field-error input,#redux-main .redux-field-error textarea,#redux-main .redux-field-error select{border-color:#b94a48}
54
  .redux-group-tab .form-table tr td table.mceLayout,.redux-group-tab .form-table tr td table.mceLayout tr,.redux-group-tab .form-table tr td table.mceLayout tr td{padding:0;border-width:0}
55
  .redux-group-tab .redux-theme-data{padding:20px 0;border-top:1px solid #e7e7e7}
56
  .redux-group-tab .redux-theme-data.theme-uri,.redux-group-tab .redux-theme-data.theme-author,.redux-group-tab .redux-theme-data.theme-version{padding:0;border-width:0}
74
  #redux-intro-text p{margin:0;font-family:"Lucida Grande",Sans-serif;color:#888}
75
  .mp6 #redux-container #info_bar{padding:6px 10px 6px 6px}
76
  .mp6 #redux-container #info_bar a{margin-top:2px}
77
+ #redux-container #info_bar{background:#f3f3f3;border-color:#d8d8d8;border-style:solid;border-width:0 1px 1px 1px;padding:6px 10px 6px 6px;text-align:right;-moz-box-shadow:inset 0 1px 0 #fcfcfc;-webkit-box-shadow:inset 0 1px 0 #fcfcfc;box-shadow:inset 0 1px 0 #fcfcfc}
78
  #redux-container #expand_options{cursor:pointer;display:block;height:22px;width:21px;float:left;font-size:0;text-indent:-9999px;margin:0 0 0 5px;border:1px solid #bbb;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}
79
  #redux-container #expand_options{background:url(../img/toggle_tabs.png) no-repeat -2px -26px}
80
  #redux-container #expand_options.expanded{background:url(../img/toggle_tabs.png) no-repeat -2px -1px}
154
  img{max-width:100%;max-height:100%}
155
  .showDefaults{display:block;font-weight:normal;font-size:.8em;color:#888}
156
  .select2-default{width:auto !important}
157
+ @media screen and (max-width:1124px){#redux-sidebar{width:42px} #redux-main{margin-left:43px;width:auto;max-width:100%} .redux-group-tab-link-a{position:relative} .redux-group-tab-link-a i{position:inherit} .redux-group-tab-link-a span{display:none;position:absolute;top:0;left:44px;padding:12px;width:200px;background:#eee;border:1px solid #ccc;-webkit-box-shadow:2px 2px 8px rgba(0,0,0,0.2);-moz-box-shadow:2px 2px 8px rgba(0,0,0,0.2);box-shadow:2px 2px 8px rgba(0,0,0,0.2);border-width:1px 1px 1px 0;z-index:1} .redux-group-tab-link-a:hover>span{display:block} #redux-sidebar #redux-group-menu li a,#redux-sidebar #redux-group-menu li a:hover,#redux-sidebar #redux-group-menu li.active a,#redux-sidebar #redux-group-menu li.active a:hover{width:auto} table.form-table,.form-table>thead,.form-table>tbody,.form-table>tbody>tr>th,.form-table>tbody>tr>td,.form-table>tbody>tr{display:block;width:100% !important;padding:0 !important} .form-table>tbody>tr>th,.form-table>tbody>tr>td{padding:10px !important} .form-table>tbody>tr>th,.form-table>tbody>tr>td{padding:10px !important} .form-table>tbody>tr>th{width:35%}}@media screen and (max-width:783px){.mp6 #redux-container #info_bar{height:auto;padding-bottom:1px} .mp6 #redux-container #info_bar a{margin-top:5px}}.mp6 .icon-themes{display:none}
158
  #redux-object-browser{overflow:auto;word-wrap:break-word;max-height:600px;max-width:100%}
159
  #redux-main span.description{font-style:normal}
160
  #redux-main #redux-system-info textarea{min-height:730px}
ReduxCore/assets/css/style.less CHANGED
@@ -383,11 +383,10 @@ border: 1px solid #e5e5e5;
383
  font-weight:normal;
384
  display:block;
385
  }
386
- #redux-main .redux-group-tab .form-table tr td input.redux-field-error{
387
  border-color:#B94A48;
388
  }
389
 
390
-
391
  /* reset nested tables for mce */
392
  .redux-group-tab .form-table tr td table.mceLayout,
393
  .redux-group-tab .form-table tr td table.mceLayout tr,
@@ -527,19 +526,19 @@ border: 1px solid #e5e5e5;
527
  .mp6 #redux-container #info_bar a {
528
  margin-top: 2px;
529
  }
 
530
  #redux-container #info_bar {
531
- background: #f3f3f3;
532
- border:solid #d8d8d8;
533
- border-bottom:1px solid #D8D8D8;
534
- border-width:0px 1px 1px 1px;
535
- padding: 6px 10px 6px 6px;
536
- text-align: right;
537
- -moz-box-shadow: inset 0 1px 0 #fcfcfc;
538
- -webkit-box-shadow: inset 0 1px 0 #fcfcfc;
539
- box-shadow: inset 0 1px 0 #fcfcfc;
540
  }
541
 
542
-
543
  #redux-container #expand_options{
544
  cursor: pointer;
545
  display: block;
@@ -940,7 +939,7 @@ img {
940
  }
941
 
942
  table.form-table, .form-table > thead, .form-table > tbody, .form-table > tbody > tr > th, .form-table > tbody > tr > td, .form-table > tbody > tr {
943
- display: block !important;
944
  width: 100% !important;
945
  padding: 0px !important;
946
  }
383
  font-weight:normal;
384
  display:block;
385
  }
386
+ #redux-main .redux-field-error input, #redux-main .redux-field-error textarea, #redux-main .redux-field-error select {
387
  border-color:#B94A48;
388
  }
389
 
 
390
  /* reset nested tables for mce */
391
  .redux-group-tab .form-table tr td table.mceLayout,
392
  .redux-group-tab .form-table tr td table.mceLayout tr,
526
  .mp6 #redux-container #info_bar a {
527
  margin-top: 2px;
528
  }
529
+
530
  #redux-container #info_bar {
531
+ background: #f3f3f3;
532
+ border-color: #d8d8d8;
533
+ border-style: solid;
534
+ border-width: 0px 1px 1px 1px;
535
+ padding: 6px 10px 6px 6px;
536
+ text-align: right;
537
+ -moz-box-shadow: inset 0 1px 0 #fcfcfc;
538
+ -webkit-box-shadow: inset 0 1px 0 #fcfcfc;
539
+ box-shadow: inset 0 1px 0 #fcfcfc;
540
  }
541
 
 
542
  #redux-container #expand_options{
543
  cursor: pointer;
544
  display: block;
939
  }
940
 
941
  table.form-table, .form-table > thead, .form-table > tbody, .form-table > tbody > tr > th, .form-table > tbody > tr > td, .form-table > tbody > tr {
942
+ display: block;
943
  width: 100% !important;
944
  padding: 0px !important;
945
  }
ReduxCore/assets/js/admin.js CHANGED
@@ -65,6 +65,10 @@
65
  $( ".fold" ).promise().done(function() {
66
  // Hide the fold elements on load
67
  $('.foldParent').each(function() {
 
 
 
 
68
  var id = $(this).parents('.redux-field:first').data('id');
69
  if ( redux_opts.folds[ id ] ) {
70
  if ( !redux_opts.folds[ id ].parent ) {
@@ -86,6 +90,10 @@
86
 
87
  if(!scope.length) scope = the_body;
88
 
 
 
 
 
89
  var id = current.parents('.redux-field:first').data('id'),
90
  dependent = scope.find('tr[data-check-field="'+id+'"]'),
91
  value1 = variable.value,
@@ -348,8 +356,8 @@ function redux_change(variable) {
348
  //verify_fold(variable);
349
  }
350
  window.onbeforeunload = confirmOnPageExit;
351
- if (jQuery(variable).hasClass('redux-field-error')) {
352
- jQuery(variable).removeClass('redux-field-error');
353
  jQuery(variable).parent().find('.redux-th-error').slideUp();
354
  var parentID = jQuery(variable).closest('.redux-group-tab').attr('id');
355
  var hideError = true;
@@ -391,6 +399,10 @@ jQuery(document).ready(function($) {
391
  jQuery('.redux-group-tab-link-a').click(function() {
392
  relid = jQuery(this).data('rel'); // The group ID of interest
393
  // Set the proper page cookie
 
 
 
 
394
 
395
  $('#toplevel_page_'+redux_opts.slug+' .wp-submenu a.current').removeClass('current');
396
  $('#toplevel_page_'+redux_opts.slug+' .wp-submenu li.current').removeClass('current');
@@ -595,8 +607,9 @@ jQuery(document).ready(function($) {
595
  jQuery("#" + sectionID + "_section_group_li_a").prepend('<span class="redux-menu-error">' + sectionArray.total + '</span>');
596
  jQuery("#" + sectionID + "_section_group_li_a").addClass("hasError");
597
  jQuery.each(sectionArray.errors, function(key, value) {
598
- jQuery("#" + value.id).addClass("redux-field-error");
599
- jQuery("#" + value.id).parents("td:first").append('<span class="redux-th-error">' + value.msg + '</span>');
 
600
  });
601
  });
602
  }
@@ -608,8 +621,8 @@ jQuery(document).ready(function($) {
608
  jQuery("#" + sectionID + "_section_group_li_a").prepend('<span class="redux-menu-warning">' + sectionArray.total + '</span>');
609
  jQuery("#" + sectionID + "_section_group_li_a").addClass("hasWarning");
610
  jQuery.each(sectionArray.warnings, function(key, value) {
611
- jQuery("#" + value.id).addClass("redux-field-warning");
612
- jQuery("#" + value.id).parents("td:first").append('<span class="redux-th-warning">' + value.msg + '</span>');
613
  });
614
  });
615
  }
@@ -640,4 +653,4 @@ jQuery(document).ready(function($) {
640
  **/
641
 
642
 
643
- });
65
  $( ".fold" ).promise().done(function() {
66
  // Hide the fold elements on load
67
  $('.foldParent').each(function() {
68
+ // in case of a radio input, take in consideration only the checked value
69
+ if ( $(this).attr('type') =='radio' && $(this).attr('checked') !='checked' ) {
70
+ return;
71
+ }
72
  var id = $(this).parents('.redux-field:first').data('id');
73
  if ( redux_opts.folds[ id ] ) {
74
  if ( !redux_opts.folds[ id ].parent ) {
90
 
91
  if(!scope.length) scope = the_body;
92
 
93
+ // Fix for Checkbox + Required issue
94
+ if($(variable).prop('type') == "checkbox")
95
+ $(variable).is(":checked") ? $(variable).val('1') : $(variable).val('0');
96
+
97
  var id = current.parents('.redux-field:first').data('id'),
98
  dependent = scope.find('tr[data-check-field="'+id+'"]'),
99
  value1 = variable.value,
356
  //verify_fold(variable);
357
  }
358
  window.onbeforeunload = confirmOnPageExit;
359
+ if (jQuery(variable).parents('fieldset.redux-field:first').hasClass('redux-field-error')) {
360
+ jQuery(variable).parents('fieldset.redux-field:first').removeClass('redux-field-error');
361
  jQuery(variable).parent().find('.redux-th-error').slideUp();
362
  var parentID = jQuery(variable).closest('.redux-group-tab').attr('id');
363
  var hideError = true;
399
  jQuery('.redux-group-tab-link-a').click(function() {
400
  relid = jQuery(this).data('rel'); // The group ID of interest
401
  // Set the proper page cookie
402
+ $.cookie('redux_current_tab', relid, {
403
+ expires: 7,
404
+ path: '/'
405
+ });
406
 
407
  $('#toplevel_page_'+redux_opts.slug+' .wp-submenu a.current').removeClass('current');
408
  $('#toplevel_page_'+redux_opts.slug+' .wp-submenu li.current').removeClass('current');
607
  jQuery("#" + sectionID + "_section_group_li_a").prepend('<span class="redux-menu-error">' + sectionArray.total + '</span>');
608
  jQuery("#" + sectionID + "_section_group_li_a").addClass("hasError");
609
  jQuery.each(sectionArray.errors, function(key, value) {
610
+ console.log(value);
611
+ jQuery("#" + redux_opts.opt_name+'-'+value.id).addClass("redux-field-error");
612
+ jQuery("#" + redux_opts.opt_name+'-'+value.id).append('<div class="redux-th-error">' + value.msg + '</div>');
613
  });
614
  });
615
  }
621
  jQuery("#" + sectionID + "_section_group_li_a").prepend('<span class="redux-menu-warning">' + sectionArray.total + '</span>');
622
  jQuery("#" + sectionID + "_section_group_li_a").addClass("hasWarning");
623
  jQuery.each(sectionArray.warnings, function(key, value) {
624
+ jQuery("#" + redux_opts.opt_name+'-'+value.id).addClass("redux-field-warning");
625
+ jQuery("#" + redux_opts.opt_name+'-'+value.id).append('<div class="redux-th-warning">' + value.msg + '</div>');
626
  });
627
  });
628
  }
653
  **/
654
 
655
 
656
+ });
ReduxCore/assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- /*global jQuery, document, redux_opts, confirm, relid:true, console, jsonView */function verify_fold(e){jQuery(document).ready(function(t){if(e.hasClass("redux-info")||e.hasClass("redux-typography"))return;var n=e.parents(".redux-field:first").data("id"),r=e.val();if(redux_opts.folds[n]&&redux_opts.folds[n].children){var i={};t.each(redux_opts.folds[n].children,function(e,s){t.each(s,function(t,s){i[s]||(i[s]={show:!1,hidden:!1});if(e==r||i[s]===!0)i[s].show=!0;i[s].show===!0&&jQuery("#"+n).parents("tr:first").hasClass("hiddenFold")&&(i[s].show=!1);i[s].show===!0&&jQuery("#"+redux_opts.folds[n].parent).hasClass("hiddenFold")&&(i[s].show=!1);i[s].hidden=jQuery("#"+s).parents("tr:first").hasClass("hiddenFold")})});t.each(i,function(e){var t=jQuery("#"+e).parents("tr:first");i[e].show===!0?t.fadeIn("medium",function(){t.removeClass("hiddenFold");redux_opts.folds[e]&&redux_opts.folds[e].children}):i[e].hidden===!1&&t.fadeOut("medium",function(){t.addClass("hiddenFold");redux_opts.folds[e].children})})}})}function redux_change(e){(e.is("input[type=hidden]")||jQuery(e).parents("fieldset:eq(0)").is(".redux-container-image_select"))&&jQuery("body").trigger("check_dependencies",e);e.hasClass("compiler")&&jQuery("#redux-compiler-hook").val(1);e.hasClass("foldParent");window.onbeforeunload=confirmOnPageExit;if(jQuery(e).hasClass("redux-field-error")){jQuery(e).removeClass("redux-field-error");jQuery(e).parent().find(".redux-th-error").slideUp();var t=jQuery(e).closest(".redux-group-tab").attr("id"),n=!0;jQuery("#"+t+" .redux-field-error").each(function(){n=!1});if(n){jQuery("#"+t+"_li .redux-menu-error").hide();jQuery("#"+t+"_li .redux-group-tab-link-a").removeClass("hasError")}}jQuery("#redux-save-warn").slideDown()}(function(e){"use strict";e.redux=e.redux||{};var t=e("body");e(document).ready(function(){jQuery.fn.isOnScreen=function(){if(!window)return;var e=jQuery(window),t={top:e.scrollTop(),left:e.scrollLeft()};t.right=t.left+e.width();t.bottom=t.top+e.height();var n=this.offset();n.right=n.left+this.outerWidth();n.bottom=n.top+this.outerHeight();return!(t.right<n.left||t.left>n.right||t.bottom<n.top||t.top>n.bottom)};e.redux.required();t.on("check_dependencies",function(t,n){e.redux.check_dependencies(t,n)})});e.redux.required=function(){e(".hiddenFold , .showFold").each(function(){var t=e(this),n=t.parents("tr:eq(0)"),r=t.data();if(t.hasClass("hiddenFold")){n.addClass("hiddenFold").attr("data-check-field",r.checkField).attr("data-check-comparison",r.checkComparison).attr("data-check-value",r.checkValue).attr("data-check-id",r.id).hide();t.removeClass("hiddenFold").removeAttr("data-check-field").removeAttr("data-check-comparison").removeAttr("data-check-value")}else{n.attr("data-check-field",r.checkField).attr("data-check-comparison",r.checkComparison).attr("data-check-value",r.checkValue).attr("data-check-id",r.id);t.removeClass("showFold").removeAttr("data-check-field").removeAttr("data-check-comparison").removeAttr("data-check-value")}});e(".fold").promise().done(function(){e(".foldParent").each(function(){var t=e(this).parents(".redux-field:first").data("id");redux_opts.folds[t]&&(redux_opts.folds[t].parent||e.redux.verify_fold(e(this)))})});t.on("change","#redux-main select, #redux-main radio, #redux-main input[type=checkbox], #redux-main input[type=hidden]",function(t){e.redux.check_dependencies(t,this)})};e.redux.check_dependencies=function(n,r){var i=e(r),s=i.parents(".redux-group-tab:eq(0)");s.length||(s=t);var o=i.parents(".redux-field:first").data("id"),u=s.find('tr[data-check-field="'+o+'"]'),a=r.value,f=i.parents("tr:eq(0)").is(".hiddenFold");if(!u.length)return;u.each(function(){var t=e(this),n=t.data(),i=n.checkValue,s=!1;if(!f)switch(n.checkComparison){case"=":case"equals":if(i.toString().indexOf("|")!==-1){var o=i.split("|");e.inArray(a,o)!=-1&&(s=!0)}else a==i&&(s=!0);break;case"!=":case"not":if(i.indexOf("|")!==-1){var o=i.split("|");e.inArray(a,o)==-1&&(s=!0)}else a!=i&&(s=!0);break;case">":case"greater":case"is_larger":parseFloat(a)>parseFloat(i)&&(s=!0);break;case"<":case"less":case"is_smaller":parseFloat(a)<parseFloat(i)&&(s=!0);break;case"contains":a.indexOf(i)!=-1&&(s=!0);break;case"doesnt_contain":a.indexOf(i)==-1&&(s=!0);break;case"is_empty_or":if(a==""||a==i)s=!0;break;case"not_empty_and":a!=""&&a!=i&&(s=!0)}e.redux.verify_fold(e(r))})};e.redux.verify_fold=function(t){var n=t.parents(".redux-field:first").data("id"),r=t.val(),i=t.parents(".redux-groups-accordion-group:first").length>0?t.parents(".redux-groups-accordion-group:first"):t.parents(".redux-group-tab:eq(0)");if(redux_opts.folds[n]&&redux_opts.folds[n].children){var s={};e.each(redux_opts.folds[n].children,function(t,o){e.each(o,function(e,o){s[o]||(s[o]={show:!1,hidden:!1});if(t==r||s[o]===!0)s[o].show=!0;s[o].show===!0&&i.find('tr[data-check-id="'+n+'"]').hasClass("hiddenFold")&&(s[o].show=!1);s[o].show===!0&&i.find('tr[data-check-id="'+redux_opts.folds[n].parent+'"]').hasClass("hiddenFold")&&(s[o].show=!1);s[o].hidden=i.find('tr[data-check-id="'+o+'"]').hasClass("hiddenFold")})});e.each(s,function(t){var n=i.find('tr[data-check-id="'+t+'"]');s[t].show===!0?n.fadeIn("medium",function(){n.removeClass("hiddenFold");redux_opts.folds[t]&&redux_opts.folds[t].children&&e.redux.verify_fold(n.find("select, radio, input[type=checkbox], input[type=hidden]"))}):s[t].hidden===!1&&n.fadeOut("medium",function(){n.addClass("hiddenFold");redux_opts.folds[t].children&&e.redux.verify_fold(n.find("select, radio, input[type=checkbox], input[type=hidden]"))})})}}})(jQuery);jQuery.noConflict();var confirmOnPageExit=function(e){e=e||window.event;var t=redux_opts.save_pending;e&&(e.returnValue=t);window.onbeforeunload=null;return t};jQuery(document).ready(function(e){function t(e){return decodeURI(((new RegExp(e+"="+"(.+?)(&|$)")).exec(location.search)||[,""])[1])}function s(){var e=jQuery("#info_bar").width()-2;if(!jQuery("#info_bar").isOnScreen()&&!jQuery("#redux-footer-sticky").isOnScreen()){jQuery("#redux-footer").css({position:"fixed",bottom:"0",width:e});jQuery("#redux-footer").addClass("sticky-footer-fixed");jQuery("#redux-sticky-padder").show()}else{jQuery("#redux-footer").css({background:"#eee",position:"inherit",bottom:"inherit",width:"inherit"});jQuery("#redux-sticky-padder").hide();jQuery("#redux-footer").removeClass("sticky-footer-fixed")}}jQuery(".redux-action_bar, .redux-presets-bar").on("click",function(){window.onbeforeunload=null});jQuery().tipsy&&e(".tips").tipsy({fade:!0,gravity:"s",opacity:.7});e("#toplevel_page_"+redux_opts.slug+" .wp-submenu a").click(function(t){t.preventDefault();var n=e(this).attr("href").split("&tab=");e("#"+n[1]+"_section_group_li_a").click();console.log(n[1]);return!1});jQuery(".redux-group-tab-link-a").click(function(){relid=jQuery(this).data("rel");e("#toplevel_page_"+redux_opts.slug+" .wp-submenu a.current").removeClass("current");e("#toplevel_page_"+redux_opts.slug+" .wp-submenu li.current").removeClass("current");e("#toplevel_page_"+redux_opts.slug+" .wp-submenu a").each(function(){var t=e(this).attr("href").split("&tab=");if(t[1]==relid){e(this).addClass("current");e(this).parent().addClass("current")}});var t=jQuery(".redux-group-tab-link-li.active .redux-group-tab-link-a").data("rel");jQuery("#"+t+"_section_group_li").removeClass("active");jQuery("#"+t+"_section_group").hide();jQuery("#"+relid+"_section_group").fadeIn(300,function(){s()});jQuery("#"+relid+"_section_group_li").addClass("active")});var n=t("tab");if(n!==""){if(e.cookie("redux_current_tab_get")!==n){e.cookie("redux_current_tab",n,{expires:7,path:"/"});e.cookie("redux_current_tab_get",n,{expires:7,path:"/"});jQuery("#"+n+"_section_group_li").click()}}else e.cookie("redux_current_tab_get")!==""&&e.removeCookie("redux_current_tab_get");var r=jQuery("#"+e.cookie("redux_current_tab")+"_section_group_li_a");e.cookie("redux_current_tab")===null||typeof e.cookie("redux_current_tab")=="undefined"||r.length===0?jQuery(".redux-group-tab-link-a:first").click():r.click();jQuery('input[name="'+redux_opts.opt_name+'[defaults]"]').click(function(){if(!confirm(redux_opts.reset_confirm))return!1;window.onbeforeunload=null});jQuery("#expand_options").click(function(e){e.preventDefault();var t=jQuery("#expand_options"),n=jQuery("#redux-sidebar").width(),r=jQuery("#redux-group-menu .active a").data("rel")+"_section_group";if(t.hasClass("expanded")){t.removeClass("expanded");jQuery("#redux-main").removeClass("expand");jQuery("#redux-sidebar").stop().animate({"margin-left":"0px"},500);jQuery("#redux-main").stop().animate({"margin-left":n},500);jQuery(".redux-group-tab").each(function(){jQuery(this).attr("id")!==r&&jQuery(this).fadeOut("fast")})}else{t.addClass("expanded");jQuery("#redux-main").addClass("expand");jQuery("#redux-sidebar").stop().animate({"margin-left":-n-2},500);jQuery("#redux-main").stop().animate({"margin-left":"0px"},500);jQuery(".redux-group-tab").fadeIn()}return!1});jQuery("#redux-import").click(function(e){if(jQuery("#import-code-value").val()===""&&jQuery("#import-link-value").val()===""){e.preventDefault();return!1}});jQuery("#redux-save").is(":visible")&&jQuery("#redux-save").slideDown();jQuery("#redux-imported").is(":visible")&&jQuery("#redux-imported").slideDown();jQuery("input, textarea, select").on("change",function(){jQuery(this).hasClass("noUpdate")||redux_change(jQuery(this))});jQuery("#redux-import-code-button").click(function(){if(jQuery("#redux-import-link-wrapper").is(":visible")){jQuery("#redux-import-link-wrapper").fadeOut("fast");jQuery("#import-link-value").val("")}jQuery("#redux-import-code-wrapper").fadeIn("slow")});jQuery("#redux-import-link-button").click(function(){if(jQuery("#redux-import-code-wrapper").is(":visible")){jQuery("#redux-import-code-wrapper").fadeOut("fast");jQuery("#import-code-value").val("")}jQuery("#redux-import-link-wrapper").fadeIn("slow")});jQuery("#redux-export-code-copy").click(function(){jQuery("#redux-export-link-value").is(":visible")&&jQuery("#redux-export-link-value").fadeOut("slow");jQuery("#redux-export-code").toggle("fade")});jQuery("#redux-export-link").click(function(){jQuery("#redux-export-code").is(":visible")&&jQuery("#redux-export-code").fadeOut("slow");jQuery("#redux-export-link-value").toggle("fade")});var i=jQuery("#redux-footer").height();jQuery("#redux-sticky-padder").css({height:i});jQuery(window).scroll(function(){s()});jQuery(window).resize(function(){s()});jQuery("#redux-save, #redux-imported").delay(4e3).slideUp();jQuery("#redux-field-errors").delay(8e3).slideUp();jQuery(".redux-save").click(function(){window.onbeforeunload=null});e("#consolePrintObject").on("click",function(){console.log(jQuery.parseJSON(jQuery("#redux-object-json").html()))});typeof jsonView=="function"&&jsonView("#redux-object-json","#redux-object-browser");if(redux_opts.errors!==undefined){jQuery("#redux-field-errors span").html(redux_opts.errors.total);jQuery("#redux-field-errors").show();jQuery.each(redux_opts.errors.errors,function(e,t){jQuery("#"+e+"_section_group_li_a").prepend('<span class="redux-menu-error">'+t.total+"</span>");jQuery("#"+e+"_section_group_li_a").addClass("hasError");jQuery.each(t.errors,function(e,t){jQuery("#"+t.id).addClass("redux-field-error");jQuery("#"+t.id).parents("td:first").append('<span class="redux-th-error">'+t.msg+"</span>")})})}if(redux_opts.warnings!==undefined){jQuery("#redux-field-warnings span").html(redux_opts.warnings.total);jQuery("#redux-field-warnings").show();jQuery.each(redux_opts.warnings.warnings,function(e,t){jQuery("#"+e+"_section_group_li_a").prepend('<span class="redux-menu-warning">'+t.total+"</span>");jQuery("#"+e+"_section_group_li_a").addClass("hasWarning");jQuery.each(t.warnings,function(e,t){jQuery("#"+t.id).addClass("redux-field-warning");jQuery("#"+t.id).parents("td:first").append('<span class="redux-th-warning">'+t.msg+"</span>")})})}jQuery(".redux-section-tabs div").hide();jQuery(".redux-section-tabs div:first").show();jQuery(".redux-section-tabs ul li:first").addClass("active");jQuery(".redux-section-tabs ul li a").click(function(){jQuery(".redux-section-tabs ul li").removeClass("active");jQuery(this).parent().addClass("active");var t=e(this).attr("href");jQuery(".redux-section-tabs div").hide();jQuery(t).fadeIn();return!1})});
1
+ /*global jQuery, document, redux_opts, confirm, relid:true, console, jsonView */function verify_fold(e){jQuery(document).ready(function(t){if(e.hasClass("redux-info")||e.hasClass("redux-typography"))return;var n=e.parents(".redux-field:first").data("id"),r=e.val();if(redux_opts.folds[n]&&redux_opts.folds[n].children){var i={};t.each(redux_opts.folds[n].children,function(e,s){t.each(s,function(t,s){i[s]||(i[s]={show:!1,hidden:!1});if(e==r||i[s]===!0)i[s].show=!0;i[s].show===!0&&jQuery("#"+n).parents("tr:first").hasClass("hiddenFold")&&(i[s].show=!1);i[s].show===!0&&jQuery("#"+redux_opts.folds[n].parent).hasClass("hiddenFold")&&(i[s].show=!1);i[s].hidden=jQuery("#"+s).parents("tr:first").hasClass("hiddenFold")})});t.each(i,function(e){var t=jQuery("#"+e).parents("tr:first");i[e].show===!0?t.fadeIn("medium",function(){t.removeClass("hiddenFold");redux_opts.folds[e]&&redux_opts.folds[e].children}):i[e].hidden===!1&&t.fadeOut("medium",function(){t.addClass("hiddenFold");redux_opts.folds[e].children})})}})}function redux_change(e){(e.is("input[type=hidden]")||jQuery(e).parents("fieldset:eq(0)").is(".redux-container-image_select"))&&jQuery("body").trigger("check_dependencies",e);e.hasClass("compiler")&&jQuery("#redux-compiler-hook").val(1);e.hasClass("foldParent");window.onbeforeunload=confirmOnPageExit;if(jQuery(e).parents("fieldset.redux-field:first").hasClass("redux-field-error")){jQuery(e).parents("fieldset.redux-field:first").removeClass("redux-field-error");jQuery(e).parent().find(".redux-th-error").slideUp();var t=jQuery(e).closest(".redux-group-tab").attr("id"),n=!0;jQuery("#"+t+" .redux-field-error").each(function(){n=!1});if(n){jQuery("#"+t+"_li .redux-menu-error").hide();jQuery("#"+t+"_li .redux-group-tab-link-a").removeClass("hasError")}}jQuery("#redux-save-warn").slideDown()}(function(e){"use strict";e.redux=e.redux||{};var t=e("body");e(document).ready(function(){jQuery.fn.isOnScreen=function(){if(!window)return;var e=jQuery(window),t={top:e.scrollTop(),left:e.scrollLeft()};t.right=t.left+e.width();t.bottom=t.top+e.height();var n=this.offset();n.right=n.left+this.outerWidth();n.bottom=n.top+this.outerHeight();return!(t.right<n.left||t.left>n.right||t.bottom<n.top||t.top>n.bottom)};e.redux.required();t.on("check_dependencies",function(t,n){e.redux.check_dependencies(t,n)})});e.redux.required=function(){e(".hiddenFold , .showFold").each(function(){var t=e(this),n=t.parents("tr:eq(0)"),r=t.data();if(t.hasClass("hiddenFold")){n.addClass("hiddenFold").attr("data-check-field",r.checkField).attr("data-check-comparison",r.checkComparison).attr("data-check-value",r.checkValue).attr("data-check-id",r.id).hide();t.removeClass("hiddenFold").removeAttr("data-check-field").removeAttr("data-check-comparison").removeAttr("data-check-value")}else{n.attr("data-check-field",r.checkField).attr("data-check-comparison",r.checkComparison).attr("data-check-value",r.checkValue).attr("data-check-id",r.id);t.removeClass("showFold").removeAttr("data-check-field").removeAttr("data-check-comparison").removeAttr("data-check-value")}});e(".fold").promise().done(function(){e(".foldParent").each(function(){if(e(this).attr("type")=="radio"&&e(this).attr("checked")!="checked")return;var t=e(this).parents(".redux-field:first").data("id");redux_opts.folds[t]&&(redux_opts.folds[t].parent||e.redux.verify_fold(e(this)))})});t.on("change","#redux-main select, #redux-main radio, #redux-main input[type=checkbox], #redux-main input[type=hidden]",function(t){e.redux.check_dependencies(t,this)})};e.redux.check_dependencies=function(n,r){var i=e(r),s=i.parents(".redux-group-tab:eq(0)");s.length||(s=t);e(r).prop("type")=="checkbox"&&(e(r).is(":checked")?e(r).val("1"):e(r).val("0"));var o=i.parents(".redux-field:first").data("id"),u=s.find('tr[data-check-field="'+o+'"]'),a=r.value,f=i.parents("tr:eq(0)").is(".hiddenFold");if(!u.length)return;u.each(function(){var t=e(this),n=t.data(),i=n.checkValue,s=!1;if(!f)switch(n.checkComparison){case"=":case"equals":if(i.toString().indexOf("|")!==-1){var o=i.split("|");e.inArray(a,o)!=-1&&(s=!0)}else a==i&&(s=!0);break;case"!=":case"not":if(i.indexOf("|")!==-1){var o=i.split("|");e.inArray(a,o)==-1&&(s=!0)}else a!=i&&(s=!0);break;case">":case"greater":case"is_larger":parseFloat(a)>parseFloat(i)&&(s=!0);break;case"<":case"less":case"is_smaller":parseFloat(a)<parseFloat(i)&&(s=!0);break;case"contains":a.indexOf(i)!=-1&&(s=!0);break;case"doesnt_contain":a.indexOf(i)==-1&&(s=!0);break;case"is_empty_or":if(a==""||a==i)s=!0;break;case"not_empty_and":a!=""&&a!=i&&(s=!0)}e.redux.verify_fold(e(r))})};e.redux.verify_fold=function(t){var n=t.parents(".redux-field:first").data("id"),r=t.val(),i=t.parents(".redux-groups-accordion-group:first").length>0?t.parents(".redux-groups-accordion-group:first"):t.parents(".redux-group-tab:eq(0)");if(redux_opts.folds[n]&&redux_opts.folds[n].children){var s={};e.each(redux_opts.folds[n].children,function(t,o){e.each(o,function(e,o){s[o]||(s[o]={show:!1,hidden:!1});if(t==r||s[o]===!0)s[o].show=!0;s[o].show===!0&&i.find('tr[data-check-id="'+n+'"]').hasClass("hiddenFold")&&(s[o].show=!1);s[o].show===!0&&i.find('tr[data-check-id="'+redux_opts.folds[n].parent+'"]').hasClass("hiddenFold")&&(s[o].show=!1);s[o].hidden=i.find('tr[data-check-id="'+o+'"]').hasClass("hiddenFold")})});e.each(s,function(t){var n=i.find('tr[data-check-id="'+t+'"]');s[t].show===!0?n.fadeIn("medium",function(){n.removeClass("hiddenFold");redux_opts.folds[t]&&redux_opts.folds[t].children&&e.redux.verify_fold(n.find("select, radio, input[type=checkbox], input[type=hidden]"))}):s[t].hidden===!1&&n.fadeOut("medium",function(){n.addClass("hiddenFold");redux_opts.folds[t].children&&e.redux.verify_fold(n.find("select, radio, input[type=checkbox], input[type=hidden]"))})})}}})(jQuery);jQuery.noConflict();var confirmOnPageExit=function(e){e=e||window.event;var t=redux_opts.save_pending;e&&(e.returnValue=t);window.onbeforeunload=null;return t};jQuery(document).ready(function(e){function t(e){return decodeURI(((new RegExp(e+"="+"(.+?)(&|$)")).exec(location.search)||[,""])[1])}function s(){var e=jQuery("#info_bar").width()-2;if(!jQuery("#info_bar").isOnScreen()&&!jQuery("#redux-footer-sticky").isOnScreen()){jQuery("#redux-footer").css({position:"fixed",bottom:"0",width:e});jQuery("#redux-footer").addClass("sticky-footer-fixed");jQuery("#redux-sticky-padder").show()}else{jQuery("#redux-footer").css({background:"#eee",position:"inherit",bottom:"inherit",width:"inherit"});jQuery("#redux-sticky-padder").hide();jQuery("#redux-footer").removeClass("sticky-footer-fixed")}}jQuery(".redux-action_bar, .redux-presets-bar").on("click",function(){window.onbeforeunload=null});jQuery().tipsy&&e(".tips").tipsy({fade:!0,gravity:"s",opacity:.7});e("#toplevel_page_"+redux_opts.slug+" .wp-submenu a").click(function(t){t.preventDefault();var n=e(this).attr("href").split("&tab=");e("#"+n[1]+"_section_group_li_a").click();console.log(n[1]);return!1});jQuery(".redux-group-tab-link-a").click(function(){relid=jQuery(this).data("rel");e.cookie("redux_current_tab",relid,{expires:7,path:"/"});e("#toplevel_page_"+redux_opts.slug+" .wp-submenu a.current").removeClass("current");e("#toplevel_page_"+redux_opts.slug+" .wp-submenu li.current").removeClass("current");e("#toplevel_page_"+redux_opts.slug+" .wp-submenu a").each(function(){var t=e(this).attr("href").split("&tab=");if(t[1]==relid){e(this).addClass("current");e(this).parent().addClass("current")}});var t=jQuery(".redux-group-tab-link-li.active .redux-group-tab-link-a").data("rel");jQuery("#"+t+"_section_group_li").removeClass("active");jQuery("#"+t+"_section_group").hide();jQuery("#"+relid+"_section_group").fadeIn(300,function(){s()});jQuery("#"+relid+"_section_group_li").addClass("active")});var n=t("tab");if(n!==""){if(e.cookie("redux_current_tab_get")!==n){e.cookie("redux_current_tab",n,{expires:7,path:"/"});e.cookie("redux_current_tab_get",n,{expires:7,path:"/"});jQuery("#"+n+"_section_group_li").click()}}else e.cookie("redux_current_tab_get")!==""&&e.removeCookie("redux_current_tab_get");var r=jQuery("#"+e.cookie("redux_current_tab")+"_section_group_li_a");e.cookie("redux_current_tab")===null||typeof e.cookie("redux_current_tab")=="undefined"||r.length===0?jQuery(".redux-group-tab-link-a:first").click():r.click();jQuery('input[name="'+redux_opts.opt_name+'[defaults]"]').click(function(){if(!confirm(redux_opts.reset_confirm))return!1;window.onbeforeunload=null});jQuery("#expand_options").click(function(e){e.preventDefault();var t=jQuery("#expand_options"),n=jQuery("#redux-sidebar").width(),r=jQuery("#redux-group-menu .active a").data("rel")+"_section_group";if(t.hasClass("expanded")){t.removeClass("expanded");jQuery("#redux-main").removeClass("expand");jQuery("#redux-sidebar").stop().animate({"margin-left":"0px"},500);jQuery("#redux-main").stop().animate({"margin-left":n},500);jQuery(".redux-group-tab").each(function(){jQuery(this).attr("id")!==r&&jQuery(this).fadeOut("fast")})}else{t.addClass("expanded");jQuery("#redux-main").addClass("expand");jQuery("#redux-sidebar").stop().animate({"margin-left":-n-2},500);jQuery("#redux-main").stop().animate({"margin-left":"0px"},500);jQuery(".redux-group-tab").fadeIn()}return!1});jQuery("#redux-import").click(function(e){if(jQuery("#import-code-value").val()===""&&jQuery("#import-link-value").val()===""){e.preventDefault();return!1}});jQuery("#redux-save").is(":visible")&&jQuery("#redux-save").slideDown();jQuery("#redux-imported").is(":visible")&&jQuery("#redux-imported").slideDown();jQuery("input, textarea, select").on("change",function(){jQuery(this).hasClass("noUpdate")||redux_change(jQuery(this))});jQuery("#redux-import-code-button").click(function(){if(jQuery("#redux-import-link-wrapper").is(":visible")){jQuery("#redux-import-link-wrapper").fadeOut("fast");jQuery("#import-link-value").val("")}jQuery("#redux-import-code-wrapper").fadeIn("slow")});jQuery("#redux-import-link-button").click(function(){if(jQuery("#redux-import-code-wrapper").is(":visible")){jQuery("#redux-import-code-wrapper").fadeOut("fast");jQuery("#import-code-value").val("")}jQuery("#redux-import-link-wrapper").fadeIn("slow")});jQuery("#redux-export-code-copy").click(function(){jQuery("#redux-export-link-value").is(":visible")&&jQuery("#redux-export-link-value").fadeOut("slow");jQuery("#redux-export-code").toggle("fade")});jQuery("#redux-export-link").click(function(){jQuery("#redux-export-code").is(":visible")&&jQuery("#redux-export-code").fadeOut("slow");jQuery("#redux-export-link-value").toggle("fade")});var i=jQuery("#redux-footer").height();jQuery("#redux-sticky-padder").css({height:i});jQuery(window).scroll(function(){s()});jQuery(window).resize(function(){s()});jQuery("#redux-save, #redux-imported").delay(4e3).slideUp();jQuery("#redux-field-errors").delay(8e3).slideUp();jQuery(".redux-save").click(function(){window.onbeforeunload=null});e("#consolePrintObject").on("click",function(){console.log(jQuery.parseJSON(jQuery("#redux-object-json").html()))});typeof jsonView=="function"&&jsonView("#redux-object-json","#redux-object-browser");if(redux_opts.errors!==undefined){jQuery("#redux-field-errors span").html(redux_opts.errors.total);jQuery("#redux-field-errors").show();jQuery.each(redux_opts.errors.errors,function(e,t){jQuery("#"+e+"_section_group_li_a").prepend('<span class="redux-menu-error">'+t.total+"</span>");jQuery("#"+e+"_section_group_li_a").addClass("hasError");jQuery.each(t.errors,function(e,t){console.log(t);jQuery("#"+redux_opts.opt_name+"-"+t.id).addClass("redux-field-error");jQuery("#"+redux_opts.opt_name+"-"+t.id).append('<div class="redux-th-error">'+t.msg+"</div>")})})}if(redux_opts.warnings!==undefined){jQuery("#redux-field-warnings span").html(redux_opts.warnings.total);jQuery("#redux-field-warnings").show();jQuery.each(redux_opts.warnings.warnings,function(e,t){jQuery("#"+e+"_section_group_li_a").prepend('<span class="redux-menu-warning">'+t.total+"</span>");jQuery("#"+e+"_section_group_li_a").addClass("hasWarning");jQuery.each(t.warnings,function(e,t){jQuery("#"+redux_opts.opt_name+"-"+t.id).addClass("redux-field-warning");jQuery("#"+redux_opts.opt_name+"-"+t.id).append('<div class="redux-th-warning">'+t.msg+"</div>")})})}jQuery(".redux-section-tabs div").hide();jQuery(".redux-section-tabs div:first").show();jQuery(".redux-section-tabs ul li:first").addClass("active");jQuery(".redux-section-tabs ul li a").click(function(){jQuery(".redux-section-tabs ul li").removeClass("active");jQuery(this).parent().addClass("active");var t=e(this).attr("href");jQuery(".redux-section-tabs div").hide();jQuery(t).fadeIn();return!1})});
ReduxCore/extensions/edd/EDD_License_Handler.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * License handler for EDD
4
+ *
5
+ * This class should simplify the process of adding license information
6
+ * to new EDD extensions.
7
+ *
8
+ * @author Daniel J Griffiths
9
+ */
10
+
11
+ // Exit if accessed directly
12
+ if ( !defined( 'ABSPATH' ) ) exit;
13
+
14
+
15
+ if ( !class_exists( 'EDD_License' ) ) {
16
+
17
+ class EDD_License {
18
+ private $file;
19
+ private $license;
20
+ private $item_name;
21
+ private $item_shortname;
22
+ private $version;
23
+ private $author;
24
+
25
+ /**
26
+ * Class constructor
27
+ *
28
+ * @global array $edd_options
29
+ * @param string $_file
30
+ * @param string $_item_name
31
+ * @param string $_version
32
+ * @param string $_author
33
+ * @return void
34
+ */
35
+ function __construct( $_file, $_item_name, $_version, $_author ) {
36
+ global $edd_options;
37
+
38
+ $this->file = $_file;
39
+ $this->item_name = $_item_name;
40
+ $this->item_shortname = 'edd_' . preg_replace( '/[^a-zA-Z0-9_\s]/', '', str_replace( ' ', '_', strtolower( $this->item_name ) ) );
41
+ $this->version = $_version;
42
+ $this->license = isset( $edd_options[$this->item_shortname . '_license_key'] ) ? trim( $edd_options[$this->item_shortname . '_license_key'] ) : '';
43
+ $this->author = $_author;
44
+
45
+ // Setup hooks
46
+ $this->includes();
47
+ $this->hook();
48
+ $this->auto_updater();
49
+ }
50
+
51
+
52
+ /**
53
+ * Include the updater class
54
+ *
55
+ * @access private
56
+ * @return void
57
+ */
58
+ private function includes() {
59
+ if ( !class_exists( 'EDD_SL_Plugin_Updater' ) )
60
+ require_once 'EDD_SL_Plugin_Updater.php';
61
+ }
62
+
63
+
64
+ /**
65
+ * Setup hooks
66
+ *
67
+ * @access private
68
+ * @return void
69
+ */
70
+ private function hook() {
71
+ // Register settings
72
+ add_filter( 'edd_settings_licenses', array( $this, 'settings' ), 1 );
73
+
74
+ // Activate license key on settings save
75
+ add_action( 'admin_init', array( $this, 'activate_license' ) );
76
+
77
+ // Deactivate license key
78
+ add_action( 'admin_init', array( $this, 'deactivate_license' ) );
79
+ }
80
+
81
+
82
+ /**
83
+ * Auto updater
84
+ *
85
+ * @access private
86
+ * @global array $edd_options
87
+ * @return void
88
+ */
89
+ private function auto_updater() {
90
+ // Setup the updater
91
+ $edd_updater = new EDD_SL_Plugin_Updater( 'https://easydigitaldownloads.com', $this->file, array(
92
+ 'version' => $this->version,
93
+ 'license' => $this->license,
94
+ 'item_name' => $this->item_name,
95
+ 'author' => $this->author
96
+ )
97
+ );
98
+ }
99
+
100
+
101
+ /**
102
+ * Add license field to settings
103
+ *
104
+ * @access public
105
+ * @param array $settings
106
+ * @return array
107
+ */
108
+ public function settings( $settings ) {
109
+ $edd_license_settings = array(
110
+ array(
111
+ 'id' => $this->item_shortname . '_license_key',
112
+ 'name' => sprintf( __( '%1$s License Key', 'edd' ), $this->item_name ),
113
+ 'desc' => '',
114
+ 'type' => 'license_key',
115
+ 'options' => array( 'is_valid_license_option' => $this->item_shortname . '_license_active' ),
116
+ 'size' => 'regular'
117
+ )
118
+ );
119
+
120
+ return array_merge( $settings, $edd_license_settings );
121
+ }
122
+
123
+
124
+ /**
125
+ * Activate the license key
126
+ *
127
+ * @access public
128
+ * @return void
129
+ */
130
+ public function activate_license() {
131
+ global $edd_options;
132
+
133
+ if ( !isset( $_POST['edd_settings_licenses'] ) ) return;
134
+ if ( !isset( $_POST['edd_settings_licenses'][$this->item_shortname . '_license_key'] ) ) return;
135
+
136
+ if ( get_option( $this->item_shortname . '_license_active' ) == 'valid' ) return;
137
+
138
+ $license = sanitize_text_field( $_POST['edd_settings_licenses'][$this->item_shortname . '_license_key'] ) ;
139
+
140
+ // Data to send to the API
141
+ $api_params = array(
142
+ 'edd_action' => 'activate_license',
143
+ 'license' => $license,
144
+ 'item_name' => urlencode( $this->item_name )
145
+ );
146
+
147
+ // Call the API
148
+ $response = wp_remote_get( add_query_arg( $api_params, 'https://easydigitaldownloads.com' ), array( 'timeout' => 15, 'body' => $api_params, 'sslverify' => false ) );
149
+
150
+ // Make sure there are no errors
151
+ if ( is_wp_error( $response ) ) return false;
152
+
153
+ // Decode license data
154
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
155
+
156
+ update_option( $this->item_shortname . '_license_active', $license_data->license );
157
+ }
158
+
159
+
160
+ /**
161
+ * Deactivate the license key
162
+ *
163
+ * @access public
164
+ * @return void
165
+ */
166
+ public function deactivate_license() {
167
+ global $edd_options;
168
+
169
+ if ( !isset( $_POST['edd_settings_licenses'] ) ) return;
170
+ if ( !isset( $_POST['edd_settings_licenses'][$this->item_shortname . '_license_key'] ) ) return;
171
+
172
+ // Run on deactivate button press
173
+ if ( isset( $_POST[$this->item_shortname . '_license_key_deactivate'] ) ) {
174
+ // Run a quick security check
175
+ if ( !check_admin_referer( $this->item_shortname . '_license_key_nonce', $this->item_shortname . '_license_key_nonce' ) ) return;
176
+
177
+ // Data to send to the API
178
+ $api_params = array(
179
+ 'edd_action' => 'deactivate_license',
180
+ 'license' => $this->license,
181
+ 'item_name' => urlencode( $this->item_name )
182
+ );
183
+
184
+ // Call the API
185
+ $response = wp_remote_get( add_query_arg( $api_params, 'https://easydigitaldownloads.com' ), array( 'timeout' => 15, 'sslverify' => false ) );
186
+
187
+ // Make sure there are no errors
188
+ if ( is_wp_error( $response ) ) return false;
189
+
190
+ // Decode the license data
191
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
192
+
193
+ if ( $license_data->license == 'deactivated' )
194
+ delete_option( $this->item_shortname . '_license_active' );
195
+ }
196
+ }
197
+ }
198
+ }
199
+
200
+
201
+ /**
202
+ * Register the new license field type
203
+ *
204
+ * This has been included in core, but is maintained for backwards compatibility
205
+ *
206
+ * @return void
207
+ */
208
+ if ( !function_exists( 'edd_license_key_callback' ) ) {
209
+ function edd_license_key_callback( $args ) {
210
+ global $edd_options;
211
+
212
+ if ( isset( $edd_options[ $args['id'] ] ) ) { $value = $edd_options[ $args['id'] ]; } else { $value = isset( $args['std'] ) ? $args['std'] : ''; }
213
+ $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
214
+ $html = '<input type="text" class="' . $args['size'] . '-text" id="edd_settings_' . $args['section'] . '[' . $args['id'] . ']" name="edd_settings_' . $args['section'] . '[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
215
+
216
+ if ( 'valid' == get_option( $args['options']['is_valid_license_option'] ) ) {
217
+ $html .= wp_nonce_field( $args['id'] . '_nonce', $args['id'] . '_nonce', false );
218
+ $html .= '<input type="submit" class="button-secondary" name="' . $args['id'] . '_deactivate" value="' . __( 'Deactivate License', 'edd-recurring' ) . '"/>';
219
+ }
220
+ $html .= '<label for="edd_settings_' . $args['section'] . '[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
221
+
222
+ echo $html;
223
+ }
224
+ }
225
+
ReduxCore/extensions/edd/EDD_SL_Plugin_Updater.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // uncomment this line for testing
4
+ //set_site_transient( 'update_plugins', null );
5
+
6
+ /**
7
+ * Allows plugins to use their own update API.
8
+ *
9
+ * @author Pippin Williamson
10
+ * @version 1.1
11
+ */
12
+ class EDD_SL_Plugin_Updater {
13
+ private $api_url = '';
14
+ private $api_data = array();
15
+ private $name = '';
16
+ private $slug = '';
17
+
18
+ /**
19
+ * Class constructor.
20
+ *
21
+ * @uses plugin_basename()
22
+ * @uses hook()
23
+ *
24
+ * @param string $_api_url The URL pointing to the custom API endpoint.
25
+ * @param string $_plugin_file Path to the plugin file.
26
+ * @param array $_api_data Optional data to send with API calls.
27
+ * @return void
28
+ */
29
+ function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
30
+ $this->api_url = trailingslashit( $_api_url );
31
+ $this->api_data = urlencode_deep( $_api_data );
32
+ $this->name = plugin_basename( $_plugin_file );
33
+ $this->slug = basename( $_plugin_file, '.php');
34
+ $this->version = $_api_data['version'];
35
+
36
+ // Set up hooks.
37
+ $this->hook();
38
+ }
39
+
40
+ /**
41
+ * Set up Wordpress filters to hook into WP's update process.
42
+ *
43
+ * @uses add_filter()
44
+ *
45
+ * @return void
46
+ */
47
+ private function hook() {
48
+ add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'pre_set_site_transient_update_plugins_filter' ) );
49
+ add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
50
+ add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 );
51
+ }
52
+
53
+ /**
54
+ * Check for Updates at the defined API endpoint and modify the update array.
55
+ *
56
+ * This function dives into the update api just when Wordpress creates its update array,
57
+ * then adds a custom API call and injects the custom plugin data retrieved from the API.
58
+ * It is reassembled from parts of the native Wordpress plugin update code.
59
+ * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
60
+ *
61
+ * @uses api_request()
62
+ *
63
+ * @param array $_transient_data Update array build by Wordpress.
64
+ * @return array Modified update array with custom plugin data.
65
+ */
66
+ function pre_set_site_transient_update_plugins_filter( $_transient_data ) {
67
+
68
+
69
+ if( empty( $_transient_data ) ) return $_transient_data;
70
+
71
+ $to_send = array( 'slug' => $this->slug );
72
+
73
+ $api_response = $this->api_request( 'plugin_latest_version', $to_send );
74
+
75
+ if( false !== $api_response && is_object( $api_response ) && isset( $api_response->new_version ) ) {
76
+ if( version_compare( $this->version, $api_response->new_version, '<' ) )
77
+ $_transient_data->response[$this->name] = $api_response;
78
+ }
79
+ return $_transient_data;
80
+ }
81
+
82
+
83
+ /**
84
+ * Updates information on the "View version x.x details" page with custom data.
85
+ *
86
+ * @uses api_request()
87
+ *
88
+ * @param mixed $_data
89
+ * @param string $_action
90
+ * @param object $_args
91
+ * @return object $_data
92
+ */
93
+ function plugins_api_filter( $_data, $_action = '', $_args = null ) {
94
+ if ( ( $_action != 'plugin_information' ) || !isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) return $_data;
95
+
96
+ $to_send = array( 'slug' => $this->slug );
97
+
98
+ $api_response = $this->api_request( 'plugin_information', $to_send );
99
+ if ( false !== $api_response ) $_data = $api_response;
100
+
101
+ return $_data;
102
+ }
103
+
104
+
105
+ /**
106
+ * Disable SSL verification in order to prevent download update failures
107
+ *
108
+ * @param array $args
109
+ * @param string $url
110
+ * @return object $array
111
+ */
112
+ function http_request_args( $args, $url ) {
113
+ // If it is an https request and we are performing a package download, disable ssl verification
114
+ if( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
115
+ $args['sslverify'] = false;
116
+ }
117
+ return $args;
118
+ }
119
+
120
+ /**
121
+ * Calls the API and, if successfull, returns the object delivered by the API.
122
+ *
123
+ * @uses get_bloginfo()
124
+ * @uses wp_remote_post()
125
+ * @uses is_wp_error()
126
+ *
127
+ * @param string $_action The requested action.
128
+ * @param array $_data Parameters for the API action.
129
+ * @return false||object
130
+ */
131
+ private function api_request( $_action, $_data ) {
132
+
133
+ global $wp_version;
134
+
135
+ $data = array_merge( $this->api_data, $_data );
136
+
137
+ if( $data['slug'] != $this->slug )
138
+ return;
139
+
140
+ if( empty( $data['license'] ) )
141
+ return;
142
+
143
+ $api_params = array(
144
+ 'edd_action' => 'get_version',
145
+ 'license' => $data['license'],
146
+ 'name' => $data['item_name'],
147
+ 'slug' => $this->slug,
148
+ 'author' => $data['author']
149
+ );
150
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
151
+
152
+ if ( ! is_wp_error( $request ) ):
153
+ $request = json_decode( wp_remote_retrieve_body( $request ) );
154
+ if( $request && isset( $request->sections ) )
155
+ $request->sections = maybe_unserialize( $request->sections );
156
+ return $request;
157
+ else:
158
+ return false;
159
+ endif;
160
+ }
161
+ }
ReduxCore/extensions/edd/EDD_SL_Theme_Updater.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class EDD_SL_Theme_Updater {
3
+ private $remote_api_url;
4
+ private $request_data;
5
+ private $response_key;
6
+ private $theme_slug;
7
+ private $license_key;
8
+ private $version;
9
+ private $author;
10
+
11
+ function __construct( $args = array() ) {
12
+ $args = wp_parse_args( $args, array(
13
+ 'remote_api_url' => 'http://easydigitaldownloads.com',
14
+ 'request_data' => array(),
15
+ 'theme_slug' => get_template(),
16
+ 'item_name' => '',
17
+ 'license' => '',
18
+ 'version' => '',
19
+ 'author' => ''
20
+ ) );
21
+ extract( $args );
22
+
23
+ $theme = wp_get_theme( sanitize_key( $theme_slug ) );
24
+ $this->license = $license;
25
+ $this->item_name = $item_name;
26
+ $this->version = ! empty( $version ) ? $version : $theme->get( 'Version' );
27
+ $this->theme_slug = sanitize_key( $theme_slug );
28
+ $this->author = $author;
29
+ $this->remote_api_url = $remote_api_url;
30
+ $this->response_key = $this->theme_slug . '-update-response';
31
+
32
+
33
+ add_filter( 'site_transient_update_themes', array( &$this, 'theme_update_transient' ) );
34
+ add_filter( 'delete_site_transient_update_themes', array( &$this, 'delete_theme_update_transient' ) );
35
+ add_action( 'load-update-core.php', array( &$this, 'delete_theme_update_transient' ) );
36
+ add_action( 'load-themes.php', array( &$this, 'delete_theme_update_transient' ) );
37
+ add_action( 'load-themes.php', array( &$this, 'load_themes_screen' ) );
38
+ }
39
+
40
+ function load_themes_screen() {
41
+ add_thickbox();
42
+ add_action( 'admin_notices', array( &$this, 'update_nag' ) );
43
+ }
44
+
45
+ function update_nag() {
46
+ $theme = wp_get_theme( $this->theme_slug );
47
+
48
+ $api_response = get_transient( $this->response_key );
49
+
50
+ if( false === $api_response )
51
+ return;
52
+
53
+ $update_url = wp_nonce_url( 'update.php?action=upgrade-theme&amp;theme=' . urlencode( $this->theme_slug ), 'upgrade-theme_' . $this->theme_slug );
54
+ $update_onclick = ' onclick="if ( confirm(\'' . esc_js( __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update." ) ) . '\') ) {return true;}return false;"';
55
+
56
+ if ( version_compare( $this->version, $api_response->new_version, '<' ) ) {
57
+
58
+ echo '<div id="update-nag">';
59
+ printf( '<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.',
60
+ $theme->get( 'Name' ),
61
+ $api_response->new_version,
62
+ '#TB_inline?width=640&amp;inlineId=' . $this->theme_slug . '_changelog',
63
+ $theme->get( 'Name' ),
64
+ $update_url,
65
+ $update_onclick
66
+ );
67
+ echo '</div>';
68
+ echo '<div id="' . $this->theme_slug . '_' . 'changelog" style="display:none;">';
69
+ echo wpautop( $api_response->sections['changelog'] );
70
+ echo '</div>';
71
+ }
72
+ }
73
+
74
+ function theme_update_transient( $value ) {
75
+ $update_data = $this->check_for_update();
76
+ if ( $update_data ) {
77
+ $value->response[ $this->theme_slug ] = $update_data;
78
+ }
79
+ return $value;
80
+ }
81
+
82
+ function delete_theme_update_transient() {
83
+ delete_transient( $this->response_key );
84
+ }
85
+
86
+ function check_for_update() {
87
+
88
+ $theme = wp_get_theme( $this->theme_slug );
89
+
90
+ $update_data = get_transient( $this->response_key );
91
+ if ( false === $update_data ) {
92
+ $failed = false;
93
+
94
+ if( empty( $this->license ) )
95
+ return false;
96
+
97
+ $api_params = array(
98
+ 'edd_action' => 'get_version',
99
+ 'license' => $this->license,
100
+ 'name' => $this->item_name,
101
+ 'slug' => $this->theme_slug,
102
+ 'author' => $this->author
103
+ );
104
+
105
+ $response = wp_remote_post( $this->remote_api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
106
+
107
+ // make sure the response was successful
108
+ if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
109
+ $failed = true;
110
+ }
111
+
112
+ $update_data = json_decode( wp_remote_retrieve_body( $response ) );
113
+
114
+ if ( ! is_object( $update_data ) ) {
115
+ $failed = true;
116
+ }
117
+
118
+ // if the response failed, try again in 30 minutes
119
+ if ( $failed ) {
120
+ $data = new stdClass;
121
+ $data->new_version = $this->version;
122
+ set_transient( $this->response_key, $data, strtotime( '+30 minutes' ) );
123
+ return false;
124
+ }
125
+
126
+ // if the status is 'ok', return the update arguments
127
+ if ( ! $failed ) {
128
+ $update_data->sections = maybe_unserialize( $update_data->sections );
129
+ set_transient( $this->response_key, $update_data, strtotime( '+12 hours' ) );
130
+ }
131
+ }
132
+
133
+ if ( version_compare( $this->version, $update_data->new_version, '>=' ) ) {
134
+ return false;
135
+ }
136
+
137
+ return (array) $update_data;
138
+ }
139
+ }
ReduxCore/extensions/edd/LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ {one line to give the program's name and a brief idea of what it does.}
635
+ Copyright (C) {year} {name of author}
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ {project} Copyright (C) {year} {fullname}
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
ReduxCore/extensions/edd/README.md ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ edd_extension
2
+ =============
3
+
4
+ Run by cloning to your ~/ReduxCore/extensions/ folder as `edd`.
5
+
6
+
7
+
8
+ To run this, you must add some args to your ReduxFramework instance. Here's an example:
9
+
10
+ ```php
11
+ $args['edd'] = array(
12
+ 'mode' => 'template', // template|plugin
13
+ 'path' => '', // Path to the plugin/template main file
14
+ 'remote_api_url' => 'http://shoestrap.org', // our store URL that is running EDD
15
+ 'version' => "2.0.1", // current version number
16
+ 'item_name' => "Shoestrap 3", // name of this theme
17
+ 'author' => "Aristeides Stathopoulos, Dimitris Kalliris, Dovy Paukstys", // author of this theme
18
+ 'field_id' => "edd", // ID of the field used by EDD
19
+ );
20
+ ```
21
+
22
+ Then you also need to specify a field of type edd, it's as simple as:
23
+
24
+ ```php
25
+ array(
26
+ 'id'=>'edd',
27
+ 'type' => 'edd',
28
+ 'title' => __('EDD License', 'redux-framework-demo'),
29
+ 'subtitle' => __('Please enter a valid key.', 'redux-framework-demo'),
30
+ ),
31
+ ```
32
+
33
+ You can place that field anywhere. Now, be sure the field_id and the actual id of your EDD field are the same. That's very important.
ReduxCore/extensions/edd/extension_edd.php ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Redux Framework is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU General Public License as published by
6
+ * the Free Software Foundation, either version 2 of the License, or
7
+ * any later version.
8
+ *
9
+ * Redux Framework is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
16
+ *
17
+ * @package ReduxFramework
18
+ * @author Dovy Paukstys (dovy)
19
+ * @version 3.0.0
20
+ */
21
+
22
+ // Exit if accessed directly
23
+ if( !defined( 'ABSPATH' ) ) exit;
24
+
25
+ // Don't duplicate me!
26
+ if( !class_exists( 'ReduxFramework_extension_edd' ) ) {
27
+
28
+
29
+ /**
30
+ * Main ReduxFramework customizer extension class
31
+ *
32
+ * @since 1.0.0
33
+ */
34
+ class ReduxFramework_extension_edd extends ReduxFramework {
35
+
36
+ // Protected vars
37
+ protected $redux;
38
+ public $url;
39
+ public $dir;
40
+
41
+ /**
42
+ * Class Constructor. Defines the args for the extions class
43
+ *
44
+ * @since 1.0.0
45
+ * @access public
46
+ * @param array $sections Panel sections.
47
+ * @param array $args Class constructor arguments.
48
+ * @param array $extra_tabs Extra panel tabs.
49
+ * @return void
50
+ */
51
+ public function __construct( $parent ) {
52
+
53
+ if ( empty( $this->dir ) ) {
54
+ $this->dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
55
+ $this->url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->dir ) );
56
+ }
57
+
58
+
59
+ if ( isset( $parent->args['edd'] ) && !empty( $parent->args['edd'] ) ) {
60
+ // Create defaults array
61
+ $defaults = array(
62
+ 'mode' => '',
63
+ 'path' => '',
64
+ 'remote_api_url' => '',
65
+ 'version' => '',
66
+ 'item_name' => '',
67
+ 'author' => '',
68
+ 'mode' => '',
69
+ 'field_id' => ''
70
+ );
71
+
72
+ $edd = wp_parse_args( $parent->args['edd'], $defaults );
73
+
74
+ if ( $edd['mode'] == "template" && !empty( $edd['field_id'] ) ) {
75
+ if( !class_exists( 'EDD_SL_Theme_Updater' ) ) :
76
+ include_once( dirname( __FILE__ ) . '/EDD_SL_Theme_Updater.php' );
77
+ endif;
78
+
79
+ $edd_updater = new EDD_SL_Theme_Updater(
80
+ array(
81
+ 'remote_api_url' => $edd['remote_api_url'], // our store URL that is running EDD
82
+ 'version' => $edd['version'], // current version number
83
+ 'license' => $parent->options[$edd['field_id']], // license key
84
+ 'item_name' => $edd['item_name'], // name of this theme
85
+ 'author' => $edd['author'] // author of this theme
86
+ )
87
+ );
88
+ }
89
+ if ( $parent->args['edd']['mode'] == "plugin" && !empty( $edd['field_id'] ) ) {
90
+ if( !class_exists( 'EDD_SL_Plugin_Updater' ) ) :
91
+ include_once( dirname( __FILE__ ) . '/EDD_SL_Plugin_Updater.php' );
92
+ endif;
93
+ }
94
+ }
95
+
96
+
97
+ add_filter( 'redux/field/class/edd', array( &$this, 'overload_edd_field_path' ) ); // Adds the local field
98
+
99
+ add_action( 'wp_ajax_redux_edd_'.$parent->args['opt_name'].'_license', array( &$this, 'license_call' ) );
100
+
101
+ }
102
+
103
+ function license_call() {
104
+
105
+ global $wp_version;
106
+
107
+ if ($_POST['data']['license'] == "") {
108
+ die(-1);
109
+ }
110
+
111
+ $api_params = array(
112
+ 'edd_action' => $_POST['data']['edd_action'],
113
+ 'license' => $_POST['data']['license'],
114
+ 'item_name' => urlencode( $_POST['data']['item_name'] )
115
+ );
116
+
117
+
118
+
119
+ if ( !isset( $_POST['data']['remote_api_url'] ) || empty( $_POST['data']['remote_api_url'] ) ) {
120
+ $_POST['data']['remote_api_url'] = 'http://easydigitaldownloads.com';
121
+ }
122
+
123
+ $response = wp_remote_get( add_query_arg( $api_params, $_POST['data']['remote_api_url'] ), array( 'timeout' => 15, 'sslverify' => false ) );
124
+
125
+ if ( is_wp_error( $response ) )
126
+ return false;
127
+
128
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
129
+
130
+ $options[$_POST['data']['field_id']]['license'] = $_POST['data']['license'];
131
+ $options[$_POST['data']['field_id']]['status'] = $license_data->license;
132
+
133
+ update_option($_POST['data']['opt_name'], $options);
134
+
135
+ if( $license_data->license == 'deactivated' ) {
136
+ echo json_encode(array('status'=>'deactivated'));
137
+ update_option($_POST['data']['opt_name'], $options);
138
+ // Delete from the DB
139
+ die();
140
+ } else if( $license_data->license == 'valid' ) {
141
+ echo json_encode(array('status'=>'valid'));
142
+ // Save to DB and update status
143
+ die();
144
+ // this license is still valid
145
+ } else {
146
+ // Change status
147
+ update_option($_POST['data']['opt_name'], $options);
148
+ echo json_encode(array('status'=>'invalid'));
149
+ die();
150
+ // this license is no longer valid
151
+ }
152
+
153
+ die(-1);
154
+ }
155
+
156
+ // Forces the use of the embeded field path vs what the core typically would use
157
+ public function overload_edd_field_path($field) {
158
+ return dirname(__FILE__).'/field_edd.php';
159
+ }
160
+
161
+
162
+ } // class
163
+ } // if
ReduxCore/extensions/edd/field_edd.css ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*-------------------------------------------------------------------------------------------*/
2
+ /* Color picker overwrite
3
+ /*-------------------------------------------------------------------------------------------*/
4
+ #redux-main input.redux-color {
5
+ float: left;
6
+ width: 70px;
7
+ margin-left: 5px;
8
+ }
9
+ #redux-main .wp-color-result.wp-picker-open {
10
+ t2op: -3px;
11
+ }
12
+ #redux-main #content .section-color .controls {
13
+ width: 345px;
14
+ }
15
+ #redux-main #content .section-color .explain {
16
+ width: 225px;
17
+ }
18
+ #redux-main .iris-picker .iris-strip .ui-slider-handle {
19
+ position: absolute;
20
+ background: none!important;
21
+ right: -3px;
22
+ left: -3px;
23
+ border: 4px solid #aaa!important;
24
+ border-width: 4px 3px;
25
+ width: auto;
26
+ border-radius: 4px;
27
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
28
+ opacity: .9;
29
+ z-index: 5;
30
+ cursor: ns-resize;
31
+ }
32
+ #redux-main .iris-picker .iris-slider-offset {
33
+ position: absolute;
34
+ top: 0px;
35
+ left: 0;
36
+ right: 0;
37
+ bottom: 12px;
38
+ width: 28px;
39
+ background: none!important;
40
+ border: 0!important;
41
+ height: auto;
42
+ }
43
+ #redux-main .wp-picker-container .wp-color-result {
44
+ outline: 0;
45
+ margin: 0;
46
+ }
47
+ #redux-main .redux-color-gradient {
48
+ line-height: 24px;
49
+ }
50
+ #redux-main .wp-picker-container input {
51
+ margin-bottom: inherit;
52
+ margin-top: inherit;
53
+ padding: 2px;
54
+ }
55
+ #redux-main .wp-picker-container .wp-picker-default {
56
+ padding: 0 10px 1px;
57
+ }
58
+ #redux-main input.color-transparency {
59
+ margin-left: 10px;
60
+ margin-right: 3px;
61
+ }
62
+ #redux-main input.wp-color-picker {
63
+ width: 80px;
64
+ }
ReduxCore/extensions/edd/field_edd.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*global jQuery, document, redux_change */
2
+ (function($){
3
+ 'use strict';
4
+
5
+ $.redux = $.redux || {};
6
+
7
+ $(document).ready(function(){
8
+ $.redux.edd();
9
+ });
10
+
11
+ $.redux.edd = function(){
12
+ jQuery('.redux-EDDAction').click(function() {
13
+
14
+ var parent = jQuery(this).parents('.redux-container-edd:first');
15
+ var id = parent.attr('id');
16
+ var theData = {};
17
+ parent.find('.redux-edd').each(function() {
18
+ theData[jQuery(this).attr('id').replace(jQuery(this).attr('data-id')+'-', '')] = jQuery(this).val();
19
+ });
20
+ theData['edd_action'] = jQuery(this).attr('data-edd_action');
21
+ theData['opt_name'] = redux_opts.opt_name;
22
+ jQuery.post(
23
+ ajaxurl, {
24
+ 'action': 'redux_edd_'+redux_opts.opt_name+'_license',
25
+ 'data': theData
26
+ },
27
+ function(response) {
28
+ jQuery('#'+id+'-status').val(response.status);
29
+ console.log(response.status);
30
+ if (response.status === "active") {
31
+
32
+ } else if (response.status === "deactivated") {
33
+ } else { // Inactive or bad
34
+
35
+ }
36
+
37
+ }
38
+ );
39
+ });
40
+
41
+ }
42
+
43
+ })(jQuery);
ReduxCore/extensions/edd/field_edd.less ADDED
File without changes
ReduxCore/extensions/edd/field_edd.min.js ADDED
@@ -0,0 +1 @@
 
1
+ /*global jQuery, document, redux_change */(function(e){"use strict";e.redux=e.redux||{};e(document).ready(function(){e.redux.edd()});e.redux.edd=function(){jQuery(".redux-EDDAction").click(function(){var e=jQuery(this).parents(".redux-container-edd:first"),t=e.attr("id"),n={};e.find(".redux-edd").each(function(){n[jQuery(this).attr("id").replace(jQuery(this).attr("data-id")+"-","")]=jQuery(this).val()});n.edd_action=jQuery(this).attr("data-edd_action");n.opt_name=redux_opts.opt_name;jQuery.post(ajaxurl,{action:"redux_edd_"+redux_opts.opt_name+"_license",data:n},function(e){jQuery("#"+t+"-status").val(e.status);console.log(e.status);e.status!=="active"&&e.status==="deactivated"})})}})(jQuery);
ReduxCore/extensions/edd/field_edd.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Redux Framework is free software: you can redistribute it and/or modify
4
+ * it under the terms of the GNU General Public License as published by
5
+ * the Free Software Foundation, either version 2 of the License, or
6
+ * any later version.
7
+ *
8
+ * Redux Framework is distributed in the hope that it will be useful,
9
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ * GNU General Public License for more details.
12
+ *
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
15
+ *
16
+ * @package ReduxFramework
17
+ * @subpackage Field_Color
18
+ * @author Daniel J Griffiths (Ghost1227)
19
+ * @author Dovy Paukstys
20
+ * @version 3.0.0
21
+ */
22
+
23
+ // Exit if accessed directly
24
+ if( !defined( 'ABSPATH' ) ) exit;
25
+
26
+ // Don't duplicate me!
27
+ if( !class_exists( 'ReduxFramework_edd' ) ) {
28
+
29
+ /**
30
+ * Main ReduxFramework_color class
31
+ *
32
+ * @since 1.0.0
33
+ */
34
+ class ReduxFramework_edd extends ReduxFramework {
35
+
36
+ /**
37
+ * Field Constructor.
38
+ *
39
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return void
44
+ */
45
+ public function __construct( $field = array(), $value ='', $parent ) {
46
+
47
+ parent::__construct( $parent->sections, $parent->args, $parent->extra_tabs );
48
+
49
+ $this->field = $field;
50
+ $this->value = $value;
51
+
52
+ $this->parent = $parent;
53
+
54
+ }
55
+
56
+ /**
57
+ * Field Render Function.
58
+ *
59
+ * Takes the vars and outputs the HTML for the field in the settings
60
+ *
61
+ * @since 1.0.0
62
+ * @access public
63
+ * @return void
64
+ */
65
+ public function render() {
66
+
67
+ $defaults = array(
68
+ 'license' => '',
69
+ 'status' => '',
70
+ );
71
+
72
+ $this->value = wp_parse_args( $this->value, $defaults );
73
+
74
+ echo '<input data-id="'.$this->field['id'].'" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][license]" id="' . $this->field['id'] . '-license" class="redux-edd ' . $this->field['class'] . '" type="text" value="' . $this->value['license'] . '" " />';
75
+ echo '<input type="hidden" data-id="'.$this->field['id'].'" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][status]" id="' . $this->field['id'] . '-status" class="redux-edd ' . $this->field['class'] . '" type="text" value="' . $this->value['status'] . '" " />';
76
+ echo '&nbsp; <a href="#" class="button button-primary redux-EDDAction" data-edd_action="check_license">Verify License</a>';
77
+ echo '&nbsp; <a href="#" class="button button-primary redux-EDDAction" data-edd_action="activate_license">Activate License</a>';
78
+ echo '&nbsp; <a href="#" class="button redux-EDDAction" data-edd_action="deactivate_license">Deactivate License</a>';
79
+ if (isset($this->parent->args['edd'])) {
80
+ foreach( $this->parent->args['edd'] as $k => $v ) {
81
+ echo '<input type="hidden" data-id="'.$this->field['id'].'" id="' . $this->field['id'] . '-'.$k.'" class="redux-edd edd-'.$k.'" type="text" value="' . $v . '" " />';
82
+ }
83
+ }
84
+
85
+ }
86
+
87
+ /**
88
+ * Enqueue Function.
89
+ *
90
+ * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
91
+ *
92
+ * @since 1.0.0
93
+ * @access public
94
+ * @return void
95
+ */
96
+ public function enqueue() {
97
+
98
+ wp_enqueue_script(
99
+ 'redux-field-edd-js',
100
+ ReduxFramework::$_url . 'extensions/edd/field_edd.js',
101
+ array( 'jquery' ),
102
+ time(),
103
+ true
104
+ );
105
+
106
+ wp_enqueue_style(
107
+ 'redux-field-edd-css',
108
+ ReduxFramework::$_url . 'extensions/edd/field_edd.css',
109
+ time(),
110
+ true
111
+ );
112
+
113
+ }
114
+
115
+ }
116
+ }
ReduxCore/extensions/edd/module.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * The updater core options for the Shoestrap theme
5
+ * Simply adds the option in the Redux Framework
6
+ */
7
+ if ( !function_exists( 'shoestrap_core_licencing_options' ) ) :
8
+ function shoestrap_core_licencing_options( $sections ) {
9
+ // Licencing Options
10
+ $section = array(
11
+ 'title' => __( 'Licencing', 'shoestrap' ),
12
+ 'icon' => 'el-icon-repeat-alt icon-large',
13
+ );
14
+
15
+ $fields[] = array(
16
+ 'name' => __( 'Shoestrap Theme Licence', 'shoestrap' ),
17
+ 'desc' => __( 'Enter your shoestrap licence to enable automatic updates.', 'shoestrap' ) . ' ' . shoestrap_licence_status_label(),
18
+ 'id' => 'shoestrap_license_key',
19
+ 'default' => '',
20
+ 'type' => 'text',
21
+ // 'validate_callback' => 'shoestrap_licence_callback_function',
22
+ );
23
+
24
+ $section['fields'] = $fields;
25
+
26
+ $section = apply_filters( 'shoestrap_module_licencing_options_modifier', $section );
27
+
28
+ $sections[] = $section;
29
+ return $sections;
30
+
31
+ }
32
+ endif;
33
+ add_filter( 'redux-sections-' . REDUX_OPT_NAME, 'shoestrap_core_licencing_options', 200 );
34
+
35
+
36
+ // Load our theme updater
37
+ if( !class_exists( 'EDD_SL_Theme_Updater' ) ) :
38
+ include_once( dirname( __FILE__ ) . '/EDD_SL_Theme_Updater.php' );
39
+ endif;
40
+
41
+ // setup the updater
42
+ $shoestrap_theme = wp_get_theme();
43
+ $shoestrap_theme_version = $shoestrap_theme->get( 'Version' );
44
+ $shoestrap_theme_author = $shoestrap_theme->get( 'Author' );
45
+ $shoestrap_theme_name = $shoestrap_theme->get( 'Name' );
46
+
47
+ define( 'SHOESTRAP_STORE_URL', 'http://shoestrap.org' );
48
+ define( 'SHOESTRAP_THEME_NAME', $shoestrap_theme_name );
49
+
50
+ // retrieve our license key from the DB
51
+ $license_key = trim( shoestrap_getVariable( 'shoestrap_license_key' ) );
52
+
53
+ $edd_updater = new EDD_SL_Theme_Updater(
54
+ array(
55
+ 'remote_api_url' => SHOESTRAP_STORE_URL, // our store URL that is running EDD
56
+ 'version' => $shoestrap_theme_version, // current version number
57
+ 'license' => $license_key, // license key
58
+ 'item_name' => SHOESTRAP_THEME_NAME, // name of this theme
59
+ 'author' => $shoestrap_theme_author // author of this theme
60
+ )
61
+ );
62
+
63
+ /*
64
+ * Get the status of the licence
65
+ */
66
+ function shoestrap_theme_license_status() {
67
+
68
+ global $wp_version;
69
+
70
+ $license = shoestrap_getVariable( 'shoestrap_license_key' );
71
+
72
+ if ( isset( $licence ) ) :
73
+ // Copy the licence to a separate option
74
+ update_option( 'shoestrap_license_key', $licence );
75
+ endif;
76
+
77
+ $api_params = array(
78
+ 'edd_action' => 'check_license',
79
+ 'license' => $license,
80
+ 'item_name' => urlencode( SHOESTRAP_THEME_NAME )
81
+ );
82
+
83
+ $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ) );
84
+
85
+ if ( is_wp_error( $response ) )
86
+ return false;
87
+
88
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
89
+
90
+ return $license_data->license;
91
+ }
92
+
93
+
94
+ /*
95
+ * Activate a licence when entered
96
+ */
97
+ function shoestrap_activate_license() {
98
+ global $wp_version;
99
+
100
+ $license = shoestrap_getVariable( 'shoestrap_license_key' );
101
+
102
+ $api_params = array(
103
+ 'edd_action' => 'activate_license',
104
+ 'license' => $license,
105
+ 'item_name' => urlencode( SHOESTRAP_THEME_NAME )
106
+ );
107
+
108
+ $response = wp_remote_get( add_query_arg( $api_params, SHOESTRAP_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );
109
+
110
+ if ( is_wp_error( $response ) ) :
111
+ return false;
112
+ endif;
113
+
114
+ $license_data = json_decode( wp_remote_retrieve_body( $response ) );
115
+ }
116
+
117
+
118
+ /*
119
+ * cache the status for 24 hours if valid
120
+ */
121
+ function shoestrap_licence_status_cached() {
122
+ $license = shoestrap_getVariable( 'shoestrap_license_key' );
123
+ $status = get_transient( 'shoestrap_licence_status_cached' );
124
+
125
+ if ( $status != 'valid' ) :
126
+ if ( shoestrap_theme_license_status() == 'valid' ) :
127
+ set_transient( 'shoestrap_licence_status_cached', shoestrap_theme_license_status(), 3600 * 24 );
128
+ endif;
129
+ endif;
130
+
131
+ add_action( 'admin_init', 'shoestrap_activate_license' );
132
+ }
133
+ add_action( 'admin_init', 'shoestrap_licence_status_cached' );
134
+
135
+ /*
136
+ *
137
+ */
138
+ function shoestrap_licence_status_label() {
139
+ $status = get_transient( 'shoestrap_licence_status_cached' );
140
+ $license = shoestrap_getVariable( 'shoestrap_license_key' );
141
+
142
+ $message = '';
143
+
144
+ if ( $status == 'valid' ) :
145
+ $message .= '<span style="background: green; color: #fff; padding: 3px 10px;">' . __( 'Valid', 'shoestrap' ) . '</span>';
146
+ else :
147
+ $message .= '<span style="background: red; color: #fff; padding: 3px 10px;">' . __( 'Invalid', 'shoestrap' ) . '</span>';
148
+ endif;
149
+
150
+ return $message;
151
+ }
ReduxCore/framework.php CHANGED
@@ -16,7 +16,7 @@
16
  *
17
  * @package ReduxFramework
18
  * @author ReduxFramework Team
19
- * @version 3.0.8
20
  */
21
 
22
  // Exit if accessed directly
@@ -34,28 +34,33 @@ if( !class_exists( 'ReduxFramework' ) ) {
34
  */
35
  class ReduxFramework {
36
 
37
- public static $_version = '3.0.8';
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.
@@ -134,13 +139,6 @@ if( !class_exists( 'ReduxFramework' ) ) {
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',
@@ -167,35 +165,35 @@ if( !class_exists( 'ReduxFramework' ) ) {
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.',
@@ -211,7 +209,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
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
 
216
  // Public vars
217
  public $page = '';
@@ -228,18 +227,16 @@ if( !class_exists( 'ReduxFramework' ) ) {
228
  public $output = array(); // Fields with CSS output selectors
229
 
230
  public $fieldsValues = array(); //all fields values in an id=>value array so we can check dependencies
231
- public $fieldsHidden = array(); //all fields that didnt pass the dependency test and are hidden
232
 
233
- /**
234
- * Class Constructor. Defines the args for the theme options class
235
- *
236
- * @since 1.0.0
237
- * @access public
238
- * @param array $sections Panel sections.
239
- * @param array $args Class constructor arguments.
240
- * @param array $extra_tabs Extra panel tabs.
241
- * @return void
242
- */
243
  public function __construct( $sections = array(), $args = array(), $extra_tabs = array() ) {
244
 
245
  // Create defaults array
@@ -308,11 +305,14 @@ if( !class_exists( 'ReduxFramework' ) ) {
308
  // Options page
309
  add_action( 'admin_menu', array( &$this, '_options_page' ) );
310
 
 
 
 
311
  // Register setting
312
  add_action( 'admin_init', array( &$this, '_register_setting' ) );
313
 
314
  // Register extensions
315
- add_action( 'init', array( &$this, '_register_extensions' ), 2 );
316
 
317
  // Any dynamic CSS output, let's run
318
  add_action( 'wp_head', array( &$this, '_enqueue_output' ), 100 );
@@ -342,13 +342,17 @@ if( !class_exists( 'ReduxFramework' ) ) {
342
 
343
  }
344
 
345
- public function get_instance() {
 
 
 
346
  return $this->instance;
347
  }
348
 
349
  public function _tracking() {
350
  include_once( dirname( __FILE__ ) . '/inc/tracking.php' );
351
- $redux_tracking = new Redux_Tracking($this);
 
352
  }
353
 
354
  /**
@@ -422,7 +426,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
422
  } else {
423
  update_option( $this->args['opt_name'], $value );
424
  }
425
- // Set a global variable by the global_variable agument.
426
  if ( $this->args['global_variable'] ) {
427
  $options = $this->args['global_variable'];
428
  global $$options;
@@ -456,7 +460,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
456
  $results = $defaults;
457
  $this->set_options($results);
458
  }
459
- // Set a global variable by the global_variable agument.
460
  if ( $this->args['global_variable'] ) {
461
  $options = $this->args['global_variable'];
462
  global $$options;
@@ -475,6 +479,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
475
  $data = "";
476
  if ( !empty($type) ) {
477
 
 
 
478
  /**
479
  Use data from Wordpress to populate options array
480
  **/
@@ -505,7 +511,19 @@ if( !class_exists( 'ReduxFramework' ) ) {
505
  $data[$page->ID] = $page->post_title;
506
  }//foreach
507
  }//if
508
- } else if ($type == "posts" || $type == "post") {
 
 
 
 
 
 
 
 
 
 
 
 
509
  $posts = get_posts($args);
510
  if (!empty($posts)) {
511
  foreach ( $posts as $post ) {
@@ -539,6 +557,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
539
  $data[$k] = $k;
540
  }
541
  }else if ($type == "roles") {
 
542
  global $wp_roles;
543
  $data = $wp_roles->get_names();
544
  }else if ($type == "capabilities") {
@@ -609,7 +628,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
609
  Folds work by setting the folds value like so
610
  $this->folds['parentID']['parentValue'][] = 'childId'
611
  */
612
- $folds = array();
613
  if( !is_null( $this->sections ) && is_null( $this->options_defaults ) ) {
614
  foreach( $this->sections as $section ) {
615
  if( isset( $section['fields'] ) ) {
@@ -662,7 +681,11 @@ if( !class_exists( 'ReduxFramework' ) ) {
662
 
663
  }
664
 
665
- function get_fold($field){
 
 
 
 
666
  if ( !is_array( $field['required'] ) ) {
667
  /*
668
  Example variable:
@@ -673,8 +696,9 @@ if( !class_exists( 'ReduxFramework' ) ) {
673
  $this->folds[$field['required']]['children'][1][] = $field['id'];
674
  $this->folds[$field['id']]['parent'] = $field['required'];
675
  } else {
676
- $parent = $foldk = $field['required'][0];
677
- $comparison = $field['required'][1];
 
678
  $value = $foldv = $field['required'][2];
679
  //foreach( $field['required'] as $foldk=>$foldv ) {
680
 
@@ -767,13 +791,12 @@ if( !class_exists( 'ReduxFramework' ) ) {
767
 
768
  }
769
 
770
- /**
771
- * Class Options Page Function, creates main options page.
772
- *
773
- * @since 1.0.0
774
- * @access public
775
- * @return
776
- */
777
  function _options_page() {
778
  if( $this->args['page_type'] == 'submenu' ) {
779
  $this->page = add_submenu_page(
@@ -879,16 +902,18 @@ if( !class_exists( 'ReduxFramework' ) ) {
879
  * @return void
880
  */
881
  public function _enqueue_output() {
 
882
  foreach( $this->sections as $k => $section ) {
883
  if( isset($section['type'] ) && $section['type'] == 'divide' ) {
884
  continue;
885
  }
886
  if( isset( $section['fields'] ) ) {
887
- foreach( $section['fields'] as $fieldk => $field ) {
 
888
  if( isset( $field['type'] ) ) {
889
  $field_class = 'ReduxFramework_' . $field['type'];
890
  if( !class_exists( $field_class ) ) {
891
- $class_file = apply_filters( 'redux-typeclass-load', self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
892
  if( $class_file ) {
893
  /** @noinspection PhpIncludeInspection */
894
  require_once( $class_file );
@@ -901,7 +926,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
901
  }
902
  $value = isset($this->options[$field['id']])?$this->options[$field['id']]:'';
903
  $enqueue = new $field_class( $field, $value, $this );
904
- $enqueue->output();
 
905
  }
906
  }
907
  }
@@ -1087,8 +1113,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
1087
  $field_class = 'ReduxFramework_' . $field['type'];
1088
 
1089
  if( !class_exists( $field_class ) ) {
1090
- $class_file = apply_filters( 'redux-typeclass-load', self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
1091
-
1092
  if( $class_file ) {
1093
  /** @noinspection PhpIncludeInspection */
1094
  require_once( $class_file );
@@ -1098,7 +1123,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
1098
 
1099
  if( class_exists( $field_class ) && method_exists( $field_class, 'enqueue' ) ) {
1100
  $enqueue = new $field_class( '', '', $this );
1101
- $enqueue->enqueue();
 
1102
  }
1103
  }
1104
  }
@@ -1363,7 +1389,8 @@ if( !class_exists( 'ReduxFramework' ) ) {
1363
  if( $class_file ) {
1364
  /** @noinspection PhpIncludeInspection */
1365
  require_once( $class_file );
1366
- $extension = new $extension_class( $this );
 
1367
  }
1368
  }
1369
 
@@ -1371,16 +1398,15 @@ if( !class_exists( 'ReduxFramework' ) ) {
1371
 
1372
  do_action( 'redux-register-extensions-' . $this->args['opt_name'], $this );
1373
 
1374
- }
1375
 
1376
- /**
1377
- * Validate the Options options before insertion
1378
- *
1379
- * @since 3.0.0
1380
- * @access public
1381
- * @param array $plugin_options The options array
1382
- * @return
1383
- */
1384
  public function _validate_options( $plugin_options ) {
1385
 
1386
  set_transient( 'redux-saved-' . $this->args['opt_name'], '1', 1000 );
@@ -1573,7 +1599,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
1573
 
1574
  // Main container
1575
  echo '<div id="redux-container">';
1576
- echo '<form method="post" action="./options.php" enctype="multipart/form-data" id="redux-form-wrapper">';
1577
 
1578
  echo '<input type="hidden" id="redux-compiler-hook" name="' . $this->args['opt_name'] . '[compiler]" value="" />';
1579
 
@@ -1653,8 +1679,18 @@ if( !class_exists( 'ReduxFramework' ) ) {
1653
  //if( !empty( $this->args['icon_type'] ) && $this->args['icon_type'] == 'image' ) {
1654
  $icon = ( !isset( $section['icon'] ) ) ? '' : '<img class="image_icon_type" src="' . $section['icon'] . '" /> ';
1655
  } else {
1656
- $icon_class = ( !isset( $section['icon_class'] ) ) ? '' : ' ' . $section['icon_class'];
1657
- $icon = ( !isset( $section['icon'] ) ) ? '<i class="icon-cog' . $icon_class . '"></i> ' : '<i class="icon-' . $section['icon'] . $icon_class . '"></i> ';
 
 
 
 
 
 
 
 
 
 
1658
  }
1659
 
1660
  if (isset($section['type']) && $section['type'] == "divide") {
@@ -1701,7 +1737,16 @@ if( !class_exists( 'ReduxFramework' ) ) {
1701
  if( !empty( $this->args['icon_type'] ) && $this->args['icon_type'] == 'image' ) {
1702
  $icon = ( !isset( $tab['icon'] ) ) ? '' : '<img src="' . $tab['icon'] . '" /> ';
1703
  } else {
1704
- $icon_class = ( !isset( $tab['icon_class'] ) ) ? '' : ' ' . $tab['icon_class'];
 
 
 
 
 
 
 
 
 
1705
  $icon = ( !isset( $tab['icon'] ) ) ? '<i class="icon-cog' . $icon_class . '"></i> ' : '<i class="icon-' . $tab['icon'] . $icon_class . '"></i> ';
1706
  }
1707
  echo '<li id="' . $k . '_section_group_li" class="redux-group-tab-link-li">';
@@ -1928,16 +1973,14 @@ if( !class_exists( 'ReduxFramework' ) ) {
1928
  }
1929
  }
1930
 
1931
- /**
1932
- * Field HTML OUTPUT.
1933
- *
1934
- * Gets option from options array, then calls the specific field type class - allows extending by other devs
1935
- *
1936
- * @since 1.0.0
1937
- * @access public
1938
- * @param array $fields
1939
- * @return void
1940
- */
1941
  public function _field_input( $field, $v = "" ) {
1942
 
1943
  if( isset( $field['callback'] ) && function_exists( $field['callback'] ) ) {
@@ -1952,8 +1995,7 @@ if( !class_exists( 'ReduxFramework' ) ) {
1952
  $field_class = 'ReduxFramework_' . $field['type'];
1953
 
1954
  if( !class_exists( $field_class ) ) {
1955
- $class_file = apply_filters( 'redux-typeclass-load', self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field_class );
1956
-
1957
  if( $class_file ) {
1958
  /** @noinspection PhpIncludeInspection */
1959
  require_once($class_file);
@@ -1970,13 +2012,16 @@ if( !class_exists( 'ReduxFramework' ) ) {
1970
  $render = new $field_class( $field, $value, $this );
1971
 
1972
  ob_start();
1973
- $render->render();
 
1974
  $_render = apply_filters('redux-field-'.$this->args['opt_name'],ob_get_contents(),$field);
1975
  ob_end_clean();
1976
 
1977
  //save the values into a unique array in case we need it for dependencies
1978
  $this->fieldsValues[$field['id']] = (isset($value['url']) && is_array($value) )?$value['url']:$value;
1979
  //create default data und class string and checks the dependencies of an object
 
 
1980
  extract($this->check_dependencies($field));
1981
 
1982
  echo '<fieldset id="'.$this->args['opt_name'].'-'.$field['id'].'" class="redux-field redux-container-'.$field['type'].' '.$class_string.'" data-id="'.$field['id'].'" '.$data_string.'>';
16
  *
17
  * @package ReduxFramework
18
  * @author ReduxFramework Team
19
+ * @version 3.0.9
20
  */
21
 
22
  // Exit if accessed directly
34
  */
35
  class ReduxFramework {
36
 
37
+ public static $_version = '3.0.9';
38
  public static $_dir;
39
  public static $_url;
40
  public static $_properties;
41
 
42
  static function init() {
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
+ // Windows-proof constants: replace backward by forward slashes. Thanks to: @peterbouwmeester
45
+ self::$_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
46
+ $wp_content_dir = trailingslashit( str_replace( '\\', '/', WP_CONTENT_DIR ) );
47
+ $relative_url = str_replace( $wp_content_dir, '', self::$_dir );
48
+ self::$_url = trailingslashit( WP_CONTENT_URL ) . $relative_url;
49
+
50
+ /** @todo OLD VERSION - remove after testing */
51
+ // $fslashed_dir = trailingslashit( str_replace( '\\', '/', dirname( __FILE__ ) ) );
52
+ // $fslashed_abs = trailingslashit( str_replace( '\\', '/', ABSPATH ) );
53
+ // // Fix for when Wordpress is not in the wp-content directory
54
+ // if (strpos($fslashed_dir,$fslashed_abs) === false) {
55
+ // $parts = explode('/', $fslashed_abs);
56
+ // $test = str_replace('/'.$parts[count($parts)-2], '', $fslashed_abs);
57
+ // if (strpos($fslashed_dir,$test) !== false) {
58
+ // $fslashed_abs = $test;
59
+ // }
60
+ // }
61
+ //
62
+ // self::$_dir = $fslashed_dir;
63
+ // self::$_url = site_url( str_replace( $fslashed_abs, '', $fslashed_dir ) );
64
 
65
  /**
66
  Still need to port these.
139
  'desc'=>'Permissions needed to access the options panel.',
140
  'default'=> 'manage_options'
141
  ),
 
 
 
 
 
 
 
142
  'page_type' => array(
143
  'required',
144
  'data_type' => 'varchar',
165
  ),
166
  'enqueue' => array(
167
  'required',
168
+ 'data_type'=>'bool',
169
  'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
170
  'label'=>'Enqueue Files',
171
  'desc'=>'Global shut-off for custom CSS enqueing by the framework',
172
  'default'=>true
173
  ),
174
  'allow_sub_menu' => array(
175
+ 'data_type'=>'bool',
176
  'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
177
  'label'=>'Allow Submenu',
178
  'desc'=>'Turn on or off the submenu that will typically be shown under Appearance.',
179
  'default'=>true
180
  ),
181
  'show_import_export' => array(
182
+ 'data_type'=>'bool',
183
  'form' => array('type' => 'radio', 'options' => array(true => 'Show', false => 'Hide')),
184
  'label'=>'Show Import/Export',
185
  'desc'=>'Show/Hide the import/export tab.',
186
  'default'=>true
187
  ),
188
  'dev_mode' => array(
189
+ 'data_type'=>'bool',
190
  'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
191
  'label'=>'Developer Mode',
192
  'desc'=>'Turn on or off the dev mode tab.',
193
  'default'=>false
194
  ),
195
  'system_info' => array(
196
+ 'data_type'=>'bool',
197
  'form' => array('type' => 'radio', 'options' => array(true => 'Enabled', false => 'Disabled')),
198
  'label'=>'System Info',
199
  'desc'=>'Turn on or off the system info tab.',
209
  // These two are actually really unnecessary and should be deprecated
210
  protected $framework_url = 'http://www.reduxframework.com/';
211
 
212
+ /** @var ReduxFramework $instance */
213
+ public $instance = null;
214
 
215
  // Public vars
216
  public $page = '';
227
  public $output = array(); // Fields with CSS output selectors
228
 
229
  public $fieldsValues = array(); //all fields values in an id=>value array so we can check dependencies
230
+ public $fieldsHidden = array(); //all fields that didn't pass the dependency test and are hidden
231
 
232
+ /**
233
+ * Class Constructor. Defines the args for the theme options class
234
+ * @since 1.0.0
235
+ * @param array $sections Panel sections.
236
+ * @param array $args Class constructor arguments.
237
+ * @param array $extra_tabs Extra panel tabs.
238
+ * @return \ReduxFramework
239
+ */
 
 
240
  public function __construct( $sections = array(), $args = array(), $extra_tabs = array() ) {
241
 
242
  // Create defaults array
305
  // Options page
306
  add_action( 'admin_menu', array( &$this, '_options_page' ) );
307
 
308
+ // Register extensions
309
+ add_action( 'init', array( &$this, '_register_extensions' ) );
310
+
311
  // Register setting
312
  add_action( 'admin_init', array( &$this, '_register_setting' ) );
313
 
314
  // Register extensions
315
+ add_action( 'init', array( &$this, '_register_extensions' ) );
316
 
317
  // Any dynamic CSS output, let's run
318
  add_action( 'wp_head', array( &$this, '_enqueue_output' ), 100 );
342
 
343
  }
344
 
345
+ /**
346
+ * @return ReduxFramework
347
+ */
348
+ public function get_instance() {
349
  return $this->instance;
350
  }
351
 
352
  public function _tracking() {
353
  include_once( dirname( __FILE__ ) . '/inc/tracking.php' );
354
+ /** @noinspection PhpUnusedLocalVariableInspection */
355
+ $redux_tracking = new Redux_Tracking($this);
356
  }
357
 
358
  /**
426
  } else {
427
  update_option( $this->args['opt_name'], $value );
428
  }
429
+ // Set a global variable by the global_variable argument.
430
  if ( $this->args['global_variable'] ) {
431
  $options = $this->args['global_variable'];
432
  global $$options;
460
  $results = $defaults;
461
  $this->set_options($results);
462
  }
463
+ // Set a global variable by the global_variable argument.
464
  if ( $this->args['global_variable'] ) {
465
  $options = $this->args['global_variable'];
466
  global $$options;
479
  $data = "";
480
  if ( !empty($type) ) {
481
 
482
+ $data = apply_filters( 'redux/options/'.$this->args['opt_name'].'/wordpress_data/'.$type.'/', $data );
483
+
484
  /**
485
  Use data from Wordpress to populate options array
486
  **/
511
  $data[$page->ID] = $page->post_title;
512
  }//foreach
513
  }//if
514
+ } else if ($type == "terms" || $type == "term") {
515
+ $taxonomies = $args['taxonomies'];
516
+ unset($args['taxonomies']);
517
+ if (empty($args)) {
518
+ $args = array();
519
+ }
520
+ $terms = get_terms($taxonomies, $args); // this will get nothing
521
+ if (!empty($terms)) {
522
+ foreach ( $terms as $term ) {
523
+ $data[$term->term_id] = $term->name;
524
+ }//foreach
525
+ } // If
526
+ } else if ($type == "posts" || $type == "post") {
527
  $posts = get_posts($args);
528
  if (!empty($posts)) {
529
  foreach ( $posts as $post ) {
557
  $data[$k] = $k;
558
  }
559
  }else if ($type == "roles") {
560
+ /** @global WP_Roles $wp_roles */
561
  global $wp_roles;
562
  $data = $wp_roles->get_names();
563
  }else if ($type == "capabilities") {
628
  Folds work by setting the folds value like so
629
  $this->folds['parentID']['parentValue'][] = 'childId'
630
  */
631
+ // $folds = array();
632
  if( !is_null( $this->sections ) && is_null( $this->options_defaults ) ) {
633
  foreach( $this->sections as $section ) {
634
  if( isset( $section['fields'] ) ) {
681
 
682
  }
683
 
684
+ /**
685
+ * @param array $field
686
+ * @return array
687
+ */
688
+ function get_fold($field){
689
  if ( !is_array( $field['required'] ) ) {
690
  /*
691
  Example variable:
696
  $this->folds[$field['required']]['children'][1][] = $field['id'];
697
  $this->folds[$field['id']]['parent'] = $field['required'];
698
  } else {
699
+ // $parent = $foldk = $field['required'][0];
700
+ $foldk = $field['required'][0];
701
+ // $comparison = $field['required'][1];
702
  $value = $foldv = $field['required'][2];
703
  //foreach( $field['required'] as $foldk=>$foldv ) {
704
 
791
 
792
  }
793
 
794
+ /**
795
+ * Class Options Page Function, creates main options page.
796
+ * @since 1.0.0
797
+ * @access public
798
+ * @return void
799
+ */
 
800
  function _options_page() {
801
  if( $this->args['page_type'] == 'submenu' ) {
802
  $this->page = add_submenu_page(
902
  * @return void
903
  */
904
  public function _enqueue_output() {
905
+ /** @noinspection PhpUnusedLocalVariableInspection */
906
  foreach( $this->sections as $k => $section ) {
907
  if( isset($section['type'] ) && $section['type'] == 'divide' ) {
908
  continue;
909
  }
910
  if( isset( $section['fields'] ) ) {
911
+ /** @noinspection PhpUnusedLocalVariableInspection */
912
+ foreach( $section['fields'] as $fieldk => $field ) {
913
  if( isset( $field['type'] ) ) {
914
  $field_class = 'ReduxFramework_' . $field['type'];
915
  if( !class_exists( $field_class ) ) {
916
+ $class_file = apply_filters( 'redux/field/class/'.$field['type'], self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field );
917
  if( $class_file ) {
918
  /** @noinspection PhpIncludeInspection */
919
  require_once( $class_file );
926
  }
927
  $value = isset($this->options[$field['id']])?$this->options[$field['id']]:'';
928
  $enqueue = new $field_class( $field, $value, $this );
929
+ /** @noinspection PhpUndefinedMethodInspection */
930
+ $enqueue->output();
931
  }
932
  }
933
  }
1113
  $field_class = 'ReduxFramework_' . $field['type'];
1114
 
1115
  if( !class_exists( $field_class ) ) {
1116
+ $class_file = apply_filters( 'redux/field/class/'.$field['type'], self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field );
 
1117
  if( $class_file ) {
1118
  /** @noinspection PhpIncludeInspection */
1119
  require_once( $class_file );
1123
 
1124
  if( class_exists( $field_class ) && method_exists( $field_class, 'enqueue' ) ) {
1125
  $enqueue = new $field_class( '', '', $this );
1126
+ /** @noinspection PhpUndefinedMethodInspection */
1127
+ $enqueue->enqueue();
1128
  }
1129
  }
1130
  }
1389
  if( $class_file ) {
1390
  /** @noinspection PhpIncludeInspection */
1391
  require_once( $class_file );
1392
+ /** @noinspection PhpUnusedLocalVariableInspection */
1393
+ $extension = new $extension_class( $this );
1394
  }
1395
  }
1396
 
1398
 
1399
  do_action( 'redux-register-extensions-' . $this->args['opt_name'], $this );
1400
 
1401
+ }
1402
 
1403
+ /**
1404
+ * Validate the Options options before insertion
1405
+ * @since 3.0.0
1406
+ * @access public
1407
+ * @param array $plugin_options The options array
1408
+ * @return array|mixed|string|void
1409
+ */
 
1410
  public function _validate_options( $plugin_options ) {
1411
 
1412
  set_transient( 'redux-saved-' . $this->args['opt_name'], '1', 1000 );
1599
 
1600
  // Main container
1601
  echo '<div id="redux-container">';
1602
+ echo '<form method="post" action="' . './options.php" enctype="multipart/form-data" id="redux-form-wrapper">';
1603
 
1604
  echo '<input type="hidden" id="redux-compiler-hook" name="' . $this->args['opt_name'] . '[compiler]" value="" />';
1605
 
1679
  //if( !empty( $this->args['icon_type'] ) && $this->args['icon_type'] == 'image' ) {
1680
  $icon = ( !isset( $section['icon'] ) ) ? '' : '<img class="image_icon_type" src="' . $section['icon'] . '" /> ';
1681
  } else {
1682
+
1683
+ if ( ! empty( $section['icon_class'] ) ) {
1684
+ $icon_class = ' ' . $section['icon_class'];
1685
+ }
1686
+ elseif ( ! empty( $this->args['default_icon_class'] ) ) {
1687
+ $icon_class = ' ' . $this->args['default_icon_class'];
1688
+ }
1689
+ else {
1690
+ $icon_class = '';
1691
+ }
1692
+
1693
+ $icon = ( !isset( $section['icon'] ) ) ? '<i class="icon-cog' . $icon_class . '"></i> ' : '<i class="icon-' . $section['icon'] . $icon_class . '"></i> ';
1694
  }
1695
 
1696
  if (isset($section['type']) && $section['type'] == "divide") {
1737
  if( !empty( $this->args['icon_type'] ) && $this->args['icon_type'] == 'image' ) {
1738
  $icon = ( !isset( $tab['icon'] ) ) ? '' : '<img src="' . $tab['icon'] . '" /> ';
1739
  } else {
1740
+ if ( ! empty( $tab['icon_class'] ) ) {
1741
+ $icon_class = ' ' . $tab['icon_class'];
1742
+ }
1743
+ elseif ( ! empty( $this->args['default_icon_class'] ) ) {
1744
+ $icon_class = ' ' . $this->args['default_icon_class'];
1745
+ }
1746
+ else {
1747
+ $icon_class = '';
1748
+ }
1749
+
1750
  $icon = ( !isset( $tab['icon'] ) ) ? '<i class="icon-cog' . $icon_class . '"></i> ' : '<i class="icon-' . $tab['icon'] . $icon_class . '"></i> ';
1751
  }
1752
  echo '<li id="' . $k . '_section_group_li" class="redux-group-tab-link-li">';
1973
  }
1974
  }
1975
 
1976
+ /**
1977
+ * Field HTML OUTPUT.
1978
+ * Gets option from options array, then calls the specific field type class - allows extending by other devs
1979
+ * @since 1.0.0
1980
+ * @param array $field
1981
+ * @param string $v
1982
+ * @return void
1983
+ */
 
 
1984
  public function _field_input( $field, $v = "" ) {
1985
 
1986
  if( isset( $field['callback'] ) && function_exists( $field['callback'] ) ) {
1995
  $field_class = 'ReduxFramework_' . $field['type'];
1996
 
1997
  if( !class_exists( $field_class ) ) {
1998
+ $class_file = apply_filters( 'redux/field/class/'.$field['type'], self::$_dir . 'inc/fields/' . $field['type'] . '/field_' . $field['type'] . '.php', $field );
 
1999
  if( $class_file ) {
2000
  /** @noinspection PhpIncludeInspection */
2001
  require_once($class_file);
2012
  $render = new $field_class( $field, $value, $this );
2013
 
2014
  ob_start();
2015
+ /** @noinspection PhpUndefinedMethodInspection */
2016
+ $render->render();
2017
  $_render = apply_filters('redux-field-'.$this->args['opt_name'],ob_get_contents(),$field);
2018
  ob_end_clean();
2019
 
2020
  //save the values into a unique array in case we need it for dependencies
2021
  $this->fieldsValues[$field['id']] = (isset($value['url']) && is_array($value) )?$value['url']:$value;
2022
  //create default data und class string and checks the dependencies of an object
2023
+ $class_string = '';
2024
+ $data_string = '';
2025
  extract($this->check_dependencies($field));
2026
 
2027
  echo '<fieldset id="'.$this->args['opt_name'].'-'.$field['id'].'" class="redux-field redux-container-'.$field['type'].' '.$class_string.'" data-id="'.$field['id'].'" '.$data_string.'>';
ReduxCore/inc/fields/border/field_border.php CHANGED
@@ -27,12 +27,12 @@ class ReduxFramework_border extends ReduxFramework{
27
  * @since ReduxFramework 1.0.0
28
  */
29
  function render(){
30
-
31
  // No errors please
32
  $defaults = array(
33
  'top' => true,
34
  'bottom' => true,
35
- 'all' => false,
36
  'style' => true,
37
  'color' => true,
38
  'left' => true,
@@ -45,6 +45,8 @@ class ReduxFramework_border extends ReduxFramework{
45
  'right'=>'',
46
  'bottom'=>'',
47
  'left'=>'',
 
 
48
  );
49
 
50
  $this->value = wp_parse_args( $this->value, $defaults );
@@ -58,6 +60,16 @@ class ReduxFramework_border extends ReduxFramework{
58
  'style' => isset( $this->value['border-style'] ) ? $this->value['border-style'] : $this->value['style']
59
  );
60
 
 
 
 
 
 
 
 
 
 
 
61
  $this->value = $value;
62
 
63
  $defaults = array(
27
  * @since ReduxFramework 1.0.0
28
  */
29
  function render(){
30
+
31
  // No errors please
32
  $defaults = array(
33
  'top' => true,
34
  'bottom' => true,
35
+ 'all' => true,
36
  'style' => true,
37
  'color' => true,
38
  'left' => true,
45
  'right'=>'',
46
  'bottom'=>'',
47
  'left'=>'',
48
+ 'color'=>'',
49
+ 'style'=>'',
50
  );
51
 
52
  $this->value = wp_parse_args( $this->value, $defaults );
60
  'style' => isset( $this->value['border-style'] ) ? $this->value['border-style'] : $this->value['style']
61
  );
62
 
63
+ if ( ( isset( $this->value['width'] ) || isset( $this->value['border-width'] ) ) ) {
64
+ if ( isset( $this->value['border-width'] ) && !empty( $this->value['border-width'] ) ) {
65
+ $this->value['width'] = $this->value['border-width'];
66
+ }
67
+ $value['top'] = $this->value['width'];
68
+ $value['right'] = $this->value['width'];
69
+ $value['bottom'] = $this->value['width'];
70
+ $value['left'] = $this->value['width'];
71
+ }
72
+
73
  $this->value = $value;
74
 
75
  $defaults = array(
ReduxCore/inc/fields/checkbox/field_checkbox.php CHANGED
@@ -98,12 +98,14 @@ if( !class_exists( 'ReduxFramework_checkbox' ) ) {
98
 
99
  } else {
100
 
101
- echo ( $this->field['desc'] != '' ) ? ' <label for="' . strtr($this->args['opt_name'] . '[' . $this->field['id'] . ']', array('[' => '_', ']' => '')) . '">' : '';
102
-
103
- echo '<input type="checkbox" id="' . strtr($this->args['opt_name'] . '[' . $this->field['id'] . ']', array('[' => '_', ']' => '')) . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="1" class="checkbox ' . $this->field['class'] . '" ' . checked( $this->value, '1', false ) . '/>';
 
 
104
 
105
  }
106
 
107
  }
108
  }
109
- }
98
 
99
  } else {
100
 
101
+ echo ( ! empty( $this->field['desc'] ) ) ? ' <label for="' . strtr($this->args['opt_name'] . '[' . $this->field['id'] . ']', array('[' => '_', ']' => '')) . '">' : '';
102
+
103
+ // Got the "Checked" status as "0" or "1" then insert it as the "value" option
104
+ $ch_value = checked( $this->value, '1', false )== "" ? "0" : "1";
105
+ echo '<input type="checkbox" id="' . strtr($this->args['opt_name'] . '[' . $this->field['id'] . ']', array('[' => '_', ']' => '')) . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="' . $ch_value . '" class="checkbox ' . $this->field['class'] . '" ' . checked( $this->value, '1', false ) . '/>';
106
 
107
  }
108
 
109
  }
110
  }
111
+ }
ReduxCore/inc/fields/dimensions/field_dimensions.php CHANGED
@@ -34,8 +34,6 @@ class ReduxFramework_dimensions extends ReduxFramework{
34
  'height' => true,
35
  'units_extended' => false,
36
  );
37
-
38
- $this->field['units'] = "em";
39
 
40
  $this->field = wp_parse_args( $this->field, $defaults );
41
 
34
  'height' => true,
35
  'units_extended' => false,
36
  );
 
 
37
 
38
  $this->field = wp_parse_args( $this->field, $defaults );
39
 
ReduxCore/inc/fields/image_select/field_image_select.css CHANGED
@@ -1,4 +1,5 @@
1
  .redux-image-select input[type='radio']{display:none}
 
2
  .redux-image-select{margin:3px 10px;display:inline-block;padding:10px;padding-left:0}
3
  .redux-image-select-selected{background-color:#f9f9f9}
4
  .redux-image-select img,.redux-image-select-selected img,.redux-image-select .tiles,.redux-image-select-selected .tiles{border-width:4px;border-style:solid}
1
  .redux-image-select input[type='radio']{display:none}
2
+ .redux-image-select-presets img{width:100%}
3
  .redux-image-select{margin:3px 10px;display:inline-block;padding:10px;padding-left:0}
4
  .redux-image-select-selected{background-color:#f9f9f9}
5
  .redux-image-select img,.redux-image-select-selected img,.redux-image-select .tiles,.redux-image-select-selected .tiles{border-width:4px;border-style:solid}
ReduxCore/inc/fields/image_select/field_image_select.js CHANGED
@@ -35,7 +35,7 @@ jQuery(document).ready(function() {
35
  title : function(){
36
  return "<img src='" + jQuery(this).attr('rel') + "' style='max-width:150px;' alt='' />";
37
  },
38
- opacity: 1,
39
  });
40
  /*var xOffset = 10; // these 2 variable determine the popup's distance from the cursor
41
  var yOffset = 30;
35
  title : function(){
36
  return "<img src='" + jQuery(this).attr('rel') + "' style='max-width:150px;' alt='' />";
37
  },
38
+ opacity: 1
39
  });
40
  /*var xOffset = 10; // these 2 variable determine the popup's distance from the cursor
41
  var yOffset = 30;
ReduxCore/inc/fields/image_select/field_image_select.less CHANGED
@@ -2,6 +2,9 @@
2
  .redux-image-select input[type='radio']{
3
  display:none;
4
  }
 
 
 
5
  .redux-image-select {
6
  margin:3px 10px;
7
  display:inline-block;
2
  .redux-image-select input[type='radio']{
3
  display:none;
4
  }
5
+ .redux-image-select-presets img {
6
+ width: 100%;
7
+ }
8
  .redux-image-select {
9
  margin:3px 10px;
10
  display:inline-block;
ReduxCore/inc/fields/password/field_password.php CHANGED
@@ -1,53 +1,95 @@
1
  <?php
 
 
 
2
  class ReduxFramework_password {
3
 
4
- /**
5
- * Field Constructor.
6
- *
7
- * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
8
- *
9
- * @since ReduxFramework 1.0.1
10
- */
11
- function __construct( $field = array(), $value ='', $parent ) {
12
- $this->field = $field;
13
- $this->value = $value;
14
- $this->args = $parent->args;
15
- }
16
-
17
- /**
18
- * Field Render Function.
19
- *
20
- * Takes the vars and outputs the HTML for the field in the settings
21
- *
22
- * @since ReduxFramework 1.0.1
23
- */
24
- function render() {
25
- if (!empty($this->field['username']) && $this->field['username'] === true ) {
26
- $defaults = array(
27
- 'username'=>'',
28
- 'password'=>'',
29
- 'placeholder' => array('password'=>__( 'Password', 'redux-framework' ), 'username'=>__( 'Username', 'redux-framework' ))
30
- );
31
- $this->value = wp_parse_args( $this->value, $defaults );
32
- }
33
-
34
- if ( !empty($this->field['placeholder'] ) ) {
35
- if ( is_array( $this->field['placeholder'] ) && !empty( $this->field['placeholder']['password'] ) ) {
36
- $this->value['placeholder']['password'] = $this->field['placeholder']['password'];
37
- }
38
- if ( is_array( $this->field['placeholder'] ) && !empty( $this->field['placeholder']['username'] ) ) {
39
- $this->value['placeholder']['username'] = $this->field['placeholder']['username'];
40
- }
41
- } else {
42
- $this->value['placeholder']['password'] = $this->field['placeholder'];
43
- }
44
-
45
- if (!empty($this->field['username']) && $this->field['username'] === true ) {
46
- echo '<input type="input" autocomplete="off" placeholder="'.$this->value['placeholder']['username'].'" id="' . $this->field['id'] . '[username]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][username]" value="' . esc_attr($this->value['username']) . '" class="regular-text ' . $this->field['class'] . '" style="margin-right: 5px;" />';
47
- echo '<input type="password" autocomplete="off" placeholder="'.$this->value['placeholder']['password'].'" id="' . $this->field['id'] . '[password]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][password]" value="' . esc_attr($this->value['password']) . '" class="regular-text ' . $this->field['class'] . '" />';
48
- } else {
49
- echo '<input type="password" autocomplete="off" placeholder="'.$this->value['placeholder']['password'].'" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="' . esc_attr($this->value) . '" class="' . $this->field['class'] . '" />';
50
- }
51
-
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
1
  <?php
2
+ /**
3
+ * Class ReduxFramework_password
4
+ */
5
  class ReduxFramework_password {
6
 
7
+ /**
8
+ * Field Constructor.
9
+ * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
10
+ * @since ReduxFramework 1.0.1
11
+ */
12
+ function __construct( $field = array(), $value = '', $parent ) {
13
+ $this->field = $field;
14
+ $this->value = $value;
15
+ $this->args = $parent->args;
16
+ }
17
+
18
+ /**
19
+ * Field Render Function.
20
+ * Takes the vars and outputs the HTML for the field in the settings
21
+ * @since ReduxFramework 1.0.1
22
+ */
23
+ function render() {
24
+ if ( ! empty( $this->field['username'] ) && $this->field['username'] === true ) {
25
+ $this->_render_combined_field();
26
+ }
27
+ else {
28
+ $this->_render_single_field();
29
+ }
30
+ }
31
+
32
+ /**
33
+ * This will render a combined User/Password field
34
+ * @since ReduxFramework 3.0.9
35
+ * @example
36
+ * <code>
37
+ * array(
38
+ * 'id' => 'smtp_account',
39
+ * 'type' => 'password',
40
+ * 'username' => true,
41
+ * 'title' => 'SMTP Account',
42
+ * 'placeholder' => array('username' => 'Username')
43
+ * )
44
+ * </code>
45
+ */
46
+ private function _render_combined_field() {
47
+
48
+ $defaults = array(
49
+ 'username' => '',
50
+ 'password' => '',
51
+ 'placeholder' => array(
52
+ 'password' => __( 'Password', 'redux-framework' ),
53
+ 'username' => __( 'Username', 'redux-framework' )
54
+ )
55
+ );
56
+ $this->value = wp_parse_args( $this->value, $defaults );
57
+
58
+
59
+ if ( ! empty( $this->field['placeholder'] ) ) {
60
+ if ( is_array( $this->field['placeholder'] ) && ! empty( $this->field['placeholder']['password'] ) ) {
61
+ $this->value['placeholder']['password'] = $this->field['placeholder']['password'];
62
+ }
63
+ if ( is_array( $this->field['placeholder'] ) && ! empty( $this->field['placeholder']['username'] ) ) {
64
+ $this->value['placeholder']['username'] = $this->field['placeholder']['username'];
65
+ }
66
+ }
67
+ else {
68
+ $this->value['placeholder']['password'] = $this->field['placeholder'];
69
+ }
70
+
71
+ // Username field
72
+ echo '<input type="input" autocomplete="off" placeholder="' . $this->value['placeholder']['username'] . '" id="' . $this->field['id'] . '[username]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][username]" value="' . esc_attr( $this->value['username'] ) . '" class="regular-text ' . $this->field['class'] . '" />&nbsp;';
73
+
74
+ // Password field
75
+ echo '<input type="password" autocomplete="off" placeholder="' . $this->value['placeholder']['password'] . '" id="' . $this->field['id'] . '[password]" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][password]" value="' . esc_attr( $this->value['password'] ) . '" class="regular-text ' . $this->field['class'] . '" />';
76
+
77
+ }
78
+
79
+ /**
80
+ * This will render a single Password field
81
+ * @since ReduxFramework 3.0.9
82
+ * @example
83
+ * <code>
84
+ * array(
85
+ * 'id' => 'smtp_password',
86
+ * 'type' => 'password',
87
+ * 'title' => 'SMTP Password'
88
+ * )
89
+ * </code>
90
+ */
91
+ private function _render_single_field() {
92
+ echo '<input type="password" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="' . esc_attr( $this->value ) . '" class="regular-text ' . $this->field['class'] . '" />';
93
+ }
94
+
95
  }
ReduxCore/inc/fields/slides/field_slides.php CHANGED
@@ -130,7 +130,7 @@ if (!class_exists('ReduxFramework_slides')) {
130
  echo '<li><input type="hidden" class="slide-sort" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][sort]" id="' . $this->field['id'] . '-sort_' . $x . '" value="' . $slide['sort'] . '" />';
131
  echo '<li><input type="hidden" class="upload-id" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][attachment_id]" id="' . $this->field['id'] . '-image_id_' . $x . '" value="' . $slide['attachment_id'] . '" />';
132
  echo '<input type="hidden" class="upload-thumbnail" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][thumb]" id="' . $this->field['id'] . '-thumb_url_' . $x . '" value="' . $slide['thumb'] . '" readonly="readonly" />';
133
- echo '<input type="hidden" class="upload" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][url]" id="' . $this->field['id'] . '-image_url_' . $x . '" value="' . $slide['url'] . '" readonly="readonly" />';
134
  echo '<input type="hidden" class="upload-height" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][height]" id="' . $this->field['id'] . '-image_height_' . $x . '" value="' . $slide['height'] . '" />';
135
  echo '<input type="hidden" class="upload-width" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][width]" id="' . $this->field['id'] . '-image_width_' . $x . '" value="' . $slide['width'] . '" /></li>';
136
  echo '<li><a href="javascript:void(0);" class="button deletion redux-slides-remove">' . __('Delete Slide', 'redux-framework') . '</a></li>';
130
  echo '<li><input type="hidden" class="slide-sort" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][sort]" id="' . $this->field['id'] . '-sort_' . $x . '" value="' . $slide['sort'] . '" />';
131
  echo '<li><input type="hidden" class="upload-id" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][attachment_id]" id="' . $this->field['id'] . '-image_id_' . $x . '" value="' . $slide['attachment_id'] . '" />';
132
  echo '<input type="hidden" class="upload-thumbnail" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][thumb]" id="' . $this->field['id'] . '-thumb_url_' . $x . '" value="' . $slide['thumb'] . '" readonly="readonly" />';
133
+ echo '<input type="hidden" class="upload" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][image]" id="' . $this->field['id'] . '-image_url_' . $x . '" value="' . $slide['image'] . '" readonly="readonly" />';
134
  echo '<input type="hidden" class="upload-height" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][height]" id="' . $this->field['id'] . '-image_height_' . $x . '" value="' . $slide['height'] . '" />';
135
  echo '<input type="hidden" class="upload-width" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '][' . $x . '][width]" id="' . $this->field['id'] . '-image_width_' . $x . '" value="' . $slide['width'] . '" /></li>';
136
  echo '<li><a href="javascript:void(0);" class="button deletion redux-slides-remove">' . __('Delete Slide', 'redux-framework') . '</a></li>';
ReduxCore/inc/fields/sortable/field_sortable.php CHANGED
@@ -10,8 +10,8 @@ class ReduxFramework_sortable {
10
  */
11
  function __construct($field = array(), $value ='', $parent) {
12
  $this->field = $field;
13
- $this->value = $value;
14
- $this->args = $parent->args;
15
  }
16
 
17
  /**
@@ -23,13 +23,13 @@ class ReduxFramework_sortable {
23
  */
24
  function render() {
25
 
26
- if ( empty( $this->field['mode'] ) ) {
27
- $this->field['mode'] = "text";
28
- }
29
 
30
- if ( $this->field['mode'] != "checkbox" && $this->field['mode'] != "text" ) {
31
- $this->field['mode'] = "text";
32
- }
33
 
34
  $class = (isset($this->field['class'])) ? $this->field['class'] : '';
35
  $options = $this->field['options'];
@@ -71,11 +71,15 @@ class ReduxFramework_sortable {
71
  echo '<div class="checkbox-container">';
72
  }
73
  echo '<input rel="'.$this->field['id'].'-'.$k.'-hidden" class="' . $class . '" '.$checked.'type="'.$this->field['mode'].'" id="' . $this->field['id'] . '[' . $k . ']" name="'.$name.'" value="' . esc_attr($value_display) . '" placeholder="' . $nicename . '" />';
74
- if ( $this->field['mode'] == "checkbox") {
 
 
 
 
 
75
  echo '<label for="' . $this->field['id'] . '[' . $k . ']"><strong>' . $options[$k] . '</strong></label>';
76
 
77
  }
78
- echo '<span class="compact drag"><i class="icon-move icon-large"></i></span>';
79
  if ( $this->field['mode'] == "checkbox") {
80
  echo '</div>';
81
  }
@@ -96,12 +100,12 @@ class ReduxFramework_sortable {
96
  );
97
 
98
 
99
- wp_enqueue_style(
100
- 'redux-field-sortable-css',
101
- ReduxFramework::$_url.'inc/fields/sortable/field_sortable.css',
102
- time(),
103
- true
104
- );
105
 
106
  }
107
  }
10
  */
11
  function __construct($field = array(), $value ='', $parent) {
12
  $this->field = $field;
13
+ $this->value = $value;
14
+ $this->args = $parent->args;
15
  }
16
 
17
  /**
23
  */
24
  function render() {
25
 
26
+ if ( empty( $this->field['mode'] ) ) {
27
+ $this->field['mode'] = "text";
28
+ }
29
 
30
+ if ( $this->field['mode'] != "checkbox" && $this->field['mode'] != "text" ) {
31
+ $this->field['mode'] = "text";
32
+ }
33
 
34
  $class = (isset($this->field['class'])) ? $this->field['class'] : '';
35
  $options = $this->field['options'];
71
  echo '<div class="checkbox-container">';
72
  }
73
  echo '<input rel="'.$this->field['id'].'-'.$k.'-hidden" class="' . $class . '" '.$checked.'type="'.$this->field['mode'].'" id="' . $this->field['id'] . '[' . $k . ']" name="'.$name.'" value="' . esc_attr($value_display) . '" placeholder="' . $nicename . '" />';
74
+
75
+ echo '<span class="compact drag"><i class="icon-move icon-large"></i></span>';
76
+ if ( $this->field['mode'] == "checkbox" || (isset( $this->field['label'] ) && $this->field['label'] == true ) ) {
77
+ if ( $this->field['mode'] != "checkbox" ) {
78
+ echo "<br />";
79
+ }
80
  echo '<label for="' . $this->field['id'] . '[' . $k . ']"><strong>' . $options[$k] . '</strong></label>';
81
 
82
  }
 
83
  if ( $this->field['mode'] == "checkbox") {
84
  echo '</div>';
85
  }
100
  );
101
 
102
 
103
+ wp_enqueue_style(
104
+ 'redux-field-sortable-css',
105
+ ReduxFramework::$_url.'inc/fields/sortable/field_sortable.css',
106
+ time(),
107
+ true
108
+ );
109
 
110
  }
111
  }
ReduxCore/inc/tracking.php CHANGED
@@ -8,7 +8,7 @@ if ( !class_exists( 'ReduxFramework' ) ) {
8
  }
9
 
10
  /**
11
- * Class that creates the tracking functionality for WP SEO, as the core class might be used in more plugins,
12
  * it's checked for existence first.
13
  *
14
  * NOTE: this functionality is opt-in. Disabling the tracking in the settings or saying no when asked will cause
@@ -17,10 +17,14 @@ if ( !class_exists( 'ReduxFramework' ) ) {
17
 
18
 
19
  if ( !class_exists( 'Redux_Tracking' ) ) {
 
 
 
20
  class Redux_Tracking extends ReduxFramework {
21
 
22
  /**
23
  * Class constructor
 
24
  */
25
  function __construct($parent){
26
 
@@ -229,10 +233,14 @@ if ( !class_exists( 'Redux_Tracking' ) ) {
229
  'spam' => $comments_count->spam,
230
  'pings' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ),
231
  ),
232
- 'options' => apply_filters( 'Redux/Tracking/Filters', array() ),
233
  'theme' => $theme,
 
234
  'plugins' => $plugins,
235
  );
 
 
 
236
 
237
  $args = array(
238
  'body' => $data
@@ -248,7 +256,7 @@ if ( !class_exists( 'Redux_Tracking' ) ) {
248
 
249
 
250
  /**
251
- * Adds tracking parameters for WP SEO settings. Outside of the main class as the class could also be in use in other plugins.
252
  *
253
  * @param array $options
254
  * @return array
@@ -262,7 +270,7 @@ if ( !class_exists( 'Redux_Tracking' ) ) {
262
  return $options;
263
  }
264
 
265
- add_filter( 'Redux/Tracking/Filters', 'redux_tracking_additions' );
266
 
267
 
268
  function redux_allow_tracking_callback() {
8
  }
9
 
10
  /**
11
+ * Class that creates the tracking functionality for Redux, as the core class might be used in more plugins,
12
  * it's checked for existence first.
13
  *
14
  * NOTE: this functionality is opt-in. Disabling the tracking in the settings or saying no when asked will cause
17
 
18
 
19
  if ( !class_exists( 'Redux_Tracking' ) ) {
20
+ /**
21
+ * Class Redux_Tracking
22
+ */
23
  class Redux_Tracking extends ReduxFramework {
24
 
25
  /**
26
  * Class constructor
27
+ * @param ReduxFramework $parent
28
  */
29
  function __construct($parent){
30
 
233
  'spam' => $comments_count->spam,
234
  'pings' => $wpdb->get_var( "SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_type = 'pingback'" ),
235
  ),
236
+ 'options' => apply_filters( 'redux/tracking/options', array() ),
237
  'theme' => $theme,
238
+ 'developer'=> apply_filters( 'redux/tracking/developer', array() ),
239
  'plugins' => $plugins,
240
  );
241
+ if (empty($data['developer'])) {
242
+ unset($data['developer']);
243
+ }
244
 
245
  $args = array(
246
  'body' => $data
256
 
257
 
258
  /**
259
+ * Adds tracking parameters for Redux settings. Outside of the main class as the class could also be in use in other plugins.
260
  *
261
  * @param array $options
262
  * @return array
270
  return $options;
271
  }
272
 
273
+ add_filter( 'Redux/Tracking/Options', 'redux_tracking_additions' );
274
 
275
 
276
  function redux_allow_tracking_callback() {
ReduxCore/inc/validation/color_rgba/validation_color_rgba.php CHANGED
@@ -39,8 +39,8 @@ class Redux_Validation_color_rgba extends ReduxFramework {
39
  if (preg_match('/^[a-f0-9]{6}$/i', $color)) {
40
  $color = '#' . $color;
41
  }
42
-
43
- return $this->hex2rgba($color);
44
 
45
  }//function
46
 
39
  if (preg_match('/^[a-f0-9]{6}$/i', $color)) {
40
  $color = '#' . $color;
41
  }
42
+
43
+ return array('hex'=>$color, 'rgba'=>$this->hex2rgba($color));
44
 
45
  }//function
46
 
ReduxCore/languages/README.txt CHANGED
@@ -17,4 +17,5 @@ Special thanks to the following people for language translations
17
 
18
  German [de_DE] @Abu-Taymiyyah
19
  Bahasa Indonesia [id_ID] @riesurya
 
20
  Tirnovanuaurel [IT_it] [RO_ro] @tirnovanuaurel
17
 
18
  German [de_DE] @Abu-Taymiyyah
19
  Bahasa Indonesia [id_ID] @riesurya
20
+ Spanish [es_ES] @vertigo7x
21
  Tirnovanuaurel [IT_it] [RO_ro] @tirnovanuaurel
ReduxCore/languages/redux-framework-es_ES.mo ADDED
Binary file
ReduxCore/languages/redux-framework-es_ES.po ADDED
@@ -0,0 +1,864 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Redux Framework\n"
4
+ "POT-Creation-Date: 2013-11-05 23:52-0000\n"
5
+ "PO-Revision-Date: 2013-11-05 23:54-0000\n"
6
+ "Last-Translator: Dovy Paukstys <dovy@reduxframework.com>\n"
7
+ "Language-Team: ReduxFramework <language@reduxframework.com>\n"
8
+ "Language: en_US\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.7\n"
13
+ "X-Poedit-KeywordsList: __;_e;__ngettext;_n;__ngettext_noop;_n_noop;_x;_nx;"
14
+ "_nx_noop;_ex;esc_attr__;esc_attr_e;esc_attr_x;esc_html__;esc_html_e;"
15
+ "esc_html_x;_c;_nc\n"
16
+ "X-Poedit-Basepath: ../../\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "X-Poedit-SearchPath-0: ReduxCore\n"
20
+ "X-Poedit-SearchPath-1: ReduxCore/languages\n"
21
+ "X-Poedit-SearchPath-2: .\n"
22
+
23
+ #: ReduxCore/framework.php:109 ReduxCore/framework.php:115
24
+ #: ReduxCore/framework.php:255 ReduxCore/framework.php:257
25
+ msgid "Options"
26
+ msgstr "Opciones"
27
+
28
+ #: ReduxCore/framework.php:268
29
+ msgid "Options panel created using"
30
+ msgstr "Panel de opciones creado con"
31
+
32
+ #: ReduxCore/framework.php:268
33
+ msgid "Redux Framework"
34
+ msgstr "Redux Framework"
35
+
36
+ #: ReduxCore/framework.php:825 ReduxCore/framework.php:826
37
+ #: ReduxCore/framework.php:1693
38
+ msgid "Import / Export"
39
+ msgstr "Importar / Exportar"
40
+
41
+ #: ReduxCore/framework.php:847 ReduxCore/framework.php:848
42
+ #: ReduxCore/framework.php:1723 ReduxCore/framework.php:1830
43
+ msgid "Options Object"
44
+ msgstr "Objeto"
45
+
46
+ #: ReduxCore/framework.php:858 ReduxCore/framework.php:859
47
+ #: ReduxCore/framework.php:1737 ReduxCore/framework.php:1850
48
+ msgid "System Info"
49
+ msgstr "Información del sistema"
50
+
51
+ #: ReduxCore/framework.php:1030
52
+ #: ReduxCore/extensions/customizer/extension_customizer.php:311
53
+ #: ReduxCore/extensions/customizer/extension_customizer.php:342
54
+ msgid "You have changes that are not saved. Would you like to save them now?"
55
+ msgstr "Ha realizado cambios que no se han guardado. ¿Desea guardar ahora?"
56
+
57
+ #: ReduxCore/framework.php:1031
58
+ #: ReduxCore/extensions/customizer/extension_customizer.php:312
59
+ #: ReduxCore/extensions/customizer/extension_customizer.php:343
60
+ msgid "Are you sure? Resetting will loose all custom values."
61
+ msgstr ""
62
+ "¿Estas seguro? Al restablecer los valores por defecto se pierden los ajustes "
63
+ "realizados."
64
+
65
+ #: ReduxCore/framework.php:1032
66
+ #: ReduxCore/extensions/customizer/extension_customizer.php:313
67
+ #: ReduxCore/extensions/customizer/extension_customizer.php:344
68
+ msgid ""
69
+ "Your current options will be replaced with the values of this preset. Would "
70
+ "you like to proceed?"
71
+ msgstr ""
72
+ "Las opciones actuales serán reemplazadas por los ajustes de esta opción. "
73
+ "¿Seguro que desea proceder?"
74
+
75
+ #: ReduxCore/framework.php:1298
76
+ msgid "Default"
77
+ msgstr "Por defecto"
78
+
79
+ #: ReduxCore/framework.php:1567
80
+ msgid "Warning- This options panel will not work properly without javascript!"
81
+ msgstr ""
82
+ "Atención- ¡Este panel de control no funciona bien sin javascript activo!"
83
+
84
+ #: ReduxCore/framework.php:1620
85
+ msgid "Expand"
86
+ msgstr "Expandir"
87
+
88
+ #: ReduxCore/framework.php:1622 ReduxCore/framework.php:1879
89
+ msgid "Save Changes"
90
+ msgstr "Guardar cambios"
91
+
92
+ #: ReduxCore/framework.php:1624 ReduxCore/framework.php:1881
93
+ msgid "Reset to Defaults"
94
+ msgstr "Restablecer ajustes por defecto"
95
+
96
+ #: ReduxCore/framework.php:1627 ReduxCore/framework.php:1884
97
+ msgid "Working..."
98
+ msgstr "Trabajando..."
99
+
100
+ #: ReduxCore/framework.php:1634
101
+ msgid "Settings Imported!"
102
+ msgstr "¡Opciones importadas!"
103
+
104
+ #: ReduxCore/framework.php:1636
105
+ msgid "Settings Saved!"
106
+ msgstr "¡Opciones guardadas!"
107
+
108
+ #: ReduxCore/framework.php:1640
109
+ msgid "Settings have changed, you should save them!"
110
+ msgstr "Las opciones han cambiado, ¡debería guardarlas!"
111
+
112
+ #: ReduxCore/framework.php:1641
113
+ msgid "error(s) were found!"
114
+ msgstr "¡Se han encontrado errores!"
115
+
116
+ #: ReduxCore/framework.php:1642
117
+ msgid "warning(s) were found!"
118
+ msgstr "¡Advertencias encontradas!"
119
+
120
+ #: ReduxCore/framework.php:1774
121
+ msgid "Import / Export Options"
122
+ msgstr "Opciones de Importación / Exportación"
123
+
124
+ #: ReduxCore/framework.php:1775
125
+ msgid "Import Options"
126
+ msgstr "Opciones de Importación"
127
+
128
+ #: ReduxCore/framework.php:1776
129
+ msgid "Import from file"
130
+ msgstr "Importar desde archivo"
131
+
132
+ #: ReduxCore/framework.php:1776
133
+ msgid "Import from URL"
134
+ msgstr "Importar desde URL"
135
+
136
+ #: ReduxCore/framework.php:1781
137
+ msgid ""
138
+ "Input your backup file below and hit Import to restore your sites options "
139
+ "from a backup."
140
+ msgstr ""
141
+ "Seleccione su archivo de copia de seguridad y haga clic en Importar para "
142
+ "restaurar sus opciones desde el."
143
+
144
+ #: ReduxCore/framework.php:1791
145
+ msgid ""
146
+ "Input the URL to another sites options set and hit Import to load the "
147
+ "options from that site."
148
+ msgstr "Introduzca una URL desde la que importar sus opciones para este sitio."
149
+
150
+ #: ReduxCore/framework.php:1798
151
+ msgid "Import"
152
+ msgstr "Importar"
153
+
154
+ #: ReduxCore/framework.php:1798
155
+ msgid ""
156
+ "WARNING! This will overwrite all existing option values, please proceed with "
157
+ "caution!"
158
+ msgstr ""
159
+ "¡Atención! Esto sobreescribirá las opciones existentes. Proceda con cautela."
160
+
161
+ #: ReduxCore/framework.php:1801
162
+ msgid "Export Options"
163
+ msgstr "Opciones de Exportación"
164
+
165
+ #: ReduxCore/framework.php:1803
166
+ msgid ""
167
+ "Here you can copy/download your current option settings. Keep this safe as "
168
+ "you can use it as a backup should anything go wrong, or you can use it to "
169
+ "restore your settings on this site (or any other site)."
170
+ msgstr ""
171
+ "Desde aquí puede descargar sus opciones actuales. Tenga en cuenta que este "
172
+ "archivo puede ser utilizado como copia de seguridad por si algo sale mal. O "
173
+ "puede utilizar este archivo para utilizarlo en otro sitio."
174
+
175
+ #: ReduxCore/framework.php:1807
176
+ msgid "Copy"
177
+ msgstr "Copiar"
178
+
179
+ #: ReduxCore/framework.php:1807
180
+ msgid "Download"
181
+ msgstr "Descargar"
182
+
183
+ #: ReduxCore/framework.php:1807
184
+ msgid "Copy Link"
185
+ msgstr "Copiar enlace"
186
+
187
+ #: ReduxCore/framework.php:1839
188
+ msgid "Show Object in Javascript Console Object"
189
+ msgstr "Mostrar objeto en la Consola de Javascript"
190
+
191
+ #: ReduxCore/inc/tracking.php:58
192
+ msgid "Help improve Our Panel"
193
+ msgstr "Ayudanos a mejorar nuestro plugin"
194
+
195
+ #: ReduxCore/inc/tracking.php:59
196
+ msgid ""
197
+ "Please helps us improve our panel by allowing us to gather anonymous usage "
198
+ "stats so we know which configurations, plugins and themes to test with."
199
+ msgstr ""
200
+ "Por favor, ayúdanos a mejorar permitiéndonos obtener información anónima de "
201
+ "uso del plugin, de esa manera sabremos que configuraciones, plugins y temas "
202
+ "han sido probados con nuestro plugin "
203
+
204
+ #: ReduxCore/inc/tracking.php:64
205
+ msgid "Allow tracking"
206
+ msgstr "Permitir rastreo"
207
+
208
+ #: ReduxCore/inc/tracking.php:69
209
+ msgid "Do not allow tracking"
210
+ msgstr "No permitir rastreo"
211
+
212
+ #: ReduxCore/inc/fields/border/field_border.php:75
213
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:122
214
+ msgid "All"
215
+ msgstr "Todo"
216
+
217
+ #: ReduxCore/inc/fields/border/field_border.php:88
218
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:135
219
+ msgid "Top"
220
+ msgstr "Arriba"
221
+
222
+ #: ReduxCore/inc/fields/border/field_border.php:95
223
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:142
224
+ msgid "Right"
225
+ msgstr "Derecha"
226
+
227
+ #: ReduxCore/inc/fields/border/field_border.php:102
228
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:149
229
+ msgid "Bottom"
230
+ msgstr "Abajo"
231
+
232
+ #: ReduxCore/inc/fields/border/field_border.php:109
233
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:156
234
+ msgid "Left"
235
+ msgstr "Izquierda"
236
+
237
+ #: ReduxCore/inc/fields/border/field_border.php:125
238
+ msgid "Border style"
239
+ msgstr "Estilo del borde"
240
+
241
+ #: ReduxCore/inc/fields/color/field_color.php:72
242
+ #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:81
243
+ #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:91
244
+ msgid "Transparent"
245
+ msgstr "Transparente"
246
+
247
+ #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:73
248
+ msgid "From "
249
+ msgstr "Desde"
250
+
251
+ #: ReduxCore/inc/fields/color_gradient/field_color_gradient.php:84
252
+ msgid "To "
253
+ msgstr "Hasta"
254
+
255
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:85
256
+ msgid "Width"
257
+ msgstr "Ancho"
258
+
259
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:101
260
+ msgid "height"
261
+ msgstr "alto"
262
+
263
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:111
264
+ #: ReduxCore/inc/fields/dimensions/field_dimensions.php:112
265
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:167
266
+ #: ReduxCore/inc/fields/spacing/field_spacing.php:168
267
+ msgid "Units"
268
+ msgstr "Unidades"
269
+
270
+ #: ReduxCore/inc/fields/gallery/field_gallery.php:76
271
+ msgid "Add/Edit Gallery"
272
+ msgstr "Añadir/Editar Galería"
273
+
274
+ #: ReduxCore/inc/fields/gallery/field_gallery.php:77
275
+ msgid "Clear Gallery"
276
+ msgstr "Limpiar Galería"
277
+
278
+ #: ReduxCore/inc/fields/group/field_group.php:71
279
+ msgid "New"
280
+ msgstr "Nuevo"
281
+
282
+ #: ReduxCore/inc/fields/group/field_group.php:126
283
+ msgid "Delete"
284
+ msgstr "Borrar"
285
+
286
+ #: ReduxCore/inc/fields/group/field_group.php:131
287
+ msgid "Add"
288
+ msgstr "Añadir"
289
+
290
+ #: ReduxCore/inc/fields/link_color/field_link_color.php:84
291
+ msgid "Regular"
292
+ msgstr "Normal"
293
+
294
+ #: ReduxCore/inc/fields/link_color/field_link_color.php:90
295
+ msgid "Hover"
296
+ msgstr "Hover"
297
+
298
+ #: ReduxCore/inc/fields/link_color/field_link_color.php:96
299
+ msgid "Active"
300
+ msgstr "Activo"
301
+
302
+ #: ReduxCore/inc/fields/media/field_media.php:112
303
+ msgid "None media selected"
304
+ msgstr "Ningún archivo seleccionado"
305
+
306
+ #: ReduxCore/inc/fields/media/field_media.php:144
307
+ #: ReduxCore/inc/fields/slides/field_slides.php:116
308
+ #: ReduxCore/inc/fields/slides/field_slides.php:158
309
+ msgid "Upload"
310
+ msgstr "Enviar"
311
+
312
+ #: ReduxCore/inc/fields/media/field_media.php:150
313
+ #: ReduxCore/inc/fields/multi_text/field_multi_text.php:74
314
+ #: ReduxCore/inc/fields/multi_text/field_multi_text.php:77
315
+ #: ReduxCore/inc/fields/multi_text/field_multi_text.php:80
316
+ #: ReduxCore/inc/fields/slides/field_slides.php:122
317
+ #: ReduxCore/inc/fields/slides/field_slides.php:160
318
+ msgid "Remove"
319
+ msgstr "Borrar"
320
+
321
+ #: ReduxCore/inc/fields/multi_text/field_multi_text.php:52
322
+ msgid "Add More"
323
+ msgstr "Añadir más"
324
+
325
+ #: ReduxCore/inc/fields/password/field_password.php:29
326
+ msgid "Password"
327
+ msgstr "Contraseña"
328
+
329
+ #: ReduxCore/inc/fields/password/field_password.php:29
330
+ msgid "Username"
331
+ msgstr "Nombre de usuario"
332
+
333
+ #: ReduxCore/inc/fields/select/field_select.php:67
334
+ msgid "Select an item"
335
+ msgstr "Seleccionar un item"
336
+
337
+ #: ReduxCore/inc/fields/select/field_select.php:87
338
+ msgid "No items of this type were found."
339
+ msgstr "No se encontraron items de ese tipo."
340
+
341
+ #: ReduxCore/inc/fields/slides/field_slides.php:127
342
+ #: ReduxCore/inc/fields/slides/field_slides.php:165
343
+ msgid "Title"
344
+ msgstr "Título"
345
+
346
+ #: ReduxCore/inc/fields/slides/field_slides.php:128
347
+ #: ReduxCore/inc/fields/slides/field_slides.php:166
348
+ msgid "Description"
349
+ msgstr "Descripción"
350
+
351
+ #: ReduxCore/inc/fields/slides/field_slides.php:129
352
+ #: ReduxCore/inc/fields/slides/field_slides.php:167
353
+ msgid "URL"
354
+ msgstr ""
355
+
356
+ #: ReduxCore/inc/fields/slides/field_slides.php:136
357
+ #: ReduxCore/inc/fields/slides/field_slides.php:173
358
+ msgid "Delete Slide"
359
+ msgstr "Borrar slide"
360
+
361
+ #: ReduxCore/inc/fields/slides/field_slides.php:176
362
+ msgid "Add Slide"
363
+ msgstr "Añadir slide"
364
+
365
+ #: ReduxCore/inc/fields/typography/field_typography.php:104
366
+ msgid "Font family"
367
+ msgstr "Familia de la tipografía"
368
+
369
+ #: ReduxCore/inc/fields/typography/field_typography.php:107
370
+ msgid "Standard Fonts"
371
+ msgstr "Tipografías estándar"
372
+
373
+ #: ReduxCore/inc/fields/typography/field_typography.php:172
374
+ #: ReduxCore/inc/fields/typography/field_typography.php:176
375
+ msgid "Font style"
376
+ msgstr "Estilo de la tipografía"
377
+
378
+ #: ReduxCore/inc/fields/typography/field_typography.php:176
379
+ msgid "Style"
380
+ msgstr "Estilo"
381
+
382
+ #: ReduxCore/inc/fields/typography/field_typography.php:202
383
+ msgid "Font subsets"
384
+ msgstr "Subgrupos de tipografías"
385
+
386
+ #: ReduxCore/inc/fields/typography/field_typography.php:203
387
+ msgid "Subsets"
388
+ msgstr "Subgrupos"
389
+
390
+ #: ReduxCore/inc/fields/typography/field_typography.php:203
391
+ msgid "Font script"
392
+ msgstr "Script de tipografía"
393
+
394
+ #: ReduxCore/inc/fields/typography/field_typography.php:221
395
+ msgid "Size"
396
+ msgstr "Tamaño"
397
+
398
+ #: ReduxCore/inc/fields/typography/field_typography.php:230
399
+ msgid "Height"
400
+ msgstr "Alto"
401
+
402
+ #: ReduxCore/inc/fields/typography/field_typography.php:238
403
+ msgid "Word Spacing"
404
+ msgstr "Separación de palabras"
405
+
406
+ #: ReduxCore/inc/fields/typography/field_typography.php:246
407
+ msgid "Letter Spacing"
408
+ msgstr "Separación de letras"
409
+
410
+ #: ReduxCore/inc/fields/typography/field_typography.php:260
411
+ msgid "Backup Font Family"
412
+ msgstr "Copia de seguridad de familia de tipografías"
413
+
414
+ #: ReduxCore/inc/fields/typography/field_typography.php:280
415
+ msgid "Font color"
416
+ msgstr "Color de tipografía"
417
+
418
+ #: ReduxCore/inc/fields/typography/field_typography.php:520
419
+ msgid "Google Webfonts"
420
+ msgstr "Tipografías de Google"
421
+
422
+ #: ReduxCore/inc/validation/color/validation_color.php:15
423
+ #: ReduxCore/inc/validation/color_rgba/validation_color_rgba.php:15
424
+ msgid "This field must be a valid color value."
425
+ msgstr "Este campo debe ser un código de color válido."
426
+
427
+ #: ReduxCore/inc/validation/comma_numeric/validation_comma_numeric.php:15
428
+ msgid ""
429
+ "You must provide a comma separated list of numerical values for this option."
430
+ msgstr ""
431
+ "Debe proporcionar una lista de valores separados por comas para esta opción."
432
+
433
+ #: ReduxCore/inc/validation/date/validation_date.php:15
434
+ msgid "This field must be a valid date."
435
+ msgstr "Este campo debe ser una fecha válida."
436
+
437
+ #: ReduxCore/inc/validation/email/validation_email.php:15
438
+ msgid "You must provide a valid email for this option."
439
+ msgstr "Debe proporcionar un email válido para esta opción."
440
+
441
+ #: ReduxCore/inc/validation/no_html/validation_no_html.php:15
442
+ msgid ""
443
+ "You must not enter any HTML in this field, all HTML tags have been removed."
444
+ msgstr ""
445
+ "No escriba etiquetas HTML en este campo. Todo el HTML introducido será "
446
+ "eliminado."
447
+
448
+ #: ReduxCore/inc/validation/no_special_chars/validation_no_special_chars.php:15
449
+ msgid ""
450
+ "You must not enter any special characters in this field, all special "
451
+ "characters have been removed."
452
+ msgstr ""
453
+ "No introduzca ningún carácter especial en este campo. Todos los caracteres "
454
+ "especiales introducidos serán eliminados."
455
+
456
+ #: ReduxCore/inc/validation/numeric/validation_numeric.php:15
457
+ msgid "You must provide a numerical value for this option."
458
+ msgstr "Debe proporcionar un valor numérico para esta opción."
459
+
460
+ #: ReduxCore/inc/validation/url/validation_url.php:15
461
+ msgid "You must provide a valid URL for this option."
462
+ msgstr "Debe proporcionar una URL válida para esta opción."
463
+
464
+ #: class-redux-plugin.php:243
465
+ msgid "Redux Framework has an embedded demo."
466
+ msgstr "El Redux Framework incluye una demo."
467
+
468
+ #: class-redux-plugin.php:243
469
+ msgid "Click here to activate the sample config file."
470
+ msgstr "Haga clic aquí para activa la configuración de prueba."
471
+
472
+ #: class-redux-plugin.php:338
473
+ msgid "Deactivate Demo Mode"
474
+ msgstr "Desactivar modo demo."
475
+
476
+ #: class-redux-plugin.php:340
477
+ msgid "Activate Demo Mode"
478
+ msgstr "Activar modo demo"
479
+
480
+ #~ msgid "Border size"
481
+ #~ msgstr "Tamaño del borde"
482
+
483
+ #~ msgid "Customize &#8220;%s&#8221;"
484
+ #~ msgstr "Customizar &#8220;%s&#8221;"
485
+
486
+ #~ msgid "Current theme preview"
487
+ #~ msgstr "Previsualizar el tema actual"
488
+
489
+ #~ msgid "By %s"
490
+ #~ msgstr "Por %s"
491
+
492
+ #~ msgid "Version %s"
493
+ #~ msgstr "Versión %s"
494
+
495
+ #~ msgid "Tags"
496
+ #~ msgstr "Etiquetas"
497
+
498
+ #~ msgid ""
499
+ #~ "This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s."
500
+ #~ msgstr "Este <a href=\"%1$s\">tema hijo</a> requiere un tema padre, %2$s."
501
+
502
+ #~ msgid "Theme Information 1"
503
+ #~ msgstr "Información del tema 1"
504
+
505
+ #~ msgid "<p>This is the tab content, HTML is allowed.</p>"
506
+ #~ msgstr "Este es el contenido de la pestaña, se permite la inclusión de HTML"
507
+
508
+ #~ msgid "Theme Information 2"
509
+ #~ msgstr "Información del tema 2"
510
+
511
+ #~ msgid "<p>This is the sidebar content, HTML is allowed.</p>"
512
+ #~ msgstr ""
513
+ #~ "Este es el contenido de la barra lateral, se permite la inclusión de HTML"
514
+
515
+ #~ msgid ""
516
+ #~ "<p>Did you know that Redux sets a global variable for you? To access any "
517
+ #~ "of your saved options from within your code you can use your global "
518
+ #~ "variable: <strong>$"
519
+ #~ msgstr ""
520
+ #~ "<p>¿Sabía que Redux Framework crea una variable global por usted? Para "
521
+ #~ "acceder a cualquier opción, solo tiene que acceder a la variable: <strong>"
522
+ #~ "$"
523
+
524
+ #~ msgid ""
525
+ #~ "<p>This text is displayed above the options panel. It isn't required, but "
526
+ #~ "more info is always better! The intro_text field accepts all HTML.</p>"
527
+ #~ msgstr ""
528
+ #~ "<p>Este texto es mostrado por encima del panel de opciones. No es "
529
+ #~ "obligatorio, pero más información siempre es mejor. El campo "
530
+ #~ "<strong>intro_text</strong> acepta HTML.</p>"
531
+
532
+ #~ msgid ""
533
+ #~ "<p>This text is displayed below the options panel. It isn't required, but "
534
+ #~ "more info is always better! The footer_text field accepts all HTML.</p>"
535
+ #~ msgstr ""
536
+ #~ "<p>Este texto es mostrado por debajo del panel de opciones. No es "
537
+ #~ "obligatorio, pero más información siempre es mejor. El campo "
538
+ #~ "<strong>footer_text</strong> acepta HTML.</p>"
539
+
540
+ #~ msgid "Home Settings"
541
+ #~ msgstr "Inicio"
542
+
543
+ #~ msgid "Welcome to the Simple Options Framework Demo"
544
+ #~ msgstr "Bienvenidos a la demo de opciones simples del Framework"
545
+
546
+ #~ msgid ""
547
+ #~ "Redux Framework was created with the developer in mind. It allows for any "
548
+ #~ "theme developer to have an advanced theme panel with most of the features "
549
+ #~ "a developer would need. For more information check out the Github repo "
550
+ #~ "at: <a href=\"https://github.com/ReduxFramework/Redux-Framework\">https://"
551
+ #~ "github.com/ReduxFramework/Redux-Framework</a>"
552
+ #~ msgstr ""
553
+ #~ "Redux Framework ha sido creado pensando en los desarrolladores. Esto "
554
+ #~ "permite a cualquier desarrollador de temas tener un panel de opciones "
555
+ #~ "avanzadas con muchas características. Para más información visita el "
556
+ #~ "repositorio de Github en: <a href=\"https://github.com/ReduxFramework/"
557
+ #~ "Redux-Framework\">https://github.com/ReduxFramework/Redux-Framework</a>"
558
+
559
+ #~ msgid "Media w/ URL"
560
+ #~ msgstr "Medios con URL"
561
+
562
+ #~ msgid "Basic media uploader with disabled URL input field."
563
+ #~ msgstr "Cargador de medios básico con el campo de URL desactivado."
564
+
565
+ #~ msgid "Upload any media using the Wordpress native uploader"
566
+ #~ msgstr ""
567
+ #~ "Carga cualquier medio usando el cargador de medios nativo de Wordpress"
568
+
569
+ #~ msgid "Media w/o URL"
570
+ #~ msgstr "Medios sin URL"
571
+
572
+ #~ msgid ""
573
+ #~ "This represents the minimalistic view. It does not have the preview box "
574
+ #~ "or the display URL in an input box. "
575
+ #~ msgstr ""
576
+ #~ "Esto representa la vista mínima. No dispone de una caja de "
577
+ #~ "previsualización o muestra de URL en un campo."
578
+
579
+ #~ msgid "Media No Preview"
580
+ #~ msgstr "Medio sin previsualización"
581
+
582
+ #~ msgid ""
583
+ #~ "Create a new Gallery by selecting existing or uploading new images using "
584
+ #~ "the Wordpress native uploader"
585
+ #~ msgstr ""
586
+ #~ "Crea una Galería seleccionando imágenes existentes o cargándolas usando "
587
+ #~ "el cargador de medios nativo de Wordpress"
588
+
589
+ #~ msgid "This is the description field, again good for additional info."
590
+ #~ msgstr "Este es el campo de descripción, bueno para información adicional."
591
+
592
+ #~ msgid "JQuery UI Slider Example 1"
593
+ #~ msgstr "JQuery UI Slider Ejemplo 1"
594
+
595
+ #~ msgid ""
596
+ #~ "JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45"
597
+ #~ msgstr ""
598
+ #~ "Descripción JQuery UI slider. mín:1, más: 500, salto: 3, valor por "
599
+ #~ "defecto: 45"
600
+
601
+ #~ msgid "JQuery UI Slider Example 2 w/ Steps (5)"
602
+ #~ msgstr "Ejemplo de JQuery UI Slider 2 con saltos (5)"
603
+
604
+ #~ msgid ""
605
+ #~ "JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75"
606
+ #~ msgstr ""
607
+ #~ "Descripción JQuery UI slider. mín:1, máx: 300, salto: 5, valor por "
608
+ #~ "defecto: 75"
609
+
610
+ #~ msgid "JQuery UI Spinner Example 1"
611
+ #~ msgstr "Ejemplo 1 de Selector JQuery UI"
612
+
613
+ #~ msgid ""
614
+ #~ "JQuery UI spinner description. Min:20, max: 100, step:20, default value: "
615
+ #~ "40"
616
+ #~ msgstr ""
617
+ #~ "Descripción Selector de JQuery UI. mín: 20, máx:100, salto: 20, valor por "
618
+ #~ "defecto: 40"
619
+
620
+ #~ msgid "Switch On"
621
+ #~ msgstr "Activar"
622
+
623
+ #~ msgid "Look, it's on!"
624
+ #~ msgstr "¡Esta activo!"
625
+
626
+ #~ msgid "Switch Off"
627
+ #~ msgstr "Desactivar"
628
+
629
+ #~ msgid "Switch - Custom Titles"
630
+ #~ msgstr "Interruptor- Títulos personalizados"
631
+
632
+ #~ msgid "Look, it's on! Also hidden child elements!"
633
+ #~ msgstr "¡Activado! Se ocultan los elementos hijo"
634
+
635
+ #~ msgid "Switch - With Hidden Items (NESTED!)"
636
+ #~ msgstr "Interruptor - Con elementos ocultos (ANIDADOS)"
637
+
638
+ #~ msgid "Also called a \"fold\" parent."
639
+ #~ msgstr "También se conocido como padre \"fold\""
640
+
641
+ #~ msgid ""
642
+ #~ "Items set with a fold to this ID will hide unless this is set to the "
643
+ #~ "appropriate value."
644
+ #~ msgstr ""
645
+ #~ "Los elementos con un fold para este ID estarán ocultos a menos que se "
646
+ #~ "seleccione un valor apropiado"
647
+
648
+ #~ msgid "Images Option (with pattern=>true)"
649
+ #~ msgstr "Opción de Imágenes (con pattern=>true)"
650
+
651
+ #~ msgid "Select a background pattern."
652
+ #~ msgstr "Selecciona un patrón para el fondo"
653
+
654
+ #, fuzzy
655
+ #~ msgid "Slides Options"
656
+ #~ msgstr "Opciones"
657
+
658
+ #~ msgid "Unlimited slides with drag and drop sortings."
659
+ #~ msgstr "Slides ilimitados con ordenación por arrastrar y soltar."
660
+
661
+ #~ msgid ""
662
+ #~ "This field will store all slides values into a multidimensional array to "
663
+ #~ "use into a foreach loop."
664
+ #~ msgstr ""
665
+ #~ "Este campo guardará todas las slides en array multidimensional para "
666
+ #~ "usarlo en un bucle foreach"
667
+
668
+ #~ msgid "Preset"
669
+ #~ msgstr "Preselección"
670
+
671
+ #~ msgid ""
672
+ #~ "This allows you to set a json string or array to override multiple "
673
+ #~ "preferences in your theme."
674
+ #~ msgstr ""
675
+ #~ "Esto le permite crear una cadena json o un array para saltase multiples "
676
+ #~ "preferencias en su tema de Wordpress."
677
+
678
+ #~ msgid "Typography"
679
+ #~ msgstr "Tipografía"
680
+
681
+ #~ msgid "Typography option with each property can be called individually."
682
+ #~ msgstr "Las opciones de tipografía pueden usarse individualmente."
683
+
684
+ #~ msgid "General Settings"
685
+ #~ msgstr "Ajustes generales"
686
+
687
+ #~ msgid "Main Layout"
688
+ #~ msgstr "Estructura principal"
689
+
690
+ #~ msgid ""
691
+ #~ "Select main content and sidebar alignment. Choose between 1, 2 or 3 "
692
+ #~ "column layout."
693
+ #~ msgstr ""
694
+ #~ "Seleccione la alineación para la barra lateral. A escoger entre 1, 2 o 3 "
695
+ #~ "columnas."
696
+
697
+ #~ msgid "Tracking Code"
698
+ #~ msgstr "Código de seguimiento"
699
+
700
+ #~ msgid ""
701
+ #~ "Paste your Google Analytics (or other) tracking code here. This will be "
702
+ #~ "added into the footer template of your theme."
703
+ #~ msgstr ""
704
+ #~ "Pegue aquí su código de seguimiento de Google Analytics (u otro). Este "
705
+ #~ "código se añadirá al píe de página de su tema de Wordpress."
706
+
707
+ #~ msgid "CSS Code"
708
+ #~ msgstr "Código CSS"
709
+
710
+ #~ msgid "Paste your CSS code here."
711
+ #~ msgstr "Pegue su código CSS aquí."
712
+
713
+ #~ msgid "JS Code"
714
+ #~ msgstr "Código Javascript"
715
+
716
+ #~ msgid "Paste your JS code here."
717
+ #~ msgstr "Pegue su código Javascript aquí."
718
+
719
+ #~ msgid "Footer Text"
720
+ #~ msgstr "Texto en el píe de página"
721
+
722
+ #~ msgid ""
723
+ #~ "You can use the following shortcodes in your footer text: [wp-url] [site-"
724
+ #~ "url] [theme-url] [login-url] [logout-url] [site-title] [site-tagline] "
725
+ #~ "[current-year]"
726
+ #~ msgstr ""
727
+ #~ "Puede usar los siguientes shortcodes en el texto de píe de página: [wp-"
728
+ #~ "url] [site-url] [theme-url] [login-url] [logout-url] [site-title] [site-"
729
+ #~ "tagline] [current-year]"
730
+
731
+ #, fuzzy
732
+ #~ msgid "Styling Options"
733
+ #~ msgstr "Opciones"
734
+
735
+ #~ msgid "Theme Stylesheet"
736
+ #~ msgstr "Hoja de estilos del tema"
737
+
738
+ #~ msgid "Select your themes alternative color scheme."
739
+ #~ msgstr "Seleccione el esquema de colores alternativo de su tema"
740
+
741
+ #~ msgid "Body Background Color"
742
+ #~ msgstr "Color de fondo del body"
743
+
744
+ #~ msgid "Pick a background color for the theme (default: #fff)."
745
+ #~ msgstr "Seleccione un color de fondo para el tema (por defecto: #fff)"
746
+
747
+ #~ msgid "Footer Background Color"
748
+ #~ msgstr "Color de fondo del píe de página"
749
+
750
+ #~ msgid "Pick a background color for the footer (default: #dd9933)."
751
+ #~ msgstr ""
752
+ #~ "Selección de color de fondo para el píe de página (por defecto: #dd9933)."
753
+
754
+ #~ msgid "Header Gradient Color Option"
755
+ #~ msgstr "Opciones de color del degradado de la cabecera"
756
+
757
+ #~ msgid "Only color validation can be done on this field type"
758
+ #~ msgstr "Sólo puede validarse un código de color en este campo"
759
+
760
+ #~ msgid "Links Color Option"
761
+ #~ msgstr "Opciones de color de enlaces"
762
+
763
+ #~ msgid "Header Border Option"
764
+ #~ msgstr "Opciones de borde de la cabecera"
765
+
766
+ #~ msgid "Padding/Margin Option"
767
+ #~ msgstr "Opciones de Padding / Margin"
768
+
769
+ #~ msgid "Allow your users to choose the spacing or margin they want."
770
+ #~ msgstr "Permite a los usuarios elegir el espaciado o márgenes que quieran"
771
+
772
+ #~ msgid ""
773
+ #~ "You can enable or diable any piece of this field. Top, Right, Bottom, "
774
+ #~ "Left, or Units."
775
+ #~ msgstr ""
776
+ #~ "Puedes activar o desactivar cualquier parte de este campo. Arriba, "
777
+ #~ "derecha, abajo, izquierda o unidades."
778
+
779
+ #~ msgid "Dimensions (Width/Height) Option"
780
+ #~ msgstr "Opciones de dimensión (Ancho/Alto) "
781
+
782
+ #~ msgid "Allow your users to choose width, height, and/or unit."
783
+ #~ msgstr "Permite a los usuarios seleccionar ancho, alto y/o unidades."
784
+
785
+ #~ msgid ""
786
+ #~ "You can enable or diable any piece of this field. Width, Height, or Units."
787
+ #~ msgstr ""
788
+ #~ "Puede desactivar cualquier parte de este campo. Ancho, alto o unidades."
789
+
790
+ #~ msgid "Body Font"
791
+ #~ msgstr "Tipografía de Body"
792
+
793
+ #~ msgid "Specify the body font properties."
794
+ #~ msgstr "Especifica la propiedad font para el body."
795
+
796
+ #~ msgid "Custom CSS"
797
+ #~ msgstr "CSS Personalizados"
798
+
799
+ #~ msgid "Quickly add some CSS to your theme by adding it to this block."
800
+ #~ msgstr "Añada rápidamente código CSS a su tema desde este campo."
801
+
802
+ #, fuzzy
803
+ #~ msgid "This field is even CSS validated!"
804
+ #~ msgstr "Este campo debe ser una fecha válida."
805
+
806
+ #~ msgid "Field Validation"
807
+ #~ msgstr "Validación del campo"
808
+
809
+ #~ msgid ""
810
+ #~ "<p class=\"description\">This is the Description. Again HTML is allowed2</"
811
+ #~ "p>"
812
+ #~ msgstr ""
813
+ #~ "<p class=\"description\">Esta es la descripción. Se permite HTML</p>"
814
+
815
+ #~ msgid "Text Option - Email Validated"
816
+ #~ msgstr "Opción de texto - Email válido"
817
+
818
+ #~ msgid ""
819
+ #~ "This is a little space under the Field Title in the Options table, "
820
+ #~ "additonal info is good in here."
821
+ #~ msgstr ""
822
+ #~ "Este es un pequeño espacio bajo el campo de título. Se puede añadir "
823
+ #~ "información adicional aquí."
824
+
825
+ #~ msgid "Multi Text Option"
826
+ #~ msgstr "Opción de texto múltiple"
827
+
828
+ #, fuzzy
829
+ #~ msgid "This must be a URL."
830
+ #~ msgstr "Este campo debe ser una fecha válida."
831
+
832
+ #, fuzzy
833
+ #~ msgid "This must be a comma seperated string of numerical values."
834
+ #~ msgstr ""
835
+ #~ "Debe proporcionar una lista de valores separados por comas para esta "
836
+ #~ "opción."
837
+
838
+ #, fuzzy
839
+ #~ msgid "This must be a alpha numeric only."
840
+ #~ msgstr "Este campo debe ser una fecha válida."
841
+
842
+ #, fuzzy
843
+ #~ msgid "Radio Option"
844
+ #~ msgstr "Opciones"
845
+
846
+ #, fuzzy
847
+ #~ msgid "Images Option"
848
+ #~ msgstr "Opciones de Importación"
849
+
850
+ #, fuzzy
851
+ #~ msgid "Sortable Text Option"
852
+ #~ msgstr "Opciones de Importación / Exportación"
853
+
854
+ #, fuzzy
855
+ #~ msgid "Select Fields"
856
+ #~ msgstr "Seleccionar un item"
857
+
858
+ #, fuzzy
859
+ #~ msgid "Select Option"
860
+ #~ msgstr "Opciones"
861
+
862
+ #, fuzzy
863
+ #~ msgid "Date Option"
864
+ #~ msgstr "Opciones"
class-redux-plugin.php CHANGED
@@ -17,8 +17,7 @@
17
  * @package ReduxFrameworkPlugin
18
  * @author Dovy Paukstys <info@simplerain.com>
19
  */
20
- /** @noinspection PhpUndefinedClassInspection */
21
- /** @noinspection PhpUndefinedClassInspection */
22
  class ReduxFrameworkPlugin {
23
 
24
  /**
@@ -223,13 +222,14 @@ class ReduxFrameworkPlugin {
223
  * @return array|false The blog ids, false if no matches.
224
  */
225
  private static function get_blog_ids() {
 
226
  global $wpdb;
227
 
228
  // get an array of blog ids
229
  $sql = "SELECT blog_id FROM $wpdb->blogs
230
  WHERE archived = '0' AND spam = '0'
231
  AND deleted = '0'";
232
- /** @noinspection PhpUndefinedMethodInspection */
233
  return $wpdb->get_col( $sql );
234
  }
235
 
@@ -309,6 +309,12 @@ class ReduxFrameworkPlugin {
309
  */
310
  }
311
 
 
 
 
 
 
 
312
  function plugin_meta_links( $links, $file ) {
313
  if ( strpos($file,'redux-framework.php') === false ) {
314
  return $links;
@@ -327,6 +333,12 @@ class ReduxFrameworkPlugin {
327
 
328
  }
329
 
 
 
 
 
 
 
330
  function plugin_meta_demo_mode_link( $links, $file ) {
331
  if ( strpos($file,'redux-framework.php') === false ) {
332
  return $links;
17
  * @package ReduxFrameworkPlugin
18
  * @author Dovy Paukstys <info@simplerain.com>
19
  */
20
+
 
21
  class ReduxFrameworkPlugin {
22
 
23
  /**
222
  * @return array|false The blog ids, false if no matches.
223
  */
224
  private static function get_blog_ids() {
225
+ /** @global wpdb $wpdb */
226
  global $wpdb;
227
 
228
  // get an array of blog ids
229
  $sql = "SELECT blog_id FROM $wpdb->blogs
230
  WHERE archived = '0' AND spam = '0'
231
  AND deleted = '0'";
232
+
233
  return $wpdb->get_col( $sql );
234
  }
235
 
309
  */
310
  }
311
 
312
+ /**
313
+ * @param array $links
314
+ * @param string $file
315
+ * @return array
316
+ * @wp-hook plugin_row_meta
317
+ */
318
  function plugin_meta_links( $links, $file ) {
319
  if ( strpos($file,'redux-framework.php') === false ) {
320
  return $links;
333
 
334
  }
335
 
336
+ /**
337
+ * @param array $links
338
+ * @param string $file
339
+ * @return array
340
+ * @wp-hook plugin_row_meta
341
+ */
342
  function plugin_meta_demo_mode_link( $links, $file ) {
343
  if ( strpos($file,'redux-framework.php') === false ) {
344
  return $links;
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.8
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.9
20
  * Author: Redux Team
21
  * Author URI: http://reduxframework.com
22
  * Text Domain: redux-framework
sample/sample-config.php CHANGED
@@ -68,8 +68,9 @@ $item_info = ob_get_contents();
68
 
69
  ob_end_clean();
70
 
71
-
72
  if( file_exists( dirname(__FILE__).'/info-html.html' )) {
 
73
  global $wp_filesystem;
74
  if (empty($wp_filesystem)) {
75
  require_once(ABSPATH .'/wp-admin/includes/file.php');
@@ -160,6 +161,13 @@ $args['share_icons']['linked_in'] = array(
160
  // Default: null
161
  $args['import_icon_class'] = 'icon-large';
162
 
 
 
 
 
 
 
 
163
  // Set a custom menu icon.
164
  //$args['menu_icon'] = '';
165
 
@@ -231,7 +239,7 @@ if (!isset($args['global_variable']) || $args['global_variable'] !== false ) {
231
  } else {
232
  $v = str_replace("-", "_", $args['opt_name']);
233
  }
234
- $args['intro_text'] = __('<p>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$'.$v.'</strong></p>', 'redux-framework-demo');
235
  } else {
236
  $args['intro_text'] = __('<p>This text is displayed above the options panel. It isn\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'redux-framework-demo');
237
  }
@@ -446,7 +454,8 @@ $sections[] = array(
446
  'default'=> array(
447
  'color'=>"#333",
448
  'font-style'=>'700',
449
- 'font-family'=>'Courier, monospace',
 
450
  'font-size'=>'33px',
451
  'line-height'=>'40'),
452
  ),
@@ -523,7 +532,13 @@ $sections[] = array(
523
  'subtitle' => __('You can use the following shortcodes in your footer text: [wp-url] [site-url] [theme-url] [login-url] [logout-url] [site-title] [site-tagline] [current-year]', 'redux-framework-demo'),
524
  'default' => 'Powered by [wp-url]. Built on the [theme-url].',
525
  ),
526
-
 
 
 
 
 
 
527
  )
528
  );
529
 
@@ -586,7 +601,7 @@ $sections[] = array(
586
  'subtitle' => __('Only color validation can be done on this field type', 'redux-framework-demo'),
587
  'output' => array('.site-header'), // An array of CSS selectors to apply this font style to
588
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
589
- 'default' => array('color' => '#1e73be', 'style' => 'solid', 'width'=>'3')
590
  ),
591
  array(
592
  'id'=>'spacing',
@@ -597,8 +612,8 @@ $sections[] = array(
597
  //'units_extended' => 'true', // Allow users to select any type of unit
598
  'title' => __('Padding/Margin Option', 'redux-framework-demo'),
599
  'subtitle' => __('Allow your users to choose the spacing or margin they want.', 'redux-framework-demo'),
600
- 'desc' => __('You can enable or diable any piece of this field. Top, Right, Bottom, Left, or Units.', 'redux-framework-demo'),
601
- 'default' => array('top' => 5, 'bottom' => 6, 'left'=>2, 'right'=>4)
602
  ),
603
  array(
604
  'id'=>'dimensions',
@@ -607,7 +622,7 @@ $sections[] = array(
607
  //'units_extended' => 'true', // Allow users to select any type of unit
608
  'title' => __('Dimensions (Width/Height) Option', 'redux-framework-demo'),
609
  'subtitle' => __('Allow your users to choose width, height, and/or unit.', 'redux-framework-demo'),
610
- 'desc' => __('You can enable or diable any piece of this field. Width, Height, or Units.', 'redux-framework-demo'),
611
  'default' => array('width' => 200, 'height'=>'100', )
612
  ),
613
  array(
@@ -644,7 +659,7 @@ $sections[] = array(
644
  'id'=>'2',
645
  'type' => 'text',
646
  'title' => __('Text Option - Email Validated', 'redux-framework-demo'),
647
- 'subtitle' => __('This is a little space under the Field Title in the Options table, additonal info is good in here.', 'redux-framework-demo'),
648
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
649
  'validate' => 'email',
650
  'msg' => 'custom error message',
@@ -654,7 +669,7 @@ $sections[] = array(
654
  'id'=>'multi_text',
655
  'type' => 'multi_text',
656
  'title' => __('Multi Text Option', 'redux-framework-demo'),
657
- 'subtitle' => __('This is a little space under the Field Title in the Options table, additonal info is good in here.', 'redux-framework-demo'),
658
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo')
659
  ),
660
  array(
@@ -680,7 +695,7 @@ $sections[] = array(
680
  'id'=>'comma_numeric',
681
  'type' => 'text',
682
  'title' => __('Text Option - Comma Numeric Validated', 'redux-framework-demo'),
683
- 'subtitle' => __('This must be a comma seperated string of numerical values.', 'redux-framework-demo'),
684
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
685
  'validate' => 'comma_numeric',
686
  'default' => '0',
@@ -784,7 +799,7 @@ $sections[] = array(
784
  'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
785
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
786
  'options' => array('1' => 'Opt 1','2' => 'Opt 2','3' => 'Opt 3'),//Must provide key => value pairs for multi checkbox options
787
- 'default' => array('1' => '1', '2' => '0', '3' => '0')//See how std has changed? you also dont need to specify opts that are 0.
788
  ),
789
  array(
790
  'id'=>'checkbox-data',
@@ -1126,7 +1141,7 @@ $sections[] = array(
1126
  ),
1127
  array(
1128
  'id'=>"custom_callback",
1129
- //'type' => 'nothing',//doesnt need to be called for callback fields
1130
  'title' => __('Custom Field Callback', 'redux-framework-demo'),
1131
  'subtitle' => __('This is a completely unique field type', 'redux-framework-demo'),
1132
  'desc' => __('This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'redux-framework-demo'),
@@ -1135,7 +1150,7 @@ $sections[] = array(
1135
 
1136
  array(
1137
  'id'=>"group",
1138
- 'type' => 'group',//doesnt need to be called for callback fields
1139
  'title' => __('Group', 'redux-framework-demo'),
1140
  'subtitle' => __('Group any items together.', 'redux-framework-demo'),
1141
  'desc' => __('No limit as to what you can group. Just don\'t try to group a group.', 'redux-framework-demo'),
@@ -1198,7 +1213,7 @@ $ReduxFramework = new ReduxFramework($sections, $args, $tabs);
1198
  Custom function for filtering the sections array. Good for child themes to override or add to the sections.
1199
  Simply include this function in the child themes functions.php file.
1200
 
1201
- NOTE: the defined constansts for URLs, and directories will NOT be available at this point in a child theme,
1202
  so you must use get_template_directory_uri() if you want to use any of the built in icons
1203
 
1204
  **/
@@ -1257,7 +1272,7 @@ function validate_callback_function($field, $value, $existing_value) {
1257
 
1258
  if(something) {
1259
  $value = $value;
1260
- } elseif(somthing else) {
1261
  $error = true;
1262
  $value = $existing_value;
1263
  $field['msg'] = 'your custom error message';
68
 
69
  ob_end_clean();
70
 
71
+ $sampleHTML = '';
72
  if( file_exists( dirname(__FILE__).'/info-html.html' )) {
73
+ /** @global WP_Filesystem_Direct $wp_filesystem */
74
  global $wp_filesystem;
75
  if (empty($wp_filesystem)) {
76
  require_once(ABSPATH .'/wp-admin/includes/file.php');
161
  // Default: null
162
  $args['import_icon_class'] = 'icon-large';
163
 
164
+ /**
165
+ * Set default icon class for all sections and tabs
166
+ * @since 3.0.9
167
+ */
168
+ $args['default_icon_class'] = 'icon-large';
169
+
170
+
171
  // Set a custom menu icon.
172
  //$args['menu_icon'] = '';
173
 
239
  } else {
240
  $v = str_replace("-", "_", $args['opt_name']);
241
  }
242
+ $args['intro_text'] = sprintf( __('<p>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$%1$s</strong></p>', 'redux-framework-demo' ), $v );
243
  } else {
244
  $args['intro_text'] = __('<p>This text is displayed above the options panel. It isn\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'redux-framework-demo');
245
  }
454
  'default'=> array(
455
  'color'=>"#333",
456
  'font-style'=>'700',
457
+ 'font-family'=>'Abel',
458
+ 'google' => true,
459
  'font-size'=>'33px',
460
  'line-height'=>'40'),
461
  ),
532
  'subtitle' => __('You can use the following shortcodes in your footer text: [wp-url] [site-url] [theme-url] [login-url] [logout-url] [site-title] [site-tagline] [current-year]', 'redux-framework-demo'),
533
  'default' => 'Powered by [wp-url]. Built on the [theme-url].',
534
  ),
535
+ array(
536
+ 'id' => 'password',
537
+ 'type' => 'password',
538
+ 'username' => true,
539
+ 'title' => 'SMTP Account',
540
+ //'placeholder' => array('username' => 'Enter your Username')
541
+ )
542
  )
543
  );
544
 
601
  'subtitle' => __('Only color validation can be done on this field type', 'redux-framework-demo'),
602
  'output' => array('.site-header'), // An array of CSS selectors to apply this font style to
603
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
604
+ 'default' => array('border-color' => '#1e73be', 'border-style' => 'solid', 'border-top'=>'3px', 'border-right'=>'3px', 'border-bottom'=>'3px', 'border-left'=>'3px')
605
  ),
606
  array(
607
  'id'=>'spacing',
612
  //'units_extended' => 'true', // Allow users to select any type of unit
613
  'title' => __('Padding/Margin Option', 'redux-framework-demo'),
614
  'subtitle' => __('Allow your users to choose the spacing or margin they want.', 'redux-framework-demo'),
615
+ 'desc' => __('You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'redux-framework-demo'),
616
+ 'default' => array('margin-top' => '1px', 'margin-right'=>"2px", 'margin-bottom' => '3px', 'margin-left'=>'4px' )
617
  ),
618
  array(
619
  'id'=>'dimensions',
622
  //'units_extended' => 'true', // Allow users to select any type of unit
623
  'title' => __('Dimensions (Width/Height) Option', 'redux-framework-demo'),
624
  'subtitle' => __('Allow your users to choose width, height, and/or unit.', 'redux-framework-demo'),
625
+ 'desc' => __('You can enable or disable any piece of this field. Width, Height, or Units.', 'redux-framework-demo'),
626
  'default' => array('width' => 200, 'height'=>'100', )
627
  ),
628
  array(
659
  'id'=>'2',
660
  'type' => 'text',
661
  'title' => __('Text Option - Email Validated', 'redux-framework-demo'),
662
+ 'subtitle' => __('This is a little space under the Field Title in the Options table, additional info is good in here.', 'redux-framework-demo'),
663
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
664
  'validate' => 'email',
665
  'msg' => 'custom error message',
669
  'id'=>'multi_text',
670
  'type' => 'multi_text',
671
  'title' => __('Multi Text Option', 'redux-framework-demo'),
672
+ 'subtitle' => __('This is a little space under the Field Title in the Options table, additional info is good in here.', 'redux-framework-demo'),
673
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo')
674
  ),
675
  array(
695
  'id'=>'comma_numeric',
696
  'type' => 'text',
697
  'title' => __('Text Option - Comma Numeric Validated', 'redux-framework-demo'),
698
+ 'subtitle' => __('This must be a comma separated string of numerical values.', 'redux-framework-demo'),
699
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
700
  'validate' => 'comma_numeric',
701
  'default' => '0',
799
  'subtitle' => __('No validation can be done on this field type', 'redux-framework-demo'),
800
  'desc' => __('This is the description field, again good for additional info.', 'redux-framework-demo'),
801
  'options' => array('1' => 'Opt 1','2' => 'Opt 2','3' => 'Opt 3'),//Must provide key => value pairs for multi checkbox options
802
+ 'default' => array('1' => '1', '2' => '0', '3' => '0')//See how std has changed? you also don't need to specify opts that are 0.
803
  ),
804
  array(
805
  'id'=>'checkbox-data',
1141
  ),
1142
  array(
1143
  'id'=>"custom_callback",
1144
+ //'type' => 'nothing',//doesn't need to be called for callback fields
1145
  'title' => __('Custom Field Callback', 'redux-framework-demo'),
1146
  'subtitle' => __('This is a completely unique field type', 'redux-framework-demo'),
1147
  'desc' => __('This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'redux-framework-demo'),
1150
 
1151
  array(
1152
  'id'=>"group",
1153
+ 'type' => 'group',//doesn't need to be called for callback fields
1154
  'title' => __('Group', 'redux-framework-demo'),
1155
  'subtitle' => __('Group any items together.', 'redux-framework-demo'),
1156
  'desc' => __('No limit as to what you can group. Just don\'t try to group a group.', 'redux-framework-demo'),
1213
  Custom function for filtering the sections array. Good for child themes to override or add to the sections.
1214
  Simply include this function in the child themes functions.php file.
1215
 
1216
+ NOTE: the defined constants for URLs, and directories will NOT be available at this point in a child theme,
1217
  so you must use get_template_directory_uri() if you want to use any of the built in icons
1218
 
1219
  **/
1272
 
1273
  if(something) {
1274
  $value = $value;
1275
+ } elseif(something else) {
1276
  $error = true;
1277
  $value = $existing_value;
1278
  $field['msg'] = 'your custom error message';