diff --git a/admin/assets/css/um-admin-redux.css b/admin/assets/css/um-admin-redux.css index cafb3a46..4bdf48cf 100644 --- a/admin/assets/css/um-admin-redux.css +++ b/admin/assets/css/um-admin-redux.css @@ -81,6 +81,11 @@ border-bottom: 0; } +.redux-main .redux-option-image { + max-width: 200px; + max-height: 200px; +} + .redux-container #redux-footer { border-radius: 0; background: none !important; @@ -121,10 +126,6 @@ margin-top: 10px !important; } -.redux-container .redux-group-tab h3 { - border-bottom: 0; -} - .redux-container-switch {font-size: 13px} .redux-sidebar .redux-group-menu li a { diff --git a/admin/core/lib/ReduxFramework/CHANGELOG.md b/admin/core/lib/ReduxFramework/CHANGELOG.md index e9fb86df..ef76dfa0 100644 --- a/admin/core/lib/ReduxFramework/CHANGELOG.md +++ b/admin/core/lib/ReduxFramework/CHANGELOG.md @@ -1,5 +1,33 @@ # Redux Framework Changelog +## 3.3.9.4 +* Added: Customizer now supports PANEL! Yay 4.0. + +## 3.3.9.3 +* Fixed: #1789 - Customizer now properly working again with WP 4.0. Odd bug. +* Modified: README.md updates as per @cmwwebfx suggestions. + +## 3.3.9.2 +* Fixed: #1782 - Fixed some extra themecheck and customizer issues. + +## 3.3.9.1 +* Fixed: #1782 - Media field not showing files after upload? Hopefully this fixes it. + +## 3.3.9 +* Fixed: #1775 - Call to undefined function is_customize_preview() in pre WP 4.0. +* Fixed: Issue where in some cases tracking still occuring after opt-out. +* Modified: Documentation URL. + +## 3.3.8.8 +* Fixed: #1742 - Sidebar subsections don't always expand. + +## 3.3.8.7 +* Fixed: #1758 - Thanks @echo1consulting! +* Added: 'hidden' to menu_type argument to allow for hidden menus until available. + +## 3.3.8.6 +* Fixed: #1749 - Remove font-wight and font-style from css output when not in use. + ## 3.3.8.5 * Modified: Added the "redux/options/{$this->args['opt_name']}/compiler/advanced" hook for more advanced compiling. * Added: Suggestions as per #1709. Thanks @echo1consulting. diff --git a/admin/core/lib/ReduxFramework/README.md b/admin/core/lib/ReduxFramework/README.md index 796cef97..23318f51 100644 --- a/admin/core/lib/ReduxFramework/README.md +++ b/admin/core/lib/ReduxFramework/README.md @@ -2,6 +2,11 @@ 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. +## Posting Guidelines for issues and questions ## +When using our Issue Tracker, you may ask questions where you may be a bit lost or need help understanding the documentation. If, however, you find a bug we require you to read and provide the information contained in our [Contributing Guidelines](https://github.com/ReduxFramework/redux-framework/blob/master/CONTRIBUTING.md). If you do not provide this information, we will request it before we can support you. + +If you are stuck in some of your own code, or need help with PHP and anything else not Redux specific, we request you purchase some [Premium Support](http://reduxframework.com/extension/premium-support/) and we will be happy to assist you. If we feel the issue is outside of our scope we will suggest you to purchase some [Premium Support](http://reduxframework.com/extension/premium-support/) in order for us to serve you. + ## Kickstart Your Development ## Are you authoring a theme, or plugin? Visit the [Redux Builder](http://build.reduxframework.com) site and get started! @@ -12,7 +17,7 @@ We help you create a seamless user experience for your users to demo your WordPr ## Documentation ## Need a little help with Redux? Come check out our brand new documentation site at [docs.reduxframework.com](http://docs.reduxframework.com), chock full of tutorials and examples! - + ## SMOF (Simple Modified Option Users) Converter! ## @@ -72,8 +77,8 @@ If you can, please donate to help support the ongoing development of Redux Frame ## Are you using Redux? ## -Send me an email at ghost1227@reduxframework.com so I can add you to our user spotlight! +Send us an email at info@reduxframework.com so we can add you to our showcase! ## Changelog ## -See Changelog.md \ No newline at end of file +See [Changelog.md](https://github.com/ReduxFramework/redux-framework/blob/master/CHANGELOG.md) \ No newline at end of file diff --git a/admin/core/lib/ReduxFramework/README.txt b/admin/core/lib/ReduxFramework/README.txt index 287e33a7..c695ff18 100644 --- a/admin/core/lib/ReduxFramework/README.txt +++ b/admin/core/lib/ReduxFramework/README.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i Tags: admin, admin interface, options, theme options, plugin options, options framework, settings, web fonts, google fonts Requires at least: 3.5.1 Tested up to: 4.0 -Stable tag: 3.3.8.4 +Stable tag: 3.3.9.4 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -125,6 +125,27 @@ That's because the real FAQ section is on our site! Please visit [http://docs.re == Changelog == +## 3.3.9.4 +* Added: Customizer now supports PANEL! Yay 4.0. +* Fixed: #1789 - Customizer now properly working again with WP 4.0. Odd bug. + += 3.3.9.2 = +* Fixed: #1670 - Fixed some extra themecheck and customizer issues. +* Fixed: #1782 - Media field not showing files after upload? Hopefully this fixes it. + += 3.3.9 = +* Fixed: #1775 - Call to undefined function is_customize_preview() in pre WP 4.0. +* Fixed: Issue where in some cases tracking still occuring after opt-out. +* Modified: Documentation URL. +* Fixed: #1742 - Sidebar subsections don't always expand. +* Fixed: #1758 - Thanks @echo1consulting! +* Added: 'hidden' to menu_type argument to allow for hidden menus until available. +* Fixed: #1749 - Remove font-wight and font-style from css output when not in use. +* Modified: Added the "redux/options/{$this->args['opt_name']}/compiler/advanced" hook for more advanced compiling. +* Added: Suggestions as per #1709. Thanks @echo1consulting. +* Modified: Removed a cURL instance from the core and fixed the developer ad resizing. +* Fixed: PHP 5.2 issues. *sigh* + = 3.3.8.3 = * Added: #1593 - Great pull request by @JonasDoebertin. Now you can enqueue dynamic output to the login screen or admin backend. * Fixed: Customizer wasn't saving at all! That's been like 4 months. No one's reported it. Hmm. diff --git a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.js b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.js index 958e2a7c..4b919518 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.js +++ b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.js @@ -1,4 +1,4 @@ -/*global redux_change, wp, redux*/ +/*global redux_change, wp, redux, libFilter */ /** * Media Uploader @@ -64,6 +64,7 @@ var frame; var jQueryel = $( this ); + var libFilter; // If the media frame already exists, reopen it. if ( frame ) { @@ -73,13 +74,12 @@ // Get library filter data var filter = $( selector ).find('.library-filter').data('lib-filter'); - var libFilter = []; // Must exist to do decoding if (filter !== undefined) { if (filter !== ''){ + libFilter = []; isFiltered = true; - filter = decodeURIComponent(filter); filter = JSON.parse(filter); @@ -87,8 +87,8 @@ libFilter.push(value); }); } - } - + } + // Create the media frame. frame = wp.media( { @@ -215,4 +215,4 @@ selector.find( '.media_upload_button' ).remove(); } }; -})( jQuery ); \ No newline at end of file +})( jQuery ); diff --git a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.min.js b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.min.js index 05684046..a8ca4c0c 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.min.js +++ b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/media/media.min.js @@ -1 +1 @@ -!function(a){"use strict";redux.field_objects=redux.field_objects||{},redux.field_objects.media=redux.field_objects.media||{};var b;a(document).ready(function(){}),redux.field_objects.media.init=function(c){c||(c=a(document).find(".redux-container-media")),a(c).each(function(){var c=a(this),d=c;c.hasClass("redux-field-container")||(d=c.parents(".redux-field-container:first")),d.hasClass("redux-field-init")&&(d.removeClass("redux-field-init"),b=!1,c.find(".remove-image, .remove-file").unbind("click").on("click",function(){redux.field_objects.media.removeFile(a(this).parents("fieldset.redux-field:first"))}),c.find(".media_upload_button").unbind().on("click",function(b){redux.field_objects.media.addFile(b,a(this).parents("fieldset.redux-field:first"))}))})},redux.field_objects.media.addFile=function(c,d){c.preventDefault();var e,f=a(this);if(e)return void e.open();var g=a(d).find(".library-filter").data("lib-filter"),h=[];void 0!==g&&""!==g&&(b=!0,g=decodeURIComponent(g),g=JSON.parse(g),a.each(g,function(a,b){h.push(b)})),e=wp.media({multiple:!1,library:{type:h},title:f.data("choose"),button:{text:f.data("update")}}),e.on("select",function(){var c=e.state().get("selection").first();e.close();var f=a(d).find(".data").data();if(("undefined"==typeof redux.field_objects.media||void 0===typeof redux.field_objects.media)&&(redux.field_objects.media={}),(void 0===f||"undefined"===f.mode)&&(f={},f.mode="image"),b===!0&&(f.mode=0),0===f.mode);else if(f.mode!==!1&&c.attributes.type!==f.mode&&c.attributes.subtype!==f.mode)return;d.find(".upload").val(c.attributes.url),d.find(".upload-id").val(c.attributes.id),d.find(".upload-height").val(c.attributes.height),d.find(".upload-width").val(c.attributes.width),redux_change(a(d).find(".upload-id"));var g=c.attributes.url;if("undefined"!=typeof c.attributes.sizes&&"undefined"!=typeof c.attributes.sizes.thumbnail)g=c.attributes.sizes.thumbnail.url;else if("undefined"!=typeof c.attributes.sizes){var h=c.attributes.height;for(var i in c.attributes.sizes){var j=c.attributes.sizes[i];j.height').slideDown("fast"),d.find(".remove-image").removeClass("hide"),d.find(".redux-background-properties").slideDown()}),e.open()},redux.field_objects.media.removeFile=function(b){if(b.find(".remove-image").addClass("hide")){b.find(".remove-image").addClass("hide"),b.find(".upload").val(""),b.find(".upload-id").val(""),b.find(".upload-height").val(""),b.find(".upload-width").val(""),b.find(".upload-thumbnail").val(""),redux_change(a(b).find(".upload-id")),b.find(".redux-background-properties").hide();var c=b.find(".screenshot");c.slideUp(),b.find(".remove-file").unbind(),b.find(".section-upload .upload-notice").length>0&&b.find(".media_upload_button").remove()}}}(jQuery); \ No newline at end of file +(function(b){redux.field_objects=redux.field_objects||{};redux.field_objects.media=redux.field_objects.media||{};var a;b(document).ready(function(){});redux.field_objects.media.init=function(c){if(!c){c=b(document).find(".redux-container-media")}b(c).each(function(){var e=b(this);var d=e;if(!e.hasClass("redux-field-container")){d=e.parents(".redux-field-container:first")}if(d.hasClass("redux-field-init")){d.removeClass("redux-field-init")}else{return}a=false;e.find(".remove-image, .remove-file").unbind("click").on("click",function(){redux.field_objects.media.removeFile(b(this).parents("fieldset.redux-field:first"))});e.find(".media_upload_button").unbind().on("click",function(f){redux.field_objects.media.addFile(f,b(this).parents("fieldset.redux-field:first"))})})};redux.field_objects.media.addFile=function(g,c){g.preventDefault();var h;var e=b(this);var d;if(h){h.open();return}var f=b(c).find(".library-filter").data("lib-filter");if(f!==undefined){if(f!==""){d=[];a=true;f=decodeURIComponent(f);f=JSON.parse(f);b.each(f,function(i,j){d.push(j)})}}h=wp.media({multiple:false,library:{type:d},title:e.data("choose"),button:{text:e.data("update")}});h.on("select",function(){var n=h.state().get("selection").first();h.close();var m=b(c).find(".data").data();if(typeof redux.field_objects.media==="undefined"||typeof redux.field_objects.media===undefined){redux.field_objects.media={}}if(m===undefined||m.mode==="undefined"){m={};m.mode="image"}if(a===true){m.mode=0}if(m.mode===0){}else{if(m.mode!==false){if(n.attributes.type!==m.mode){if(n.attributes.subtype!==m.mode){return}}}}c.find(".upload").val(n.attributes.url);c.find(".upload-id").val(n.attributes.id);c.find(".upload-height").val(n.attributes.height);c.find(".upload-width").val(n.attributes.width);redux_change(b(c).find(".upload-id"));var l=n.attributes.url;if(typeof n.attributes.sizes!=="undefined"&&typeof n.attributes.sizes.thumbnail!=="undefined"){l=n.attributes.sizes.thumbnail.url}else{if(typeof n.attributes.sizes!=="undefined"){var i=n.attributes.height;for(var k in n.attributes.sizes){var j=n.attributes.sizes[k];if(j.height').slideDown("fast")}c.find(".remove-image").removeClass("hide");c.find(".redux-background-properties").slideDown()});h.open()};redux.field_objects.media.removeFile=function(c){if(!c.find(".remove-image").addClass("hide")){return}c.find(".remove-image").addClass("hide");c.find(".upload").val("");c.find(".upload-id").val("");c.find(".upload-height").val("");c.find(".upload-width").val("");c.find(".upload-thumbnail").val("");redux_change(b(c).find(".upload-id"));c.find(".redux-background-properties").hide();var d=c.find(".screenshot");d.slideUp();c.find(".remove-file").unbind();if(c.find(".section-upload .upload-notice").length>0){c.find(".media_upload_button").remove()}}})(jQuery); \ No newline at end of file diff --git a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.js b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.js index 677823eb..d9cf2c49 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.js +++ b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.js @@ -301,8 +301,9 @@ } var el = link.parents( '.redux-container:first' ); var relid = link.data( 'rel' ); // The group ID of interest - var oldid = el.find( '.redux-group-tab-link-li.active .redux-group-tab-link-a' ).data( 'rel' ); + var oldid = el.find( '.redux-group-tab-link-li.active:first .redux-group-tab-link-a' ).data( 'rel' ); + //console.log('id: '+relid+' oldid: '+oldid); if ( oldid === relid ) { return; @@ -356,12 +357,20 @@ el.find( '#' + relid + '_section_group_li' ).addClass( 'active' ).removeClass( 'activeChild' ).find( 'ul.subsection' ).slideDown(); if ( el.find( '#' + oldid + '_section_group_li' ).find( 'ul.subsection' ).length ) { - //console.log('oldid is parent') + //console.log('oldid is parent'); + //console.log('#' + relid + '_section_group_li'); + el.find( '#' + oldid + '_section_group_li' ).find( 'ul.subsection' ).slideUp( 'fast', function() { el.find( '#' + oldid + '_section_group_li' ).removeClass( 'active' ).removeClass( 'activeChild' ); } ); + var newParent = el.find( '#' + relid + '_section_group_li' ).parents( '.hasSubSections:first' ); + if ( newParent.length > 0 ) { + el.find( '#' + relid + '_section_group_li' ).removeClass( 'active' ); + relid = newParent.find( '.redux-group-tab-link-a:first' ).data( 'rel' ); + el.find( '#' + relid + '_section_group_li' ).addClass( 'active' ).removeClass( 'activeChild' ).find( 'ul.subsection' ).slideDown(); + } } else if ( el.find( '#' + oldid + '_section_group_li' ).parents( 'ul.subsection' ).length ) { //console.log('oldid is a child'); if ( !el.find( '#' + oldid + '_section_group_li' ).parents( '#' + relid + '_section_group_li' ).length ) { diff --git a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.min.js b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.min.js index 153ad1e6..b0e5691a 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.min.js +++ b/admin/core/lib/ReduxFramework/ReduxCore/assets/js/redux.min.js @@ -1,3 +1,3 @@ function redux_change(a){jQuery("body").trigger("check_dependencies",a),a.hasClass("compiler")&&jQuery("#redux-compiler-hook").val(1),window.onbeforeunload=confirmOnPageExit;var b=jQuery(a).parents(".redux-container:first");if(jQuery(a).parents("fieldset.redux-field:first").hasClass("redux-field-error")){jQuery(a).parents("fieldset.redux-field:first").removeClass("redux-field-error"),jQuery(a).parent().find(".redux-th-error").slideUp();var c=jQuery(a).closest(".redux-group-tab").attr("id"),d=parseInt(b.find(".redux-field-errors span").text())-1,e=parseInt(b.find(".redux-field-warnings span").text())-1;if(0>=d)jQuery("#"+c+"_li .redux-menu-error").fadeOut("fast").remove(),jQuery("#"+c+"_li .redux-group-tab-link-a").removeClass("hasError"),jQuery("#"+c+"_li").parents(".inside:first").find(".redux-field-errors").slideUp(),jQuery(a).parents(".redux-container:first").find(".redux-field-errors").slideUp(),jQuery("#redux_metaboxes_errors").slideUp();else{var f=c.split("_");f=f[0];var g=b.find('.redux-group-tab-link-a[data-key="'+f+'"]').parents(".redux-group-tab-link-li:first"),h=parseInt(g.find(".redux-menu-error:first").text())-1;0>=h?g.find(".redux-menu-error:first").fadeOut().remove():g.find(".redux-menu-error:first").text(h);var i=parseInt(g.find(".redux-menu-warning:first").text())-1;0>=i?g.find(".redux-menu-warning:first").fadeOut().remove():g.find(".redux-menu-warning:first").text(i),b.find(".redux-field-errors span").text(d),b.find(".redux-field-warning span").text(e)}var j=jQuery("#"+c+"_li").parents(".hasSubSections:first");0!==j.length&&0===j.find(".redux-menu-error").length&&j.find(".hasError").removeClass("hasError")}redux.args.disable_save_warn||b.find(".redux-save-warn").slideDown()}function colorValidate(a){var b=jQuery(a).val(),c=colorNameToHex(b);return c!==b.replace("#","")?c:b}function colorNameToHex(a){var b=a.replace(/^\s\s*/,"").replace(/\s\s*$/,"").replace("#",""),c={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c","indigo ":"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",redux:"#01a3e3",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};return"undefined"!==c[b.toLowerCase()]?c[b.toLowerCase()]:a}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){return a}function c(a){return decodeURIComponent(a.replace(e," "))}function d(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return f.json?JSON.parse(a):a}catch(b){}}var e=/\+/g,f=a.cookie=function(e,g,h){if(void 0!==g){if(h=a.extend({},f.defaults,h),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=f.json?JSON.stringify(g):String(g),document.cookie=[f.raw?e:encodeURIComponent(e),"=",f.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}for(var k=f.raw?b:c,l=document.cookie.split("; "),m=e?void 0:{},n=0,o=l.length;o>n;n++){var p=l[n].split("="),q=k(p.shift()),r=k(p.join("="));if(e&&e===q){m=d(r);break}e||(m[q]=d(r))}return m};f.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)?(a.cookie(b,"",a.extend({},c,{expires:-1})),!0):!1}}),"undefined"==typeof jQuery.qtip&&!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=G,this.elements={target:a},this._id=T+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:F,attr:e,onTooltip:F,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=F}function f(a){return a===G||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?F:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?F:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==F,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,G,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||F)&&(b.title=F))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===E?{ready:E}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(S,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d0?setTimeout(d.proxy(a,this),b):void a.call(this)}function n(a){return this.tooltip.hasClass(bb)?F:(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),void(this.timers.show=m.call(this,function(){this.toggle(E,a)},this.options.show.delay)))}function o(a){if(this.tooltip.hasClass(bb))return F;var b=d(a.relatedTarget),c=b.closest(X)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=m.call(this,function(){this.toggle(F,a)},this.options.hide.delay,this)}function p(a){return this.tooltip.hasClass(bb)||!this.options.hide.inactive?F:(clearTimeout(this.timers.inactive),void(this.timers.inactive=m.call(this,function(){this.hide(a)},this.options.hide.inactive)))}function q(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function r(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(ib+" "))+ib,function(){var a=z.api[d.attr(this,V)];a&&!a.disabled&&e.apply(a,arguments)})}function s(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):G,p="html5"===f.metadata.type&&o?o[f.metadata.name]:G,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(E,{},z.defaults,f,"object"==typeof q?h(q):G,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===F||!j)return F;k.content.text=j}if(i.container.length||(i.container=m),i.target===F&&(i.target=n),k.show.target===F&&(k.show.target=n),k.show.solo===E&&(k.show.solo=i.container.closest("body")),k.hide.target===F&&(k.hide.target=n),k.position.viewport===E&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new B(i.at,E),i.my=new B(i.my),a.data(T))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===F)return F;return a.attr(U,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(db,l).attr("title",""),g=new e(a,k,c,!!j),a.data(T,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(T))&&a.destroy(!0)}),g}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function u(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+tb.join(f+" ")+f).split(" "),h=0;if(sb[b])return a.css(sb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return sb[b]=d,e}function v(a,b){return Math.ceil(parseFloat(u(a,b)))}function w(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}function x(a,b){this.options=b,this._ns="-modal",this.init(this.qtip=a)}function y(a){this._ns="ie6",this.init(this.qtip=a)}var z,A,B,C,D,E=!0,F=!1,G=null,H="x",I="y",J="width",K="height",L="top",M="left",N="bottom",O="right",P="center",Q="flipinvert",R="shift",S={},T="qtip",U="data-hasqtip",V="data-qtip-id",W=["ui-widget","ui-tooltip"],X="."+T,Y="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Z=T+"-fixed",$=T+"-default",_=T+"-focus",ab=T+"-hover",bb=T+"-disabled",cb="_replacedByqTip",db="oldtitle",eb={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="")&&c.getElementsByTagName("i")[0];);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||F};A=e.prototype,A._when=function(a){return d.when.apply(d,a)},A.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=g.tooltip=b=d("
",{id:this._id,"class":[T,$,e.style.classes,T+"-pos-"+e.position.my.abbrev()].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":F,"aria-describedby":this._id+"-content","aria-hidden":E}).toggleClass(bb,this.disabled).attr(V,this.id).data(T,this).appendTo(k.container).append(g.content=d("
",{"class":T+"-content",id:this._id+"-content","aria-atomic":E})),this.rendered=-1,this.positioning=E,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,F))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,F)),this.rendered=E,this._setWidget(),d.each(S,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=F,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(E,f.event,F),c.hiddenDuringWait=F}),z.api[this.id]=this,this},A.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=E;var a=this.target,b=a.attr(db);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(T).removeAttr(V).removeAttr(U).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(db),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=G,delete z.api[this.id]}}return this.destroyed?this.target:(a===E&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},C=A.checks={builtin:{"^id$":function(a,b,c,e){var f=c===E?z.nextid:c,g=T+"-"+f;f!==F&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),void this._updateTitle(c)):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new B(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(E)||this.toggle(E))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass($,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},A.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var fb=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,gb=/^prerender|show\.ready/i;A.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=F,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&gb.test(b))return void delete a[b];var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=fb.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=E,d.each(a,d.proxy(j,this)),this.positioning=F,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?G:this.cache.event),this},A._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=E,a.then(function(a){return e.waiting=F,c._update(a,b)},G,function(a){return c._update(a,b)})):a===F||!a&&""!==a?F:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){a.images&&a.images.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):F},A._waitForContent=function(a){var b=this.cache;return b.waiting=E,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=F}).promise()},A._updateContent=function(a,b){this._update(a,this.elements.content,b)},A._updateTitle=function(a,b){this._update(a,this.elements.title,b)===F&&this._removeTitle(F)},A._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("
",{"class":T+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("
",{id:b,"class":T+"-title","aria-atomic":E})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},A._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=G,a!==F&&this.reposition())},A.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=E;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(F),s=i.outerHeight(F),t=0,u=0,v=i.css("position"),w={left:0,top:0},x=i[0].offsetWidth>0,y=c&&"scroll"===c.type,z=d(a),A=o[0].ownerDocument,B=this.mouse;if(d.isArray(k)&&2===k.length)m={x:M,y:L},w={left:k[0],top:k[1]};else if("mouse"===k)m={x:M,y:L},!B||!B.pageX||!p.mouse&&c&&c.pageX?c&&c.pageX||((!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?c=h.origin:(!c||c&&("resize"===c.type||"scroll"===c.type))&&(c=h.event)):c=B,"static"!==v&&(w=o.offset()),A.body.offsetWidth!==(a.innerWidth||A.documentElement.clientWidth)&&(g=d(b.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&y&&B&&(w.left-=(B.scrollX||0)-z.scrollLeft(),w.top-=(B.scrollY||0)-z.scrollTop());else{if("event"===k?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):c.target||(h.target=this.elements.target):"event"!==k&&(h.target=d(k.jquery?k:this.elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=eb.iOS?a.innerWidth:k.width(),u=eb.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):S.imagemap&&k.is("area")?f=S.imagemap(this,k,m,S.viewport?q:F):S.svg&&k&&k[0].ownerSVGElement?f=S.svg(this,k,m,S.viewport?q:F):(t=k.outerWidth(F),u=k.outerHeight(F),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(eb.iOS>3.1&&eb.iOS<4.1||eb.iOS>=4.3&&eb.iOS<4.33||!eb.iOS&&"fixed"===v)&&(w.left-=z.scrollLeft(),w.top-=z.scrollTop()),(!f||f&&f.adjustable!==F)&&(w.left+=m.x===O?t:m.x===P?t/2:0,w.top+=m.y===N?u:m.y===P?u/2:0)}return w.left+=p.x+(l.x===O?-r:l.x===P?-r/2:0),w.top+=p.y+(l.y===N?-s:l.y===P?-s/2:0),S.viewport?(w.adjusted=S.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===F||!x||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),eb.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=F,this):this},A.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!eb.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var hb=(B=A.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,P).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?I:H}).prototype;hb.invert=function(a,b){this[a]=this[a]===M?O:this[a]===O?M:b||this[a]},hb.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===I||this.forceY&&"center"!==b?b+" "+a:a+" "+b},hb.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},hb.clone=function(){return new B(this.string(),this.forceY)},A.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=l(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=E),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",m=this.options[k],n=(this.options[a?"hide":"show"],this.options.position),o=this.options.content,p=this.tooltip.css("width"),q=this.tooltip.is(":visible"),r=a||1===m.target.length,s=!c||m.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!q),h=!g.is(":animated")&&q===a&&s,i=h?G:!!this._trigger(k,[90]),this.destroyed?this:(i!==F&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=l(this.mouse),d.isFunction(o.text)&&this._updateContent(o.text,F),d.isFunction(o.title)&&this._updateTitle(o.title,F),!D&&"mouse"===n.target&&n.adjust.mouse&&(d(b).bind("mousemove."+T,this._storeMouse),D=E),p||g.css("width",g.outerWidth(F)),this.reposition(c,arguments[2]),p||g.css("width",""),m.solo&&("string"==typeof m.solo?d(m.solo):d(X,m.solo)).not(g).not(m.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,D&&!d(X+'[tracking="true"]:visible',m.solo).not(g).length&&(d(b).unbind("mousemove."+T),D=F),this.blur(c)),j=d.proxy(function(){a?(eb.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof m.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),m.effect===F||r===F?(g[k](),j()):d.isFunction(m.effect)?(g.stop(1,1),m.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&m.target.trigger("qtip-"+this.id+"-inactive"),this))},A.show=function(a){return this.toggle(E,a)},A.hide=function(a){return this.toggle(F,a)},A.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(X),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=z.zindex+b.length;return c.hasClass(_)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+_).qtip("blur",a)),c.addClass(_)[0].style.zIndex=f),this},A.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(_),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},A.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(bb):this.disabled):"boolean"!=typeof a&&(a=E),this.rendered&&this.tooltip.toggleClass(bb,a).attr("aria-disabled",a),this.disabled=!!a,this)},A.enable=function(){return this.disable(F)},A._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("",{"class":"qtip-close "+(this.options.style.widget?"":T+"-icon"),title:g,"aria-label":g}).prepend(d("",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(bb)||a.hide(b),F})},A._updateButton=function(a){if(!this.rendered)return F;var b=this.elements.button;a?this._createButton():b.remove()},A._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(bb);c.removeClass(bb),bb=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(bb,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass($,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(T+"-icon",!a)},A._storeMouse=function(a){(this.mouse=l(a)).type="mousemove"},A._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},A._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var ib="."+T;d(function(){r(X,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(Z)&&!c.hasClass(bb)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(ab,b)}),r("["+V+"]",Y,p)}),A._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||G,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=F,!e.isDefaultPrevented()},A._bindEvents=function(a,b,c,e,f,g){if(e.add(c).length===e.length){var h=[];b=d.map(b,function(b){var c=d.inArray(b,a);return c>-1?void h.push(a.splice(c,1)[0]):b}),h.length&&this._bind(c,h,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)})}this._bind(c,a,f),this._bind(e,b,g)},A._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?F:(this.cache.event=l(a),this.cache.target=a?d(a.target):[c],clearTimeout(this.timers.show),void(this.timers.show=m.call(this,function(){this.render("object"==typeof a||e.show.ready)},e.show.delay)))}var e=this.options,f=e.show.target,g=e.hide.target,h=e.show.event?d.trim(""+e.show.event).split(" "):[],i=e.hide.event?d.trim(""+e.hide.event).split(" "):[];/mouse(over|enter)/i.test(e.show.event)&&!/mouse(out|leave)/i.test(e.hide.event)&&i.push("mouseleave"),this._bind(f,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=E}),this._bindEvents(h,i,f,g,b,function(){clearTimeout(this.timers.show)}),(e.show.ready||e.prerender)&&b.call(this,a)},A._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),m=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(Z)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(bb)&&this.tooltip[0].offsetWidth>0,e=b.parents(X).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",p),this._bind(i.add(g),z.inactiveEvents,p,"-inactive")),this._bindEvents(r,s,h,i,n,o),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(bb)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:m,"resize",q),f.adjust.scroll&&this._bind(m.add(f.container),"scroll",q)},A._unassignEvents=function(){var c=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],a,b];this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a})))},z=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=G,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],T):G;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,T);if(!a)return E;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),F;a.set(b,e)}}),g!==G?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(E,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===F||c.length<1||z.api[c]?z.nextid++:c,b=s(d(this),c,k),b===F?E:(z.api[c]=b,d.each(S,function(){"initialize"===this.initialize&&this(b)}),void b._assignInitialEvents(j))}))},d.qtip=e,z.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,db):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(db,b))}return d.fn["attr"+cb].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+cb].apply(this,arguments));return a||b.filter("["+db+"]").attr("title",function(){return d.attr(this,db)}).removeAttr(db),b}},function(a,b){if(!b||d.fn[a+cb])return E;var c=d.fn[a+cb]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+cb]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(U))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+cb].apply(this,arguments)}),z.version="2.2.0",z.nextid=0,z.inactiveEvents=Y,z.zindex=15e3,z.defaults={prerender:F,id:F,overwrite:E,suppress:E,content:{text:E,attr:"title",title:F,button:F},position:{my:"top left",at:"bottom right",target:F,container:F,viewport:F,adjust:{x:0,y:0,mouse:E,scroll:E,resize:E,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:F})}},show:{target:F,event:"mouseenter",effect:E,delay:90,solo:F,ready:F,autofocus:F},hide:{target:F,event:"mouseleave",effect:E,delay:0,fixed:F,inactive:F,leave:"window",distance:F},style:{classes:"",widget:F,width:F,height:F,def:E},events:{render:G,move:G,show:G,hide:G,toggle:G,visible:G,hidden:G,focus:G,blur:G}}; -var jb,kb="margin",lb="border",mb="color",nb="background-color",ob="transparent",pb=" !important",qb=!!b.createElement("canvas").getContext,rb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,sb={},tb=["Webkit","O","Moz","ms"];if(qb)var ub=a.devicePixelRatio||1,vb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),wb=ub/vb;else var xb=function(a,b,c){return"'};d.extend(w.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("
",{"class":T+"-tip"}).prependTo(a.tooltip),qb?(b=d("").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=xb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===L||a.y===P&&this.element.position().top+this.size[1]/2+this.options.offsetl&&!rb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==E?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===I?[s(r.x===M?l:r.x===O?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===L?k[1]-q[1]:0)]:[s(r.x===M?k[0]-q[0]:0),s(r.y===L?l:r.y===N?k[1]-q[1]-l:(k[1]-q[1])/2)],qb?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,wb),i=this._calculateTip(r,this.size,wb),o.attr(J,k[0]*wb).attr(K,k[1]*wb),o.css(J,k[0]).css(K,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*wb,j[1]*wb),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===eb.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(P)>-1),left:j[0]-j[2]*Number(f===H),top:j[1]-j[2]*Number(f===I),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(xb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==F&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return F;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===H&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===P?(h=c===I?M:L,j[h]="50%",j[kb+"-"+h]=-Math.round(b[c===I?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===H?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===R&&j.precedance===b&&k[d]&&j[c]!==P?j.precedance=j.precedance===H?I:H:a!==R&&k[d]&&(j[b]=j[b]===P?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===P?p[kb+"-"+b]=o[a]=g[kb+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=F),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:F,top:F,x:0,y:0},p={};this.corner.fixed!==E&&(e(m,H,I,M,O),e(n,I,H,L,N),j.string()===i.corner.string()||i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,F)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===R&&!!k.left)&&f(H,M,O),(o.top=n===R&&!!k.top)&&f(I,L,N),this.element.css(p).toggle(!(o.x&&o.y||j.x===P&&o.y||j.y===P&&o.x)),d.left-=g.left.charAt?g.user:m!==R||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==R||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),jb=S.tip=function(a){return new w(a,a.options.style.tip)},jb.initialize="render",jb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=E)}},C.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(E,z.defaults,{style:{tip:{corner:E,mimic:F,width:6,height:6,border:E,offset:0}}});var yb,zb,Ab="qtip-modal",Bb="."+Ab;zb=function(){function a(a){if(d.expr[":"].focusable)return d.expr[":"].focusable;var b,c,e,f=!isNaN(d.attr(a,"tabindex")),g=a.nodeName&&a.nodeName.toLowerCase();return"area"===g?(b=a.parentNode,c=b.name,a.href&&c&&"map"===b.nodeName.toLowerCase()?(e=d("img[usemap=#"+c+"]")[0],!!e&&e.is(":visible")):!1):/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||f:f}function c(a){k.length<1&&a.length?a.not("body").blur():k.first().focus()}function e(a){if(i.is(":visible")){var b,e=d(a.target),h=f.tooltip,j=e.closest(X);b=j.length<1?F:parseInt(j[0].style.zIndex,10)>parseInt(h[0].style.zIndex,10),b||e.closest(X)[0]===h[0]||c(e),g=a.target===k[k.length-1]}}var f,g,h,i,j=this,k={};d.extend(j,{init:function(){return i=j.elem=d("
",{id:"qtip-overlay",html:"
",mousedown:function(){return F}}).hide(),d(b.body).bind("focusin"+Bb,e),d(b).bind("keydown"+Bb,function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)}),i.bind("click"+Bb,function(a){f&&f.options.show.modal.blur&&f.hide(a)}),j},update:function(b){f=b,k=b.options.show.modal.stealfocus!==F?b.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(a,e,g){var k=(d(b.body),a.tooltip),l=a.options.show.modal,m=l.effect,n=e?"show":"hide",o=i.is(":visible"),p=d(Bb).filter(":visible:not(:animated)").not(k);return j.update(a),e&&l.stealfocus!==F&&c(d(":focus")),i.toggleClass("blurs",l.blur),e&&i.appendTo(b.body),i.is(":animated")&&o===e&&h!==F||!e&&p.length?j:(i.stop(E,F),d.isFunction(m)?m.call(i,e):m===F?i[n]():i.fadeTo(parseInt(g,10)||90,e?1:0,function(){e||i.hide()}),e||i.queue(function(a){i.css({left:"",top:""}),d(Bb).length||i.detach(),a()}),h=e,f.destroyed&&(f=G),j)}}),j.init()},zb=new zb,d.extend(x.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=zb.elem,b.addClass(Ab).css("z-index",z.modal_zindex+d(Bb).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(zb.elem[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(Bb),f=z.modal_zindex+e.length,g=parseInt(b[0].style.zIndex,10);zb.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+_).qtip("blur",a.originalEvent),b.addClass(_)[0].style.zIndex=f,zb.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),void a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(Bb).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this)):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:void zb.toggle(this.qtip,!!b,c)},destroy:function(){this.qtip.tooltip.removeClass(Ab),this.qtip._unbind(this.qtip.tooltip,this._ns),zb.toggle(this.qtip,F),delete this.qtip.elements.overlay}}),yb=S.modal=function(a){return new x(a,a.options.show.modal)},yb.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=E))},z.modal_zindex=z.zindex-200,yb.initialize="render",C.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(E,z.defaults,{show:{modal:{on:F,effect:E,blur:E,stealfocus:E,escape:E}}}),S.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=v[a],t=w[a],u=c===R,x=m===f?j:m===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=r[f]+s[f]-(o?0:n[f]),A=z-k,B=k+j-(h===J?p:q)-z,C=x-(v.precedance===a||m===v[b]?y:0)-(t===P?i/2:0);return u?(C=(m===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-n[f]+s[f],k-C,Math.min(Math.max(-n[f]+s[f]+(h===J?p:q),k+C),d[f],"center"===m?k-x:1e9))):(e*=c===Q?2:0,A>0&&(m!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(m!==g||A>0)&&(d[f]-=(m===P?-C:C)+e,l.invert(a,g)),d[f]B&&(d[f]=k,l=v.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s,t=e.target,u=c.elements.tooltip,v=e.my,w=e.at,x=e.adjust,y=x.method.split(" "),z=y[0],A=y[1]||y[0],B=e.viewport,C=e.container,D=c.cache,E={left:0,top:0};return B.jquery&&t[0]!==a&&t[0]!==b.body&&"none"!==x.method?(n=C.offset()||E,o="static"===C.css("position"),k="fixed"===u.css("position"),p=B[0]===a?B.width():B.outerWidth(F),q=B[0]===a?B.height():B.outerHeight(F),r={left:k?0:B.scrollLeft(),top:k?0:B.scrollTop()},s=B.offset()||E,("shift"!==z||"shift"!==A)&&(l=v.clone()),E={left:"none"!==z?j(H,I,z,x.x,M,O,J,f,h):0,top:"none"!==A?j(I,H,A,x.y,L,N,K,g,i):0},l&&D.lastClass!==(m=T+"-pos-"+l.abbrev())&&u.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),E):E},S.polys={polygon:function(a,b){var c,d,e,f={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:F},g=0,h=[],i=1,j=1,k=0,l=0;for(g=a.length;g--;)c=[parseInt(a[--g],10),parseInt(a[g+1],10)],c[0]>f.position.right&&(f.position.right=c[0]),c[0]f.position.bottom&&(f.position.bottom=c[1]),c[1]0&&e>0&&i>0&&j>0;)for(d=Math.floor(d/2),e=Math.floor(e/2),b.x===M?i=d:b.x===O?i=f.width-d:i+=Math.floor(d/2),b.y===L?j=e:b.y===N?j=f.height-e:j+=Math.floor(e/2),g=h.length;g--&&!(h.length<2);)k=h[g][0]-f.position.left,l=h[g][1]-f.position.top,(b.x===M&&k>=i||b.x===O&&i>=k||b.x===P&&(i>k||k>f.width-i)||b.y===L&&l>=j||b.y===N&&j>=l||b.y===P&&(j>l||l>f.height-j))&&h.splice(g,1);f.position={left:h[0][0],top:h[0][1]}}return f},rect:function(a,b,c,d){return{width:Math.abs(c-a),height:Math.abs(d-b),position:{left:Math.min(a,c),top:Math.min(b,d)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(a,b,c,d,e){var f=S.polys._angles[e.abbrev()],g=0===f?0:c*Math.cos(f*Math.PI),h=d*Math.sin(f*Math.PI);return{width:2*c-Math.abs(g),height:2*d-Math.abs(h),position:{left:a+g,top:b+h},adjustable:F}},circle:function(a,b,c,d){return S.polys.ellipse(a,b,c,c,d)}},S.svg=function(a,c,e){for(var f,g,h,i,j,k,l,m,n,o,p,q=d(b),r=c[0],s=d(r.ownerSVGElement),t=1,u=1,v=!0;!r.getBBox;)r=r.parentNode;if(!r.getBBox||!r.parentNode)return F;f=s.attr("width")||s.width()||parseInt(s.css("width"),10),g=s.attr("height")||s.height()||parseInt(s.css("height"),10);var w=(parseInt(c.css("stroke-width"),10)||0)/2;switch(w&&(t+=w/f,u+=w/g),r.nodeName){case"ellipse":case"circle":o=S.polys.ellipse(r.cx.baseVal.value,r.cy.baseVal.value,(r.rx||r.r).baseVal.value+w,(r.ry||r.r).baseVal.value+w,e);break;case"line":case"polygon":case"polyline":for(n=r.points||[{x:r.x1.baseVal.value,y:r.y1.baseVal.value},{x:r.x2.baseVal.value,y:r.y2.baseVal.value}],o=[],m=-1,k=n.numberOfItems||n.length;++m';d.extend(y.prototype,{_scroll:function(){var b=this.qtip.elements.overlay;b&&(b[0].style.top=d(a).scrollTop()+"px")},init:function(c){var e=c.tooltip;d("select, object").length<1&&(this.bgiframe=c.elements.bgiframe=d(Db).appendTo(e),c._bind(e,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=d("
",{id:T+"-rcontainer"}).appendTo(b.body),c.elements.overlay&&c.elements.overlay.addClass("qtipmodal-ie6fix")&&(c._bind(a,["scroll","resize"],this._scroll,this._ns,this),c._bind(e,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var a,b,c=this.qtip.tooltip,d={height:c.outerHeight(F),width:c.outerWidth(F)},e=this.qtip.plugins.tip,f=this.qtip.elements.tip;b=parseInt(c.css("borderLeftWidth"),10)||0,b={left:-b,top:-b},e&&f&&(a="x"===e.corner.precedance?[J,M]:[K,L],b[a[1]]-=f[a[0]]()),this.bgiframe.css(b).css(d)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var a,b,c,d,e=this.qtip.tooltip,f=this.qtip.options.style,g=this.qtip.options.position.container;return this.qtip.drawing=1,f.height&&e.css(K,f.height),f.width?e.css(J,f.width):(e.css(J,"").appendTo(this.redrawContainer),b=e.width(),1>b%2&&(b+=1),c=e.css("maxWidth")||"",d=e.css("minWidth")||"",a=(c+d).indexOf("%")>-1?g.width()/100:0,c=(c.indexOf("%")>-1?a:1)*parseInt(c,10)||b,d=(d.indexOf("%")>-1?a:1)*parseInt(d,10)||0,b=c+d?Math.min(Math.max(b,d),c):b,e.css(J,Math.round(b)).appendTo(g)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([a,this.qtip.tooltip],this._ns)}}),Cb=S.ie6=function(a){return 6===eb.ie?new y(a):F},Cb.initialize="render",C.ie6={"^content|style$":function(){this.redraw()}}})}(window,document),function(a){a.fn.typeWatch=function(b){function c(b,c){var d=a(b.el).val();(d.length>=f.captureLength&&d.toUpperCase()!=b.text||c&&d.length>=f.captureLength)&&(b.text=d.toUpperCase(),b.cb.call(b.el,d))}function d(b){var d=b.type.toUpperCase();if(a.inArray(d,f.inputTypes)>=0){var e={timer:null,text:a(b).val().toUpperCase(),cb:f.callback,el:b,wait:f.wait};f.highlight&&a(b).focus(function(){this.select()});var g=function(b){var d=e.wait,g=!1,h=this.type.toUpperCase();"undefined"!=typeof b.keyCode&&13==b.keyCode&&"TEXTAREA"!=h&&a.inArray(h,f.inputTypes)>=0&&(d=1,g=!0);var i=function(){c(e,g)};clearTimeout(e.timer),e.timer=setTimeout(i,d)};a(b).on("keydown paste cut input",g)}}var e=["TEXT","TEXTAREA","PASSWORD","TEL","SEARCH","URL","EMAIL","DATETIME","DATE","MONTH","WEEK","TIME","DATETIME-LOCAL","NUMBER","RANGE"],f=a.extend({wait:750,callback:function(){},highlight:!0,captureLength:2,inputTypes:e},b);return this.each(function(){d(this)})}}(jQuery),function(a){function b(){var a="!@#$%^&*()+=[]\\';,/{}|\":<>?~`.-_";return a+=" "}function c(){var a="¬€£¦";return a}function d(b,c,d){b.each(function(){var b=a(this);b.bind("keyup change paste",function(a){var e="";a.originalEvent&&a.originalEvent.clipboardData&&a.originalEvent.clipboardData.getData&&(e=a.originalEvent.clipboardData.getData("text/plain")),setTimeout(function(){h(b,c,d,e)},0)}),b.bind("keypress",function(a){var e=a.charCode?a.charCode:a.which;if(!(g(e)||a.ctrlKey||a.metaKey)){var f=String.fromCharCode(e),h=b.selection(),i=h.start,j=h.end,k=b.val(),l=k.substring(0,i)+f+k.substring(j),m=c(l,d);m!=l&&a.preventDefault()}})})}function e(b,c){var d=parseFloat(a(b).val()),e=a(b);return isNaN(d)?void e.val(""):(f(c.min)&&dc.max&&e.val("")))}function f(a){return!isNaN(a)}function g(a){return a>=32?!1:10==a?!1:13==a?!1:!0}function h(a,b,c,d){var e=a.val();""==e&&d.length>0&&(e=d);var f=b(e,c);if(e!=f){var g=a.alphanum_caret();a.val(f),a.alphanum_caret(e.length==f.length+1?g-1:g)}}function i(b,c){"undefined"==typeof c&&(c=D);var d,e={};return d="string"==typeof b?F[b]:"undefined"==typeof b?{}:b,a.extend(e,c,d),"undefined"==typeof e.blacklist&&(e.blacklistSet=x(e.allow,e.disallow)),e}function j(b){var c,d={};return c="string"==typeof b?G[b]:"undefined"==typeof b?{}:b,a.extend(d,E,c),d}function k(a,b,c){return c.maxLength&&a.length>=c.maxLength?!1:c.allow.indexOf(b)>=0?!0:c.allowSpace&&" "==b?!0:c.blacklistSet.contains(b)?!1:!c.allowNumeric&&K[b]?!1:!c.allowUpper&&u(b)?!1:!c.allowLower&&v(b)?!1:!c.allowCaseless&&w(b)?!1:!c.allowLatin&&L.contains(b)?!1:c.allowOtherCharSets?!0:K[b]||L.contains(b)?!0:!1}function l(a,b,c){if(K[b])return n(a,c)?!1:p(a,c)?!1:o(a,c)?!1:q(a+b,c)?!1:r(a+b,c)?!1:!0;if(c.allowPlus&&"+"==b&&""==a)return!0;if(c.allowMinus&&"-"==b&&""==a)return!0;if(b==I&&c.allowThouSep&&A(a,b))return!0;if(b==J){if(a.indexOf(J)>=0)return!1;if(c.allowDecSep)return!0}return!1}function m(a){return a+="",a.replace(/[^0-9]/g,"").length}function n(a,b){var c=b.maxDigits;if(""==c||isNaN(c))return!1;var d=m(a);return d>=c?!0:!1}function o(a,b){var c=b.maxDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(-1==d)return!1;var e=a.substring(d),f=m(e);return f>=c?!0:!1}function p(a,b){var c=b.maxPreDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(d>=0)return!1;var e=m(a);return e>=c?!0:!1}function q(a,b){if(!b.max||b.max<0)return!1;var c=parseFloat(a);return c>b.max?!0:!1}function r(a,b){if(!b.min||b.min>0)return!1;var c=parseFloat(a);return c=0)return!1;var c=a.indexOf(I);if(0>c)return!0;var d=a.lastIndexOf(I),e=a.length-d-1;if(3>e)return!1;var f=m(a.substring(c));return f%3>0?!1:!0}function B(a){this.map="string"==typeof a?C(a):{}}function C(a){var b,c={},d=a.split(""),e=0;for(e=0;e=0?d.toString().length:startPos+c.toString().length,{start:startPos,end:endPos}):null},d=function(d){var e=b(d);if(void 0!==d.selectionStart)return document.activeElement&&document.activeElement!=d&&d.selectionStart==d.selectionEnd&&0==d.selectionStart?{start:d.value.length,end:d.value.length}:{start:d.selectionStart,end:d.selectionEnd};if(e.getSelection)return c(d,e);try{if("input"==d.nodeName.toLowerCase()){var f=b(d).document.selection.createRange(),g=d.createTextRange();g.setEndPoint("EndToStart",f);var h=g.text.length;return{start:h,end:h+f.text.length}}var i=c(d,e);if(!i)return i;var j=a.Range.current().clone(),k=j.clone().collapse().range,l=j.clone().collapse(!1).range;return k.moveStart("character",-1),l.moveStart("character",-1),0!=i.startPos&&""==k.text&&(i.startPos+=2),0!=i.endPos&&""==l.text&&(i.endPos+=2),i}catch(m){return{start:d.value.length,end:d.value.length}}},e=function(a,c,d){var e=b(a);if(a.setSelectionRange)void 0===d?(a.focus(),a.setSelectionRange(c,c)):(a.select(),a.selectionStart=c,a.selectionEnd=d);else if(a.createTextRange){var f=a.createTextRange();f.moveStart("character",c),d=d||c,f.moveEnd("character",d-a.value.length),f.select()}else if(e.getSelection){var h=e.document,i=e.getSelection(),j=h.createRange(),k=[c,void 0!==d?d:c];g([a],k),j.setStart(k[0].el,k[0].count),j.setEnd(k[1].el,k[1].count),i.removeAllRanges(),i.addRange(j)}else if(e.document.body.createTextRange){var j=document.body.createTextRange();j.moveToElementText(a),j.collapse(),j.moveStart("character",c),j.moveEnd("character",void 0!==d?d:c),j.select()}},f=function(a,b,c,d){"number"==typeof c[0]&&c[0]d.right||c.bottomd.bottom)}},a.redux.checkRequired(),a.redux.initEvents(),a.redux.initQtip(),a.redux.tabCheck(),a.redux.notices(),a.redux.tabControl(),a.redux.devFunctions()}),a.redux.initEvents=function(){a(".redux-action_bar, .redux-presets-bar").on("click",function(){window.onbeforeunload=null}),a("#toplevel_page_"+redux.args.slug+" .wp-submenu a, #wp-admin-bar-"+redux.args.slug+" a.ab-item").click(function(b){if((a("#toplevel_page_"+redux.args.slug).hasClass("wp-menu-open")||a(this).hasClass("ab-item"))&&!a(this).parents("ul.ab-submenu:first").hasClass("ab-sub-secondary")){b.preventDefault();var c=a(this).attr("href").split("&tab=");return a("#"+c[1]+"_section_group_li_a").click(),a(this).parents("ul:first").find(".current").removeClass("current"),a(this).addClass("current"),a(this).parent().addClass("current"),!1}}),a('input[name="'+redux.args.opt_name+'[defaults]"]').click(function(){return confirm(redux.args.reset_confirm)?void(window.onbeforeunload=null):!1}),a('input[name="'+redux.args.opt_name+'[defaults-section]"]').click(function(){return confirm(redux.args.reset_section_confirm)?void(window.onbeforeunload=null):!1}),a(".expand_options").click(function(b){return b.preventDefault(),a.redux.expandOptions(a(this).parents(".redux-container:first")),!1}),a(".saved_notice").is(":visible")&&a(".saved_notice").slideDown(),a(document.body).on("change",".redux-field input, .redux-field textarea, .redux-field select",function(){a(this).hasClass("noUpdate")||redux_change(a(this))});var b=a("#redux-footer").height();a("#redux-sticky-padder").css({height:b}),0!==a("#redux-footer").length&&(a(window).scroll(function(){a.redux.stickyInfo()}),a(window).resize(function(){a.redux.stickyInfo()})),a(".saved_notice").delay(4e3).slideUp(),a(".redux-save").click(function(){window.onbeforeunload=null})},a.redux.checkRequired=function(){a.redux.required(),a("body").on("change",".redux-main select, .redux-main radio, .redux-main input[type=checkbox], .redux-main input[type=hidden]",function(){a.redux.check_dependencies(this)}),a("body").on("check_dependencies",function(b,c){a.redux.check_dependencies(c)}),a("td > fieldset:empty,td > div:empty").parent().parent().hide()},a.redux.initQtip=function(){if(a().qtip){var b="",c=redux.args.hints.tip_style.shadow;c===!0&&(b="qtip-shadow");var d="",e=redux.args.hints.tip_style.color;""!==e&&(d="qtip-"+e);var f="",g=redux.args.hints.tip_style.rounded;g===!0&&(f="qtip-rounded");var h="",i=redux.args.hints.tip_style.style;""!==i&&(h="qtip-"+i);var j=b+","+d+","+f+","+h;j=j.replace(/,/g," ");var k=redux.args.hints.tip_position.my,l=redux.args.hints.tip_position.at;k=a.redux.verifyPos(k.toLowerCase(),!0),l=a.redux.verifyPos(l.toLowerCase(),!1);var m=redux.args.hints.tip_effect.show.event,n=redux.args.hints.tip_effect.hide.event,o=redux.args.hints.tip_effect.show.effect,p=redux.args.hints.tip_effect.show.duration,q=redux.args.hints.tip_effect.hide.effect,r=redux.args.hints.tip_effect.hide.duration;a("div.redux-hint-qtip").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:{effect:function(){switch(o){case"slide":a(this).slideDown(p);break;case"fade":a(this).fadeIn(p);break;default:a(this).show()}},event:m},hide:{effect:function(){switch(q){case"slide":a(this).slideUp(r);break;case"fade":a(this).fadeOut(r);break;default:a(this).show(r)}},event:n},style:{classes:j},position:{my:k,at:l}})}),a("input[qtip-content]").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:"focus",hide:"blur",style:j,position:{my:k,at:l}})})}},a.redux.tabCheck=function(){a(".redux-group-tab-link-a").click(function(){var b=a(this);if(b.parent().hasClass("empty_section")&&b.parent().hasClass("hasSubSections")){var c=a(this).closest("ul").find(".redux-group-tab-link-a"),d=c.index(this);b=c.slice(d+1,d+2)}var e=b.parents(".redux-container:first"),f=b.data("rel"),g=e.find(".redux-group-tab-link-li.active .redux-group-tab-link-a").data("rel");if(g!==f){if(a("#currentSection").val(f),b.parents(".postbox-container:first").length||a.cookie("redux_current_tab",f,{expires:7,path:"/"}),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").length){var h=e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").attr("id").split("_");h=h[0]}e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu a.current").removeClass("current"),e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu li.current").removeClass("current"),e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu a").each(function(){var b=a(this).attr("href").split("&tab="); -(b[1]==f||b[1]==h)&&(a(this).addClass("current"),a(this).parent().addClass("current"))}),e.find("#"+g+"_section_group_li").find("#"+g+"_section_group_li").length?(e.find("#"+g+"_section_group_li").addClass("activeChild"),e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild")):e.find("#"+f+"_section_group_li").parents("#"+g+"_section_group_li").length||e.find("#"+g+"_section_group_li").parents("ul.subsection").find("#"+f+"_section_group_li").length?(e.find("#"+f+"_section_group_li").parents("#"+g+"_section_group_li").length?e.find("#"+g+"_section_group_li").addClass("activeChild").removeClass("active"):(e.find("#"+f+"_section_group_li").addClass("active"),e.find("#"+g+"_section_group_li").removeClass("active")),e.find("#"+f+"_section_group_li").removeClass("activeChild").addClass("active")):(e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+g+"_section_group_li").find("ul.subsection").length?e.find("#"+g+"_section_group_li").find("ul.subsection").slideUp("fast",function(){e.find("#"+g+"_section_group_li").removeClass("active").removeClass("activeChild")}):e.find("#"+g+"_section_group_li").parents("ul.subsection").length?e.find("#"+g+"_section_group_li").parents("#"+f+"_section_group_li").length?e.find("#"+g+"_section_group_li").removeClass("active"):e.find("#"+g+"_section_group_li").parents("ul.subsection").slideUp("fast",function(){e.find("#"+g+"_section_group_li").removeClass("active"),e.find("#"+g+"_section_group_li").parents(".redux-group-tab-link-li").removeClass("active").removeClass("activeChild"),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").addClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+f+"_section_group_li").addClass("active")}):(e.find("#"+g+"_section_group_li").removeClass("active"),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").length&&(e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").addClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+f+"_section_group_li").addClass("active")))),e.find("#"+g+"_section_group").hide(),e.find("#"+f+"_section_group").fadeIn(200,function(){0!==e.find("#redux-footer").length&&a.redux.stickyInfo(),a.redux.initFields()}),a("#toplevel_page_"+redux.args.slug).find(".current").removeClass("current")}});var b=decodeURI((new RegExp("tab=(.+?)(&|$)").exec(location.search)||[,""])[1]);""!==b?a.cookie("redux_current_tab_get")!==b&&(a.cookie("redux_current_tab",b,{expires:7,path:"/"}),a.cookie("redux_current_tab_get",b,{expires:7,path:"/"}),a("#"+b+"_section_group_li").click()):""!==a.cookie("redux_current_tab_get")&&a.removeCookie("redux_current_tab_get");var c=a("#"+a.cookie("redux_current_tab")+"_section_group_li_a");null===a.cookie("redux_current_tab")||"undefined"==typeof a.cookie("redux_current_tab")||0===c.length?a(".redux-container").find(".redux-group-tab-link-a:first").click():c.click()},a.redux.initFields=function(){a(".redux-field-init:visible").each(function(){var b=a(this).attr("data-type");redux.field_objects[b]&&redux.field_objects[b].init()})},a.redux.notices=function(){void 0!==redux.errors&&(a.each(redux.errors.errors,function(b,c){a.each(c.errors,function(b,c){a("#"+redux.args.opt_name+"-"+c.id).addClass("redux-field-error"),0===a("#"+redux.args.opt_name+"-"+c.id).parent().find(".redux-th-error").length&&a("#"+redux.args.opt_name+"-"+c.id).append('
'+c.msg+"
")})}),a(".redux-container").each(function(){var b=a(this),c=b.find(".redux-field-error").length;c>0&&(b.find(".redux-field-errors span").text(c),b.find(".redux-field-errors").slideDown(),b.find(".redux-group-tab").each(function(){var c=a(this).find(".redux-field-error").length;if(c>0){var d=a(this).attr("id").split("_");d=d[0],b.find('.redux-group-tab-link-a[data-key="'+d+'"]').prepend(''+c+""),b.find('.redux-group-tab-link-a[data-key="'+d+'"]').addClass("hasError");var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".hasSubSections:first");e&&e.find(".redux-group-tab-link-a:first").addClass("hasError")}}));var d=b.find(".redux-field-warning").length;d>0&&(b.find(".redux-field-warnings span").text(d),b.find(".redux-field-warnings").slideDown(),b.find(".redux-group-tab").each(function(){var c=a(this).find(".redux-field-warning").length;if(c>0){var d=a(this).attr("id").split("_");d=d[0],b.find('.redux-group-tab-link-a[data-key="'+d+'"]').prepend(''+total+""),b.find('.redux-group-tab-link-a[data-key="'+d+'"]').addClass("hasWarning");var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".hasSubSections:first");e&&e.find(".redux-group-tab-link-a:first").addClass("hasWarning")}}))}))},a.redux.tabControl=function(){a(".redux-section-tabs div").hide(),a(".redux-section-tabs div:first").show(),a(".redux-section-tabs ul li:first").addClass("active"),a(".redux-section-tabs ul li a").click(function(){a(".redux-section-tabs ul li").removeClass("active"),a(this).parent().addClass("active");var b=a(this).attr("href");return a(".redux-section-tabs div").hide(),a(b).fadeIn("medium",function(){a.redux.initFields()}),!1})},a.redux.devFunctions=function(){a("#consolePrintObject").on("click",function(b){b.preventDefault(),console.log(a.parseJSON(a("#redux-object-json").html()))}),"function"==typeof jsonView&&jsonView("#redux-object-json","#redux-object-browser")},a.redux.required=function(){a.each(redux.folds,function(b,c){var d=a("#"+redux.args.opt_name+"-"+b);if(d.parents("tr:first").addClass("fold"),"hide"==c){if(d.parents("tr:first").addClass("hide"),d.hasClass("redux-container-section")){var e=a("#section-"+b);e.hasClass("redux-section-indent-start")&&(a("#section-table-"+b).hide().addClass("hide"),e.hide().addClass("hide"))}if(d.hasClass("redux-container-info")&&a("#info-"+b).hide().addClass("hide"),d.hasClass("redux-container-divide")&&a("#divide-"+b).hide().addClass("hide"),d.hasClass("redux-container-raw")){var f=d.parents().find("table#"+redux.args.opt_name+"-"+b);f.hide().addClass("hide")}}})},a.redux.get_container_value=function(b){var c=a("#"+redux.args.opt_name+"-"+b).serializeForm();return null!==c&&"object"==typeof c&&c.hasOwnProperty(redux.args.opt_name)&&(c=c[redux.args.opt_name][b]),c},a.redux.check_dependencies=function(b){if(null!==redux.required){var c=a(b),d=c.parents(".redux-field:first").data("id");if(redux.required.hasOwnProperty(d)){var e=c.parents(".redux-field-container:first"),f=e.parents("tr:first").hasClass(".hide");a.each(redux.required[d],function(b){var c=a(this),d=!1,e=a("#"+redux.args.opt_name+"-"+b),g=e.parents("tr:first");if(f||(d=a.redux.check_parents_dependencies(b)),d===!0){if(e.hasClass("redux-container-section")){var h=a("#section-"+b);h.hasClass("redux-section-indent-start")&&h.hasClass("hide")&&(a("#section-table-"+b).fadeIn(300).removeClass("hide"),h.fadeIn(300).removeClass("hide"))}if(e.hasClass("redux-container-info")&&a("#info-"+b).fadeIn(300).removeClass("hide"),e.hasClass("redux-container-divide")&&a("#divide-"+b).fadeIn(300).removeClass("hide"),e.hasClass("redux-container-raw")){var i=e.parents().find("table#"+redux.args.opt_name+"-"+b);i.fadeIn(300).removeClass("hide")}g.fadeIn(300,function(){a(this).removeClass("hide"),redux.required.hasOwnProperty(b)&&a.redux.check_dependencies(a("#"+redux.args.opt_name+"-"+b).children().first()),a.redux.initFields()}),(e.hasClass("redux-container-section")||e.hasClass("redux-container-info"))&&g.css({display:"none"})}else d===!1&&g.fadeOut(100,function(){a(this).addClass("hide"),redux.required.hasOwnProperty(b)&&a.redux.required_recursive_hide(b)});c.find("select, radio, input[type=checkbox]").trigger("change")})}}},a.redux.required_recursive_hide=function(b){var c=a("#"+redux.args.opt_name+"-"+b).parents("tr:first");c.fadeOut(50,function(){if(a(this).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-section")){var c=a("#section-"+b);c.hasClass("redux-section-indent-start")&&(a("#section-table-"+b).fadeOut(50).addClass("hide"),c.fadeOut(50).addClass("hide"))}if(a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-info")&&a("#info-"+b).fadeOut(50).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-divide")&&a("#divide-"+b).fadeOut(50).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-raw")){var d=a("#"+redux.args.opt_name+"-"+b).parents().find("table#"+redux.args.opt_name+"-"+b);d.fadeOut(50).addClass("hide")}redux.required.hasOwnProperty(b)&&a.each(redux.required[b],function(b){a.redux.required_recursive_hide(b)})})},a.redux.check_parents_dependencies=function(b){var c="";return redux.required_child.hasOwnProperty(b)?a.each(redux.required_child[b],function(b,d){if(a("#"+redux.args.opt_name+"-"+d.parent).parents("tr:first").hasClass(".hide"))c=!1;else if(c!==!1){var e=a.redux.get_container_value(d.parent);c=a.redux.check_dependencies_visibility(e,d)}}):c=!0,c},a.redux.check_dependencies_visibility=function(b,c){var d=!1,e=c.checkValue,f=c.operation;switch(f){case"=":case"equals":a.isArray(e)?-1!=a.inArray(b,e)&&(d=!0):b==e?d=!0:a.isArray(b)&&-1!=a.inArray(e,b)&&(d=!0);break;case"!=":case"not":a.isArray(e)?-1==a.inArray(b,e)&&(d=!0):b!=e?d=!0:a.isArray(b)&&-1==a.inArray(e,b)&&(d=!0);break;case">":case"greater":case"is_larger":parseFloat(b)>parseFloat(e)&&(d=!0);break;case">=":case"greater_equal":case"is_larger_equal":parseFloat(b)>=parseFloat(e)&&(d=!0);break;case"<":case"less":case"is_smaller":parseFloat(b)g)&&(g=h,b.attr("data-height",g),b.css("width","auto"),b.attr("data-width",b.width()),f=b.width()),f>d?(e=d/f,b.css("width",d),b.css("height",g*e),g*=e,f*=e):b.css("width","auto"),g>c?(e=c/g,b.css("height",c),b.css("width",f*e),f*=e,g*=e):b.css("height","auto");var i=(a(document.getElementById("redux-header")).height()-b.height())/2;i>0?b.css("margin-top",i):b.css("margin-top",0),a("#redux-header .redux_field_search")&&a("#redux-header .redux_field_search").css("right",a(b).width()+20)},a.redux.resizeAds=function(){var b=a("#redux-header"),c=b.find(".rAds"),d=b.height(),e=b.width()-b.find(".display_header").width()-30;a(c).find("video").each(function(){a.redux.scaleToRatio(a(this),d,e)}),a(c).find("img").each(function(){a.redux.scaleToRatio(a(this),d,e)}),a(c).find("div").each(function(){a.redux.scaleToRatio(a(this),d,e)}),"-99999px"==c.css("left")&&c.css("display","none").css("left","auto"),c.fadeIn("slow")},a(document).ready(function(){redux.rAds&&setTimeout(function(){a("#redux-header").append('
');var b=a("#redux-header");b.css("position","relative"),b.find(".rAds").attr("style","position:absolute; top: 6px; right: 6px; display:block !important;overflow:hidden;").css("left","-99999px"),b.find(".rAds").html(redux.rAds.replace(//,""));{var c=b.find(".rAds");b.height(),b.width()-b.find(".display_header").width()-30}c.find("a").css("float","right").css("line-height",b.height()+"px").css("margin-left","5px"),a(document).ajaxComplete(function(){c.find("a").hide(),setTimeout(function(){a.redux.resizeAds(),c.find("a").fadeIn()},1400),setTimeout(function(){a.redux.resizeAds()},1500),a(document).unbind("ajaxComplete")}),a(window).resize(function(){a.redux.resizeAds()})},400)})}(jQuery),jQuery.noConflict();var confirmOnPageExit=function(a){a=a||window.event;var b=redux.args.save_pending;return a&&(a.returnValue=b),window.onbeforeunload=null,b}; \ No newline at end of file +var jb,kb="margin",lb="border",mb="color",nb="background-color",ob="transparent",pb=" !important",qb=!!b.createElement("canvas").getContext,rb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,sb={},tb=["Webkit","O","Moz","ms"];if(qb)var ub=a.devicePixelRatio||1,vb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),wb=ub/vb;else var xb=function(a,b,c){return"'};d.extend(w.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("
",{"class":T+"-tip"}).prependTo(a.tooltip),qb?(b=d("").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=xb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===L||a.y===P&&this.element.position().top+this.size[1]/2+this.options.offsetl&&!rb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==E?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===I?[s(r.x===M?l:r.x===O?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===L?k[1]-q[1]:0)]:[s(r.x===M?k[0]-q[0]:0),s(r.y===L?l:r.y===N?k[1]-q[1]-l:(k[1]-q[1])/2)],qb?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,wb),i=this._calculateTip(r,this.size,wb),o.attr(J,k[0]*wb).attr(K,k[1]*wb),o.css(J,k[0]).css(K,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*wb,j[1]*wb),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===eb.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(P)>-1),left:j[0]-j[2]*Number(f===H),top:j[1]-j[2]*Number(f===I),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(xb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==F&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return F;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===H&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===P?(h=c===I?M:L,j[h]="50%",j[kb+"-"+h]=-Math.round(b[c===I?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===H?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j},reposition:function(a,b,d){function e(a,b,c,d,e){a===R&&j.precedance===b&&k[d]&&j[c]!==P?j.precedance=j.precedance===H?I:H:a!==R&&k[d]&&(j[b]=j[b]===P?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===P?p[kb+"-"+b]=o[a]=g[kb+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=F),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:F,top:F,x:0,y:0},p={};this.corner.fixed!==E&&(e(m,H,I,M,O),e(n,I,H,L,N),j.string()===i.corner.string()||i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,F)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===R&&!!k.left)&&f(H,M,O),(o.top=n===R&&!!k.top)&&f(I,L,N),this.element.css(p).toggle(!(o.x&&o.y||j.x===P&&o.y||j.y===P&&o.x)),d.left-=g.left.charAt?g.user:m!==R||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==R||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),jb=S.tip=function(a){return new w(a,a.options.style.tip)},jb.initialize="render",jb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=E)}},C.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(E,z.defaults,{style:{tip:{corner:E,mimic:F,width:6,height:6,border:E,offset:0}}});var yb,zb,Ab="qtip-modal",Bb="."+Ab;zb=function(){function a(a){if(d.expr[":"].focusable)return d.expr[":"].focusable;var b,c,e,f=!isNaN(d.attr(a,"tabindex")),g=a.nodeName&&a.nodeName.toLowerCase();return"area"===g?(b=a.parentNode,c=b.name,a.href&&c&&"map"===b.nodeName.toLowerCase()?(e=d("img[usemap=#"+c+"]")[0],!!e&&e.is(":visible")):!1):/input|select|textarea|button|object/.test(g)?!a.disabled:"a"===g?a.href||f:f}function c(a){k.length<1&&a.length?a.not("body").blur():k.first().focus()}function e(a){if(i.is(":visible")){var b,e=d(a.target),h=f.tooltip,j=e.closest(X);b=j.length<1?F:parseInt(j[0].style.zIndex,10)>parseInt(h[0].style.zIndex,10),b||e.closest(X)[0]===h[0]||c(e),g=a.target===k[k.length-1]}}var f,g,h,i,j=this,k={};d.extend(j,{init:function(){return i=j.elem=d("
",{id:"qtip-overlay",html:"
",mousedown:function(){return F}}).hide(),d(b.body).bind("focusin"+Bb,e),d(b).bind("keydown"+Bb,function(a){f&&f.options.show.modal.escape&&27===a.keyCode&&f.hide(a)}),i.bind("click"+Bb,function(a){f&&f.options.show.modal.blur&&f.hide(a)}),j},update:function(b){f=b,k=b.options.show.modal.stealfocus!==F?b.tooltip.find("*").filter(function(){return a(this)}):[]},toggle:function(a,e,g){var k=(d(b.body),a.tooltip),l=a.options.show.modal,m=l.effect,n=e?"show":"hide",o=i.is(":visible"),p=d(Bb).filter(":visible:not(:animated)").not(k);return j.update(a),e&&l.stealfocus!==F&&c(d(":focus")),i.toggleClass("blurs",l.blur),e&&i.appendTo(b.body),i.is(":animated")&&o===e&&h!==F||!e&&p.length?j:(i.stop(E,F),d.isFunction(m)?m.call(i,e):m===F?i[n]():i.fadeTo(parseInt(g,10)||90,e?1:0,function(){e||i.hide()}),e||i.queue(function(a){i.css({left:"",top:""}),d(Bb).length||i.detach(),a()}),h=e,f.destroyed&&(f=G),j)}}),j.init()},zb=new zb,d.extend(x.prototype,{init:function(a){var b=a.tooltip;return this.options.on?(a.elements.overlay=zb.elem,b.addClass(Ab).css("z-index",z.modal_zindex+d(Bb).length),a._bind(b,["tooltipshow","tooltiphide"],function(a,c,e){var f=a.originalEvent;if(a.target===b[0])if(f&&"tooltiphide"===a.type&&/mouse(leave|enter)/.test(f.type)&&d(f.relatedTarget).closest(zb.elem[0]).length)try{a.preventDefault()}catch(g){}else(!f||f&&"tooltipsolo"!==f.type)&&this.toggle(a,"tooltipshow"===a.type,e)},this._ns,this),a._bind(b,"tooltipfocus",function(a,c){if(!a.isDefaultPrevented()&&a.target===b[0]){var e=d(Bb),f=z.modal_zindex+e.length,g=parseInt(b[0].style.zIndex,10);zb.elem[0].style.zIndex=f-1,e.each(function(){this.style.zIndex>g&&(this.style.zIndex-=1)}),e.filter("."+_).qtip("blur",a.originalEvent),b.addClass(_)[0].style.zIndex=f,zb.update(c);try{a.preventDefault()}catch(h){}}},this._ns,this),void a._bind(b,"tooltiphide",function(a){a.target===b[0]&&d(Bb).filter(":visible").not(b).last().qtip("focus",a)},this._ns,this)):this},toggle:function(a,b,c){return a&&a.isDefaultPrevented()?this:void zb.toggle(this.qtip,!!b,c)},destroy:function(){this.qtip.tooltip.removeClass(Ab),this.qtip._unbind(this.qtip.tooltip,this._ns),zb.toggle(this.qtip,F),delete this.qtip.elements.overlay}}),yb=S.modal=function(a){return new x(a,a.options.show.modal)},yb.sanitize=function(a){a.show&&("object"!=typeof a.show.modal?a.show.modal={on:!!a.show.modal}:"undefined"==typeof a.show.modal.on&&(a.show.modal.on=E))},z.modal_zindex=z.zindex-200,yb.initialize="render",C.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},d.extend(E,z.defaults,{show:{modal:{on:F,effect:E,blur:E,stealfocus:E,escape:E}}}),S.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=v[a],t=w[a],u=c===R,x=m===f?j:m===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=r[f]+s[f]-(o?0:n[f]),A=z-k,B=k+j-(h===J?p:q)-z,C=x-(v.precedance===a||m===v[b]?y:0)-(t===P?i/2:0);return u?(C=(m===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-n[f]+s[f],k-C,Math.min(Math.max(-n[f]+s[f]+(h===J?p:q),k+C),d[f],"center"===m?k-x:1e9))):(e*=c===Q?2:0,A>0&&(m!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(m!==g||A>0)&&(d[f]-=(m===P?-C:C)+e,l.invert(a,g)),d[f]B&&(d[f]=k,l=v.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s,t=e.target,u=c.elements.tooltip,v=e.my,w=e.at,x=e.adjust,y=x.method.split(" "),z=y[0],A=y[1]||y[0],B=e.viewport,C=e.container,D=c.cache,E={left:0,top:0};return B.jquery&&t[0]!==a&&t[0]!==b.body&&"none"!==x.method?(n=C.offset()||E,o="static"===C.css("position"),k="fixed"===u.css("position"),p=B[0]===a?B.width():B.outerWidth(F),q=B[0]===a?B.height():B.outerHeight(F),r={left:k?0:B.scrollLeft(),top:k?0:B.scrollTop()},s=B.offset()||E,("shift"!==z||"shift"!==A)&&(l=v.clone()),E={left:"none"!==z?j(H,I,z,x.x,M,O,J,f,h):0,top:"none"!==A?j(I,H,A,x.y,L,N,K,g,i):0},l&&D.lastClass!==(m=T+"-pos-"+l.abbrev())&&u.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),E):E},S.polys={polygon:function(a,b){var c,d,e,f={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:F},g=0,h=[],i=1,j=1,k=0,l=0;for(g=a.length;g--;)c=[parseInt(a[--g],10),parseInt(a[g+1],10)],c[0]>f.position.right&&(f.position.right=c[0]),c[0]f.position.bottom&&(f.position.bottom=c[1]),c[1]0&&e>0&&i>0&&j>0;)for(d=Math.floor(d/2),e=Math.floor(e/2),b.x===M?i=d:b.x===O?i=f.width-d:i+=Math.floor(d/2),b.y===L?j=e:b.y===N?j=f.height-e:j+=Math.floor(e/2),g=h.length;g--&&!(h.length<2);)k=h[g][0]-f.position.left,l=h[g][1]-f.position.top,(b.x===M&&k>=i||b.x===O&&i>=k||b.x===P&&(i>k||k>f.width-i)||b.y===L&&l>=j||b.y===N&&j>=l||b.y===P&&(j>l||l>f.height-j))&&h.splice(g,1);f.position={left:h[0][0],top:h[0][1]}}return f},rect:function(a,b,c,d){return{width:Math.abs(c-a),height:Math.abs(d-b),position:{left:Math.min(a,c),top:Math.min(b,d)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(a,b,c,d,e){var f=S.polys._angles[e.abbrev()],g=0===f?0:c*Math.cos(f*Math.PI),h=d*Math.sin(f*Math.PI);return{width:2*c-Math.abs(g),height:2*d-Math.abs(h),position:{left:a+g,top:b+h},adjustable:F}},circle:function(a,b,c,d){return S.polys.ellipse(a,b,c,c,d)}},S.svg=function(a,c,e){for(var f,g,h,i,j,k,l,m,n,o,p,q=d(b),r=c[0],s=d(r.ownerSVGElement),t=1,u=1,v=!0;!r.getBBox;)r=r.parentNode;if(!r.getBBox||!r.parentNode)return F;f=s.attr("width")||s.width()||parseInt(s.css("width"),10),g=s.attr("height")||s.height()||parseInt(s.css("height"),10);var w=(parseInt(c.css("stroke-width"),10)||0)/2;switch(w&&(t+=w/f,u+=w/g),r.nodeName){case"ellipse":case"circle":o=S.polys.ellipse(r.cx.baseVal.value,r.cy.baseVal.value,(r.rx||r.r).baseVal.value+w,(r.ry||r.r).baseVal.value+w,e);break;case"line":case"polygon":case"polyline":for(n=r.points||[{x:r.x1.baseVal.value,y:r.y1.baseVal.value},{x:r.x2.baseVal.value,y:r.y2.baseVal.value}],o=[],m=-1,k=n.numberOfItems||n.length;++m';d.extend(y.prototype,{_scroll:function(){var b=this.qtip.elements.overlay;b&&(b[0].style.top=d(a).scrollTop()+"px")},init:function(c){var e=c.tooltip;d("select, object").length<1&&(this.bgiframe=c.elements.bgiframe=d(Db).appendTo(e),c._bind(e,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=d("
",{id:T+"-rcontainer"}).appendTo(b.body),c.elements.overlay&&c.elements.overlay.addClass("qtipmodal-ie6fix")&&(c._bind(a,["scroll","resize"],this._scroll,this._ns,this),c._bind(e,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var a,b,c=this.qtip.tooltip,d={height:c.outerHeight(F),width:c.outerWidth(F)},e=this.qtip.plugins.tip,f=this.qtip.elements.tip;b=parseInt(c.css("borderLeftWidth"),10)||0,b={left:-b,top:-b},e&&f&&(a="x"===e.corner.precedance?[J,M]:[K,L],b[a[1]]-=f[a[0]]()),this.bgiframe.css(b).css(d)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return this;var a,b,c,d,e=this.qtip.tooltip,f=this.qtip.options.style,g=this.qtip.options.position.container;return this.qtip.drawing=1,f.height&&e.css(K,f.height),f.width?e.css(J,f.width):(e.css(J,"").appendTo(this.redrawContainer),b=e.width(),1>b%2&&(b+=1),c=e.css("maxWidth")||"",d=e.css("minWidth")||"",a=(c+d).indexOf("%")>-1?g.width()/100:0,c=(c.indexOf("%")>-1?a:1)*parseInt(c,10)||b,d=(d.indexOf("%")>-1?a:1)*parseInt(d,10)||0,b=c+d?Math.min(Math.max(b,d),c):b,e.css(J,Math.round(b)).appendTo(g)),this.drawing=0,this},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([a,this.qtip.tooltip],this._ns)}}),Cb=S.ie6=function(a){return 6===eb.ie?new y(a):F},Cb.initialize="render",C.ie6={"^content|style$":function(){this.redraw()}}})}(window,document),function(a){a.fn.typeWatch=function(b){function c(b,c){var d=a(b.el).val();(d.length>=f.captureLength&&d.toUpperCase()!=b.text||c&&d.length>=f.captureLength)&&(b.text=d.toUpperCase(),b.cb.call(b.el,d))}function d(b){var d=b.type.toUpperCase();if(a.inArray(d,f.inputTypes)>=0){var e={timer:null,text:a(b).val().toUpperCase(),cb:f.callback,el:b,wait:f.wait};f.highlight&&a(b).focus(function(){this.select()});var g=function(b){var d=e.wait,g=!1,h=this.type.toUpperCase();"undefined"!=typeof b.keyCode&&13==b.keyCode&&"TEXTAREA"!=h&&a.inArray(h,f.inputTypes)>=0&&(d=1,g=!0);var i=function(){c(e,g)};clearTimeout(e.timer),e.timer=setTimeout(i,d)};a(b).on("keydown paste cut input",g)}}var e=["TEXT","TEXTAREA","PASSWORD","TEL","SEARCH","URL","EMAIL","DATETIME","DATE","MONTH","WEEK","TIME","DATETIME-LOCAL","NUMBER","RANGE"],f=a.extend({wait:750,callback:function(){},highlight:!0,captureLength:2,inputTypes:e},b);return this.each(function(){d(this)})}}(jQuery),function(a){function b(){var a="!@#$%^&*()+=[]\\';,/{}|\":<>?~`.-_";return a+=" "}function c(){var a="¬€£¦";return a}function d(b,c,d){b.each(function(){var b=a(this);b.bind("keyup change paste",function(a){var e="";a.originalEvent&&a.originalEvent.clipboardData&&a.originalEvent.clipboardData.getData&&(e=a.originalEvent.clipboardData.getData("text/plain")),setTimeout(function(){h(b,c,d,e)},0)}),b.bind("keypress",function(a){var e=a.charCode?a.charCode:a.which;if(!(g(e)||a.ctrlKey||a.metaKey)){var f=String.fromCharCode(e),h=b.selection(),i=h.start,j=h.end,k=b.val(),l=k.substring(0,i)+f+k.substring(j),m=c(l,d);m!=l&&a.preventDefault()}})})}function e(b,c){var d=parseFloat(a(b).val()),e=a(b);return isNaN(d)?void e.val(""):(f(c.min)&&dc.max&&e.val("")))}function f(a){return!isNaN(a)}function g(a){return a>=32?!1:10==a?!1:13==a?!1:!0}function h(a,b,c,d){var e=a.val();""==e&&d.length>0&&(e=d);var f=b(e,c);if(e!=f){var g=a.alphanum_caret();a.val(f),a.alphanum_caret(e.length==f.length+1?g-1:g)}}function i(b,c){"undefined"==typeof c&&(c=D);var d,e={};return d="string"==typeof b?F[b]:"undefined"==typeof b?{}:b,a.extend(e,c,d),"undefined"==typeof e.blacklist&&(e.blacklistSet=x(e.allow,e.disallow)),e}function j(b){var c,d={};return c="string"==typeof b?G[b]:"undefined"==typeof b?{}:b,a.extend(d,E,c),d}function k(a,b,c){return c.maxLength&&a.length>=c.maxLength?!1:c.allow.indexOf(b)>=0?!0:c.allowSpace&&" "==b?!0:c.blacklistSet.contains(b)?!1:!c.allowNumeric&&K[b]?!1:!c.allowUpper&&u(b)?!1:!c.allowLower&&v(b)?!1:!c.allowCaseless&&w(b)?!1:!c.allowLatin&&L.contains(b)?!1:c.allowOtherCharSets?!0:K[b]||L.contains(b)?!0:!1}function l(a,b,c){if(K[b])return n(a,c)?!1:p(a,c)?!1:o(a,c)?!1:q(a+b,c)?!1:r(a+b,c)?!1:!0;if(c.allowPlus&&"+"==b&&""==a)return!0;if(c.allowMinus&&"-"==b&&""==a)return!0;if(b==I&&c.allowThouSep&&A(a,b))return!0;if(b==J){if(a.indexOf(J)>=0)return!1;if(c.allowDecSep)return!0}return!1}function m(a){return a+="",a.replace(/[^0-9]/g,"").length}function n(a,b){var c=b.maxDigits;if(""==c||isNaN(c))return!1;var d=m(a);return d>=c?!0:!1}function o(a,b){var c=b.maxDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(-1==d)return!1;var e=a.substring(d),f=m(e);return f>=c?!0:!1}function p(a,b){var c=b.maxPreDecimalPlaces;if(""==c||isNaN(c))return!1;var d=a.indexOf(J);if(d>=0)return!1;var e=m(a);return e>=c?!0:!1}function q(a,b){if(!b.max||b.max<0)return!1;var c=parseFloat(a);return c>b.max?!0:!1}function r(a,b){if(!b.min||b.min>0)return!1;var c=parseFloat(a);return c=0)return!1;var c=a.indexOf(I);if(0>c)return!0;var d=a.lastIndexOf(I),e=a.length-d-1;if(3>e)return!1;var f=m(a.substring(c));return f%3>0?!1:!0}function B(a){this.map="string"==typeof a?C(a):{}}function C(a){var b,c={},d=a.split(""),e=0;for(e=0;e=0?d.toString().length:startPos+c.toString().length,{start:startPos,end:endPos}):null},d=function(d){var e=b(d);if(void 0!==d.selectionStart)return document.activeElement&&document.activeElement!=d&&d.selectionStart==d.selectionEnd&&0==d.selectionStart?{start:d.value.length,end:d.value.length}:{start:d.selectionStart,end:d.selectionEnd};if(e.getSelection)return c(d,e);try{if("input"==d.nodeName.toLowerCase()){var f=b(d).document.selection.createRange(),g=d.createTextRange();g.setEndPoint("EndToStart",f);var h=g.text.length;return{start:h,end:h+f.text.length}}var i=c(d,e);if(!i)return i;var j=a.Range.current().clone(),k=j.clone().collapse().range,l=j.clone().collapse(!1).range;return k.moveStart("character",-1),l.moveStart("character",-1),0!=i.startPos&&""==k.text&&(i.startPos+=2),0!=i.endPos&&""==l.text&&(i.endPos+=2),i}catch(m){return{start:d.value.length,end:d.value.length}}},e=function(a,c,d){var e=b(a);if(a.setSelectionRange)void 0===d?(a.focus(),a.setSelectionRange(c,c)):(a.select(),a.selectionStart=c,a.selectionEnd=d);else if(a.createTextRange){var f=a.createTextRange();f.moveStart("character",c),d=d||c,f.moveEnd("character",d-a.value.length),f.select()}else if(e.getSelection){var h=e.document,i=e.getSelection(),j=h.createRange(),k=[c,void 0!==d?d:c];g([a],k),j.setStart(k[0].el,k[0].count),j.setEnd(k[1].el,k[1].count),i.removeAllRanges(),i.addRange(j)}else if(e.document.body.createTextRange){var j=document.body.createTextRange();j.moveToElementText(a),j.collapse(),j.moveStart("character",c),j.moveEnd("character",void 0!==d?d:c),j.select()}},f=function(a,b,c,d){"number"==typeof c[0]&&c[0]d.right||c.bottomd.bottom)}},a.redux.checkRequired(),a.redux.initEvents(),a.redux.initQtip(),a.redux.tabCheck(),a.redux.notices(),a.redux.tabControl(),a.redux.devFunctions()}),a.redux.initEvents=function(){a(".redux-action_bar, .redux-presets-bar").on("click",function(){window.onbeforeunload=null}),a("#toplevel_page_"+redux.args.slug+" .wp-submenu a, #wp-admin-bar-"+redux.args.slug+" a.ab-item").click(function(b){if((a("#toplevel_page_"+redux.args.slug).hasClass("wp-menu-open")||a(this).hasClass("ab-item"))&&!a(this).parents("ul.ab-submenu:first").hasClass("ab-sub-secondary")){b.preventDefault();var c=a(this).attr("href").split("&tab=");return a("#"+c[1]+"_section_group_li_a").click(),a(this).parents("ul:first").find(".current").removeClass("current"),a(this).addClass("current"),a(this).parent().addClass("current"),!1}}),a('input[name="'+redux.args.opt_name+'[defaults]"]').click(function(){return confirm(redux.args.reset_confirm)?void(window.onbeforeunload=null):!1}),a('input[name="'+redux.args.opt_name+'[defaults-section]"]').click(function(){return confirm(redux.args.reset_section_confirm)?void(window.onbeforeunload=null):!1}),a(".expand_options").click(function(b){return b.preventDefault(),a.redux.expandOptions(a(this).parents(".redux-container:first")),!1}),a(".saved_notice").is(":visible")&&a(".saved_notice").slideDown(),a(document.body).on("change",".redux-field input, .redux-field textarea, .redux-field select",function(){a(this).hasClass("noUpdate")||redux_change(a(this))});var b=a("#redux-footer").height();a("#redux-sticky-padder").css({height:b}),0!==a("#redux-footer").length&&(a(window).scroll(function(){a.redux.stickyInfo()}),a(window).resize(function(){a.redux.stickyInfo()})),a(".saved_notice").delay(4e3).slideUp(),a(".redux-save").click(function(){window.onbeforeunload=null})},a.redux.checkRequired=function(){a.redux.required(),a("body").on("change",".redux-main select, .redux-main radio, .redux-main input[type=checkbox], .redux-main input[type=hidden]",function(){a.redux.check_dependencies(this)}),a("body").on("check_dependencies",function(b,c){a.redux.check_dependencies(c)}),a("td > fieldset:empty,td > div:empty").parent().parent().hide()},a.redux.initQtip=function(){if(a().qtip){var b="",c=redux.args.hints.tip_style.shadow;c===!0&&(b="qtip-shadow");var d="",e=redux.args.hints.tip_style.color;""!==e&&(d="qtip-"+e);var f="",g=redux.args.hints.tip_style.rounded;g===!0&&(f="qtip-rounded");var h="",i=redux.args.hints.tip_style.style;""!==i&&(h="qtip-"+i);var j=b+","+d+","+f+","+h;j=j.replace(/,/g," ");var k=redux.args.hints.tip_position.my,l=redux.args.hints.tip_position.at;k=a.redux.verifyPos(k.toLowerCase(),!0),l=a.redux.verifyPos(l.toLowerCase(),!1);var m=redux.args.hints.tip_effect.show.event,n=redux.args.hints.tip_effect.hide.event,o=redux.args.hints.tip_effect.show.effect,p=redux.args.hints.tip_effect.show.duration,q=redux.args.hints.tip_effect.hide.effect,r=redux.args.hints.tip_effect.hide.duration;a("div.redux-hint-qtip").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:{effect:function(){switch(o){case"slide":a(this).slideDown(p);break;case"fade":a(this).fadeIn(p);break;default:a(this).show()}},event:m},hide:{effect:function(){switch(q){case"slide":a(this).slideUp(r);break;case"fade":a(this).fadeOut(r);break;default:a(this).show(r)}},event:n},style:{classes:j},position:{my:k,at:l}})}),a("input[qtip-content]").each(function(){a(this).qtip({content:{text:a(this).attr("qtip-content"),title:a(this).attr("qtip-title")},show:"focus",hide:"blur",style:j,position:{my:k,at:l}})})}},a.redux.tabCheck=function(){a(".redux-group-tab-link-a").click(function(){var b=a(this);if(b.parent().hasClass("empty_section")&&b.parent().hasClass("hasSubSections")){var c=a(this).closest("ul").find(".redux-group-tab-link-a"),d=c.index(this);b=c.slice(d+1,d+2)}var e=b.parents(".redux-container:first"),f=b.data("rel"),g=e.find(".redux-group-tab-link-li.active:first .redux-group-tab-link-a").data("rel");if(g!==f){if(a("#currentSection").val(f),b.parents(".postbox-container:first").length||a.cookie("redux_current_tab",f,{expires:7,path:"/"}),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").length){var h=e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").attr("id").split("_");h=h[0]}if(e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu a.current").removeClass("current"),e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu li.current").removeClass("current"),e.find("#toplevel_page_"+redux.args.slug+" .wp-submenu a").each(function(){var b=a(this).attr("href").split("&tab="); +(b[1]==f||b[1]==h)&&(a(this).addClass("current"),a(this).parent().addClass("current"))}),e.find("#"+g+"_section_group_li").find("#"+g+"_section_group_li").length)e.find("#"+g+"_section_group_li").addClass("activeChild"),e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild");else if(e.find("#"+f+"_section_group_li").parents("#"+g+"_section_group_li").length||e.find("#"+g+"_section_group_li").parents("ul.subsection").find("#"+f+"_section_group_li").length)e.find("#"+f+"_section_group_li").parents("#"+g+"_section_group_li").length?e.find("#"+g+"_section_group_li").addClass("activeChild").removeClass("active"):(e.find("#"+f+"_section_group_li").addClass("active"),e.find("#"+g+"_section_group_li").removeClass("active")),e.find("#"+f+"_section_group_li").removeClass("activeChild").addClass("active");else if(e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+g+"_section_group_li").find("ul.subsection").length){e.find("#"+g+"_section_group_li").find("ul.subsection").slideUp("fast",function(){e.find("#"+g+"_section_group_li").removeClass("active").removeClass("activeChild")});var i=e.find("#"+f+"_section_group_li").parents(".hasSubSections:first");i.length>0&&(e.find("#"+f+"_section_group_li").removeClass("active"),f=i.find(".redux-group-tab-link-a:first").data("rel"),e.find("#"+f+"_section_group_li").addClass("active").removeClass("activeChild").find("ul.subsection").slideDown())}else e.find("#"+g+"_section_group_li").parents("ul.subsection").length?e.find("#"+g+"_section_group_li").parents("#"+f+"_section_group_li").length?e.find("#"+g+"_section_group_li").removeClass("active"):e.find("#"+g+"_section_group_li").parents("ul.subsection").slideUp("fast",function(){e.find("#"+g+"_section_group_li").removeClass("active"),e.find("#"+g+"_section_group_li").parents(".redux-group-tab-link-li").removeClass("active").removeClass("activeChild"),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").addClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+f+"_section_group_li").addClass("active")}):(e.find("#"+g+"_section_group_li").removeClass("active"),e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").length&&(e.find("#"+f+"_section_group_li").parents(".redux-group-tab-link-li").addClass("activeChild").find("ul.subsection").slideDown(),e.find("#"+f+"_section_group_li").addClass("active")));e.find("#"+g+"_section_group").hide(),e.find("#"+f+"_section_group").fadeIn(200,function(){0!==e.find("#redux-footer").length&&a.redux.stickyInfo(),a.redux.initFields()}),a("#toplevel_page_"+redux.args.slug).find(".current").removeClass("current")}});var b=decodeURI((new RegExp("tab=(.+?)(&|$)").exec(location.search)||[,""])[1]);""!==b?a.cookie("redux_current_tab_get")!==b&&(a.cookie("redux_current_tab",b,{expires:7,path:"/"}),a.cookie("redux_current_tab_get",b,{expires:7,path:"/"}),a("#"+b+"_section_group_li").click()):""!==a.cookie("redux_current_tab_get")&&a.removeCookie("redux_current_tab_get");var c=a("#"+a.cookie("redux_current_tab")+"_section_group_li_a");null===a.cookie("redux_current_tab")||"undefined"==typeof a.cookie("redux_current_tab")||0===c.length?a(".redux-container").find(".redux-group-tab-link-a:first").click():c.click()},a.redux.initFields=function(){a(".redux-field-init:visible").each(function(){var b=a(this).attr("data-type");redux.field_objects[b]&&redux.field_objects[b].init()})},a.redux.notices=function(){void 0!==redux.errors&&(a.each(redux.errors.errors,function(b,c){a.each(c.errors,function(b,c){a("#"+redux.args.opt_name+"-"+c.id).addClass("redux-field-error"),0===a("#"+redux.args.opt_name+"-"+c.id).parent().find(".redux-th-error").length&&a("#"+redux.args.opt_name+"-"+c.id).append('
'+c.msg+"
")})}),a(".redux-container").each(function(){var b=a(this),c=b.find(".redux-field-error").length;c>0&&(b.find(".redux-field-errors span").text(c),b.find(".redux-field-errors").slideDown(),b.find(".redux-group-tab").each(function(){var c=a(this).find(".redux-field-error").length;if(c>0){var d=a(this).attr("id").split("_");d=d[0],b.find('.redux-group-tab-link-a[data-key="'+d+'"]').prepend(''+c+""),b.find('.redux-group-tab-link-a[data-key="'+d+'"]').addClass("hasError");var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".hasSubSections:first");e&&e.find(".redux-group-tab-link-a:first").addClass("hasError")}}));var d=b.find(".redux-field-warning").length;d>0&&(b.find(".redux-field-warnings span").text(d),b.find(".redux-field-warnings").slideDown(),b.find(".redux-group-tab").each(function(){var c=a(this).find(".redux-field-warning").length;if(c>0){var d=a(this).attr("id").split("_");d=d[0],b.find('.redux-group-tab-link-a[data-key="'+d+'"]').prepend(''+total+""),b.find('.redux-group-tab-link-a[data-key="'+d+'"]').addClass("hasWarning");var e=b.find('.redux-group-tab-link-a[data-key="'+d+'"]').parents(".hasSubSections:first");e&&e.find(".redux-group-tab-link-a:first").addClass("hasWarning")}}))}))},a.redux.tabControl=function(){a(".redux-section-tabs div").hide(),a(".redux-section-tabs div:first").show(),a(".redux-section-tabs ul li:first").addClass("active"),a(".redux-section-tabs ul li a").click(function(){a(".redux-section-tabs ul li").removeClass("active"),a(this).parent().addClass("active");var b=a(this).attr("href");return a(".redux-section-tabs div").hide(),a(b).fadeIn("medium",function(){a.redux.initFields()}),!1})},a.redux.devFunctions=function(){a("#consolePrintObject").on("click",function(b){b.preventDefault(),console.log(a.parseJSON(a("#redux-object-json").html()))}),"function"==typeof jsonView&&jsonView("#redux-object-json","#redux-object-browser")},a.redux.required=function(){a.each(redux.folds,function(b,c){var d=a("#"+redux.args.opt_name+"-"+b);if(d.parents("tr:first").addClass("fold"),"hide"==c){if(d.parents("tr:first").addClass("hide"),d.hasClass("redux-container-section")){var e=a("#section-"+b);e.hasClass("redux-section-indent-start")&&(a("#section-table-"+b).hide().addClass("hide"),e.hide().addClass("hide"))}if(d.hasClass("redux-container-info")&&a("#info-"+b).hide().addClass("hide"),d.hasClass("redux-container-divide")&&a("#divide-"+b).hide().addClass("hide"),d.hasClass("redux-container-raw")){var f=d.parents().find("table#"+redux.args.opt_name+"-"+b);f.hide().addClass("hide")}}})},a.redux.get_container_value=function(b){var c=a("#"+redux.args.opt_name+"-"+b).serializeForm();return null!==c&&"object"==typeof c&&c.hasOwnProperty(redux.args.opt_name)&&(c=c[redux.args.opt_name][b]),c},a.redux.check_dependencies=function(b){if(null!==redux.required){var c=a(b),d=c.parents(".redux-field:first").data("id");if(redux.required.hasOwnProperty(d)){var e=c.parents(".redux-field-container:first"),f=e.parents("tr:first").hasClass(".hide");a.each(redux.required[d],function(b){var c=a(this),d=!1,e=a("#"+redux.args.opt_name+"-"+b),g=e.parents("tr:first");if(f||(d=a.redux.check_parents_dependencies(b)),d===!0){if(e.hasClass("redux-container-section")){var h=a("#section-"+b);h.hasClass("redux-section-indent-start")&&h.hasClass("hide")&&(a("#section-table-"+b).fadeIn(300).removeClass("hide"),h.fadeIn(300).removeClass("hide"))}if(e.hasClass("redux-container-info")&&a("#info-"+b).fadeIn(300).removeClass("hide"),e.hasClass("redux-container-divide")&&a("#divide-"+b).fadeIn(300).removeClass("hide"),e.hasClass("redux-container-raw")){var i=e.parents().find("table#"+redux.args.opt_name+"-"+b);i.fadeIn(300).removeClass("hide")}g.fadeIn(300,function(){a(this).removeClass("hide"),redux.required.hasOwnProperty(b)&&a.redux.check_dependencies(a("#"+redux.args.opt_name+"-"+b).children().first()),a.redux.initFields()}),(e.hasClass("redux-container-section")||e.hasClass("redux-container-info"))&&g.css({display:"none"})}else d===!1&&g.fadeOut(100,function(){a(this).addClass("hide"),redux.required.hasOwnProperty(b)&&a.redux.required_recursive_hide(b)});c.find("select, radio, input[type=checkbox]").trigger("change")})}}},a.redux.required_recursive_hide=function(b){var c=a("#"+redux.args.opt_name+"-"+b).parents("tr:first");c.fadeOut(50,function(){if(a(this).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-section")){var c=a("#section-"+b);c.hasClass("redux-section-indent-start")&&(a("#section-table-"+b).fadeOut(50).addClass("hide"),c.fadeOut(50).addClass("hide"))}if(a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-info")&&a("#info-"+b).fadeOut(50).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-divide")&&a("#divide-"+b).fadeOut(50).addClass("hide"),a("#"+redux.args.opt_name+"-"+b).hasClass("redux-container-raw")){var d=a("#"+redux.args.opt_name+"-"+b).parents().find("table#"+redux.args.opt_name+"-"+b);d.fadeOut(50).addClass("hide")}redux.required.hasOwnProperty(b)&&a.each(redux.required[b],function(b){a.redux.required_recursive_hide(b)})})},a.redux.check_parents_dependencies=function(b){var c="";return redux.required_child.hasOwnProperty(b)?a.each(redux.required_child[b],function(b,d){if(a("#"+redux.args.opt_name+"-"+d.parent).parents("tr:first").hasClass(".hide"))c=!1;else if(c!==!1){var e=a.redux.get_container_value(d.parent);c=a.redux.check_dependencies_visibility(e,d)}}):c=!0,c},a.redux.check_dependencies_visibility=function(b,c){var d=!1,e=c.checkValue,f=c.operation;switch(f){case"=":case"equals":a.isArray(e)?-1!=a.inArray(b,e)&&(d=!0):b==e?d=!0:a.isArray(b)&&-1!=a.inArray(e,b)&&(d=!0);break;case"!=":case"not":a.isArray(e)?-1==a.inArray(b,e)&&(d=!0):b!=e?d=!0:a.isArray(b)&&-1==a.inArray(e,b)&&(d=!0);break;case">":case"greater":case"is_larger":parseFloat(b)>parseFloat(e)&&(d=!0);break;case">=":case"greater_equal":case"is_larger_equal":parseFloat(b)>=parseFloat(e)&&(d=!0);break;case"<":case"less":case"is_smaller":parseFloat(b)g)&&(g=h,b.attr("data-height",g),b.css("width","auto"),b.attr("data-width",b.width()),f=b.width()),f>d?(e=d/f,b.css("width",d),b.css("height",g*e),g*=e,f*=e):b.css("width","auto"),g>c?(e=c/g,b.css("height",c),b.css("width",f*e),f*=e,g*=e):b.css("height","auto");var i=(a(document.getElementById("redux-header")).height()-b.height())/2;i>0?b.css("margin-top",i):b.css("margin-top",0),a("#redux-header .redux_field_search")&&a("#redux-header .redux_field_search").css("right",a(b).width()+20)},a.redux.resizeAds=function(){var b=a("#redux-header"),c=b.find(".rAds"),d=b.height(),e=b.width()-b.find(".display_header").width()-30;a(c).find("video").each(function(){a.redux.scaleToRatio(a(this),d,e)}),a(c).find("img").each(function(){a.redux.scaleToRatio(a(this),d,e)}),a(c).find("div").each(function(){a.redux.scaleToRatio(a(this),d,e)}),"-99999px"==c.css("left")&&c.css("display","none").css("left","auto"),c.fadeIn("slow")},a(document).ready(function(){redux.rAds&&setTimeout(function(){a("#redux-header").append('
');var b=a("#redux-header");b.css("position","relative"),b.find(".rAds").attr("style","position:absolute; top: 6px; right: 6px; display:block !important;overflow:hidden;").css("left","-99999px"),b.find(".rAds").html(redux.rAds.replace(//,""));{var c=b.find(".rAds");b.height(),b.width()-b.find(".display_header").width()-30}c.find("a").css("float","right").css("line-height",b.height()+"px").css("margin-left","5px"),a(document).ajaxComplete(function(){c.find("a").hide(),setTimeout(function(){a.redux.resizeAds(),c.find("a").fadeIn()},1400),setTimeout(function(){a.redux.resizeAds()},1500),a(document).unbind("ajaxComplete")}),a(window).resize(function(){a.redux.resizeAds()})},400)})}(jQuery),jQuery.noConflict();var confirmOnPageExit=function(a){a=a||window.event;var b=redux.args.save_pending;return a&&(a.returnValue=b),window.onbeforeunload=null,b}; \ No newline at end of file diff --git a/admin/core/lib/ReduxFramework/ReduxCore/extensions/customizer/extension_customizer.php b/admin/core/lib/ReduxFramework/ReduxCore/extensions/customizer/extension_customizer.php index 4fe2e819..02061f1e 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/extensions/customizer/extension_customizer.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/extensions/customizer/extension_customizer.php @@ -37,6 +37,8 @@ private $_extension_url; private $_extension_dir; private $parent; + private $orig_options = array(); + private static $post_values = array(); public static $version = "2.0"; /** @@ -54,10 +56,13 @@ public function __construct( $parent ) { //add_action('wp_head', array( $this, '_enqueue_new' )); - global $pagenow; - if ( ( $pagenow !== "customize.php" && $pagenow !== "admin-ajax.php" && ! isset( $GLOBALS['wp_customize'] ) ) ) { + global $pagenow, $wp_customize; + if ( ! isset( $wp_customize ) && $pagenow !== "customize.php" && $pagenow !== "admin-ajax.php" ) { return; } + if ( ( $pagenow !== "customize.php" && $pagenow !== "admin-ajax.php" && ! isset( $GLOBALS['wp_customize'] ) ) ) { + //return; + } $this->parent = $parent; @@ -66,6 +71,9 @@ $this->_extension_url = site_url( str_replace( trailingslashit( str_replace( '\\', '/', ABSPATH ) ), '', $this->_extension_dir ) ); } + self::get_post_values(); + + // Create defaults array $defaults = array(); /* @@ -76,29 +84,31 @@ customize_controls_print_footer_scripts */ - if ( ! isset( $_POST['customized'] ) || $pagenow == "admin-ajax.php" ) { - if ( current_user_can( $this->parent->args['page_permissions'] ) ) { - add_action( 'customize_register', array( + + if ( ! ( isset( $_POST['action'] ) || ( isset( $_POST['action'] ) && $_POST['action'] != "customize_save" ) ) ) { + + add_action( "redux/options/{$this->parent->args['opt_name']}/options", array( + $this, + '_override_values' + ), 100 ); + + if ( ! isset( $_POST['customized'] ) || $pagenow == "admin-ajax.php" ) { + if ( current_user_can( $this->parent->args['page_permissions'] ) ) { + add_action( 'customize_register', array( $this, '_register_customizer_controls' ) ); // Create controls + } } - } - if ( isset( $_POST['customized'] ) ) { - if ( $pagenow == "admin-ajax.php" && $_POST['action'] == 'customize_save' ) { - //$this->parent-> - } - add_action( "redux/options/{$this->parent->args['opt_name']}/options", array( - $this, - '_override_values' - ), 100 ); - add_action( 'customize_save', array( $this, 'customizer_save_before' ) ); // Before save - add_action( 'customize_save_after', array( &$this, 'customizer_save_after' ) ); // After save add_action( 'wp_head', array( $this, 'customize_preview_init' ) ); } + //add_action( 'customize_save', array( $this, 'customizer_save_before' ) ); // Before save + add_action( 'customize_save_after', array( &$this, 'customizer_save_after' ) ); // After save + + //add_action( 'wp_enqueue_scripts', array( &$this, '_enqueue_previewer_css' ) ); // Enqueue previewer css //add_action( 'wp_enqueue_scripts', array( &$this, '_enqueue_previewer_js' ) ); // Enqueue previewer javascript //add_action( "wp_footer", array( $this, '_enqueue_new' ), 100 ); @@ -109,12 +119,22 @@ do_action( 'redux/customizer/live_preview' ); } + protected static function get_post_values() { + if ( empty( self::$post_values ) && isset( $_POST['customized'] ) && ! empty( $_POST['customized'] ) ) { + self::$post_values = json_decode( stripslashes_deep( $_POST['customized'] ), true ); + } + } + public function _override_values( $data ) { - if ( isset( $_POST['customized'] ) ) { - $this->orig_options = $this->parent->options; - $options = json_decode( stripslashes_deep( $_POST['customized'] ), true ); - if ( ! empty( $options ) && is_array( $options ) ) { - foreach ( $options as $key => $value ) { + if ( empty( $this->parent->options ) ) { + $this->parent->get_options(); + } + self::get_post_values(); + + if ( isset( $_POST['customized'] ) && ! empty( self::$post_values ) ) { + + if ( is_array( self::$post_values ) ) { + foreach ( self::$post_values as $key => $value ) { if ( strpos( $key, $this->parent->args['opt_name'] ) !== false ) { $key = str_replace( $this->parent->args['opt_name'] . '[', '', rtrim( $key, "]" ) ); $data[ $key ] = $value; @@ -172,6 +192,7 @@ 'admin-head-callback' => '', 'admin-preview-callback' => '' ); + $panel = ""; foreach ( $this->parent->sections as $key => $section ) { @@ -218,11 +239,28 @@ $order['heading'] ++; } - $wp_customize->add_section( $section['id'], array( - 'title' => $section['title'], - 'priority' => $section['priority'], - 'description' => $section['desc'] - ) ); + if ( method_exists( $wp_customize, 'add_panel' ) && ( ! isset( $section['subsection'] ) || ( isset( $section['subsection'] ) && $section['subsection'] != true ) ) && isset( $this->parent->sections[ ( $key + 1 ) ]['subsection'] ) && $this->parent->sections[ ( $key + 1 ) ]['subsection'] ) { + + $wp_customize->add_panel( $section['id'], array( + 'priority' => $section['priority'], + 'capability' => 'customize', + 'theme_supports' => '', + 'title' => $section['title'], + 'description' => $section['desc'], + ) ); + $panel = $section['id']; + + } else { + if ( ! isset( $section['subsection'] ) || ( isset( $section['subsection'] ) && $section['subsection'] != true ) ) { + $panel = ""; + } + $wp_customize->add_section( $section['id'], array( + 'title' => $section['title'], + 'priority' => $section['priority'], + 'description' => $section['desc'], + 'panel' => $panel + ) ); + } foreach ( $section['fields'] as $skey => $option ) { @@ -266,23 +304,22 @@ continue; } - $customSetting = array( - 'default' => $option['default'], - 'type' => 'option', - 'capabilities' => 'edit_theme_options', - //'capabilities' => $this->parent->args['page_permissions'], - 'transport' => 'refresh', - 'theme_supports' => '', - 'sanitize_callback' => '__return_false', - //'sanitize_callback' => array( $this, '_field_validation' ), - //'sanitize_js_callback' =>array( &$parent, '_field_input' ), - ); - - $option['id'] = $this->parent->args['opt_name'] . '[' . $option['id'] . ']'; if ( $option['type'] != "heading" || ! empty( $option['type'] ) ) { - $wp_customize->add_setting( $option['id'], $customSetting ); + $wp_customize->add_setting( $option['id'], + array( + 'default' => $option['default'], + 'type' => 'option', + 'capabilities' => 'edit_theme_options', + //'capabilities' => $this->parent->args['page_permissions'], + 'transport' => 'refresh', + 'theme_supports' => '', + //'sanitize_callback' => '__return_false', + 'sanitize_callback' => array( $this, '_field_validation' ), + //'sanitize_js_callback' =>array( &$parent, '_field_input' ), + ) + ); } if ( ! empty( $option['data'] ) && empty( $option['options'] ) ) { @@ -320,6 +357,14 @@ if ( isset( $option['data'] ) && $option['data'] ) { continue; } + //if ($option['title'] == "Twitter Publisher Username") { + // print_r($option); + // $trueID = str_replace(array(']', 'redux_demo['),'',$option['id']); + // $data = get_option($this->parent->args['opt_name']); + // print_r($data[$trueID]); + // print_r($this->parent->options[$trueID]); + // exit(); + //} $wp_customize->add_control( $option['id'], array( 'label' => $option['title'], 'section' => $section['id'], @@ -331,9 +376,14 @@ case 'select': case 'button_set': + if ( ! isset( $option['options'] ) ) { + continue; + } + if ( ( isset( $option['sortable'] ) && $option['sortable'] ) ) { continue; } + $wp_customize->add_control( $option['id'], array( 'label' => $option['title'], 'section' => $section['id'], @@ -423,7 +473,14 @@ } public function customizer_save_after( $wp_customize ) { - //if( isset( $_POST['customized'] ) ) { + + if ( empty( $this->parent->options ) ) { + $this->parent->get_options(); + } + if ( empty( $this->orig_options ) && ! empty( $this->parent->options ) ) { + $this->orig_options = $this->parent->options; + } + $options = json_decode( stripslashes_deep( $_POST['customized'] ), true ); $compiler = false; $changed = false; @@ -449,7 +506,7 @@ $this->parent->no_output = true; $this->parent->_enqueue_output(); do_action( "redux/options/{$this->parent->args['opt_name']}/compiler", $this->parent->options, $this->parent->compilerCSS ); - do_action( "redux/options/{$this->args['opt_name']}/compiler/advanced", $parent ); + do_action( "redux/options/{$this->args['opt_name']}/compiler/advanced", $this->parent ); } } @@ -568,13 +625,13 @@ * * @return */ - public function _field_validation( $plugin_options, $two ) { - echo "dovy"; - echo $two; + public function _field_validation( $value ) { + print_r( $value ); + print_r( $_POST ); - return $plugin_options; + return $value; - return $this->parent->_validate_options( $plugin_options ); + //return $this->parent->_validate_options( $plugin_options ); } /** @@ -588,4 +645,7 @@ } } // class + function redux_customizer_custom_validation( $field ) { + return $field; + } } // if diff --git a/admin/core/lib/ReduxFramework/ReduxCore/framework.php b/admin/core/lib/ReduxFramework/ReduxCore/framework.php index afa2b330..b57777af 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/framework.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/framework.php @@ -68,7 +68,7 @@ // ATTENTION DEVS // Please update the build number with each push, no matter how small. // This will make for easier support when we ask users what version they are using. - public static $_version = '3.3.8.5'; + public static $_version = '3.3.9.4'; public static $_dir; public static $_url; public static $_upload_dir; @@ -124,11 +124,11 @@ self::$_url = trailingslashit( self::$wp_content_url . $relative_url ); } } - - self::$_url = apply_filters( "redux/_url", self::$_url ); - self::$_dir = apply_filters( "redux/_dir", self::$_dir ); + + self::$_url = apply_filters( "redux/_url", self::$_url ); + self::$_dir = apply_filters( "redux/_dir", self::$_dir ); self::$_is_plugin = apply_filters( "redux/_is_plugin", self::$_is_plugin ); - + } // ::init() @@ -186,11 +186,6 @@ */ public function __construct( $sections = array(), $args = array(), $extra_tabs = array() ) { - $this->slug = 'ultimatemember'; - - $this->about_tabs['about'] = 'About'; - $this->about_tabs['start'] = 'Getting Started'; - // Disregard WP AJAX 'heartbeat'call. Why waste resources? if ( isset( $_POST ) && isset( $_POST['action'] ) && $_POST['action'] == 'heartbeat' ) { @@ -215,7 +210,7 @@ } if ( empty( $this->args['footer_credit'] ) ) { - $this->args['footer_credit'] = ''; + $this->args['footer_credit'] = '' . sprintf( __( 'Options panel created using %1$s', 'redux-framework' ), '
' . __( 'Redux Framework', 'redux-framework' ) . ' v' . self::$_version ) . ''; } if ( empty( $this->args['menu_title'] ) ) { @@ -390,19 +385,19 @@ // Output dynamic CSS // Frontend: Maybe enqueue dynamic CSS and Google fonts - if( empty( $this->args['output_location'] ) || in_array( 'frontend', $this->args['output_location'] ) ) { + if ( empty( $this->args['output_location'] ) || in_array( 'frontend', $this->args['output_location'] ) ) { add_action( 'wp_head', array( &$this, '_output_css' ), 150 ); add_action( 'wp_enqueue_scripts', array( &$this, '_enqueue_output' ), 150 ); } // Login page: Maybe enqueue dynamic CSS and Google fonts - if( in_array( 'login', $this->args['output_location'] ) ) { + if ( in_array( 'login', $this->args['output_location'] ) ) { add_action( 'login_head', array( &$this, '_output_css' ), 150 ); add_action( 'login_enqueue_scripts', array( &$this, '_enqueue_output' ), 150 ); } // Admin area: Maybe enqueue dynamic CSS and Google fonts - if( in_array( 'admin', $this->args['output_location'] ) ) { + if ( in_array( 'admin', $this->args['output_location'] ) ) { add_action( 'admin_head', array( &$this, '_output_css' ), 150 ); add_action( 'admin_enqueue_scripts', array( &$this, '_enqueue_output' ), 150 ); } @@ -1301,22 +1296,14 @@ * @access public * @return void */ - public function _options_page() { - + public function _options_page() { $this->import_export->in_field(); - if ( $this->args['menu_type'] == 'submenu' ) { + if ( $this->args['menu_type'] == 'hidden' ) { - add_menu_page( __('Ultimate Member', $this->slug), __('Ultimate Member', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page'), 'dashicons-admin-users', '66.78578'); - - foreach( $this->about_tabs as $k => $tab ) { - - add_submenu_page( '_'. $k . '_um', sprintf(__('%s | Ultimate Member', $this->slug), $tab), sprintf(__('%s | Ultimate Member', $this->slug), $tab), 'manage_options', $this->slug . '-' . $k, array(&$this, 'admin_page') ); - - } - - add_submenu_page( $this->slug, __('Dashboard', $this->slug), __('Dashboard', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page') ); - + // No menu to add! + + } else if ( $this->args['menu_type'] == 'submenu' ) { $this->add_submenu( $this->args['page_parent'], $this->args['page_title'], @@ -1325,14 +1312,68 @@ $this->args['page_slug'] ); - add_submenu_page( $this->slug, __('Forms', $this->slug), __('Forms', $this->slug), 'manage_options', 'edit.php?post_type=um_form', '', '' ); - - add_submenu_page( $this->slug, __('User Roles', $this->slug), __('User Roles', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' ); - - if ( um_get_option('members_page' ) || !get_option('um_options') ){ - add_submenu_page( $this->slug, __('Member Directories', $this->slug), __('Member Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' ); - } + } else { + $this->page = add_menu_page( + $this->args['page_title'], + $this->args['menu_title'], + $this->args['page_permissions'], + $this->args['page_slug'], + array( &$this, '_options_page_html' ), + $this->args['menu_icon'], + $this->args['page_priority'] + ); + if ( true === $this->args['allow_sub_menu'] ) { + if ( ! isset( $section['type'] ) || $section['type'] != 'divide' ) { + foreach ( $this->sections as $k => $section ) { + $canBeSubSection = ( $k > 0 && ( ! isset( $this->sections[ ( $k ) ]['type'] ) || $this->sections[ ( $k ) ]['type'] != "divide" ) ) ? true : false; + + if ( ! isset( $section['title'] ) || ( $canBeSubSection && ( isset( $section['subsection'] ) && $section['subsection'] == true ) ) ) { + continue; + } + + if ( isset( $section['submenu'] ) && $section['submenu'] == false ) { + continue; + } + + if ( isset( $section['customizer_only'] ) && $section['customizer_only'] == true ) { + continue; + } + + add_submenu_page( + $this->args['page_slug'], + $section['title'], + $section['title'], + $this->args['page_permissions'], + $this->args['page_slug'] . '&tab=' . $k, + //create_function( '$a', "return null;" ) + '__return_null' + ); + } + + // Remove parent submenu item instead of adding null item. + remove_submenu_page( $this->args['page_slug'], $this->args['page_slug'] ); + } + + if ( true == $this->args['show_import_export'] && false == $this->import_export->is_field ) { + $this->import_export->add_submenu(); + } + + if ( true == $this->args['dev_mode'] ) { + $this->debug->add_submenu(); + } + + if ( true == $this->args['system_info'] ) { + add_submenu_page( + $this->args['page_slug'], + __( 'System Info', 'redux-framework' ), + __( 'System Info', 'redux-framework' ), + $this->args['page_permissions'], + $this->args['page_slug'] . '&tab=system_info_default', + '__return_null' + ); + } + } } add_action( "load-{$this->page}", array( &$this, '_load_page' ) ); @@ -1352,7 +1393,7 @@ $ct = wp_get_theme(); $theme_data = $ct; - if ( ! is_super_admin() || ! is_admin_bar_showing() || ! $this->args['admin_bar'] ) { + if ( ! is_super_admin() || ! is_admin_bar_showing() || ! $this->args['admin_bar'] || $this->args['menu_type'] == 'hidden' ) { return; } @@ -1422,6 +1463,7 @@ $nodeargs = array( 'id' => $this->args["page_slug"], 'title' => $title, + // $theme_data->get( 'Name' ) . " " . __( 'Options', 'redux-framework-demo' ), 'href' => admin_url( 'admin.php?page=' . $this->args["page_slug"] ), 'meta' => array() ); @@ -1890,7 +1932,7 @@ if ( isset( $this->args['dev_mode'] ) && $this->args['dev_mode'] == true ) { - $base = admin_url('admin-ajax.php') . '?action=redux_p&url='; + $base = admin_url( 'admin-ajax.php' ) . '?action=redux_p&url='; $url = $base . urlencode( 'http://ads.reduxframework.com/api/index.php?js&g&1&v=2' ) . '&proxy=' . urlencode( $base ); $this->localize_data['rAds'] = ''; } @@ -2250,15 +2292,13 @@ } // In case docs are ignored. - $contentParam = isset( $field['hint'] ) ? $field['hint'] : ''; + $titleParam = isset( $field['hint']['title'] ) ? $field['hint']['title'] : ''; + $contentParam = isset( $field['hint']['content'] ) ? $field['hint']['content'] : ''; $hint_color = isset( $this->args['hints']['icon_color'] ) ? $this->args['hints']['icon_color'] : '#d3d3d3'; // Set hint html with appropriate position css - $hint = ''; - $hint .= ''; - $hint .= ''; - + $hint = '
  
'; } } @@ -2351,7 +2391,7 @@ $section['title'] = ""; } - $heading = isset( $section['heading'] ) ? $section['heading'] : null; + $heading = isset( $section['heading'] ) ? $section['heading'] : $section['title']; if ( isset( $section['permissions'] ) ) { if ( ! current_user_can( $section['permissions'] ) ) { @@ -2632,7 +2672,8 @@ } if ( isset( $this->transients['run_compiler'] ) && $this->transients['run_compiler'] ) { - $this->args['output_tag'] = false; + + $this->no_output = true; $this->_enqueue_output(); @@ -2653,7 +2694,7 @@ * @param string CSS that get sent to the compiler hook */ do_action( "redux/options/{$this->args['opt_name']}/compiler", $this->options, $this->compilerCSS, $this->transients['changed_values'] ); - + /** * action 'redux/options/{opt_name}/compiler/advanced' * @@ -2769,7 +2810,9 @@ foreach ( $keys as $key ) { $plugin_options[ $key ] = $this->options[ $key ]; } - unset( $plugin_options['redux-no_panel'] ); + if ( isset( $plugin_options['redux-no_panel'] ) ) { + unset( $plugin_options['redux-no_panel'] ); + } } if ( ! empty( $this->hidden_perm_fields ) && is_array( $this->hidden_perm_fields ) ) { @@ -2859,6 +2902,11 @@ $plugin_options = $this->options_defaults; $this->transients['changed_values'] = array(); + + if ( empty( $this->options ) ) { + $this->options = $this->options_defaults; + } + foreach ( $this->options as $key => $value ) { if ( isset( $plugin_options[ $key ] ) && $value != $plugin_options[ $key ] ) { $this->transients['changed_values'][ $key ] = $value; @@ -3657,7 +3705,7 @@ unset( $link['link'] ); } - echo ''; + echo ''; if ( isset( $link['icon'] ) && ! empty( $link['icon'] ) ) { echo ''; @@ -4252,30 +4300,6 @@ return $data_string; } - - public function admin_page(){ - - $page = $_REQUEST['page']; - - if ( $page == 'ultimatemember' ) { - include_once um_path . 'admin/templates/dashboard.php'; - } - - if ( strstr( $page, 'ultimatemember-' ) ) { - - $template = str_replace('ultimatemember-','',$page); - $file = um_path . 'admin/templates/'. $template . '.php'; - - if ( file_exists( $file ) ){ - include_once um_path . 'admin/templates/'. $template . '.php'; - } else { - echo '

' . __('Please create a team.php template in admin templates.','ultimatemember') . '

'; - } - - } - - } - } // ReduxFramework /** diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/media/field_media.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/media/field_media.php index 9fe65770..7fa33020 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/media/field_media.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/media/field_media.php @@ -181,20 +181,9 @@ } echo '
'; //Upload controls DIV diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/slider/field_slider.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/slider/field_slider.php index 2d21d67e..9f01dbc4 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/slider/field_slider.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/slider/field_slider.php @@ -310,7 +310,7 @@ value="' . $valOne . '" class="redux-slider-input redux-slider-input-one-' . $fieldID . ' ' . $this->field['class'] . '"/>'; - // LABEL output + // LABEL output } elseif ( $this->display_label == $this->field['display_value'] ) { $showLabel = true; @@ -321,7 +321,7 @@ name="' . $nameOne . '">
'; - // SELECT output + // SELECT output } elseif ( $this->display_select == $this->field['display_value'] ) { $showSelect = true; diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/typography/field_typography.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/typography/field_typography.php index f92b7a7a..abb3350c 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/typography/field_typography.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/fields/typography/field_typography.php @@ -687,6 +687,15 @@ $value = "normal"; } + if ($key == 'font-weight' && $this->field['font-weight'] == false) { + continue; + } + + if ($key == 'font-style' && $this->field['font-style'] == false) { + continue; + } + + if ( $key == "google" || $key == "subsets" || $key == "font-backup" || empty( $value ) ) { continue; } @@ -728,6 +737,7 @@ } } } + // Google only stuff! if ( ! empty( $font['font-family'] ) && ! empty( $this->field['google'] ) && filter_var( $this->field['google'], FILTER_VALIDATE_BOOLEAN ) ) { diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/p.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/p.php index 3bac3325..5951701d 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/inc/p.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/p.php @@ -208,7 +208,7 @@ curl_setopt( $ch, CURLOPT_USERAGENT, isset($_GET['user_agent']) ? $_GET['user_agent'] : $_SERVER['HTTP_USER_AGENT'] ); - list( $header, $contents ) = preg_split( '/([\r\n][\r\n])\\1/', curl_exec( $ch ), 2 ); + list( $header, $contents ) = array_merge( array( '', '' ), preg_split( '/([\r\n][\r\n])\1/', curl_exec( $ch ), 2 ) ); $status = curl_getinfo( $ch ); diff --git a/admin/core/lib/ReduxFramework/ReduxCore/inc/tracking.php b/admin/core/lib/ReduxFramework/ReduxCore/inc/tracking.php index 65fdd514..a5501cca 100644 --- a/admin/core/lib/ReduxFramework/ReduxCore/inc/tracking.php +++ b/admin/core/lib/ReduxFramework/ReduxCore/inc/tracking.php @@ -67,15 +67,23 @@ } if ( isset( $_GET['redux_framework_disable_tracking'] ) && ! empty( $_GET['redux_framework_disable_tracking'] ) ) { - $this->options['allow_tracking'] = false; + $this->options['allow_tracking'] = 'no'; update_option( 'redux-framework-tracking', $this->options ); } if ( isset( $_GET['redux_framework_enable_tracking'] ) && ! empty( $_GET['redux_framework_enable_tracking'] ) ) { - $this->options['allow_tracking'] = true; + $this->options['allow_tracking'] = 'yes'; update_option( 'redux-framework-tracking', $this->options ); } + if ( isset( $_GET['page'] ) && $_GET['page'] == $this->parent->args['page_slug'] ) { + if ( ! isset( $this->options['allow_tracking'] ) ) { + add_action( 'admin_enqueue_scripts', array( $this, '_enqueue_tracking' ) ); + } else if ( ! isset( $this->options['tour'] ) && ( $this->parent->args['dev_mode'] == "true" || $this->parent->args['page_slug'] == "redux_demo" ) ) { + add_action( 'admin_enqueue_scripts', array( $this, '_enqueue_newsletter' ) ); + } + } + $hash = md5( trailingslashit( network_site_url() ) . '-redux' ); add_action( 'wp_ajax_nopriv_' . $hash, array( $this, 'tracking_arg' ) ); add_action( 'wp_ajax_' . $hash, array( $this, 'tracking_arg' ) ); @@ -84,6 +92,78 @@ add_action( 'wp_ajax_nopriv_' . $hash, array( $this, 'support_args' ) ); add_action( 'wp_ajax_' . $hash, array( $this, 'support_args' ) ); + if ( isset( $this->options['allow_tracking'] ) && $this->options['allow_tracking'] == 'yes' ) { + // The tracking checks daily, but only sends new data every 7 days. + if ( ! wp_next_scheduled( 'redux_tracking' ) ) { + wp_schedule_event( time(), 'daily', 'redux_tracking' ); + } + add_action( 'redux_tracking', array( $this, 'tracking' ) ); + } + } + + function _enqueue_tracking() { + wp_enqueue_style( 'wp-pointer' ); + wp_enqueue_script( 'jquery' ); + wp_enqueue_script( 'jquery-ui' ); + wp_enqueue_script( 'wp-pointer' ); + wp_enqueue_script( 'utils' ); + add_action( 'admin_print_footer_scripts', array( $this, 'tracking_request' ) ); + } + + function _enqueue_newsletter() { + wp_enqueue_style( 'wp-pointer' ); + wp_enqueue_script( 'jquery' ); + wp_enqueue_script( 'jquery-ui' ); + wp_enqueue_script( 'wp-pointer' ); + wp_enqueue_script( 'utils' ); + add_action( 'admin_print_footer_scripts', array( $this, 'newsletter_request' ) ); + } + + /** + * Shows a popup that asks for permission to allow tracking. + */ + function tracking_request() { + $id = '#wpadminbar'; + $nonce = wp_create_nonce( 'redux_activate_tracking' ); + + $content = '

' . __( 'Help improve Our Panel', 'redux-framework' ) . '

'; + $content .= '

' . __( 'Please helps us improve our panel by allowing us to gather anonymous usage stats so we know which configurations, plugins and themes to test to ensure compatibility.', 'redux-framework' ) . '

'; + $opt_arr = array( + 'content' => $content, + 'position' => array( 'edge' => 'top', 'align' => 'center' ) + ); + $button2 = __( 'Allow tracking', 'redux-framework' ); + + $function2 = 'redux_store_answer("yes","' . $nonce . '")'; + $function1 = 'redux_store_answer("no","' . $nonce . '")'; + + $this->print_scripts( $id, $opt_arr, __( 'Do not allow tracking', 'redux-framework' ), $button2, $function2, $function1 ); + } + + /** + * Shows a popup that asks for permission to allow tracking. + */ + function newsletter_request() { + $id = '#wpadminbar'; + $nonce = wp_create_nonce( 'redux_activate_tracking' ); + + + $content = '

' . __( 'Welcome to the Redux Demo Panel', 'redux-framework' ) . '

'; + $content .= '

' . __( 'Getting Started', 'redux-framework' ) . '
' . sprintf( __( 'This panel demonstrates the many features of Redux. Before digging in, we suggest you get up to speed by reviewing %1$s.', 'redux-framework' ), '' . __( 'our documentation', 'redux-framework' ) . '' ); + $content .= '

' . __( 'Redux Generator', 'redux-framework' ) . '
' . sprintf( __( 'Want to get a head start? Use the %1$s. It will create a customized boilerplate theme or a standalone admin folder complete with all things Redux (with the help of Underscores and TGM). Save yourself a headache and try it today.', 'redux-framework' ), '' . __( 'Redux Generator', 'redux-framework' ) . '' ); + $content .= '

' . __( 'Redux Extensions', 'redux-framework' ) . '
' . sprintf( __( 'Did you know we have extensions, which greatly enhance the features of Redux? Visit our %1$s to learn more!', 'redux-framework' ), '' . __( 'extensions directory', 'redux-framework' ) . '' ); + $content .= '

' . __( 'Like Redux?', 'redux-framework' ) . '
' . sprintf( __( 'If so, please %1$s and consider making a %2$s to keep development of Redux moving forward.', 'redux-framework' ), '' . __( 'leave us a favorable review on WordPress.org', 'redux-framework' ) . '', '' . __( 'donation', 'redux-framework' ) . '' ); + $content .= '

' . __( 'Newsletter', 'redux-framework' ) . '
' . __( 'If you\'d like to keep up to with all things Redux, please subscribe to our newsletter', 'redux-framework' ) . ':

'; + $content .= '

    

'; + $opt_arr = array( + 'content' => $content, + 'position' => array( 'edge' => 'top', 'align' => 'center' ), + 'pointerWidth' => 450 + ); + + $function1 = 'redux_store_answer("tour","' . $nonce . '")'; + + $this->print_scripts( $id, $opt_arr, __( 'Close', 'redux-framework' ), false, '', $function1 ); } /** diff --git a/admin/core/lib/ReduxFramework/class.redux-plugin.php b/admin/core/lib/ReduxFramework/class.redux-plugin.php index 6bcac6ab..9ea16799 100644 --- a/admin/core/lib/ReduxFramework/class.redux-plugin.php +++ b/admin/core/lib/ReduxFramework/class.redux-plugin.php @@ -25,7 +25,7 @@ * @const string VERSION The plugin version, used for cache-busting and script file references * @since 3.0.0 */ - const VERSION = '3.3.6.6'; + const VERSION = '3.3.9.1'; /** * @access protected diff --git a/admin/core/lib/ReduxFramework/redux-framework.php b/admin/core/lib/ReduxFramework/redux-framework.php index aaf1cda4..47f5cdf6 100644 --- a/admin/core/lib/ReduxFramework/redux-framework.php +++ b/admin/core/lib/ReduxFramework/redux-framework.php @@ -12,7 +12,7 @@ * Description: Redux is a simple, truly extensible options framework for WordPress themes and plugins. * Author: Team Redux * Author URI: http://reduxframework.com - * Version: 3.3.8.5 + * Version: 3.3.9.4 * Text Domain: redux-framework * License: GPL3+ * License URI: http://www.gnu.org/licenses/gpl-3.0.txt diff --git a/admin/core/lib/ReduxFramework/sample/barebones-config.php b/admin/core/lib/ReduxFramework/sample/barebones-config.php new file mode 100644 index 00000000..49730796 --- /dev/null +++ b/admin/core/lib/ReduxFramework/sample/barebones-config.php @@ -0,0 +1,249 @@ +initSettings(); + } else { + add_action( 'plugins_loaded', array( $this, 'initSettings' ), 10 ); + } + + } + + public function initSettings() { + + // Set the default arguments + $this->setArguments(); + + // Set a few help tabs so you can see how it's done + $this->setHelpTabs(); + + // Create the sections and fields + $this->setSections(); + + if ( ! isset( $this->args['opt_name'] ) ) { // No errors please + return; + } + + $this->ReduxFramework = new ReduxFramework( $this->sections, $this->args ); + } + + public function setSections() { + + + // ACTUAL DECLARATION OF SECTIONS + $this->sections[] = array( + 'title' => __( 'Home Settings', 'redux-framework-demo' ), + 'desc' => sprintf( __( 'Redux Framework was created with the developer in mind. It allows for any theme developer to have an advanced theme panel with most of the features a developer would need. For more information check out the Github repo at: %d', 'redux-framework-demo' ), '' . 'https://' . 'github.com/ReduxFramework/Redux-Framework' ), + 'icon' => 'el-icon-home', + // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu! + 'fields' => array( + + array( + 'id' => 'opt-web-fonts', + 'type' => 'media', + 'title' => __( 'Web Fonts', 'redux-framework-demo' ), + 'compiler' => 'true', + 'mode' => false, + // Can be set to false to allow any media type, or can also be set to any mime type. + 'desc' => __( 'Basic media uploader with disabled URL input field.', 'redux-framework-demo' ), + 'subtitle' => __( 'Upload any media using the WordPress native uploader', 'redux-framework-demo' ), + 'hint' => array( + //'title' => '', + 'content' => 'This is a hint tool-tip for the webFonts field.

Add any HTML based text you like here.', + ) + ), + ) + ); + } + + public function setHelpTabs() { + + // Custom page help tabs, displayed using the help API. Tabs are shown in order of definition. + $this->args['help_tabs'][] = array( + 'id' => 'redux-help-tab-1', + 'title' => __( 'Theme Information 1', 'redux-framework-demo' ), + 'content' => __( '

This is the tab content, HTML is allowed.

', 'redux-framework-demo' ) + ); + + $this->args['help_tabs'][] = array( + 'id' => 'redux-help-tab-2', + 'title' => __( 'Theme Information 2', 'redux-framework-demo' ), + 'content' => __( '

This is the tab content, HTML is allowed.

', 'redux-framework-demo' ) + ); + + // Set the help sidebar + $this->args['help_sidebar'] = __( '

This is the sidebar content, HTML is allowed.

', 'redux-framework-demo' ); + } + + /** + * All the possible arguments for Redux. + * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments + * */ + public function setArguments() { + + $theme = wp_get_theme(); // For use with some settings. Not necessary. + + $this->args = array( + // TYPICAL -> Change these values as you need/desire + 'opt_name' => 'redux_demo', + // This is where your data is stored in the database and also becomes your global variable name. + 'display_name' => $theme->get( 'Name' ), + // Name that appears at the top of your panel + 'display_version' => $theme->get( 'Version' ), + // Version that appears at the top of your panel + 'menu_type' => 'menu', + //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only) + 'allow_sub_menu' => true, + // Show the sections below the admin menu item or not + 'menu_title' => __( 'Sample Options', 'redux-framework-demo' ), + 'page_title' => __( 'Sample Options', 'redux-framework-demo' ), + // You will need to generate a Google API key to use this feature. + // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth + 'google_api_key' => '', + // Must be defined to add google fonts to the typography module + + 'async_typography' => false, + // Use a asynchronous font on the front end or font string + 'admin_bar' => true, + // Show the panel pages on the admin bar + 'global_variable' => '', + // Set a different name for your global variable other than the opt_name + 'dev_mode' => true, + // Show the time the page took to load, etc + 'customizer' => true, + // Enable basic customizer support + + // OPTIONAL -> Give you extra features + 'page_priority' => null, + // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning. + 'page_parent' => 'themes.php', + // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters + 'page_permissions' => 'manage_options', + // Permissions needed to access the options panel. + 'menu_icon' => '', + // Specify a custom URL to an icon + 'last_tab' => '', + // Force your panel to always open to a specific tab (by id) + 'page_icon' => 'icon-themes', + // Icon displayed in the admin panel next to your menu_title + 'page_slug' => '_options', + // Page slug used to denote the panel + 'save_defaults' => true, + // On load save the defaults to DB before user clicks save or not + 'default_show' => false, + // If true, shows the default value next to each field that is not the default value. + 'default_mark' => '', + // What to print by the field's title if the value shown is default. Suggested: * + 'show_import_export' => true, + // Shows the Import/Export panel when not used as a field. + + // CAREFUL -> These options are for advanced use only + 'transient_time' => 60 * MINUTE_IN_SECONDS, + 'output' => true, + // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output + 'output_tag' => true, + // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head + // 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it. + + // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk. + 'database' => '', + // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning! + 'system_info' => false, + // REMOVE + + // HINTS + 'hints' => array( + 'icon' => 'icon-question-sign', + 'icon_position' => 'right', + 'icon_color' => 'lightgray', + 'icon_size' => 'normal', + 'tip_style' => array( + 'color' => 'light', + 'shadow' => true, + 'rounded' => false, + 'style' => '', + ), + 'tip_position' => array( + 'my' => 'top left', + 'at' => 'bottom right', + ), + 'tip_effect' => array( + 'show' => array( + 'effect' => 'slide', + 'duration' => '500', + 'event' => 'mouseover', + ), + 'hide' => array( + 'effect' => 'slide', + 'duration' => '500', + 'event' => 'click mouseleave', + ), + ), + ) + ); + + + // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons. + $this->args['share_icons'][] = array( + 'url' => 'https://github.com/ReduxFramework/ReduxFramework', + 'title' => 'Visit us on GitHub', + 'icon' => 'el-icon-github' + //'img' => '', // You can use icon OR img. IMG needs to be a full URL. + ); + $this->args['share_icons'][] = array( + 'url' => 'https://www.facebook.com/pages/Redux-Framework/243141545850368', + 'title' => 'Like us on Facebook', + 'icon' => 'el-icon-facebook' + ); + $this->args['share_icons'][] = array( + 'url' => 'http://twitter.com/reduxframework', + 'title' => 'Follow us on Twitter', + 'icon' => 'el-icon-twitter' + ); + $this->args['share_icons'][] = array( + 'url' => 'http://www.linkedin.com/company/redux-framework', + 'title' => 'Find us on LinkedIn', + 'icon' => 'el-icon-linkedin' + ); + + // Panel Intro text -> before the form + if ( ! isset( $this->args['global_variable'] ) || $this->args['global_variable'] !== false ) { + if ( ! empty( $this->args['global_variable'] ) ) { + $v = $this->args['global_variable']; + } else { + $v = str_replace( '-', '_', $this->args['opt_name'] ); + } + $this->args['intro_text'] = sprintf( __( '

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: $%1$s

', 'redux-framework-demo' ), $v ); + } else { + $this->args['intro_text'] = __( '

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.

', 'redux-framework-demo' ); + } + + // Add content after the form. + $this->args['footer_text'] = __( '

This text is displayed below the options panel. It isn\'t required, but more info is always better! The footer_text field accepts all HTML.

', 'redux-framework-demo' ); + } + + } + + global $reduxConfig; + $reduxConfig = new Redux_Framework_sample_config(); + } diff --git a/admin/core/lib/ReduxFramework/sample/info-html.html b/admin/core/lib/ReduxFramework/sample/info-html.html new file mode 100644 index 00000000..79fd45fb --- /dev/null +++ b/admin/core/lib/ReduxFramework/sample/info-html.html @@ -0,0 +1,68 @@ + +
+
+
+
+ +
+

Info Field with Raw HTML Flag

+ +

If you set the raw_html flag to true, you can embed any type of content in an info field. Then you can have all kinds of fun with Redux!

+
+
+
+
\ No newline at end of file diff --git a/admin/core/lib/ReduxFramework/sample/patterns/tree_bark.png b/admin/core/lib/ReduxFramework/sample/patterns/tree_bark.png new file mode 100644 index 00000000..5efc869b Binary files /dev/null and b/admin/core/lib/ReduxFramework/sample/patterns/tree_bark.png differ diff --git a/admin/core/lib/ReduxFramework/sample/patterns/triangular.png b/admin/core/lib/ReduxFramework/sample/patterns/triangular.png new file mode 100644 index 00000000..7f41795c Binary files /dev/null and b/admin/core/lib/ReduxFramework/sample/patterns/triangular.png differ diff --git a/admin/core/lib/ReduxFramework/sample/patterns/triangular_@2X.png b/admin/core/lib/ReduxFramework/sample/patterns/triangular_@2X.png new file mode 100644 index 00000000..0b5b88af Binary files /dev/null and b/admin/core/lib/ReduxFramework/sample/patterns/triangular_@2X.png differ diff --git a/admin/core/lib/ReduxFramework/sample/patterns/wild_flowers.png b/admin/core/lib/ReduxFramework/sample/patterns/wild_flowers.png new file mode 100644 index 00000000..07a52373 Binary files /dev/null and b/admin/core/lib/ReduxFramework/sample/patterns/wild_flowers.png differ diff --git a/admin/core/lib/ReduxFramework/sample/presets/preset1.png b/admin/core/lib/ReduxFramework/sample/presets/preset1.png new file mode 100644 index 00000000..9cdbb93d Binary files /dev/null and b/admin/core/lib/ReduxFramework/sample/presets/preset1.png differ diff --git a/admin/core/lib/ReduxFramework/sample/presets/preset2.png b/admin/core/lib/ReduxFramework/sample/presets/preset2.png new file mode 100644 index 00000000..de80d93a Binary files /dev/null and b/admin/core/lib/ReduxFramework/sample/presets/preset2.png differ diff --git a/admin/core/lib/ReduxFramework/sample/sample-config.php b/admin/core/lib/ReduxFramework/sample/sample-config.php new file mode 100644 index 00000000..e1d8f989 --- /dev/null +++ b/admin/core/lib/ReduxFramework/sample/sample-config.php @@ -0,0 +1,1845 @@ +initSettings(); + } else { + add_action( 'plugins_loaded', array( $this, 'initSettings' ), 10 ); + } + + } + + public function initSettings() { + + // Just for demo purposes. Not needed per say. + $this->theme = wp_get_theme(); + + // Set the default arguments + $this->setArguments(); + + // Set a few help tabs so you can see how it's done + $this->setHelpTabs(); + + // Create the sections and fields + $this->setSections(); + + if ( ! isset( $this->args['opt_name'] ) ) { // No errors please + return; + } + + // If Redux is running as a plugin, this will remove the demo notice and links + //add_action( 'redux/loaded', array( $this, 'remove_demo' ) ); + + // Function to test the compiler hook and demo CSS output. + // Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function. + //add_filter('redux/options/'.$this->args['opt_name'].'/compiler', array( $this, 'compiler_action' ), 10, 3); + + // Change the arguments after they've been declared, but before the panel is created + //add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) ); + + // Change the default value of a field after it's been set, but before it's been useds + //add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) ); + + // Dynamically add a section. Can be also used to modify sections/fields + //add_filter('redux/options/' . $this->args['opt_name'] . '/sections', array($this, 'dynamic_section')); + + $this->ReduxFramework = new ReduxFramework( $this->sections, $this->args ); + } + + /** + * This is a test function that will let you see when the compiler hook occurs. + * It only runs if a field set with compiler=>true is changed. + * */ + function compiler_action( $options, $css, $changed_values ) { + echo '

The compiler hook has run!

'; + echo "
";
+                print_r( $changed_values ); // Values that have changed since the last save
+                echo "
"; + //print_r($options); //Option values + //print_r($css); // Compiler selector CSS values compiler => array( CSS SELECTORS ) + + /* + // Demo of how to use the dynamic CSS and write your own static CSS file + $filename = dirname(__FILE__) . '/style' . '.css'; + global $wp_filesystem; + if( empty( $wp_filesystem ) ) { + require_once( ABSPATH .'/wp-admin/includes/file.php' ); + WP_Filesystem(); + } + + if( $wp_filesystem ) { + $wp_filesystem->put_contents( + $filename, + $css, + FS_CHMOD_FILE // predefined mode settings for WP files + ); + } + */ + } + + /** + * Custom function for filtering the sections array. Good for child themes to override or add to the sections. + * Simply include this function in the child themes functions.php file. + * NOTE: the defined constants for URLs, and directories will NOT be available at this point in a child theme, + * so you must use get_template_directory_uri() if you want to use any of the built in icons + * */ + function dynamic_section( $sections ) { + //$sections = array(); + $sections[] = array( + 'title' => __( 'Section via hook', 'redux-framework-demo' ), + 'desc' => __( '

This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.

', 'redux-framework-demo' ), + 'icon' => 'el-icon-paper-clip', + // Leave this as a blank section, no options just some intro text set above. + 'fields' => array() + ); + + return $sections; + } + + /** + * Filter hook for filtering the args. Good for child themes to override or add to the args array. Can also be used in other functions. + * */ + function change_arguments( $args ) { + //$args['dev_mode'] = true; + + return $args; + } + + /** + * Filter hook for filtering the default value of any given field. Very useful in development mode. + * */ + function change_defaults( $defaults ) { + $defaults['str_replace'] = 'Testing filter hook!'; + + return $defaults; + } + + // Remove the demo link and the notice of integrated demo from the redux-framework plugin + function remove_demo() { + + // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin. + if ( class_exists( 'ReduxFrameworkPlugin' ) ) { + remove_filter( 'plugin_row_meta', array( + ReduxFrameworkPlugin::instance(), + 'plugin_metalinks' + ), null, 2 ); + + // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin. + remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) ); + } + } + + public function setSections() { + + /** + * Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples + * */ + // Background Patterns Reader + $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/'; + $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/'; + $sample_patterns = array(); + + if ( is_dir( $sample_patterns_path ) ) : + + if ( $sample_patterns_dir = opendir( $sample_patterns_path ) ) : + $sample_patterns = array(); + + while ( ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) !== false ) { + + if ( stristr( $sample_patterns_file, '.png' ) !== false || stristr( $sample_patterns_file, '.jpg' ) !== false ) { + $name = explode( '.', $sample_patterns_file ); + $name = str_replace( '.' . end( $name ), '', $sample_patterns_file ); + $sample_patterns[] = array( + 'alt' => $name, + 'img' => $sample_patterns_url . $sample_patterns_file + ); + } + } + endif; + endif; + + ob_start(); + + $ct = wp_get_theme(); + $this->theme = $ct; + $item_name = $this->theme->get( 'Name' ); + $tags = $this->theme->Tags; + $screenshot = $this->theme->get_screenshot(); + $class = $screenshot ? 'has-screenshot' : ''; + + $customize_title = sprintf( __( 'Customize “%s”', 'redux-framework-demo' ), $this->theme->display( 'Name' ) ); + + ?> +
+ + + + <?php esc_attr_e( 'Current theme preview', 'redux-framework-demo' ); ?> + + + <?php esc_attr_e( 'Current theme preview', 'redux-framework-demo' ); ?> + + +

theme->display( 'Name' ); ?>

+ +
+
    +
  • theme->display( 'Author' ) ); ?>
  • +
  • theme->display( 'Version' ) ); ?>
  • +
  • ' . __( 'Tags', 'redux-framework-demo' ) . ': '; ?>theme->display( 'Tags' ) ); ?>
  • +
+

theme->display( 'Description' ); ?>

+ theme->parent() ) { + printf( '

' . __( 'This child theme requires its parent theme, %2$s.', 'redux-framework-demo' ) . '

', __( 'http://codex.wordpress.org/Child_Themes', 'redux-framework-demo' ), $this->theme->parent()->display( 'Name' ) ); + } + ?> + +
+
+ + get_contents( dirname( __FILE__ ) . '/info-html.html' ); + } + + // ACTUAL DECLARATION OF SECTIONS + $this->sections[] = array( + 'title' => __( 'Home Settings', 'redux-framework-demo' ), + 'desc' => __( 'Redux Framework was created with the developer in mind. It allows for any theme developer to have an advanced theme panel with most of the features a developer would need. For more information check out the Github repo at: https://github.com/ReduxFramework/Redux-Framework', 'redux-framework-demo' ), + 'icon' => 'el-icon-home', + // 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu! + 'fields' => array( + + array( + 'id' => 'opt-web-fonts', + 'type' => 'media', + 'title' => __( 'Web Fonts', 'redux-framework-demo' ), + 'compiler' => 'true', + 'mode' => false, + // Can be set to false to allow any media type, or can also be set to any mime type. + 'desc' => __( 'Basic media uploader with disabled URL input field.', 'redux-framework-demo' ), + 'subtitle' => __( 'Upload any media using the WordPress native uploader', 'redux-framework-demo' ), + 'hint' => array( + //'title' => '', + 'content' => 'This is a hint tool-tip for the webFonts field.

Add any HTML based text you like here.', + ) + ), + array( + 'id' => 'section-media-checkbox', + 'type' => 'switch', + 'title' => __( 'Section Show', 'redux-framework-demo' ), + 'subtitle' => __( 'With the "section" field you can create indent option sections.', 'redux-framework-demo' ), + + ), + array( + 'id' => 'section-media-start', + 'type' => 'section', + 'title' => __( 'Media Options', 'redux-framework-demo' ), + 'subtitle' => __( 'With the "section" field you can create indent option sections.', 'redux-framework-demo' ), + 'indent' => true, // Indent all options below until the next 'section' option is set. + 'required' => array( 'section-media-checkbox', "=", 1 ), + ), + array( + 'id' => 'opt-media', + 'type' => 'media', + 'url' => true, + 'title' => __( 'Media w/ URL', 'redux-framework-demo' ), + 'compiler' => 'true', + //'mode' => false, // Can be set to false to allow any media type, or can also be set to any mime type. + 'desc' => __( 'Basic media uploader with disabled URL input field.', 'redux-framework-demo' ), + 'subtitle' => __( 'Upload any media using the WordPress native uploader', 'redux-framework-demo' ), + 'default' => array( 'url' => 'http://s.wordpress.org/style/images/codeispoetry.png' ), + //'hint' => array( + // 'title' => 'Hint Title', + // 'content' => 'This is a hint for the media field with a Title.', + //) + ), + array( + 'id' => 'section-media-end', + 'type' => 'section', + 'indent' => false, // Indent all options below until the next 'section' option is set. + 'required' => array( 'section-media-checkbox', "=", 1 ), + ), + array( + 'id' => 'media-no-url', + 'type' => 'media', + 'title' => __( 'Media w/o URL', 'redux-framework-demo' ), + 'desc' => __( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'redux-framework-demo' ), + 'subtitle' => __( 'Upload any media using the WordPress native uploader', 'redux-framework-demo' ), + ), + array( + 'id' => 'media-no-preview', + 'type' => 'media', + 'preview' => false, + 'title' => __( 'Media No Preview', 'redux-framework-demo' ), + 'desc' => __( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'redux-framework-demo' ), + 'subtitle' => __( 'Upload any media using the WordPress native uploader', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-gallery', + 'type' => 'gallery', + 'title' => __( 'Add/Edit Gallery', 'redux-framework-demo' ), + 'subtitle' => __( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-slider-label', + 'type' => 'slider', + 'title' => __( 'Slider Example 1', 'redux-framework-demo' ), + 'subtitle' => __( 'This slider displays the value as a label.', 'redux-framework-demo' ), + 'desc' => __( 'Slider description. Min: 1, max: 500, step: 1, default value: 250', 'redux-framework-demo' ), + 'default' => 250, + 'min' => 1, + 'step' => 1, + 'max' => 500, + 'display_value' => 'label' + ), + array( + 'id' => 'opt-slider-text', + 'type' => 'slider', + 'title' => __( 'Slider Example 2 with Steps (5)', 'redux-framework-demo' ), + 'subtitle' => __( 'This example displays the value in a text box', 'redux-framework-demo' ), + 'desc' => __( 'Slider description. Min: 0, max: 300, step: 5, default value: 75', 'redux-framework-demo' ), + 'default' => 75, + 'min' => 0, + 'step' => 5, + 'max' => 300, + 'display_value' => 'text' + ), + array( + 'id' => 'opt-slider-select', + 'type' => 'slider', + 'title' => __( 'Slider Example 3 with two sliders', 'redux-framework-demo' ), + 'subtitle' => __( 'This example displays the values in select boxes', 'redux-framework-demo' ), + 'desc' => __( 'Slider description. Min: 0, max: 500, step: 5, slider 1 default value: 100, slider 2 default value: 300', 'redux-framework-demo' ), + 'default' => array( + 1 => 100, + 2 => 300, + ), + 'min' => 0, + 'step' => 5, + 'max' => '500', + 'display_value' => 'select', + 'handles' => 2, + ), + array( + 'id' => 'opt-slider-float', + 'type' => 'slider', + 'title' => __( 'Slider Example 4 with float values', 'redux-framework-demo' ), + 'subtitle' => __( 'This example displays float values', 'redux-framework-demo' ), + 'desc' => __( 'Slider description. Min: 0, max: 1, step: .1, default value: .5', 'redux-framework-demo' ), + 'default' => .5, + 'min' => 0, + 'step' => .1, + 'max' => 1, + 'resolution' => 0.1, + 'display_value' => 'text' + ), + array( + 'id' => 'opt-spinner', + 'type' => 'spinner', + 'title' => __( 'JQuery UI Spinner Example 1', 'redux-framework-demo' ), + 'desc' => __( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'redux-framework-demo' ), + 'default' => '40', + 'min' => '20', + 'step' => '20', + 'max' => '100', + ), + array( + 'id' => 'switch-on', + 'type' => 'switch', + 'title' => __( 'Switch On', 'redux-framework-demo' ), + 'subtitle' => __( 'Look, it\'s on!', 'redux-framework-demo' ), + 'default' => true, + ), + array( + 'id' => 'switch-off', + 'type' => 'switch', + 'title' => __( 'Switch Off', 'redux-framework-demo' ), + 'subtitle' => __( 'Look, it\'s on!', 'redux-framework-demo' ), + //'options' => array('on', 'off'), + 'default' => false, + ), + array( + 'id' => 'switch-parent', + 'type' => 'switch', + 'title' => __( 'Switch - Nested Children, Enable to show', 'redux-framework-demo' ), + 'subtitle' => __( 'Look, it\'s on! Also hidden child elements!', 'redux-framework-demo' ), + 'default' => 0, + 'on' => 'Enabled', + 'off' => 'Disabled', + ), + array( + 'id' => 'switch-child1', + 'type' => 'switch', + 'required' => array( 'switch-parent', '=', '1' ), + 'title' => __( 'Switch - This and the next switch required for patterns to show', 'redux-framework-demo' ), + 'subtitle' => __( 'Also called a "fold" parent.', 'redux-framework-demo' ), + 'desc' => __( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'redux-framework-demo' ), + 'default' => false, + ), + array( + 'id' => 'switch-child2', + 'type' => 'switch', + 'required' => array( 'switch-parent', '=', '1' ), + 'title' => __( 'Switch2 - Enable the above switch and this one for patterns to show', 'redux-framework-demo' ), + 'subtitle' => __( 'Also called a "fold" parent.', 'redux-framework-demo' ), + 'desc' => __( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'redux-framework-demo' ), + 'default' => false, + ), + array( + 'id' => 'opt-patterns', + 'type' => 'image_select', + 'tiles' => true, + 'required' => array( + array( 'switch-child1', 'equals', 1 ), + array( 'switch-child2', 'equals', 1 ), + ), + 'title' => __( 'Images Option (with pattern=>true)', 'redux-framework-demo' ), + 'subtitle' => __( 'Select a background pattern.', 'redux-framework-demo' ), + 'default' => 0, + 'options' => $sample_patterns + , + ), + array( + 'id' => 'opt-homepage-layout', + 'type' => 'sorter', + 'title' => 'Layout Manager Advanced', + 'subtitle' => 'You can add multiple drop areas or columns.', + 'compiler' => 'true', + 'options' => array( + 'enabled' => array( + 'highlights' => 'Highlights', + 'slider' => 'Slider', + 'staticpage' => 'Static Page', + 'services' => 'Services' + ), + 'disabled' => array(), + 'backup' => array(), + ), + 'limits' => array( + 'disabled' => 1, + 'backup' => 2, + ), + ), + array( + 'id' => 'opt-homepage-layout-2', + 'type' => 'sorter', + 'title' => 'Homepage Layout Manager', + 'desc' => 'Organize how you want the layout to appear on the homepage', + 'compiler' => 'true', + 'options' => array( + 'disabled' => array( + 'highlights' => 'Highlights', + 'slider' => 'Slider', + ), + 'enabled' => array( + 'staticpage' => 'Static Page', + 'services' => 'Services' + ), + ), + ), + array( + 'id' => 'opt-slides', + 'type' => 'slides', + 'title' => __( 'Slides Options', 'redux-framework-demo' ), + 'subtitle' => __( 'Unlimited slides with drag and drop sortings.', 'redux-framework-demo' ), + 'desc' => __( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'redux-framework-demo' ), + 'placeholder' => array( + 'title' => __( 'This is a title', 'redux-framework-demo' ), + 'description' => __( 'Description Here', 'redux-framework-demo' ), + 'url' => __( 'Give us a link!', 'redux-framework-demo' ), + ), + ), + array( + 'id' => 'opt-presets', + 'type' => 'image_select', + 'presets' => true, + 'title' => __( 'Preset', 'redux-framework-demo' ), + 'subtitle' => __( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'redux-framework-demo' ), + 'default' => 0, + 'desc' => __( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'redux-framework-demo' ), + 'options' => array( + '1' => array( + 'alt' => 'Preset 1', + 'img' => ReduxFramework::$_url . '../sample/presets/preset1.png', + 'presets' => array( + 'switch-on' => 1, + 'switch-off' => 1, + 'switch-parent' => 1 + ) + ), + '2' => array( + 'alt' => 'Preset 2', + 'img' => ReduxFramework::$_url . '../sample/presets/preset2.png', + 'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}' + ), + ), + ), + array( + 'id' => 'opt-typography', + 'type' => 'typography', + 'title' => __( 'Typography', 'redux-framework-demo' ), + //'compiler' => true, // Use if you want to hook in your own CSS compiler + 'google' => true, + // Disable google fonts. Won't work if you haven't defined your google api key + 'font-backup' => true, + // Select a backup non-google font in addition to a google font + //'font-style' => false, // Includes font-style and weight. Can use font-style or font-weight to declare + //'subsets' => false, // Only appears if google is true and subsets not set to false + //'font-size' => false, + //'line-height' => false, + //'word-spacing' => true, // Defaults to false + //'letter-spacing'=> true, // Defaults to false + //'color' => false, + //'preview' => false, // Disable the previewer + 'all_styles' => true, + // Enable all Google Font style/weight variations to be added to the page + 'output' => array( 'h2.site-description, .entry-title' ), + // An array of CSS selectors to apply this font style to dynamically + 'compiler' => array( 'h2.site-description-compiler' ), + // An array of CSS selectors to apply this font style to dynamically + 'units' => 'px', + // Defaults to px + 'subtitle' => __( 'Typography option with each property can be called individually.', 'redux-framework-demo' ), + 'default' => array( + 'color' => '#333', + 'font-style' => '700', + 'font-family' => 'Abel', + 'google' => true, + 'font-size' => '33px', + 'line-height' => '40px' + ), + ), + ), + ); + + $this->sections[] = array( + 'type' => 'divide', + ); + + $this->sections[] = array( + 'icon' => 'el-icon-cogs', + 'title' => __( 'General Settings', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => 'opt-layout', + 'type' => 'image_select', + 'compiler' => true, + 'title' => __( 'Main Layout', 'redux-framework-demo' ), + 'subtitle' => __( 'Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'redux-framework-demo' ), + 'options' => array( + '1' => array( + 'alt' => '1 Column', + 'img' => ReduxFramework::$_url . 'assets/img/1col.png' + ), + '2' => array( + 'alt' => '2 Column Left', + 'img' => ReduxFramework::$_url . 'assets/img/2cl.png' + ), + '3' => array( + 'alt' => '2 Column Right', + 'img' => ReduxFramework::$_url . 'assets/img/2cr.png' + ), + '4' => array( + 'alt' => '3 Column Middle', + 'img' => ReduxFramework::$_url . 'assets/img/3cm.png' + ), + '5' => array( + 'alt' => '3 Column Left', + 'img' => ReduxFramework::$_url . 'assets/img/3cl.png' + ), + '6' => array( + 'alt' => '3 Column Right', + 'img' => ReduxFramework::$_url . 'assets/img/3cr.png' + ) + ), + 'default' => '2' + ), + array( + 'id' => 'opt-textarea', + 'type' => 'textarea', + 'required' => array( 'layout', 'equals', '1' ), + 'title' => __( 'Tracking Code', 'redux-framework-demo' ), + 'subtitle' => __( 'Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'redux-framework-demo' ), + 'validate' => 'js', + 'desc' => 'Validate that it\'s javascript!', + ), + array( + 'id' => 'opt-ace-editor-css', + 'type' => 'ace_editor', + 'title' => __( 'CSS Code', 'redux-framework-demo' ), + 'subtitle' => __( 'Paste your CSS code here.', 'redux-framework-demo' ), + 'mode' => 'css', + 'theme' => 'monokai', + 'desc' => 'Possible modes can be found at http://ace.c9.io/.', + 'default' => "#header{\nmargin: 0 auto;\n}" + ), + /* + array( + 'id' => 'opt-ace-editor-js', + 'type' => 'ace_editor', + 'title' => __('JS Code', 'redux-framework-demo'), + 'subtitle' => __('Paste your JS code here.', 'redux-framework-demo'), + 'mode' => 'javascript', + 'theme' => 'chrome', + 'desc' => 'Possible modes can be found at http://ace.c9.io/.', + 'default' => "jQuery(document).ready(function(){\n\n});" + ), + array( + 'id' => 'opt-ace-editor-php', + 'type' => 'ace_editor', + 'title' => __('PHP Code', 'redux-framework-demo'), + 'subtitle' => __('Paste your PHP code here.', 'redux-framework-demo'), + 'mode' => 'php', + 'theme' => 'chrome', + 'desc' => 'Possible modes can be found at http://ace.c9.io/.', + 'default' => '' + ), + */ + array( + 'id' => 'opt-editor', + 'type' => 'editor', + 'title' => __( 'Footer Text', 'redux-framework-demo' ), + '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' ), + 'default' => 'Powered by Redux Framework.', + ), + array( + 'id' => 'password', + 'type' => 'password', + 'username' => true, + 'title' => 'SMTP Account', + //'placeholder' => array('username' => 'Enter your Username') + ) + ) + ); + + $this->sections[] = array( + 'icon' => 'el-icon-website', + 'title' => __( 'Styling Options', 'redux-framework-demo' ), + 'subsection' => true, + 'fields' => array( + array( + 'id' => 'opt-select-stylesheet', + 'type' => 'select', + 'title' => __( 'Theme Stylesheet', 'redux-framework-demo' ), + 'subtitle' => __( 'Select your themes alternative color scheme.', 'redux-framework-demo' ), + 'options' => array( 'default.css' => 'default.css', 'color1.css' => 'color1.css' ), + 'default' => 'default.css', + ), + array( + 'id' => 'opt-color-background', + 'type' => 'color', + 'output' => array( '.site-title' ), + 'title' => __( 'Body Background Color', 'redux-framework-demo' ), + 'subtitle' => __( 'Pick a background color for the theme (default: #fff).', 'redux-framework-demo' ), + 'default' => '#FFFFFF', + 'validate' => 'color', + ), + array( + 'id' => 'opt-background', + 'type' => 'background', + 'output' => array( 'body' ), + 'title' => __( 'Body Background', 'redux-framework-demo' ), + 'subtitle' => __( 'Body background with image, color, etc.', 'redux-framework-demo' ), + //'default' => '#FFFFFF', + ), + array( + 'id' => 'opt-color-footer', + 'type' => 'color', + 'title' => __( 'Footer Background Color', 'redux-framework-demo' ), + 'subtitle' => __( 'Pick a background color for the footer (default: #dd9933).', 'redux-framework-demo' ), + 'default' => '#dd9933', + 'validate' => 'color', + ), + array( + 'id' => 'opt-color-rgba', + 'type' => 'color_rgba', + 'title' => __( 'Color RGBA - BETA', 'redux-framework-demo' ), + 'subtitle' => __( 'Gives you the RGBA color. Still quite experimental. Use at your own risk.', 'redux-framework-demo' ), + 'default' => array( 'color' => '#dd9933', 'alpha' => '1.0' ), + 'output' => array( 'body' ), + 'mode' => 'background', + 'validate' => 'colorrgba', + ), + array( + 'id' => 'opt-color-header', + 'type' => 'color_gradient', + 'title' => __( 'Header Gradient Color Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Only color validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'default' => array( + 'from' => '#1e73be', + 'to' => '#00897e' + ) + ), + array( + 'id' => 'opt-link-color', + 'type' => 'link_color', + 'title' => __( 'Links Color Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Only color validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //'regular' => false, // Disable Regular Color + //'hover' => false, // Disable Hover Color + //'active' => false, // Disable Active Color + //'visited' => true, // Enable Visited Color + 'default' => array( + 'regular' => '#aaa', + 'hover' => '#bbb', + 'active' => '#ccc', + ) + ), + array( + 'id' => 'opt-header-border', + 'type' => 'border', + 'title' => __( 'Header Border Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Only color validation can be done on this field type', 'redux-framework-demo' ), + 'output' => array( '.site-header' ), + // An array of CSS selectors to apply this font style to + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'default' => array( + 'border-color' => '#1e73be', + 'border-style' => 'solid', + 'border-top' => '3px', + 'border-right' => '3px', + 'border-bottom' => '3px', + 'border-left' => '3px' + ) + ), + array( + 'id' => 'opt-spacing', + 'type' => 'spacing', + 'output' => array( '.site-header' ), + // An array of CSS selectors to apply this font style to + 'mode' => 'margin', + // absolute, padding, margin, defaults to padding + 'all' => true, + // Have one field that applies to all + //'top' => false, // Disable the top + //'right' => false, // Disable the right + //'bottom' => false, // Disable the bottom + //'left' => false, // Disable the left + //'units' => 'em', // You can specify a unit value. Possible: px, em, % + //'units_extended'=> 'true', // Allow users to select any type of unit + //'display_units' => 'false', // Set to false to hide the units if the units are specified + 'title' => __( 'Padding/Margin Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Allow your users to choose the spacing or margin they want.', 'redux-framework-demo' ), + 'desc' => __( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'redux-framework-demo' ), + 'default' => array( + 'margin-top' => '1px', + 'margin-right' => '2px', + 'margin-bottom' => '3px', + 'margin-left' => '4px' + ) + ), + array( + 'id' => 'opt-dimensions', + 'type' => 'dimensions', + 'units' => 'em', // You can specify a unit value. Possible: px, em, % + 'units_extended' => 'true', // Allow users to select any type of unit + 'title' => __( 'Dimensions (Width/Height) Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Allow your users to choose width, height, and/or unit.', 'redux-framework-demo' ), + 'desc' => __( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'redux-framework-demo' ), + 'default' => array( + 'width' => 200, + 'height' => 100, + ) + ), + array( + 'id' => 'opt-typography-body', + 'type' => 'typography', + 'title' => __( 'Body Font', 'redux-framework-demo' ), + 'subtitle' => __( 'Specify the body font properties.', 'redux-framework-demo' ), + 'google' => true, + 'default' => array( + 'color' => '#dd9933', + 'font-size' => '30px', + 'font-family' => 'Arial,Helvetica,sans-serif', + 'font-weight' => 'Normal', + ), + ), + array( + 'id' => 'opt-custom-css', + 'type' => 'textarea', + 'title' => __( 'Custom CSS', 'redux-framework-demo' ), + 'subtitle' => __( 'Quickly add some CSS to your theme by adding it to this block.', 'redux-framework-demo' ), + 'desc' => __( 'This field is even CSS validated!', 'redux-framework-demo' ), + 'validate' => 'css', + ), + array( + 'id' => 'opt-custom-html', + 'type' => 'textarea', + 'title' => __( 'Custom HTML', 'redux-framework-demo' ), + 'subtitle' => __( 'Just like a text box widget.', 'redux-framework-demo' ), + 'desc' => __( 'This field is even HTML validated!', 'redux-framework-demo' ), + 'validate' => 'html', + ), + ) + ); + + /** + * Note here I used a 'heading' in the sections array construct + * This allows you to use a different title on your options page + * instead of reusing the 'title' value. This can be done on any + * section - kp + */ + $this->sections[] = array( + 'icon' => 'el-icon-bullhorn', + 'title' => __( 'Field Validation', 'redux-framework-demo' ), + 'heading' => __( 'Validate ALL fields within Redux.', 'redux-framework-demo' ), + 'desc' => __( '

This is the Description. Again HTML is allowed2

', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => 'opt-text-email', + 'type' => 'text', + 'title' => __( 'Text Option - Email Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'This is a little space under the Field Title in the Options table, additional info is good in here.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'email', + 'msg' => 'custom error message', + 'default' => 'test@test.com', + // 'text_hint' => array( + // 'title' => 'Valid Email Required!', + // 'content' => 'This field required a valid email address.' + // ) + ), + array( + 'id' => 'opt-text-post-type', + 'type' => 'text', + 'title' => __( 'Text Option with Data Attributes', 'redux-framework-demo' ), + 'subtitle' => __( 'You can also pass an options array if you want. Set the default to whatever you like.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'data' => 'post_type', + ), + array( + 'id' => 'opt-multi-text', + 'type' => 'multi_text', + 'title' => __( 'Multi Text Option - Color Validated', 'redux-framework-demo' ), + 'validate' => 'color', + 'subtitle' => __( 'If you enter an invalid color it will be removed. Try using the text "blue" as a color. ;)', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-text-url', + 'type' => 'text', + 'title' => __( 'Text Option - URL Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'This must be a URL.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'url', + 'default' => 'http://reduxframework.com', + // 'text_hint' => array( + // 'title' => '', + // 'content' => 'Please enter a valid URL in this field.' + // ) + ), + array( + 'id' => 'opt-text-numeric', + 'type' => 'text', + 'title' => __( 'Text Option - Numeric Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'This must be numeric.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'numeric', + 'default' => '0', + ), + array( + 'id' => 'opt-text-comma-numeric', + 'type' => 'text', + 'title' => __( 'Text Option - Comma Numeric Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'This must be a comma separated string of numerical values.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'comma_numeric', + 'default' => '0', + ), + array( + 'id' => 'opt-text-no-special-chars', + 'type' => 'text', + 'title' => __( 'Text Option - No Special Chars Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'This must be a alpha numeric only.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'no_special_chars', + 'default' => '0' + ), + array( + 'id' => 'opt-text-str_replace', + 'type' => 'text', + 'title' => __( 'Text Option - Str Replace Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'You decide.', 'redux-framework-demo' ), + 'desc' => __( 'This field\'s default value was changed by a filter hook!', 'redux-framework-demo' ), + 'validate' => 'str_replace', + 'str' => array( + 'search' => ' ', + 'replacement' => 'thisisaspace' + ), + 'default' => 'This is the default.' + ), + array( + 'id' => 'opt-text-preg_replace', + 'type' => 'text', + 'title' => __( 'Text Option - Preg Replace Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'You decide.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'preg_replace', + 'preg' => array( + 'pattern' => '/[^a-zA-Z_ -]/s', + 'replacement' => 'no numbers' + ), + 'default' => '0' + ), + array( + 'id' => 'opt-text-custom_validate', + 'type' => 'text', + 'title' => __( 'Text Option - Custom Callback Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'You decide.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate_callback' => 'redux_validate_callback_function', + 'default' => '0' + ), + array( + 'id' => 'opt-text-custom_validate-class', + 'type' => 'text', + 'title' => __( 'Text Option - Custom Callback Validated - Class', 'redux-framework-demo' ), + 'subtitle' => __( 'You decide.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate_callback' => array( $this, 'validate_callback_function' ), + // You can pass the current class + // Or pass the class name and method + //'validate_callback' => array( + // 'Redux_Framework_sample_config', + // 'validate_callback_function' + //), + 'default' => '0' + ), + array( + 'id' => 'opt-textarea-no-html', + 'type' => 'textarea', + 'title' => __( 'Textarea Option - No HTML Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'All HTML will be stripped', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'no_html', + 'default' => 'No HTML is allowed in here.' + ), + array( + 'id' => 'opt-textarea-html', + 'type' => 'textarea', + 'title' => __( 'Textarea Option - HTML Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'HTML Allowed (wp_kses)', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'html', //see http://codex.wordpress.org/Function_Reference/wp_kses_post + 'default' => 'HTML is allowed in here.' + ), + array( + 'id' => 'opt-textarea-some-html', + 'type' => 'textarea', + 'title' => __( 'Textarea Option - HTML Validated Custom', 'redux-framework-demo' ), + 'subtitle' => __( 'Custom HTML Allowed (wp_kses)', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'html_custom', + 'default' => '

Some HTML is allowed in here.

', + 'allowed_html' => array( '' ) //see http://codex.wordpress.org/Function_Reference/wp_kses + ), + array( + 'id' => 'opt-textarea-js', + 'type' => 'textarea', + 'title' => __( 'Textarea Option - JS Validated', 'redux-framework-demo' ), + 'subtitle' => __( 'JS will be escaped', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'validate' => 'js' + ), + ) + ); + + $this->sections[] = array( + 'icon' => 'el-icon-check', + 'title' => __( 'Radio/Checkbox Fields', 'redux-framework-demo' ), + 'desc' => __( '

This is the Description. Again HTML is allowed

', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => 'opt-checkbox', + 'type' => 'checkbox', + 'title' => __( 'Checkbox Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'default' => '1'// 1 = on | 0 = off + ), + array( + 'id' => 'opt-multi-check', + 'type' => 'checkbox', + 'title' => __( 'Multi Checkbox Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //Must provide key => value pairs for multi checkbox options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + //See how std has changed? you also don't need to specify opts that are 0. + 'default' => array( + '1' => '1', + '2' => '0', + '3' => '0' + ) + ), + array( + 'id' => 'opt-checkbox-data', + 'type' => 'checkbox', + 'title' => __( 'Multi Checkbox Option (with menu data)', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'data' => 'menu' + ), + array( + 'id' => 'opt-checkbox-sidebar', + 'type' => 'checkbox', + 'title' => __( 'Multi Checkbox Option (with sidebar data)', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'data' => 'sidebars' + ), + array( + 'id' => 'opt-radio', + 'type' => 'radio', + 'title' => __( 'Radio Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //Must provide key => value pairs for radio options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'default' => '2' + ), + array( + 'id' => 'opt-radio-data', + 'type' => 'radio', + 'title' => __( 'Multi Checkbox Option (with menu data)', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'data' => 'menu' + ), + array( + 'id' => 'opt-image-select', + 'type' => 'image_select', + 'title' => __( 'Images Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //Must provide key => value(array:title|img) pairs for radio options + 'options' => array( + '1' => array( 'title' => 'Opt 1', 'img' => 'images/align-none.png' ), + '2' => array( 'title' => 'Opt 2', 'img' => 'images/align-left.png' ), + '3' => array( 'title' => 'Opt 3', 'img' => 'images/align-center.png' ), + '4' => array( 'title' => 'Opt 4', 'img' => 'images/align-right.png' ) + ), + 'default' => '2' + ), + array( + 'id' => 'opt-image-select-layout', + 'type' => 'image_select', + 'title' => __( 'Images Option for Layout', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This uses some of the built in images, you can use them for layout options.', 'redux-framework-demo' ), + //Must provide key => value(array:title|img) pairs for radio options + 'options' => array( + '1' => array( + 'alt' => '1 Column', + 'img' => ReduxFramework::$_url . 'assets/img/1col.png' + ), + '2' => array( + 'alt' => '2 Column Left', + 'img' => ReduxFramework::$_url . 'assets/img/2cl.png' + ), + '3' => array( + 'alt' => '2 Column Right', + 'img' => ReduxFramework::$_url . 'assets/img/2cr.png' + ), + '4' => array( + 'alt' => '3 Column Middle', + 'img' => ReduxFramework::$_url . 'assets/img/3cm.png' + ), + '5' => array( + 'alt' => '3 Column Left', + 'img' => ReduxFramework::$_url . 'assets/img/3cl.png' + ), + '6' => array( + 'alt' => '3 Column Right', + 'img' => ReduxFramework::$_url . 'assets/img/3cr.png' + ) + ), + 'default' => '2' + ), + array( + 'id' => 'opt-sortable', + 'type' => 'sortable', + 'title' => __( 'Sortable Text Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Define and reorder these however you want.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'options' => array( + 'si1' => 'Item 1', + 'si2' => 'Item 2', + 'si3' => 'Item 3', + ) + ), + array( + 'id' => 'opt-check-sortable', + 'type' => 'sortable', + 'mode' => 'checkbox', // checkbox or text + 'title' => __( 'Sortable Text Option', 'redux-framework-demo' ), + 'subtitle' => __( 'Define and reorder these however you want.', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'options' => array( + 'si1' => false, + 'si2' => true, + 'si3' => false, + ) + ), + ) + ); + + $this->sections[] = array( + 'icon' => 'el-icon-list-alt', + 'title' => __( 'Select Fields', 'redux-framework-demo' ), + 'desc' => __( '

This is the Description. Again HTML is allowed

', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => 'opt-select', + 'type' => 'select', + 'title' => __( 'Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //Must provide key => value pairs for select options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'default' => '2' + ), + array( + 'id' => 'opt-multi-select', + 'type' => 'select', + 'multi' => true, + 'title' => __( 'Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //Must provide key => value pairs for radio options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'required' => array( 'select', 'equals', array( '1', '3' ) ), + 'default' => array( '2', '3' ) + ), + array( + 'id' => 'opt-select-image', + 'type' => 'select_image', + 'title' => __( 'Select Image', 'redux-framework-demo' ), + 'subtitle' => __( 'A preview of the selected image will appear underneath the select box.', 'redux-framework-demo' ), + 'options' => $sample_patterns, + // Alternatively + //'options' => Array( + // 'img_name' => 'img_path' + // ) + 'default' => 'tree_bark.png', + ), + array( + 'id' => 'opt-info', + 'type' => 'info', + 'desc' => __( 'You can easily add a variety of data from WordPress.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-categories', + 'type' => 'select', + 'data' => 'categories', + 'title' => __( 'Categories Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-categories-multi', + 'type' => 'select', + 'data' => 'categories', + 'multi' => true, + 'title' => __( 'Categories Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-pages', + 'type' => 'select', + 'data' => 'pages', + 'title' => __( 'Pages Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-multi-select-pages', + 'type' => 'select', + 'data' => 'pages', + 'multi' => true, + 'title' => __( 'Pages Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-tags', + 'type' => 'select', + 'data' => 'tags', + 'title' => __( 'Tags Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-multi-select-tags', + 'type' => 'select', + 'data' => 'tags', + 'multi' => true, + 'title' => __( 'Tags Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-menus', + 'type' => 'select', + 'data' => 'menus', + 'title' => __( 'Menus Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-multi-select-menus', + 'type' => 'select', + 'data' => 'menu', + 'multi' => true, + 'title' => __( 'Menus Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-post-type', + 'type' => 'select', + 'data' => 'post_type', + 'title' => __( 'Post Type Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-multi-select-post-type', + 'type' => 'select', + 'data' => 'post_type', + 'multi' => true, + 'title' => __( 'Post Type Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-multi-select-sortable', + 'type' => 'select', + 'data' => 'post_type', + 'multi' => true, + 'sortable' => true, + 'title' => __( 'Post Type Multi Select Option + Sortable', 'redux-framework-demo' ), + 'subtitle' => __( 'This field also has sortable enabled!', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-posts', + 'type' => 'select', + 'data' => 'post', + 'title' => __( 'Posts Select Option2', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-multi-select-posts', + 'type' => 'select', + 'data' => 'post', + 'multi' => true, + 'title' => __( 'Posts Multi Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-roles', + 'type' => 'select', + 'data' => 'roles', + 'title' => __( 'User Role Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-capabilities', + 'type' => 'select', + 'data' => 'capabilities', + 'multi' => true, + 'title' => __( 'Capabilities Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + ), + array( + 'id' => 'opt-select-elusive', + 'type' => 'select', + 'data' => 'elusive-icons', + 'title' => __( 'Elusive Icons Select Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'Here\'s a list of all the elusive icons by name and icon.', 'redux-framework-demo' ), + ), + ) + ); + + $theme_info = '
'; + $theme_info .= '

' . __( 'Theme URL: ', 'redux-framework-demo' ) . '' . $this->theme->get( 'ThemeURI' ) . '

'; + $theme_info .= '

' . __( 'Author: ', 'redux-framework-demo' ) . $this->theme->get( 'Author' ) . '

'; + $theme_info .= '

' . __( 'Version: ', 'redux-framework-demo' ) . $this->theme->get( 'Version' ) . '

'; + $theme_info .= '

' . $this->theme->get( 'Description' ) . '

'; + $tabs = $this->theme->get( 'Tags' ); + if ( ! empty( $tabs ) ) { + $theme_info .= '

' . __( 'Tags: ', 'redux-framework-demo' ) . implode( ', ', $tabs ) . '

'; + } + $theme_info .= '
'; + + if ( file_exists( dirname( __FILE__ ) . '/../README.md' ) ) { + $this->sections['theme_docs'] = array( + 'icon' => 'el-icon-list-alt', + 'title' => __( 'Documentation', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => '17', + 'type' => 'raw', + 'markdown' => true, + 'content' => file_get_contents( dirname( __FILE__ ) . '/../README.md' ) + ), + ), + ); + } + + // You can append a new section at any time. + $this->sections[] = array( + 'icon' => 'el-icon-eye-open', + 'title' => __( 'Additional Fields', 'redux-framework-demo' ), + 'desc' => __( '

This is the Description. Again HTML is allowed

', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => 'opt-datepicker', + 'type' => 'date', + 'title' => __( 'Date Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-divide', + 'type' => 'divide' + ), + array( + 'id' => 'opt-button-set', + 'type' => 'button_set', + 'title' => __( 'Button Set Option', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + //Must provide key => value pairs for radio options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'default' => '2' + ), + array( + 'id' => 'opt-button-set-multi', + 'type' => 'button_set', + 'title' => __( 'Button Set, Multi Select', 'redux-framework-demo' ), + 'subtitle' => __( 'No validation can be done on this field type', 'redux-framework-demo' ), + 'desc' => __( 'This is the description field, again good for additional info.', 'redux-framework-demo' ), + 'multi' => true, + //Must provide key => value pairs for radio options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'default' => array( '2', '3' ) + ), + array( + 'id' => 'opt-info-field', + 'type' => 'info', + 'desc' => __( 'This is the info field, if you want to break sections up.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-info-warning', + 'type' => 'info', + 'style' => 'warning', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info field with the warning style applied and a header.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-info-success', + 'type' => 'info', + 'style' => 'success', + 'icon' => 'el-icon-info-sign', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info field with the success style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-info-critical', + 'type' => 'info', + 'style' => 'critical', + 'icon' => 'el-icon-info-sign', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info field with the critical style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-raw_info', + 'type' => 'info', + 'required' => array( '18', 'equals', array( '1', '2' ) ), + 'raw_html' => true, + 'desc' => $sampleHTML, + ), + array( + 'id' => 'opt-info-normal', + 'type' => 'info', + 'notice' => true, + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info notice field with the normal style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-notice-info', + 'type' => 'info', + 'notice' => true, + 'style' => 'info', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info notice field with the info style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-notice-warning', + 'type' => 'info', + 'notice' => true, + 'style' => 'warning', + 'icon' => 'el-icon-info-sign', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info notice field with the warning style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-notice-success', + 'type' => 'info', + 'notice' => true, + 'style' => 'success', + 'icon' => 'el-icon-info-sign', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an info notice field with the success style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-notice-critical', + 'type' => 'info', + 'notice' => true, + 'style' => 'critical', + 'icon' => 'el-icon-info-sign', + 'title' => __( 'This is a title.', 'redux-framework-demo' ), + 'desc' => __( 'This is an notice field with the critical style applied, a header and an icon.', 'redux-framework-demo' ) + ), + array( + 'id' => 'opt-custom-callback', + 'type' => 'callback', + 'title' => __( 'Custom Field Callback', 'redux-framework-demo' ), + 'subtitle' => __( 'This is a completely unique field type', 'redux-framework-demo' ), + 'desc' => __( 'This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'redux-framework-demo' ), + 'callback' => 'redux_my_custom_field' + ), + array( + 'id' => 'opt-custom-callback-class', + 'type' => 'callback', + 'title' => __( 'Custom Field Callback - Class', 'redux-framework-demo' ), + 'subtitle' => __( 'This is a completely unique field type', 'redux-framework-demo' ), + 'desc' => __( 'This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'redux-framework-demo' ), + //'callback' => array( $this, 'class_field_callback' ) // Can use the current class object + 'callback' => array( 'Redux_Framework_sample_config', 'class_field_callback' ) + // Can use just class name + ), + array( + 'id' => 'opt-customizer-only-in-section', + 'type' => 'select', + 'title' => __( 'Customizer Only Option', 'redux-framework-demo' ), + 'subtitle' => __( 'The subtitle is NOT visible in customizer', 'redux-framework-demo' ), + 'desc' => __( 'The field desc is NOT visible in customizer.', 'redux-framework-demo' ), + 'customizer_only' => true, + //Must provide key => value pairs for select options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'default' => '2' + ), + ) + ); + + $this->sections[] = array( + 'icon' => 'el-icon-list-alt', + 'title' => __( 'Customizer Only', 'redux-framework-demo' ), + 'desc' => __( '

This Section should be visible only in Customizer

', 'redux-framework-demo' ), + 'customizer_only' => true, + 'fields' => array( + array( + 'id' => 'opt-customizer-only', + 'type' => 'select', + 'title' => __( 'Customizer Only Option', 'redux-framework-demo' ), + 'subtitle' => __( 'The subtitle is NOT visible in customizer', 'redux-framework-demo' ), + 'desc' => __( 'The field desc is NOT visible in customizer.', 'redux-framework-demo' ), + 'customizer_only' => true, + //Must provide key => value pairs for select options + 'options' => array( + '1' => 'Opt 1', + '2' => 'Opt 2', + '3' => 'Opt 3' + ), + 'default' => '2' + ), + ) + ); + + $this->sections[] = array( + 'title' => __( 'Import / Export', 'redux-framework-demo' ), + 'desc' => __( 'Import and Export your Redux Framework settings from file, text or URL.', 'redux-framework-demo' ), + 'icon' => 'el-icon-refresh', + 'fields' => array( + array( + 'id' => 'opt-import-export', + 'type' => 'import_export', + 'title' => 'Import Export', + 'subtitle' => 'Save and restore your Redux options', + 'full_width' => false, + ), + ), + ); + + $this->sections[] = array( + 'type' => 'divide', + ); + + $this->sections[] = array( + 'icon' => 'el-icon-info-sign', + 'title' => __( 'Theme Information', 'redux-framework-demo' ), + 'desc' => __( '

This is the Description. Again HTML is allowed

', 'redux-framework-demo' ), + 'fields' => array( + array( + 'id' => 'opt-raw-info', + 'type' => 'raw', + 'content' => $item_info, + ) + ), + ); + + if ( file_exists( trailingslashit( dirname( __FILE__ ) ) . 'README.html' ) ) { + $tabs['docs'] = array( + 'icon' => 'el-icon-book', + 'title' => __( 'Documentation', 'redux-framework-demo' ), + 'content' => nl2br( file_get_contents( trailingslashit( dirname( __FILE__ ) ) . 'README.html' ) ) + ); + } + } + + public function setHelpTabs() { + + // Custom page help tabs, displayed using the help API. Tabs are shown in order of definition. + $this->args['help_tabs'][] = array( + 'id' => 'redux-help-tab-1', + 'title' => __( 'Theme Information 1', 'redux-framework-demo' ), + 'content' => __( '

This is the tab content, HTML is allowed.

', 'redux-framework-demo' ) + ); + + $this->args['help_tabs'][] = array( + 'id' => 'redux-help-tab-2', + 'title' => __( 'Theme Information 2', 'redux-framework-demo' ), + 'content' => __( '

This is the tab content, HTML is allowed.

', 'redux-framework-demo' ) + ); + + // Set the help sidebar + $this->args['help_sidebar'] = __( '

This is the sidebar content, HTML is allowed.

', 'redux-framework-demo' ); + } + + /** + * All the possible arguments for Redux. + * For full documentation on arguments, please refer to: https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments + * */ + public function setArguments() { + + $theme = wp_get_theme(); // For use with some settings. Not necessary. + + $this->args = array( + // TYPICAL -> Change these values as you need/desire + 'opt_name' => 'redux_demo', + // This is where your data is stored in the database and also becomes your global variable name. + 'display_name' => $theme->get( 'Name' ), + // Name that appears at the top of your panel + 'display_version' => $theme->get( 'Version' ), + // Version that appears at the top of your panel + 'menu_type' => 'menu', + //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only) + 'allow_sub_menu' => true, + // Show the sections below the admin menu item or not + 'menu_title' => __( 'Sample Options', 'redux-framework-demo' ), + 'page_title' => __( 'Sample Options', 'redux-framework-demo' ), + // You will need to generate a Google API key to use this feature. + // Please visit: https://developers.google.com/fonts/docs/developer_api#Auth + 'google_api_key' => '', + // Set it you want google fonts to update weekly. A google_api_key value is required. + 'google_update_weekly' => false, + // Must be defined to add google fonts to the typography module + 'async_typography' => true, + // Use a asynchronous font on the front end or font string + //'disable_google_fonts_link' => true, // Disable this in case you want to create your own google fonts loader + 'admin_bar' => true, + // Show the panel pages on the admin bar + 'admin_bar_icon' => 'dashicons-portfolio', + // Choose an icon for the admin bar menu + 'admin_bar_priority' => 50, + // Choose an priority for the admin bar menu + 'global_variable' => '', + // Set a different name for your global variable other than the opt_name + 'dev_mode' => true, + // Show the time the page took to load, etc + 'update_notice' => true, + // If dev_mode is enabled, will notify developer of updated versions available in the GitHub Repo + 'customizer' => true, + // Enable basic customizer support + //'open_expanded' => true, // Allow you to start the panel in an expanded way initially. + //'disable_save_warn' => true, // Disable the save warning when a user changes a field + + // OPTIONAL -> Give you extra features + 'page_priority' => null, + // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning. + 'page_parent' => 'themes.php', + // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters + 'page_permissions' => 'manage_options', + // Permissions needed to access the options panel. + 'menu_icon' => '', + // Specify a custom URL to an icon + 'last_tab' => '', + // Force your panel to always open to a specific tab (by id) + 'page_icon' => 'icon-themes', + // Icon displayed in the admin panel next to your menu_title + 'page_slug' => '_options', + // Page slug used to denote the panel + 'save_defaults' => true, + // On load save the defaults to DB before user clicks save or not + 'default_show' => false, + // If true, shows the default value next to each field that is not the default value. + 'default_mark' => '', + // What to print by the field's title if the value shown is default. Suggested: * + 'show_import_export' => true, + // Shows the Import/Export panel when not used as a field. + + // CAREFUL -> These options are for advanced use only + 'transient_time' => 60 * MINUTE_IN_SECONDS, + 'output' => true, + // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output + 'output_tag' => true, + // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head + // 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it. + + // FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk. + 'database' => '', + // possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning! + 'system_info' => false, + // REMOVE + + // HINTS + 'hints' => array( + 'icon' => 'icon-question-sign', + 'icon_position' => 'right', + 'icon_color' => 'lightgray', + 'icon_size' => 'normal', + 'tip_style' => array( + 'color' => 'light', + 'shadow' => true, + 'rounded' => false, + 'style' => '', + ), + 'tip_position' => array( + 'my' => 'top left', + 'at' => 'bottom right', + ), + 'tip_effect' => array( + 'show' => array( + 'effect' => 'slide', + 'duration' => '500', + 'event' => 'mouseover', + ), + 'hide' => array( + 'effect' => 'slide', + 'duration' => '500', + 'event' => 'click mouseleave', + ), + ), + ) + ); + + // ADMIN BAR LINKS -> Setup custom links in the admin bar menu as external items. + $this->args['admin_bar_links'][] = array( + 'id' => 'redux-docs', + 'href' => 'http://docs.reduxframework.com/', + 'title' => __( 'Documentation', 'redux-framework-demo' ), + ); + + $this->args['admin_bar_links'][] = array( + //'id' => 'redux-support', + 'href' => 'https://github.com/ReduxFramework/redux-framework/issues', + 'title' => __( 'Support', 'redux-framework-demo' ), + ); + + $this->args['admin_bar_links'][] = array( + 'id' => 'redux-extensions', + 'href' => 'reduxframework.com/extensions', + 'title' => __( 'Extensions', 'redux-framework-demo' ), + ); + + // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons. + $this->args['share_icons'][] = array( + 'url' => 'https://github.com/ReduxFramework/ReduxFramework', + 'title' => 'Visit us on GitHub', + 'icon' => 'el-icon-github' + //'img' => '', // You can use icon OR img. IMG needs to be a full URL. + ); + $this->args['share_icons'][] = array( + 'url' => 'https://www.facebook.com/pages/Redux-Framework/243141545850368', + 'title' => 'Like us on Facebook', + 'icon' => 'el-icon-facebook' + ); + $this->args['share_icons'][] = array( + 'url' => 'http://twitter.com/reduxframework', + 'title' => 'Follow us on Twitter', + 'icon' => 'el-icon-twitter' + ); + $this->args['share_icons'][] = array( + 'url' => 'http://www.linkedin.com/company/redux-framework', + 'title' => 'Find us on LinkedIn', + 'icon' => 'el-icon-linkedin' + ); + + // Panel Intro text -> before the form + if ( ! isset( $this->args['global_variable'] ) || $this->args['global_variable'] !== false ) { + if ( ! empty( $this->args['global_variable'] ) ) { + $v = $this->args['global_variable']; + } else { + $v = str_replace( '-', '_', $this->args['opt_name'] ); + } + $this->args['intro_text'] = sprintf( __( '

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: $%1$s

', 'redux-framework-demo' ), $v ); + } else { + $this->args['intro_text'] = __( '

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.

', 'redux-framework-demo' ); + } + + // Add content after the form. + $this->args['footer_text'] = __( '

This text is displayed below the options panel. It isn\'t required, but more info is always better! The footer_text field accepts all HTML.

', 'redux-framework-demo' ); + } + + public function validate_callback_function( $field, $value, $existing_value ) { + $error = true; + $value = 'just testing'; + + /* + do your validation + + if(something) { + $value = $value; + } elseif(something else) { + $error = true; + $value = $existing_value; + + } + */ + + $return['value'] = $value; + $field['msg'] = 'your custom error message'; + if ( $error == true ) { + $return['error'] = $field; + } + + return $return; + } + + public function class_field_callback( $field, $value ) { + print_r( $field ); + echo '
CLASS CALLBACK'; + print_r( $value ); + } + + } + + global $reduxConfig; + $reduxConfig = new Redux_Framework_sample_config(); + } else { + echo "The class named Redux_Framework_sample_config has already been called. Developers, you need to prefix this class with your company name or you'll run into problems!"; + } + + /** + * Custom function for the callback referenced above + */ + if ( ! function_exists( 'redux_my_custom_field' ) ): + function redux_my_custom_field( $field, $value ) { + print_r( $field ); + echo '
'; + print_r( $value ); + } + endif; + + /** + * Custom function for the callback validation referenced above + * */ + if ( ! function_exists( 'redux_validate_callback_function' ) ): + function redux_validate_callback_function( $field, $value, $existing_value ) { + $error = true; + $value = 'just testing'; + + /* + do your validation + + if(something) { + $value = $value; + } elseif(something else) { + $error = true; + $value = $existing_value; + + } + */ + + $return['value'] = $value; + $field['msg'] = 'your custom error message'; + if ( $error == true ) { + $return['error'] = $field; + } + + return $return; + } + endif; diff --git a/admin/core/um-admin-redux.php b/admin/core/um-admin-redux.php index f721fedc..7ceab405 100644 --- a/admin/core/um-admin-redux.php +++ b/admin/core/um-admin-redux.php @@ -44,127 +44,79 @@ } - public function setHelpTabs() { + public function setHelpTabs() { - } + } - public function setArguments() { + public function setArguments() { - $this->args = array( - 'opt_name' => 'um_options', // This is where your data is stored in the database and also becomes your global variable name. - 'display_name' => 'Settings', // Name that appears at the top of your panel - 'display_version' => ultimatemember_version, // Version that appears at the top of your panel - 'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only) - 'allow_sub_menu' => false, // Show the sections below the admin menu item or not - 'menu_title' => __('Settings', 'redux-framework-demo'), - 'page_title' => __('Settings', 'redux-framework-demo'), - - 'google_api_key' => '', // Must be defined to add google fonts to the typography module - 'async_typography' => true, // Use a asynchronous font on the front end or font string - 'admin_bar' => false, // Show the panel pages on the admin bar - 'global_variable' => '', // Set a different name for your global variable other than the opt_name - 'dev_mode' => false, // Show the time the page took to load, etc - 'customizer' => false, // Enable basic customizer support - 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning. - 'page_parent' => 'ultimatemember', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters - 'page_permissions' => 'manage_options', // Permissions needed to access the options panel. - 'menu_icon' => 'dashicons-admin-users', // Specify a custom URL to an icon - 'last_tab' => '', // Force your panel to always open to a specific tab (by id) - 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title - 'page_slug' => 'um_options', // Page slug used to denote the panel - 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not - 'default_show' => false, // If true, shows the default value next to each field that is not the default value. - 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: * - 'show_import_export' => false, // Shows the Import/Export panel when not used as a field. + $this->args = array( + 'opt_name' => 'um_options', // This is where your data is stored in the database and also becomes your global variable name. + 'display_name' => 'Settings', // Name that appears at the top of your panel + 'display_version' => ultimatemember_version, // Version that appears at the top of your panel + 'menu_type' => 'submenu', //Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only) + 'allow_sub_menu' => false, // Show the sections below the admin menu item or not + 'menu_title' => __('Settings', 'redux-framework-demo'), + 'page_title' => __('Settings', 'redux-framework-demo'), + + 'google_api_key' => '', // Must be defined to add google fonts to the typography module + 'async_typography' => true, // Use a asynchronous font on the front end or font string + 'admin_bar' => false, // Show the panel pages on the admin bar + 'global_variable' => '', // Set a different name for your global variable other than the opt_name + 'dev_mode' => false, // Show the time the page took to load, etc + 'customizer' => false, // Enable basic customizer support + 'page_priority' => null, // Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning. + 'page_parent' => 'ultimatemember', // For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters + 'page_permissions' => 'manage_options', // Permissions needed to access the options panel. + 'menu_icon' => 'dashicons-admin-users', // Specify a custom URL to an icon + 'last_tab' => '', // Force your panel to always open to a specific tab (by id) + 'page_icon' => 'icon-themes', // Icon displayed in the admin panel next to your menu_title + 'page_slug' => 'um_options', // Page slug used to denote the panel + 'save_defaults' => true, // On load save the defaults to DB before user clicks save or not + 'default_show' => false, // If true, shows the default value next to each field that is not the default value. + 'default_mark' => '', // What to print by the field's title if the value shown is default. Suggested: * + 'show_import_export' => false, // Shows the Import/Export panel when not used as a field. - 'transient_time' => 60 * MINUTE_IN_SECONDS, - 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output - 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head - 'footer_credit' => '', // Disable the footer credit of Redux. Please leave if you can help it. - - 'hints' => array( - 'icon' => 'icon-question-sign', - 'icon_position' => 'right', - 'icon_color' => 'lightgray', - 'icon_size' => 'normal', - 'tip_style' => array( - 'color' => 'light', - 'shadow' => true, - 'rounded' => false, - 'style' => '', - ), - 'tip_position' => array( - 'my' => 'top left', - 'at' => 'bottom right', - ), - 'tip_effect' => array( - 'show' => array( - 'effect' => 'slide', - 'duration' => '500', - 'event' => 'mouseover', - ), - 'hide' => array( - 'effect' => 'slide', - 'duration' => '500', - 'event' => 'click mouseleave', - ), - ), - ) + 'transient_time' => 60 * MINUTE_IN_SECONDS, + 'output' => true, // Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output + 'output_tag' => true, // Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head + 'footer_credit' => false, // Disable the footer credit of Redux. Please leave if you can help it. + + ); - ); - - // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons. - $this->args['share_icons'][] = array( - 'url' => 'https://github.com/ultimatemember/ultimatemember', - 'title' => 'GitHub Repository', - 'icon' => 'um-icon-social-github' - ); - $this->args['share_icons'][] = array( - 'url' => 'https://trello.com/b/30quaczv/ultimate-member', - 'title' => 'Roadmap', - 'icon' => 'um-faicon-trello' - ); - $this->args['share_icons'][] = array( - 'url' => 'https://facebook.com/pages/Ultimate-Member/1413909622233054', - 'title' => 'Like us on Facebook', - 'icon' => 'um-icon-social-facebook' - ); - $this->args['share_icons'][] = array( - 'url' => 'https://twitter.com/umplugin', - 'title' => 'Follow us on Twitter', - 'icon' => 'um-icon-social-twitter' - ); - $this->args['share_icons'][] = array( - 'url' => 'https://google.com/+ultimatemember', - 'title' => 'Follow us on Google+', - 'icon' => 'um-icon-social-googleplus' - ); - $this->args['share_icons'][] = array( - 'url' => 'https://youtube.com/user/umplugin', - 'title' => 'We\'re on YouTube', - 'icon' => 'um-icon-social-youtube' - ); + // SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons. + $this->args['share_icons'][] = array( + 'url' => 'https://github.com/ultimatemember/ultimatemember', + 'title' => 'GitHub Repository', + 'icon' => 'um-icon-social-github' + ); + $this->args['share_icons'][] = array( + 'url' => 'https://trello.com/b/30quaczv/ultimate-member', + 'title' => 'Roadmap', + 'icon' => 'um-faicon-trello' + ); + $this->args['share_icons'][] = array( + 'url' => 'https://facebook.com/pages/Ultimate-Member/1413909622233054', + 'title' => 'Like us on Facebook', + 'icon' => 'um-icon-social-facebook' + ); + $this->args['share_icons'][] = array( + 'url' => 'https://twitter.com/umplugin', + 'title' => 'Follow us on Twitter', + 'icon' => 'um-icon-social-twitter' + ); + $this->args['share_icons'][] = array( + 'url' => 'https://google.com/+ultimatemember', + 'title' => 'Follow us on Google+', + 'icon' => 'um-icon-social-googleplus' + ); + $this->args['share_icons'][] = array( + 'url' => 'https://youtube.com/user/umplugin', + 'title' => 'We\'re on YouTube', + 'icon' => 'um-icon-social-youtube' + ); - } - - public function validate_callback_function( $field, $value, $existing_value ) { - $error = true; - $value = 'just testing'; - - $return['value'] = $value; - $field['msg'] = 'your custom error message'; - if ( $error == true ) { - $return['error'] = $field; - } - - return $return; - } - - public function class_field_callback( $field, $value ) { - print_r( $field ); - echo '
CLASS CALLBACK'; - print_r( $value ); - } + } } @@ -172,26 +124,3 @@ $reduxConfig = new UM_Redux_Framework_Config(); } - - if ( ! function_exists( 'redux_my_custom_field' ) ): - function redux_my_custom_field( $field, $value ) { - print_r( $field ); - echo '
'; - print_r( $value ); - } - endif; - - if ( ! function_exists( 'redux_validate_callback_function' ) ): - function redux_validate_callback_function( $field, $value, $existing_value ) { - $error = true; - $value = 'just testing'; - - $return['value'] = $value; - $field['msg'] = 'your custom error message'; - if ( $error == true ) { - $return['error'] = $field; - } - - return $return; - } - endif; diff --git a/admin/um-admin-init.php b/admin/um-admin-init.php index 73647d8b..e75d3582 100644 --- a/admin/um-admin-init.php +++ b/admin/um-admin-init.php @@ -6,7 +6,13 @@ class UM_Admin_API { $this->slug = 'ultimatemember'; - add_action('admin_init', array(&$this, 'admin_init'), 0); + $this->about_tabs['about'] = 'About'; + $this->about_tabs['start'] = 'Getting Started'; + + add_action('admin_init', array(&$this, 'admin_init'), 0); + + add_action('admin_menu', array(&$this, 'admin_menu'), 0 ); + add_action('admin_menu', array(&$this, 'secondary_menu_items'), 1000 ); if ( !class_exists( 'ReduxFramework' ) && file_exists( um_path . 'admin/core/lib/ReduxFramework/ReduxCore/framework.php' ) ) { require_once( um_path . 'admin/core/lib/ReduxFramework/ReduxCore/framework.php' ); @@ -17,6 +23,62 @@ class UM_Admin_API { } + /*** + *** @Creates menu + ***/ + function admin_menu() { + + add_menu_page( __('Ultimate Member', $this->slug), __('Ultimate Member', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page'), 'dashicons-admin-users', '66.78578'); + + add_submenu_page( $this->slug, __('Dashboard', $this->slug), __('Dashboard', $this->slug), 'manage_options', $this->slug, array(&$this, 'admin_page') ); + + foreach( $this->about_tabs as $k => $tab ) { + add_submenu_page( '_'. $k . '_um', sprintf(__('%s | Ultimate Member', $this->slug), $tab), sprintf(__('%s | Ultimate Member', $this->slug), $tab), 'manage_options', $this->slug . '-' . $k, array(&$this, 'admin_page') ); + } + + } + + /*** + *** @After "settings" menu + ***/ + function secondary_menu_items() { + + add_submenu_page( $this->slug, __('Forms', $this->slug), __('Forms', $this->slug), 'manage_options', 'edit.php?post_type=um_form', '', '' ); + + add_submenu_page( $this->slug, __('User Roles', $this->slug), __('User Roles', $this->slug), 'manage_options', 'edit.php?post_type=um_role', '', '' ); + + if ( um_get_option('members_page' ) || !get_option('um_options') ){ + add_submenu_page( $this->slug, __('Member Directories', $this->slug), __('Member Directories', $this->slug), 'manage_options', 'edit.php?post_type=um_directory', '', '' ); + } + + } + + /*** + *** @Admin page function + ***/ + function admin_page() { + + $page = $_REQUEST['page']; + + if ( $page == 'ultimatemember' ) { + include_once um_path . 'admin/templates/dashboard.php'; + } + + if ( strstr( $page, 'ultimatemember-' ) ) { + + $template = str_replace('ultimatemember-','',$page); + $file = um_path . 'admin/templates/'. $template . '.php'; + + if ( file_exists( $file ) ){ + include_once um_path . 'admin/templates/'. $template . '.php'; + } else { + echo '

' . __('Please create a team.php template in admin templates.','ultimatemember') . '

'; + } + + } + + } + /*** *** @Init ***/ @@ -43,7 +105,7 @@ class UM_Admin_API { require_once um_path . 'admin/core/um-admin-actions.php'; require_once um_path . 'admin/core/um-admin-filters-fields.php'; - + /* initialize UM administration */ $this->columns = new UM_Admin_Columns(); $this->styles = new UM_Admin_Enqueue();