mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Compatible with Redux plugin
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
See [Changelog.md](https://github.com/ReduxFramework/redux-framework/blob/master/CHANGELOG.md)
|
||||
@@ -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.
|
||||
|
||||
@@ -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 );
|
||||
})( jQuery );
|
||||
|
||||
@@ -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<h&&(h=j.height,g=j.url)}}else g=c.attributes.icon;d.find(".upload-thumbnail").val(g),d.find(".upload").hasClass("noPreview")||d.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+g+'">').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);
|
||||
(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<i){i=j.height;l=j.url}}}else{l=n.attributes.icon}}c.find(".upload-thumbnail").val(l);if(!c.find(".upload").hasClass("noPreview")){c.find(".screenshot").empty().hide().append('<img class="redux-option-image" src="'+l+'">').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);
|
||||
@@ -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 ) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
+107
-47
@@ -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
|
||||
|
||||
@@ -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'] = '<span id="footer-thankyou">' . sprintf( __( 'Options panel created using %1$s', 'redux-framework' ), '<a href="' . esc_url( $this->framework_url ) . '" target="_blank">' . __( 'Redux Framework', 'redux-framework' ) . '</a> v' . self::$_version ) . '</span>';
|
||||
}
|
||||
|
||||
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'] = '<span data-id="1" class="mgv1_1"><script type="text/javascript">(function(){if (mysa_mgv1_1) return; var ma = document.createElement("script"); ma.type = "text/javascript"; ma.async = true; ma.src = "' . $url . '"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ma, s) })();var mysa_mgv1_1=true;</script></span>';
|
||||
}
|
||||
@@ -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 = '<span class="um-admin-tip e" style="float:right">';
|
||||
$hint .= '<span class="um-admin-tipsy-e" title="'.$contentParam.'"><i class="dashicons dashicons-editor-help"></i></span>';
|
||||
$hint .= '</span>';
|
||||
|
||||
$hint = '<div class="redux-hint-qtip" style="float:' . $this->args['hints']['icon_position'] . '; font-size: ' . $size . '; color:' . $hint_color . '; cursor: ' . $pointer . ';" qtip-title="' . $titleParam . '" qtip-content="' . $contentParam . '"><i class="el-' . $this->args['hints']['icon'] . '"></i>  </div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 '<a href="' . $link['url'] . '" title="' . $link['title'] . '" target="_blank" class="um-admin-tipsy-n">';
|
||||
echo '<a href="' . $link['url'] . '" title="' . $link['title'] . '" target="_blank">';
|
||||
|
||||
if ( isset( $link['icon'] ) && ! empty( $link['icon'] ) ) {
|
||||
echo '<i class="' . $link['icon'] . '"></i>';
|
||||
@@ -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 '<h4>' . __('Please create a team.php template in admin templates.','ultimatemember') . '</h4>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} // ReduxFramework
|
||||
|
||||
/**
|
||||
|
||||
@@ -181,20 +181,9 @@
|
||||
}
|
||||
|
||||
echo '<div class="' . $hide . 'screenshot">';
|
||||
|
||||
if ( isset( $this->field['width'] ) && isset( $this->field['height'] ) ) {
|
||||
|
||||
echo '<a class="of-uploaded-image" href="' . $this->value['url'] . '" target="_blank">';
|
||||
echo '<img class="redux-option-image" id="image_' . $this->field['id'] . '" src="' . $this->value['thumbnail'] . '" alt="" target="_blank" rel="external" width="' . $this->field['width'] . '" height="'. $this->field['height'] . '" style="width: '.$this->field['width'] . 'px; height: '.$this->field['height'] . 'px;" />';
|
||||
echo '</a>';
|
||||
|
||||
} else {
|
||||
|
||||
echo '<a class="of-uploaded-image" href="' . $this->value['url'] . '" target="_blank">';
|
||||
echo '<img class="redux-option-image" id="image_' . $this->field['id'] . '" src="' . $this->value['thumbnail'] . '" alt="" target="_blank" rel="external" />';
|
||||
echo '</a>';
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
//Upload controls DIV
|
||||
|
||||
@@ -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 . '">
|
||||
</div>';
|
||||
|
||||
// SELECT output
|
||||
// SELECT output
|
||||
} elseif ( $this->display_select == $this->field['display_value'] ) {
|
||||
$showSelect = true;
|
||||
|
||||
|
||||
@@ -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 ) ) {
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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 = '<h3>' . __( 'Help improve Our Panel', 'redux-framework' ) . '</h3>';
|
||||
$content .= '<p>' . __( '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' ) . '</p>';
|
||||
$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 = '<h3>' . __( 'Welcome to the Redux Demo Panel', 'redux-framework' ) . '</h3>';
|
||||
$content .= '<p><strong>' . __( 'Getting Started', 'redux-framework' ) . '</strong><br>' . 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' ), '<a href="' . 'http://' . 'docs.reduxframework.com/redux-framework/getting-started/" target="_blank">' . __( 'our documentation', 'redux-framework' ) . '</a>' );
|
||||
$content .= '<p><strong>' . __( 'Redux Generator', 'redux-framework' ) . '</strong><br>' . 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' ), '<a href="' . 'http://' . 'generate.reduxframework.com/" target="_blank">' . __( 'Redux Generator', 'redux-framework' ) . '</a>' );
|
||||
$content .= '<p><strong>' . __( 'Redux Extensions', 'redux-framework' ) . '</strong><br>' . sprintf( __( 'Did you know we have extensions, which greatly enhance the features of Redux? Visit our %1$s to learn more!', 'redux-framework' ), '<a href="' . 'http://' . 'reduxframework.com/extensions/" target="_blank">' . __( 'extensions directory', 'redux-framework' ) . '</a>' );
|
||||
$content .= '<p><strong>' . __( 'Like Redux?', 'redux-framework' ) . '</strong><br>' . sprintf( __( 'If so, please %1$s and consider making a %2$s to keep development of Redux moving forward.', 'redux-framework' ), '<a target="_blank" href="' . 'http://' . 'wordpress.org/support/view/plugin-reviews/redux-framework">' . __( 'leave us a favorable review on WordPress.org', 'redux-framework' ) . '</a>', '<a href="' . 'https://' . 'www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=N5AD7TSH8YA5U" target="_blank">' . __( 'donation', 'redux-framework' ) . '</a>' );
|
||||
$content .= '<p><strong>' . __( 'Newsletter', 'redux-framework' ) . '</strong><br>' . __( 'If you\'d like to keep up to with all things Redux, please subscribe to our newsletter', 'redux-framework' ) . ':</p>';
|
||||
$content .= '<form action="' . 'http://' . 'reduxframework.us7.list-manage2.com/subscribe/post?u=564f5178f6cc288064f332efd&id=ace5bbc1f9&SOURCE=panel" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate><p style="text-align: center;"><label for="mce-EMAIL">' . __( 'Email address', 'redux-framework' ) . ' </label><input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"><input type="hidden" value="panel" name="SOURCE"> <input type="submit" value="' . __( 'Subscribe', 'redux-framework' ) . '" name="subscribe" id="mc-embedded-subscribe" class="button button-primary"></p></form>';
|
||||
$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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ReduxFramework Sample Config File
|
||||
* For full documentation, please visit: http://docs.reduxframework.com/
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'Redux_Framework_sample_config' ) ) {
|
||||
|
||||
class Redux_Framework_sample_config {
|
||||
|
||||
public $args = array();
|
||||
public $sections = array();
|
||||
public $theme;
|
||||
public $ReduxFramework;
|
||||
|
||||
public function __construct() {
|
||||
|
||||
if ( ! class_exists( 'ReduxFramework' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// This is needed. Bah WordPress bugs. ;)
|
||||
if ( true == Redux_Helpers::isTheme( __FILE__ ) ) {
|
||||
$this->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' ), '<a href="' . 'https://' . 'github.com/ReduxFramework/Redux-Framework">' . 'https://' . 'github.com/ReduxFramework/Redux-Framework</a>' ),
|
||||
'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 <b>hint</b> tool-tip for the webFonts field.<br/><br/>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' => __( '<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo' )
|
||||
);
|
||||
|
||||
$this->args['help_tabs'][] = array(
|
||||
'id' => 'redux-help-tab-2',
|
||||
'title' => __( 'Theme Information 2', 'redux-framework-demo' ),
|
||||
'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'redux-framework-demo' )
|
||||
);
|
||||
|
||||
// Set the help sidebar
|
||||
$this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', '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( __( '<p>Did you know that Redux sets a global variable for you? To access any of your saved options from within your code you can use your global variable: <strong>$%1$s</strong></p>', 'redux-framework-demo' ), $v );
|
||||
} else {
|
||||
$this->args['intro_text'] = __( '<p>This text is displayed above the options panel. It isn\'t required, but more info is always better! The intro_text field accepts all HTML.</p>', 'redux-framework-demo' );
|
||||
}
|
||||
|
||||
// Add content after the form.
|
||||
$this->args['footer_text'] = __( '<p>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.</p>', 'redux-framework-demo' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
global $reduxConfig;
|
||||
$reduxConfig = new Redux_Framework_sample_config();
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 210 B |
Binary file not shown.
|
After Width: | Height: | Size: 212 B |
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
File diff suppressed because it is too large
Load Diff
+67
-138
@@ -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 '<br/>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 '<br/>';
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user