initial commit

This commit is contained in:
2024-04-29 13:12:44 +05:45
commit 34887303c5
19300 changed files with 5268802 additions and 0 deletions

View File

@@ -0,0 +1,335 @@
<?php
/**
* ReduxFramework Barebones Sample Config File
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
if ( ! class_exists( 'Redux' ) ) {
return null;
}
// This is your option name where all the Redux data is stored.
$opt_name = 'redux_demo';
/**
* GLOBAL ARGUMENTS
* All the possible arguments for Redux.
* For full documentation on arguments, please refer to: @link https://github.com/ReduxFramework/ReduxFramework/wiki/Arguments
*/
/**
* ---> BEGIN ARGUMENTS
*/
$theme = wp_get_theme(); // For use with some settings. Not necessary.
$args = array(
// REQUIRED!! Change these values as you need/desire.
'opt_name' => $opt_name,
// Name that appears at the top of your panel.
'display_name' => $theme->get( 'Name' ),
// Version that appears at the top of your panel.
'display_version' => $theme->get( 'Version' ),
// Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only).
'menu_type' => 'menu',
// Show the sections below the admin menu item or not.
'allow_sub_menu' => true,
'menu_title' => esc_html__( 'Sample Options', 'your-textdomain-here' ),
'page_title' => esc_html__( 'Sample Options', 'your-textdomain-here' ),
// Disable this in case you want to create your own Google fonts loader.
'disable_google_fonts_link' => false,
// Show the panel pages on the admin bar.
'admin_bar' => true,
// Choose an icon for the admin bar menu.
'admin_bar_icon' => 'dashicons-portfolio',
// Choose a priority for the admin bar menu.
'admin_bar_priority' => 50,
// Set a different name for your global variable other than the opt_name.
'global_variable' => '',
// Show the time the page took to load, etc.
'dev_mode' => true,
// Enable basic customizer support.
'customizer' => true,
// Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
'page_priority' => null,
// For a full list of options, visit: @link http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters.
'page_parent' => 'themes.php',
// Permissions needed to access the options panel.
'page_permissions' => 'manage_options',
// Specify a custom URL to an icon.
'menu_icon' => '',
// Force your panel to always open to a specific tab (by id).
'last_tab' => '',
// Icon displayed in the admin panel next to your menu_title.
'page_icon' => 'icon-themes',
// Page slug used to denote the panel.
'page_slug' => '_options',
// On load save the defaults to DB before user clicks save or not.
'save_defaults' => true,
// If true, shows the default value next to each field that is not the default value.
'default_show' => false,
// What to print by the field's title if the value shown is default. Suggested: *.
'default_mark' => '',
// Shows the Import/Export panel when not used as a field.
'show_import_export' => true,
// CAREFUL -> These options are for advanced use only.
'transient_time' => 60 * MINUTE_IN_SECONDS,
// Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output.
'output' => true,
// Allows dynamic CSS to be generated for customizer and google fonts, but stops the dynamic CSS from going to the head.
'output_tag' => true,
// FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
// Possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
'database' => '',
// If you prefer not to use the CDN for Select2, Ace Editor, and others, you may download the Redux Vendor Support plugin yourself and run locally or embed it in your code.
'use_cdn' => true,
'compiler' => true,
// Enable or disable flyout menus when hovering over a menu with submenus.
'flyout_submenus' => true,
// Mode to display fonts (auto|block|swap|fallback|optional)
// See: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display .
'font_display' => 'swap',
// HINTS.
'hints' => array(
'icon' => 'el el-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.
$args['admin_bar_links'][] = array(
'id' => 'redux-docs',
'href' => '//devs.redux.io/',
'title' => esc_html__( 'Documentation', 'your-textdomain-here' ),
);
$args['admin_bar_links'][] = array(
'id' => 'redux-support',
'href' => '//github.com/ReduxFramework/redux-framework/issues',
'title' => esc_html__( 'Support', 'your-textdomain-here' ),
);
$args['admin_bar_links'][] = array(
'id' => 'redux-extensions',
'href' => 'redux.io/extensions',
'title' => esc_html__( 'Extensions', 'your-textdomain-here' ),
);
// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
$args['share_icons'][] = array(
'url' => '//github.com/ReduxFramework/ReduxFramework',
'title' => 'Visit us on GitHub',
'icon' => 'el el-github',
);
$args['share_icons'][] = array(
'url' => '//www.facebook.com/pages/Redux-Framework/243141545850368',
'title' => esc_html__( 'Like us on Facebook', 'your-textdomain-here' ),
'icon' => 'el el-facebook',
);
$args['share_icons'][] = array(
'url' => '//twitter.com/reduxframework',
'title' => esc_html__( 'Follow us on Twitter', 'your-textdomain-here' ),
'icon' => 'el el-twitter',
);
$args['share_icons'][] = array(
'url' => '//www.linkedin.com/company/redux-framework',
'title' => esc_html__( 'Find us on LinkedIn', 'your-textdomain-here' ),
'icon' => 'el el-linkedin',
);
// Panel Intro text -> before the form.
if ( false !== $args['global_variable'] ) {
if ( ! empty( $args['global_variable'] ) ) {
$v = $args['global_variable'];
} else {
$v = str_replace( '-', '_', $args['opt_name'] );
}
$args['intro_text'] = '<p>' . 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: $s', 'your-textdomain-here' ) . '</p>', '<strong>' . $v . '</strong>' );
} else {
$args['intro_text'] = '<p>' . esc_html__( '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.', 'your-textdomain-here' ) . '</p>';
}
// Add content after the form.
$args['footer_text'] = '<p>' . esc_html__( '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.', 'your-textdomain-here' ) . '</p>';
Redux::set_args( $opt_name, $args );
/*
* ---> END ARGUMENTS
*/
/*
* ---> BEGIN HELP TABS
*/
$help_tabs = array(
array(
'id' => 'redux-help-tab-1',
'title' => esc_html__( 'Theme Information 1', 'your-textdomain-here' ),
'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'your-textdomain-here' ) . '</p>',
),
array(
'id' => 'redux-help-tab-2',
'title' => esc_html__( 'Theme Information 2', 'your-textdomain-here' ),
'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'your-textdomain-here' ) . '</p>',
),
);
Redux::set_help_tab( $opt_name, $help_tabs );
// Set the help sidebar.
$content = '<p>' . esc_html__( 'This is the sidebar content, HTML is allowed.', 'your-textdomain-here' ) . '</p>';
Redux::set_help_sidebar( $opt_name, $content );
/*
* <--- END HELP TABS
*/
/*
*
* ---> BEGIN SECTIONS
*
*/
/* As of Redux 3.5+, there is an extensive API. This API can be used in a mix/match mode allowing for. */
/* -> START Basic Fields. */
$kses_exceptions = array(
'a' => array(
'href' => array(),
),
'strong' => array(),
'br' => array(),
);
$section = array(
'title' => esc_html__( 'Basic Field', 'your-textdomain-here' ),
'id' => 'basic',
'desc' => esc_html__( 'Basic field with no subsections.', 'your-textdomain-here' ),
'icon' => 'el el-home',
'fields' => array(
array(
'id' => 'opt-text',
'type' => 'text',
'title' => esc_html__( 'Example Text', 'your-textdomain-here' ),
'desc' => esc_html__( 'Example description.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Example subtitle.', 'your-textdomain-here' ),
'hint' => array(
'content' => wp_kses( __( 'This is a <strong>hint</strong> tool-tip for the text field.<br/><br/>Add any HTML-based text you like here.', 'your-textdomain-here' ), $kses_exceptions ),
),
),
),
);
Redux::set_section( $opt_name, $section );
$section = array(
'title' => __( 'Basic Fields', 'your-textdomain-here' ),
'id' => 'basic',
'desc' => __( 'Basic fields as subsections.', 'your-textdomain-here' ),
'icon' => 'el el-home',
);
Redux::set_section( $opt_name, $section );
$section = array(
'title' => esc_html__( 'Text', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/text.html" target="_blank">https://devs.redux.io/core-fields/text.html</a>',
'id' => 'opt-text-subsection',
'subsection' => true,
'fields' => array(
array(
'id' => 'text-example',
'type' => 'text',
'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Field Description', 'your-textdomain-here' ),
'default' => 'Default Text',
),
),
);
Redux::set_section( $opt_name, $section );
$section = array(
'title' => esc_html__( 'Text Area', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/textarea.html" target="_blank">https://devs.redux.io/core-fields/textarea.html</a>',
'id' => 'opt-textarea-subsection',
'subsection' => true,
'fields' => array(
array(
'id' => 'textarea-example',
'type' => 'textarea',
'title' => esc_html__( 'Text Area Field', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Field Description', 'your-textdomain-here' ),
'default' => 'Default Text',
),
),
);
Redux::set_section( $opt_name, $section );
/*
* <--- END SECTIONS
*/

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,67 @@
<?php
/**
* Redux "My Extension" Extension Class
* Short description.
*
* @package Redux Extentions
* @class Redux_Extension_My_Extension
* @version 1.0.0
*
* There is no free support for extension development.
* This example is 'as is'.
*
* Please be sure to replace ALL instances of "My Extension" and "My_Extension" with the name of your actual
* extension. Please also change the file name, so the 'my-extension' portion is also the name of your extension.
* Please use dashes and not underscores in the filename. Please use underscores instead of dashes in the classname.
* Thanks! :)
*/
defined( 'ABSPATH' ) || exit;
// Don't duplicate me!
if ( ! class_exists( 'Redux_Extension_My_Extension', false ) ) {
/**
* Class Redux_Extension_My_Extension
*/
class Redux_Extension_My_Extension extends Redux_Extension_Abstract {
/**
* Set extension version.
*
* @var string
*/
public static $version = '1.0.0';
/**
* Set the friendly name of the extension. This is for display purposes. No underscores or dashes are required.
*
* @var string
*/
private $extension_name = 'My Extension';
/**
* Set the minimum required version of Redux here (optional).
*
* Leave blank to require no minimum version. This allows you to specify a minimum required version of
* Redux in the event you do not want to support older versions.
*
* @var string
*/
private $minimum_redux_version = '4.0.0';
/**
* Redux_Extension_my_extension constructor.
*
* @param object $parent ReduxFramework pointer.
*/
public function __construct( $parent ) {
parent::__construct( $parent, __FILE__ );
if ( is_admin() && ! $this->is_minimum_version( $this->minimum_redux_version, self::$version, $this->extension_name ) ) {
return;
}
$this->add_field( 'my_field' );
}
}
}

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,89 @@
<?php
/**
* Redux My Extension Field Class
* Short description.
*
* @package Redux Extentions
* @class Redux_Extension_My_Extension
* @version 1.0.0
*
* There is no free support for extension development.
* This example is 'as is'.
*
* Please be sure to replace ALL instances of "My Extension" and "My_Extension" with the name of your actual
* extension.
*
* Please also change the file name, so the 'my-extension' portion is also the name of your extension.
* Please use dashes and not underscores in the filename. Please use underscores instead of dashes in the classname.
*/
defined( 'ABSPATH' ) || exit;
// Don't duplicate me!
if ( ! class_exists( 'Redux_My_Extension', false ) ) {
/**
* Main ReduxFramework_options_object class
*
* @since 1.0.0
*/
class Redux_My_Extension extends Redux_Field {
/**
* Field Constructor.
* Required - must call the parent constructor, then assign field and value to vars
*
* @param array $field Field array.
* @param mixed $value Field values.
* @param object $parent ReduxFramework pointer.
*
* @throws ReflectionException Construct Exception.
*/
public function __construct( array $field, $value, $parent ) {
parent::__construct( $field, $value, $parent );
// Set default args for this field to avoid bad indexes. Change this to anything you use.
$defaults = array(
'options' => array(),
'stylesheet' => '',
'output' => true,
'enqueue' => true,
'enqueue_frontend' => true,
);
$this->field = wp_parse_args( $this->field, $defaults );
}
/**
* Field Render Function.
* Takes the vars and outputs the HTML for the field in the settings
*
* @return void
*/
public function render() {
// Render the field.
}
/**
* Enqueue Function.
* If this field requires any scripts, or css define this function and register/enqueue the scripts/css
*
* @return void
*/
public function enqueue() {
wp_enqueue_script(
'redux-my-field',
$this->url . 'redux-my-extension.js',
array( 'jquery', 'redux-js' ),
Redux_Extension_My_Extension::$version,
true
);
wp_enqueue_style(
'redux-my-field',
$this->url . 'redux-my-extension.css',
array(),
Redux_Extension_my_extension::$version
);
}
}
}

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,14 @@
/* global jQuery, document */
/** Add any Javascript for your extension here. Use of this file is optional and is only for those
* who wish to output the file CSS using a SASS compiler.
*
* Please be sure to rename the 'my-extension' part of the file name to the name of your extension. Pleas use
* dashes instead of underscores.
*/
$( document ).ready(
function() {
}
)( jQuery );

View File

@@ -0,0 +1,7 @@
/*
* Add any SASS formatted CSS necessary for your extension here. Use of this file is optional and is only for those
* who wish to output the file CSS using a SASS compiler.
*
* Please be sure to rename the 'my-extension' part of the file name to the name of your extension. Pleas use
* dashes instead of underscores.
*/

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,225 @@
<?php
/**
* Redux Framework Sample Metabox Config File
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'Redux_Metaboxes' ) ) {
return;
}
Redux_Metaboxes::set_box(
$opt_name,
array(
'id' => 'opt-metaboxes',
'title' => esc_html__( 'Metabox Options', 'your-textdomain-here' ),
'post_types' => array( 'page', 'post' ),
'position' => 'normal', // normal, advanced, side.
'priority' => 'high', // high, core, default, low.
'sections' => array(
array(
'title' => esc_html__( 'Basic Fields', 'your-textdomain-here' ),
'id' => 'opt-basic-fields',
'desc' => esc_html__( '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:', 'your-textdomain-here' ) . ' <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
'icon' => 'el-icon-cogs',
'fields' => array(
array(
'id' => 'opt-checkbox',
'type' => 'checkbox',
'title' => esc_html__( 'Checkbox', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Basic Checkbox field.', 'your-textdomain-here' ),
'default' => true,
),
array(
'id' => 'opt-radio',
'type' => 'radio',
'title' => esc_html__( 'Radio Button', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Basic Radio Button field.', 'your-textdomain-here' ),
'options' => array(
'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
),
'default' => '2',
),
array(
'id' => 'opt-media',
'type' => 'media',
'url' => true,
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
'compiler' => 'true',
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'default' => array( 'url' => 'http://s.wordpress.org/style/images/codeispoetry.png' ),
),
array(
'id' => 'gallery',
'type' => 'gallery',
'title' => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-slider',
'type' => 'slider',
'title' => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
'default' => '0',
'min' => '0',
'step' => '5',
'max' => '300',
),
array(
'id' => 'opt-spinner',
'type' => 'spinner',
'title' => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
'default' => '40',
'min' => '20',
'step' => '20',
'max' => '100',
),
array(
'id' => 'switch-on',
'type' => 'switch',
'title' => esc_html__( 'Switch On', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
'default' => 1,
),
),
),
array(
'title' => esc_html__( 'Text Fields', 'your-textdomain-here' ),
'desc' => esc_html__( '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:', 'your-textdomain-here' ) . ' <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
'icon' => 'el-icon-cog',
'id' => 'opt-text-fields',
'subsection' => true,
'fields' => array(
array(
'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'id' => 'opt-text',
'type' => 'text',
),
array(
'title' => esc_html__( 'Textarea Field', 'your-textdomain-here' ),
'id' => 'opt-textarea',
'type' => 'textarea',
),
),
),
array(
'title' => esc_html__( 'Color Field', 'your-textdomain-here' ),
'desc' => esc_html__( '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:', 'your-textdomain-here' ) . ' <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
'icon' => 'el-icon-pencil',
'id' => 'color-section',
'fields' => array(
array(
'id' => 'opt-color',
'type' => 'color',
'title' => esc_html__( 'Color Field', 'your-textdomain-here' ),
'default' => '#333333',
'required' => array( 'opt-layout', '=', 'on' ),
),
),
),
array(
'title' => esc_html__( 'Layout', 'your-textdomain-here' ),
'desc' => esc_html__( '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:', 'your-textdomain-here' ) . ' <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>',
'icon' => 'el-icon-pencil',
'id' => 'home-layout',
'fields' => array(
array(
'id' => 'homepage_blocks',
'type' => 'sorter',
'title' => 'Homepage Layout Manager',
'desc' => 'Organize how you want the layout to appear on the homepage',
'compiler' => 'true',
'required' => array( 'layout', '=', '1' ),
'options' => array(
'enabled' => array(
'placebo' => 'placebo',
'highlights' => 'Highlights',
'slider' => 'Slider',
'staticpage' => 'Static Page',
'services' => 'Services',
),
'disabled' => array(
'placebo' => 'placebo',
),
),
),
array(
'id' => 'slides',
'type' => 'slides',
'title' => esc_html__( 'Slides Options', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
),
),
),
),
)
);
Redux_Metaboxes::set_box(
$opt_name,
array(
'id' => 'opt-metaboxes-2',
'post_types' => array( 'page', 'post' ),
'position' => 'side', // normal, advanced, side.
'priority' => 'high', // high, core, default, low.
'sections' => array(
array(
'icon_class' => 'icon-large',
'icon' => 'el-icon-home',
'fields' => array(
array(
'title' => esc_html__( 'Cross Box Required', 'your-textdomain-here' ),
'desc' => esc_html__( 'Required arguments work across metaboxes! Click on Color Field under Metabox Options then adjust this field to see the fields within show or hide.', 'your-textdomain-here' ),
'id' => 'opt-layout',
'type' => 'radio',
'options' => array(
'on' => esc_html__( 'On', 'your-textdomain-here' ),
'off' => esc_html__( 'Off', 'your-textdomain-here' ),
),
'default' => 'on',
),
),
),
),
)
);
Redux_Metaboxes::set_box(
$opt_name,
array(
'id' => 'opt-metaboxes-3',
'post_types' => array( 'page', 'post' ),
'position' => 'side', // normal, advanced, side.
'priority' => 'high', // high, core, default, low.
'sections' => array(
array(
'icon_class' => 'icon-large',
'icon' => 'el-icon-home',
'fields' => array(
array(
'id' => 'sidebar',
'title' => esc_html__( 'Sidebar', 'your-textdomain-here' ),
'desc' => esc_html__( 'Please select the sidebar you would like to display on this page. Note: You must first create the sidebar under Appearance > Widgets.', 'your-textdomain-here' ),
'type' => 'select',
'data' => 'sidebars',
'default' => 'None',
),
),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

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

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,757 @@
<?php
/**
* ReduxFramework Sample Config File
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'Redux' ) ) {
return;
}
// This is your option name where all the Redux data is stored.
$opt_name = 'redux_demo'; // YOU MUST CHANGE THIS. DO NOT USE 'redux_demo' IN YOUR PROJECT!!!
// Uncomment to disable demo mode.
/* Redux::disable_demo(); */ // phpcs:ignore Squiz.PHP.CommentedOutCode
$dir = __DIR__ . DIRECTORY_SEPARATOR;
/*
* --> Used within different fields. Simply examples. Search for ACTUAL DECLARATION for field examples
*/
// Background Patterns Reader.
$sample_patterns_path = Redux_Core::$dir . '../sample/patterns/';
$sample_patterns_url = Redux_Core::$url . '../sample/patterns/';
$sample_patterns = array();
if ( is_dir( $sample_patterns_path ) ) {
$sample_patterns_dir = opendir( $sample_patterns_path );
if ( $sample_patterns_dir ) {
// phpcs:ignore WordPress.CodeAnalysis.AssignmentInCondition
while ( false !== ( $sample_patterns_file = readdir( $sample_patterns_dir ) ) ) {
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,
);
}
}
}
}
// Used to except HTML tags in description arguments where esc_html would remove.
$kses_exceptions = array(
'a' => array(
'href' => array(),
),
'strong' => array(),
'br' => array(),
'code' => array(),
);
/*
* ---> BEGIN ARGUMENTS
*/
/**
* All the possible arguments for Redux.
* For full documentation on arguments, please refer to: https://devs.redux.io/core/arguments/
*/
$theme = wp_get_theme(); // For use with some settings. Not necessary.
// TYPICAL -> Change these values as you need/desire.
$args = array(
// This is where your data is stored in the database and also becomes your global variable name.
'opt_name' => $opt_name,
// Name that appears at the top of your panel.
'display_name' => $theme->get( 'Name' ),
// Version that appears at the top of your panel.
'display_version' => $theme->get( 'Version' ),
// Specify if the admin menu should appear or not. Options: menu or submenu (Under appearance only).
'menu_type' => 'menu',
// Show the sections below the admin menu item or not.
'allow_sub_menu' => true,
// The text to appear in the admin menu.
'menu_title' => esc_html__( 'Sample Options', 'your-textdomain-here' ),
// The text to appear on the page title.
'page_title' => esc_html__( 'Sample Options', 'your-textdomain-here' ),
// Disable to create your own Google fonts loader.
'disable_google_fonts_link' => false,
// Show the panel pages on the admin bar.
'admin_bar' => true,
// Icon for the admin bar menu.
'admin_bar_icon' => 'dashicons-portfolio',
// Priority for the admin bar menu.
'admin_bar_priority' => 50,
// Sets a different name for your global variable other than the opt_name.
'global_variable' => $opt_name,
// Show the time the page took to load, etc. (forced on while on localhost or when WP_DEBUG is enabled).
'dev_mode' => true,
// Enable basic customizer support.
'customizer' => true,
// Allow the panel to open expanded.
'open_expanded' => false,
// Disable the save warning when a user changes a field.
'disable_save_warn' => false,
// Order where the menu appears in the admin area. If there is any conflict, something will not show. Warning.
'page_priority' => 90,
// For a full list of options, visit: http://codex.wordpress.org/Function_Reference/add_submenu_page#Parameters.
'page_parent' => 'themes.php',
// Permissions needed to access the options panel.
'page_permissions' => 'manage_options',
// Specify a custom URL to an icon.
'menu_icon' => '',
// Force your panel to always open to a specific tab (by id).
'last_tab' => '',
// Icon displayed in the admin panel next to your menu_title.
'page_icon' => 'icon-themes',
// Page slug used to denote the panel, will be based off page title, then menu title, then opt_name if not provided.
'page_slug' => $opt_name,
// On load save the defaults to DB before user clicks save.
'save_defaults' => true,
// Display the default value next to each field when not set to the default value.
'default_show' => false,
// What to print by the field's title if the value shown is default.
'default_mark' => '*',
// Shows the Import/Export panel when not used as a field.
'show_import_export' => true,
// The time transients will expire when the 'database' arg is set.
'transient_time' => 60 * MINUTE_IN_SECONDS,
// Global shut-off for dynamic CSS output by the framework. Will also disable google fonts output.
'output' => true,
// Allows dynamic CSS to be generated for customizer and google fonts,
// but stops the dynamic CSS from going to the page head.
'output_tag' => true,
// Disable the footer credit of Redux. Please leave if you can help it.
'footer_credit' => '',
// If you prefer not to use the CDN for ACE Editor.
// You may download the Redux Vendor Support plugin to run locally or embed it in your code.
'use_cdn' => true,
// Set the theme of the option panel. Use 'wp' to use a more modern style, default is classic.
'admin_theme' => 'wp',
// Enable or disable flyout menus when hovering over a menu with submenus.
'flyout_submenus' => true,
// Mode to display fonts (auto|block|swap|fallback|optional)
// See: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display.
'font_display' => 'swap',
// HINTS.
'hints' => array(
'icon' => 'el el-question-sign',
'icon_position' => 'right',
'icon_color' => 'lightgray',
'icon_size' => 'normal',
'tip_style' => array(
'color' => 'red',
'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',
),
),
),
// FUTURE -> Not in use yet, but reserved or partially implemented. Use at your own risk.
// Possible: options, theme_mods, theme_mods_expanded, transient. Not fully functional, warning!
'database' => '',
'network_admin' => true,
'search' => true,
);
// ADMIN BAR LINKS -> Setup custom links in the admin bar menu as external items.
// PLEASE CHANGE THESE SETTINGS IN YOUR THEME BEFORE RELEASING YOUR PRODUCT!!
// If these are left unchanged, they will not display in your panel!
$args['admin_bar_links'][] = array(
'id' => 'redux-docs',
'href' => '//devs.redux.io/',
'title' => __( 'Documentation', 'your-textdomain-here' ),
);
$args['admin_bar_links'][] = array(
'id' => 'redux-support',
'href' => '//github.com/ReduxFramework/redux-framework/issues',
'title' => __( 'Support', 'your-textdomain-here' ),
);
// SOCIAL ICONS -> Setup custom links in the footer for quick links in your panel footer icons.
// PLEASE CHANGE THESE SETTINGS IN YOUR THEME BEFORE RELEASING YOUR PRODUCT!!
// If these are left unchanged, they will not display in your panel!
$args['share_icons'][] = array(
'url' => '//github.com/ReduxFramework/ReduxFramework',
'title' => 'Visit us on GitHub',
'icon' => 'el el-github',
);
$args['share_icons'][] = array(
'url' => '//www.facebook.com/pages/Redux-Framework/243141545850368',
'title' => 'Like us on Facebook',
'icon' => 'el el-facebook',
);
$args['share_icons'][] = array(
'url' => '//twitter.com/reduxframework',
'title' => 'Follow us on Twitter',
'icon' => 'el el-twitter',
);
$args['share_icons'][] = array(
'url' => '//www.linkedin.com/company/redux-framework',
'title' => 'Find us on LinkedIn',
'icon' => 'el el-linkedin',
);
// Panel Intro text -> before the form.
if ( ! isset( $args['global_variable'] ) || false !== $args['global_variable'] ) {
if ( ! empty( $args['global_variable'] ) ) {
$v = $args['global_variable'];
} else {
$v = str_replace( '-', '_', $args['opt_name'] );
}
// translators: Panel opt_name.
$args['intro_text'] = '<p>' . sprintf( esc_html__( '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', 'your-textdomain-here' ), '<strong>' . $v . '</strong>' ) . '<p>';
} else {
$args['intro_text'] = '<p>' . esc_html__( '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.', 'your-textdomain-here' ) . '</p>';
}
// Add content after the form.
$args['footer_text'] = '<p>' . esc_html__( '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.', 'your-textdomain-here' ) . '</p>';
Redux::set_args( $opt_name, $args );
/*
* ---> END ARGUMENTS
*/
/*
* ---> START HELP TABS
*/
$help_tabs = array(
array(
'id' => 'redux-help-tab-1',
'title' => esc_html__( 'Theme Information 1', 'your-textdomain-here' ),
'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'your-textdomain-here' ) . '</p>',
),
array(
'id' => 'redux-help-tab-2',
'title' => esc_html__( 'Theme Information 2', 'your-textdomain-here' ),
'content' => '<p>' . esc_html__( 'This is the tab content, HTML is allowed.', 'your-textdomain-here' ) . '</p>',
),
);
Redux::set_help_tab( $opt_name, $help_tabs );
// Set the help sidebar.
$content = '<p>' . esc_html__( 'This is the sidebar content, HTML is allowed.', 'your-textdomain-here' ) . '</p>';
Redux::set_help_sidebar( $opt_name, $content );
/*
* <--- END HELP TABS
*/
/*
* ---> START SECTIONS
*/
// -> START Basic Fields
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Basic Fields', 'your-textdomain-here' ),
'id' => 'basic',
'desc' => esc_html__( 'These are really basic fields!', 'your-textdomain-here' ),
'customizer_width' => '400px',
'icon' => 'el el-home',
)
);
require_once Redux_Core::$dir . '../sample/sections/basic-fields/checkbox.php';
require_once Redux_Core::$dir . '../sample/sections/basic-fields/radio.php';
require_once Redux_Core::$dir . '../sample/sections/basic-fields/sortable.php';
require_once Redux_Core::$dir . '../sample/sections/basic-fields/text.php';
require_once Redux_Core::$dir . '../sample/sections/basic-fields/multi-text.php';
require_once Redux_Core::$dir . '../sample/sections/basic-fields/password.php';
require_once Redux_Core::$dir . '../sample/sections/basic-fields/textarea.php';
// -> START Editors.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Editors', 'your-textdomain-here' ),
'id' => 'editor',
'customizer_width' => '500px',
'icon' => 'el el-edit',
)
);
require_once Redux_Core::$dir . '../sample/sections/editors/wordpress-editor.php';
require_once Redux_Core::$dir . '../sample/sections/editors/ace-editor.php';
// -> START Color Selection.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Color Selection', 'your-textdomain-here' ),
'id' => 'color',
'icon' => 'el el-brush',
)
);
require_once Redux_Core::$dir . '../sample/sections/color-selection/color.php';
require_once Redux_Core::$dir . '../sample/sections/color-selection/color-gradient.php';
require_once Redux_Core::$dir . '../sample/sections/color-selection/color-rgba.php';
require_once Redux_Core::$dir . '../sample/sections/color-selection/link-color.php';
require_once Redux_Core::$dir . '../sample/sections/color-selection/palette.php';
require_once Redux_Core::$dir . '../sample/sections/color-selection/color-palette.php';
// -> START Design Fields.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Design Fields', 'your-textdomain-here' ),
'id' => 'design',
'icon' => 'el el-wrench',
)
);
require_once Redux_Core::$dir . '../sample/sections/design-fields/background.php';
require_once Redux_Core::$dir . '../sample/sections/design-fields/box-shadow.php';
require_once Redux_Core::$dir . '../sample/sections/design-fields/border.php';
require_once Redux_Core::$dir . '../sample/sections/design-fields/dimensions.php';
require_once Redux_Core::$dir . '../sample/sections/design-fields/spacing.php';
// -> START Media Uploads.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Media Uploads', 'your-textdomain-here' ),
'id' => 'media',
'icon' => 'el el-picture',
)
);
require_once Redux_Core::$dir . '../sample/sections/media-uploads/gallery.php';
require_once Redux_Core::$dir . '../sample/sections/media-uploads/media.php';
require_once Redux_Core::$dir . '../sample/sections/media-uploads/multi-media.php';
require_once Redux_Core::$dir . '../sample/sections/media-uploads/slides.php';
// -> START Presentation Fields.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Presentation Fields', 'your-textdomain-here' ),
'id' => 'presentation',
'icon' => 'el el-screen',
)
);
require_once Redux_Core::$dir . '../sample/sections/presentation-fields/divide.php';
require_once Redux_Core::$dir . '../sample/sections/presentation-fields/content.php';
require_once Redux_Core::$dir . '../sample/sections/presentation-fields/info.php';
require_once Redux_Core::$dir . '../sample/sections/presentation-fields/section.php';
Redux::set_section(
$opt_name,
array(
'id' => 'presentation-divide-sample',
'type' => 'divide',
)
);
// -> START Switch & Button Set.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Switch / Button Set', 'your-textdomain-here' ),
'id' => 'switch_buttonset',
'icon' => 'el el-cogs',
)
);
require_once Redux_Core::$dir . '../sample/sections/switch-button/button-set.php';
require_once Redux_Core::$dir . '../sample/sections/switch-button/switch.php';
// -> START Select Fields.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Select Fields', 'your-textdomain-here' ),
'id' => 'select',
'icon' => 'el el-list-alt',
)
);
require_once Redux_Core::$dir . '../sample/sections/select-fields/select.php';
require_once Redux_Core::$dir . '../sample/sections/select-fields/image-select.php';
require_once Redux_Core::$dir . '../sample/sections/select-fields/select-image.php';
// -> START Slider / Spinner.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Slider / Spinner', 'your-textdomain-here' ),
'id' => 'slider_spinner',
'icon' => 'el el-adjust-alt',
)
);
require_once Redux_Core::$dir . '../sample/sections/slider-spinner/slider.php';
require_once Redux_Core::$dir . '../sample/sections/slider-spinner/spinner.php';
// -> START Typography.
require_once Redux_Core::$dir . '../sample/sections/typography/typography.php';
// -> START Additional Types.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Additional Types', 'your-textdomain-here' ),
'id' => 'additional',
'icon' => 'el el-magic',
)
);
require_once Redux_Core::$dir . '../sample/sections/additional-types/date.php';
require_once Redux_Core::$dir . '../sample/sections/additional-types/date-time-picker.php';
require_once Redux_Core::$dir . '../sample/sections/additional-types/sorter.php';
require_once Redux_Core::$dir . '../sample/sections/additional-types/raw.php';
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Advanced Features', 'your-textdomain-here' ),
'icon' => 'el el-thumbs-up',
)
);
require_once Redux_Core::$dir . '../sample/sections/advanced-features/callback.php';
// -> START Validation.
require_once Redux_Core::$dir . '../sample/sections/advanced-features/field-validation.php';
// -> START Sanitizing.
require_once Redux_Core::$dir . '../sample/sections/advanced-features/field-sanitizing.php';
// -> START Required.
require_once Redux_Core::$dir . '../sample/sections/advanced-features/field-required-linking.php';
require_once Redux_Core::$dir . '../sample/sections/advanced-features/wpml-integration.php';
// -> START Disabling.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Disabling', 'your-textdomain-here' ),
'icon' => 'el el-lock',
)
);
require_once Redux_Core::$dir . '../sample/sections/disabling/disable-field.php';
require_once Redux_Core::$dir . '../sample/sections/disabling/disable-section.php';
// -> START Extensions.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Redux Extensions', 'your-textdomain-here' ),
'id' => 'redux-extensions',
'icon' => 'el el-redux',
'class' => 'pro_highlight',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/" target="_blank">https://devs.redux.io/core-extensions/</a>',
)
);
require_once Redux_Core::$dir . '../sample/sections/extensions/accordion.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/color-scheme.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/custom-fonts.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/google-maps.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/icon-select.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/js-button.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/repeater.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/search.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/shortcodes.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/social-profiles.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/tabbed.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/widget-areas.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/taxonomy.php';
require_once Redux_Core::$dir . '../sample/sections/extensions/users.php';
/**
* Metaboxes
*/
require_once Redux_Core::$dir . '../sample/metaboxes.php';
/**
* Raw README
*/
if ( file_exists( $dir . '/../README.md' ) ) {
$section = array(
'icon' => 'el el-list-alt',
'title' => esc_html__( 'Documentation', 'your-textdomain-here' ),
'fields' => array(
array(
'id' => 'opt-raw-documentation',
'type' => 'raw',
'markdown' => true,
'content_path' => __DIR__ . '/../README.md', // FULL PATH, not relative, please.
),
),
);
Redux::set_section( $opt_name, $section );
}
Redux::set_section(
$opt_name,
array(
'icon' => 'el el-list-alt',
'title' => esc_html__( 'Customizer Only', 'your-textdomain-here' ),
'desc' => '<p class="description">' . esc_html__( 'This Section should be visible only in Customizer', 'your-textdomain-here' ) . '</p>',
'customizer_only' => true,
'fields' => array(
array(
'id' => 'opt-customizer-only',
'type' => 'select',
'title' => esc_html__( 'Customizer Only Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'The subtitle is NOT visible in customizer', 'your-textdomain-here' ),
'desc' => esc_html__( 'The field desc is NOT visible in customizer.', 'your-textdomain-here' ),
'customizer_only' => true,
'options' => array(
'1' => esc_html__( 'Opt 1', 'your-textdomain-here' ),
'2' => esc_html__( 'Opt 2', 'your-textdomain-here' ),
'3' => esc_html__( 'Opt 3', 'your-textdomain-here' ),
),
'default' => '2',
),
),
)
);
/*
* <--- END SECTIONS
*/
/*
* YOU MUST PREFIX THE FUNCTIONS BELOW AND ACTION FUNCTION CALLS OR OTHER CONFIGS MAY OVERRIDE YOUR CODE.
*/
/*
* --> Action hook examples.
*/
// Function to test the compiler hook and demo CSS output.
// Above 10 is a priority, but 2 is necessary to include the dynamically generated CSS to be sent to the function.
// add_filter('redux/options/' . $opt_name . '/compiler', 'compiler_action', 10, 3);
//
// Change the arguments after they've been declared, but before the panel is created.
// add_filter('redux/options/' . $opt_name . '/args', 'change_arguments' );
//
// Change the default value of a field after it's been set, but before it's been used.
// add_filter('redux/options/' . $opt_name . '/defaults', 'change_defaults' );
//
// Dynamically add a section.
// It can be also used to modify sections/fields.
// add_filter('redux/options/' . $opt_name . '/sections', 'dynamic_section');
// .
if ( ! function_exists( 'compiler_action' ) ) {
/**
* This is a test function that will let you see when the compiler hook occurs.
* It only runs if a field's value has changed and compiler=>true is set.
*
* @param array $options Options values.
* @param string $css Compiler selector CSS values compiler => array( CSS SELECTORS ).
* @param array $changed_values Any values changed since last save.
*/
function compiler_action( array $options, string $css, array $changed_values ) {
echo '<h1>The compiler hook has run!</h1>';
echo '<pre>';
// phpcs:ignore WordPress.PHP.DevelopmentFunctions
print_r( $changed_values ); // Values that have changed since the last save.
// echo '<br/>';
// print_r($options); //Option values.
// echo '<br/>';
// print_r($css); // Compiler selector CSS values compiler => array( CSS SELECTORS ).
echo '</pre>';
}
}
if ( ! function_exists( 'redux_validate_callback_function' ) ) {
/**
* Custom function for the callback validation referenced above
*
* @param array $field Field array.
* @param mixed $value New value.
* @param mixed $existing_value Existing value.
*
* @return array
*/
function redux_validate_callback_function( array $field, $value, $existing_value ): array {
$error = false;
$warning = false;
// Do your validation.
if ( 1 === (int) $value ) {
$error = true;
$value = $existing_value;
} elseif ( 2 === (int) $value ) {
$warning = true;
$value = $existing_value;
}
$return['value'] = $value;
if ( true === $error ) {
$field['msg'] = 'your custom error message';
$return['error'] = $field;
}
if ( true === $warning ) {
$field['msg'] = 'your custom warning message';
$return['warning'] = $field;
}
return $return;
}
}
if ( ! function_exists( 'dynamic_section' ) ) {
/**
* Custom function for filtering the section 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.
*
* @param array $sections Section array.
*
* @return array
*/
function dynamic_section( array $sections ): array {
$sections[] = array(
'title' => esc_html__( 'Section via hook', 'your-textdomain-here' ),
'desc' => '<p class="description">' . esc_html__( '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.', 'your-textdomain-here' ) . '</p>',
'icon' => 'el el-paper-clip',
// Leave this as a blank section, no options just some intro text set above.
'fields' => array(),
);
return $sections;
}
}
if ( ! function_exists( 'change_arguments' ) ) {
/**
* Filter hook for filtering the args.
* Good for child themes to override or add to the args array.
* It can also be used in other functions.
*
* @param array $args Global arguments array.
*
* @return array
*/
function change_arguments( array $args ): array {
$args['dev_mode'] = true;
return $args;
}
}
if ( ! function_exists( 'change_defaults' ) ) {
/**
* Filter hook for filtering the default value of any given field. Very useful in development mode.
*
* @param array $defaults Default value array.
*
* @return array
*/
function change_defaults( array $defaults ): array {
$defaults['str_replace'] = esc_html__( 'Testing filter hook!', 'your-textdomain-here' );
return $defaults;
}
}
if ( ! function_exists( 'redux_custom_sanitize' ) ) {
/**
* Function to be used if the field sanitizes argument.
* Return value MUST be formatted or cleaned text to display.
*
* @param string $value Value to evaluate or clean. Required.
*
* @return string
*/
function redux_custom_sanitize( string $value ): string {
$return = '';
foreach ( explode( ' ', $value ) as $w ) {
foreach ( str_split( $w ) as $k => $v ) {
if ( ( $k + 1 ) % 2 !== 0 && ctype_alpha( $v ) ) {
$return .= mb_strtoupper( $v );
} else {
$return .= $v;
}
}
$return .= ' ';
}
return $return;
}
}

View File

@@ -0,0 +1,92 @@
<?php
/**
* Redux Date/Time Picker Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Date / Time Picker', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/date-time-picker.html" target="_blank">https://devs.redux.io/premium/date-time-picker.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-date-time-single',
'type' => 'datetime',
'title' => esc_html__( 'Single Date / Time input', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Display when the split argument is set to false', 'your-textdomain-here' ),
'desc' => 'The separator argument is set to the @ symbol. Control-type is set to \'slider\'',
'split' => false,
'control-type' => 'slider',
'separator' => ' @ ',
),
array(
'id' => 'opt-date-time-split',
'type' => 'datetime',
'title' => esc_html__( 'Split Date / Time input', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Display when the split argument is set to true.', 'your-textdomain-here' ),
'desc' => 'The \'timezone-list\' argument is set to display labels instead of time offsets.',
'split' => true,
'control-type' => 'slider',
'timezone-list' => array(
array(
'value' => '-300',
'label' => 'Eastern',
),
array(
'value' => '-360',
'label' => 'Central',
),
array(
'value' => '-420',
'label' => 'Mountain',
),
array(
'value' => '-480',
'label' => 'Pacific',
),
),
),
array(
'id' => 'opt-date-time-date-only',
'type' => 'datetime',
'title' => esc_html__( 'Date only input', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Popup shows only the date picker.', 'your-textdomain-here' ),
'desc' => 'The \'time-picker\' argument is set to false.',
'time-picker' => false,
'placeholder' => 'Date only',
),
array(
'id' => 'opt-date-time-time-only',
'type' => 'datetime',
'title' => esc_html__( 'Time only input', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Popup shows only the time picker.', 'your-textdomain-here' ),
'desc' => 'The \'date-picker\' argument is set to false.',
'date-picker' => false,
'placeholder' => 'Time only',
),
array(
'id' => 'opt-date-time-minmax',
'type' => 'datetime',
'title' => esc_html__( 'Min Max demo', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Both time and date have min and max values.', 'your-textdomain-here' ),
'desc' => 'The selectable date range is 30 days from the current day. The selectable time range is between 8:20 AM and 4:40 PM',
'split' => true,
'time-format' => 'hh:mm TT',
'hour-min' => 8,
'hour-max' => 16,
'minute-min' => 20,
'minute-max' => 40,
'num-of-months' => 2,
'date-min' => 0,
'date-max' => 30,
),
),
)
);

View File

@@ -0,0 +1,28 @@
<?php
/**
* Redux Framework date config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Date', 'your-textdomain-here' ),
'id' => 'additional-date',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/date.html" target="_blank">https://devs.redux.io/core-fields/date.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-datepicker',
'type' => 'date',
'title' => esc_html__( 'Date Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,47 @@
<?php
/**
* Redux Framework raw config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
$sample_html = '';
if ( file_exists( $dir . 'info-html.html' ) ) {
global $wp_filesystem;
$fs = Redux_Filesystem::get_instance();
$sample_html = $wp_filesystem->get_contents( $dir . 'info-html.html' );
}
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Raw', 'your-textdomain-here' ),
'id' => 'additional-raw',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/raw.html" target="_blank">https://devs.redux.io/core-fields/raw.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-raw_info_4',
'type' => 'raw',
'title' => esc_html__( 'Standard Raw Field', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Description', 'your-textdomain-here' ),
'content' => $sample_html,
),
array(
'id' => 'opt-raw_info_5',
'type' => 'raw',
'full_width' => false,
'title' => wp_kses_post( __( 'Raw Field <code>full_width</code> set to <code>false</code>', 'your-textdomain-here' ) ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Description', 'your-textdomain-here' ),
'content' => $sample_html,
),
),
)
);

View File

@@ -0,0 +1,59 @@
<?php
/**
* Redux Framework sorter config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Sorter', 'your-textdomain-here' ),
'id' => 'additional-sorter',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/sorter.html" target="_blank">https://devs.redux.io/core-fields/sorter.html</a>',
'subsection' => true,
'fields' => array(
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',
),
),
),
),
)
);

View File

@@ -0,0 +1,43 @@
<?php
/**
* Redux Framework callback config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Callback', 'your-textdomain-here' ),
'id' => 'additional-callback',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/data.html#using-a-custom-callback" target="_blank">https://devs.redux.io/configuration/fields/data.html#using-a-custom-callback</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-custom-callback',
'type' => 'callback',
'title' => esc_html__( 'Custom Field Callback', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This is a completely unique field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is created with a callback function, so anything goes in this field. Make sure to define the function though.', 'your-textdomain-here' ),
'callback' => 'redux_my_custom_field',
),
),
)
);
if ( ! function_exists( 'redux_my_custom_field' ) ) {
/**
* Custom function for the callback referenced above.
*
* @param array $field Field array.
* @param mixed $value Set value.
*/
function redux_my_custom_field( array $field, $value ) {
print_r( $field ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
echo '<br/>';
print_r( $value ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions
}
}

View File

@@ -0,0 +1,118 @@
<?php
/**
* Redux Framework required/linking config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Field Required / Linking', 'your-textdomain-here' ),
'id' => 'required',
'desc' => esc_html__( 'For full documentation on validation, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/required.html" target="_blank">https://devs.redux.io/configuration/fields/required.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-required-basic',
'type' => 'switch',
'title' => esc_html__( 'Basic Required Example', 'your-textdomain-here' ),
'subtitle' => wp_kses_post( __( 'Click <code>On</code> to see the text field appear.', 'your-textdomain-here' ) ),
'default' => false,
),
array(
'id' => 'opt-required-basic-text',
'type' => 'text',
'title' => esc_html__( 'Basic Text Field', 'your-textdomain-here' ),
'subtitle' => wp_kses_post( __( 'This text field is only show when the above switch is set to <code>On</code>, using the <code>required</code> argument.', 'your-textdomain-here' ) ),
'required' => array( 'opt-required-basic', '=', true ),
),
array(
'id' => 'opt-required-divide-1',
'type' => 'divide',
),
array(
'id' => 'opt-required-nested',
'type' => 'switch',
'title' => esc_html__( 'Nested Required Example', 'your-textdomain-here' ),
'subtitle' => wp_kses_post( __( 'Click <code>On</code> to see another set of options appear.', 'your-textdomain-here' ) ),
'default' => false,
),
array(
'id' => 'opt-required-nested-buttonset',
'type' => 'button_set',
'title' => esc_html__( 'Multiple Nested Required Examples', 'your-textdomain-here' ),
'subtitle' => wp_kses_post( __( 'Click any button to show different fields based on their <code>required</code> statements.', 'your-textdomain-here' ) ),
'options' => array(
'button-text' => esc_html__( 'Show Text Field', 'your-textdomain-here' ),
'button-textarea' => esc_html__( 'Show Textarea Field', 'your-textdomain-here' ),
'button-editor' => esc_html__( 'Show WP Editor', 'your-textdomain-here' ),
'button-ace' => esc_html__( 'Show ACE Editor', 'your-textdomain-here' ),
),
'required' => array( 'opt-required-nested', '=', true ),
'default' => 'button-text',
),
array(
'id' => 'opt-required-nested-text',
'type' => 'text',
'title' => esc_html__( 'Nested Text Field', 'your-textdomain-here' ),
'required' => array( 'opt-required-nested-buttonset', '=', 'button-text' ),
),
array(
'id' => 'opt-required-nested-textarea',
'type' => 'textarea',
'title' => esc_html__( 'Nested Textarea Field', 'your-textdomain-here' ),
'required' => array( 'opt-required-nested-buttonset', '=', 'button-textarea' ),
),
array(
'id' => 'opt-required-nested-editor',
'type' => 'editor',
'title' => esc_html__( 'Nested Editor Field', 'your-textdomain-here' ),
'required' => array( 'opt-required-nested-buttonset', '=', 'button-editor' ),
),
array(
'id' => 'opt-required-nested-ace',
'type' => 'ace_editor',
'title' => esc_html__( 'Nested ACE Editor Field', 'your-textdomain-here' ),
'required' => array( 'opt-required-nested-buttonset', '=', 'button-ace' ),
),
array(
'id' => 'opt-required-divide-2',
'type' => 'divide',
),
array(
'id' => 'opt-required-select',
'type' => 'select',
'title' => esc_html__( 'Select Required Example', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Select a different option to display its value. Required may be used to display multiple & reusable fields', 'your-textdomain-here' ),
'options' => array(
'no-sidebar' => esc_html__( 'No Sidebars', 'your-textdomain-here' ),
'left-sidebar' => esc_html__( 'Left Sidebar', 'your-textdomain-here' ),
'right-sidebar' => esc_html__( 'Right Sidebar', 'your-textdomain-here' ),
'both-sidebars' => esc_html__( 'Both Sidebars', 'your-textdomain-here' ),
),
'default' => 'no-sidebar',
'select2' => array( 'allowClear' => false ),
),
array(
'id' => 'opt-required-select-left-sidebar',
'type' => 'select',
'title' => esc_html__( 'Select Left Sidebar', 'your-textdomain-here' ),
'data' => 'sidebars',
'default' => '',
'required' => array( 'opt-required-select', '=', array( 'left-sidebar', 'both-sidebars' ) ),
),
array(
'id' => 'opt-required-select-right-sidebar',
'type' => 'select',
'title' => esc_html__( 'Select Right Sidebar', 'your-textdomain-here' ),
'data' => 'sidebars',
'default' => '',
'required' => array( 'opt-required-select', '=', array( 'right-sidebar', 'both-sidebars' ) ),
),
),
)
);

View File

@@ -0,0 +1,49 @@
<?php
/**
* Redux Framework field sanitizing config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Field Sanitizing', 'your-textdomain-here' ),
'id' => 'sanitizing',
// phpcs:ignore
// 'desc' => esc_html__( 'For full documentation on sanitizing, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/sanitizing/" target="_blank">https://devs.redux.io/configuration/fields/sanitizing/</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-text-uppercase',
'type' => 'text',
'title' => esc_html__( 'Text Option - Force Uppercase', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Uses the strtoupper function to force all uppercase characters.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'sanitize' => array( 'strtoupper' ),
'default' => 'Force Uppercase',
),
array(
'id' => 'opt-text-sanitize-title',
'type' => 'text',
'title' => esc_html__( 'Text Option - Sanitize Title', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Uses the WordPress sanitize_title function to format text.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'sanitize' => array( 'sanitize_title' ),
'default' => 'Sanitize This Title',
),
array(
'id' => 'opt-text-custom-sanitize',
'type' => 'text',
'title' => esc_html__( 'Text Option - Custom Sanitize', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Uses the custom function redux_custom_sanitize to capitalize every other letter.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'sanitize' => array( 'redux_custom_sanitize' ),
'default' => 'Sanitize This Text',
),
),
)
);

View File

@@ -0,0 +1,164 @@
<?php
/**
* Redux Framework field validation config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Field Validation', 'your-textdomain-here' ),
'id' => 'validation',
'desc' => esc_html__( 'For full documentation on validation, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/configuration/fields/validate.html" target="_blank">https://devs.redux.io/configuration/fields/validate.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-text-email',
'type' => 'text',
'title' => esc_html__( 'Text Option - Email Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This is a little space under the Field Title in the Options table, additional info is good in here.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'email',
'msg' => 'An error message you could customize via your option array!',
'default' => 'test@test.com',
),
array(
'id' => 'opt-text-post-type',
'type' => 'text',
'title' => esc_html__( 'Text Option with Data Attributes', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'You can also pass an options array if you want. Set the default to whatever you like.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'data' => 'post_type',
),
array(
'id' => 'opt-multi-text',
'type' => 'multi_text',
'title' => esc_html__( 'Multi Text Option - Color Validated', 'your-textdomain-here' ),
'validate' => 'color',
'subtitle' => esc_html__( 'If you enter an invalid color it will be removed. Try using the text "blue" as a color. ;)', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-text-url',
'type' => 'text',
'title' => esc_html__( 'Text Option - URL Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This must be a URL.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'url',
'default' => 'https://redux.io',
),
array(
'id' => 'opt-text-numeric',
'type' => 'text',
'title' => esc_html__( 'Text Option - Numeric Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This must be numeric.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => array( 'numeric', 'not_empty' ),
'default' => '0',
),
array(
'id' => 'opt-text-comma-numeric',
'type' => 'text',
'title' => esc_html__( 'Text Option - Comma Numeric Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This must be a comma separated string of numerical values.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'comma_numeric',
'default' => '0',
),
array(
'id' => 'opt-text-no-special-chars',
'type' => 'text',
'title' => __( 'Text Option - No Special Chars Validated', 'your-textdomain-here' ),
'subtitle' => __( 'This must be a alpha numeric only.', 'your-textdomain-here' ),
'desc' => __( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'no_special_chars',
'default' => '0',
),
array(
'id' => 'opt-text-str_replace',
'type' => 'text',
'title' => esc_html__( 'Text Option - Str Replace Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'You decide.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This field\'s default value was changed by a filter hook!', 'your-textdomain-here' ),
'validate' => 'str_replace',
'str' => array(
'search' => ' ',
'replacement' => '-thisisaspace-',
),
'default' => 'This is the default.',
),
array(
'id' => 'opt-text-preg_replace',
'type' => 'text',
'title' => esc_html__( 'Text Option - Preg Replace Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'You decide.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'preg_replace',
'preg' => array(
'pattern' => '/.*?\\d.*?\\d(\\d)/is',
'replacement' => 'no numbers',
),
'default' => '0',
),
array(
'id' => 'opt-text-custom_validate',
'type' => 'text',
'title' => esc_html__( 'Text Option - Custom Callback Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'You decide.', 'your-textdomain-here' ),
'desc' => wp_kses( __( 'Enter <code>1</code> and click <strong>Save Changes</strong> for an error message, or enter <code>2</code> and click <strong>Save Changes</strong> for a warning message.', 'your-textdomain-here' ), $kses_exceptions ),
'validate_callback' => 'redux_validate_callback_function',
'default' => '0',
),
array(
'id' => 'opt-textarea-no-html',
'type' => 'textarea',
'title' => esc_html__( 'Textarea Option - No HTML Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'All HTML will be stripped', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'no_html',
'default' => 'No HTML is allowed in here.',
),
array(
'id' => 'opt-textarea-html',
'type' => 'textarea',
'title' => esc_html__( 'Textarea Option - HTML Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'HTML Allowed (wp_kses)', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'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' => esc_html__( 'Textarea Option - HTML Validated Custom', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Custom HTML Allowed (wp_kses)', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'html_custom',
'default' => '<p>Some HTML is allowed in here.</p>',
// See http://codex.wordpress.org/Function_Reference/wp_kses.
'allowed_html' => array(
'a' => array(
'href' => array(),
'title' => array(),
),
'br' => array(),
'em' => array(),
'strong' => array(),
),
),
array(
'id' => 'opt-textarea-js',
'type' => 'textarea',
'title' => esc_html__( 'Textarea Option - JS Validated', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'JS will be escaped', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'validate' => 'js',
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,37 @@
<?php
/**
* Redux Framework WPML integration config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'WPML Integration', 'your-textdomain-here' ),
'desc' => esc_html__( 'These fields can be fully translated by WPML (WordPress Multi-Language). This serves as an example for you to implement. For extra details look at our WPML Implementation documentation: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/guides/advanced/wpml-integration.html" target="_blank" >https://devs.redux.io/guides/advanced/wpml-integration.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'wpml-text',
'type' => 'textarea',
'title' => esc_html__( 'WPML Text', 'your-textdomain-here' ),
'desc' => esc_html__( 'This string can be translated via WPML.', 'your-textdomain-here' ),
),
array(
'id' => 'wpml-multicheck',
'type' => 'checkbox',
'title' => esc_html__( 'WPML Multi Checkbox', 'your-textdomain-here' ),
'desc' => esc_html__( 'You can literally translate the values via key.', 'your-textdomain-here' ),
'options' => array(
'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
),
),
),
)
);

View File

@@ -0,0 +1,65 @@
<?php
/**
* Redux Framework checkbox config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Checkbox', 'your-textdomain-here' ),
'id' => 'basic-checkbox',
'subsection' => true,
'customizer_width' => '450px',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/checkbox.html" target="_blank">https://devs.redux.io/core-fields/checkbox.html</a>',
'fields' => array(
array(
'id' => 'opt-checkbox',
'type' => 'checkbox',
'title' => esc_html__( 'Checkbox Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => '1', // 1 = on | 0 = off.
),
array(
'id' => 'opt-multi-check',
'type' => 'checkbox',
'title' => esc_html__( 'Multi Checkbox Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// Must provide key => value pairs for multi checkbox options.
'options' => array(
'1' => 'Opt 1',
'2' => 'Opt 2',
'3' => 'Opt 3',
),
'default' => array(
'1' => '1',
'2' => '0',
'3' => '0',
),
),
array(
'id' => 'opt-checkbox-data',
'type' => 'checkbox',
'title' => esc_html__( 'Multi Checkbox Option (with menu data)', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'data' => 'menu',
),
array(
'id' => 'opt-checkbox-sidebar',
'type' => 'checkbox',
'title' => esc_html__( 'Multi Checkbox Option (with sidebar data)', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'data' => 'sidebars',
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,28 @@
<?php
/**
* Redux Framework multi text config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Multi Text', 'your-textdomain-here' ),
'id' => 'basic-multi-text',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/multi-text.html" target="_blank">https://devs.redux.io/core-fields/multi-text.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-multitext',
'type' => 'multi_text',
'title' => esc_html__( 'Multi Text Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Field subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Field Description', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,27 @@
<?php
/**
* Redux Framework password config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Password', 'your-textdomain-here' ),
'id' => 'basic-password',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/password.html" target="_blank">https://devs.redux.io/core-fields/password.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'password',
'type' => 'password',
'username' => true,
'title' => 'Password Field',
),
),
)
);

View File

@@ -0,0 +1,45 @@
<?php
/**
* Redux Framework radio box config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Radio', 'your-textdomain-here' ),
'id' => 'basic-radio',
'subsection' => true,
'customizer_width' => '500px',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/radio.html" target="_blank">https://devs.redux.io/core-fields/radio.html</a>',
'fields' => array(
array(
'id' => 'opt-radio',
'type' => 'radio',
'title' => esc_html__( 'Radio Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// 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' => esc_html__( 'Radio Option w/ Menu Data', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'data' => 'menu',
),
),
)
);

View File

@@ -0,0 +1,52 @@
<?php
/**
* Redux Framework sortable config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Sortable', 'your-textdomain-here' ),
'id' => 'basic-sortable',
'subsection' => true,
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/sortable.html" target="_blank">https://devs.redux.io/core-fields/sortable.html</a>',
'fields' => array(
array(
'id' => 'opt-sortable',
'type' => 'sortable',
'title' => esc_html__( 'Sortable Text Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Define and reorder these however you want.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'label' => true,
'options' => array(
'Text One' => 'Item 1',
'Text Two' => 'Item 2',
'Text Three' => 'Item 3',
),
),
array(
'id' => 'opt-check-sortable',
'type' => 'sortable',
'mode' => 'toggle', // toggle or text.
'title' => esc_html__( 'Sortable Toggle Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Define and reorder these however you want.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'options' => array(
'cb1' => 'Option One',
'cb2' => 'Option Two',
'cb3' => 'Option Three',
),
'default' => array(
'cb1' => false,
'cb2' => true,
'cb3' => false,
),
),
),
)
);

View File

@@ -0,0 +1,57 @@
<?php
/**
* Redux Framework text config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Text', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/text.html" target="_blank">https://devs.redux.io/core-fields/text.html</a>',
'id' => 'basic-text',
'subsection' => true,
'customizer_width' => '700px',
'fields' => array(
array(
'id' => 'text-example',
'type' => 'text',
'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Field Description', 'your-textdomain-here' ),
'default' => 'Default Text',
),
array(
'id' => 'text-example-hint',
'type' => 'text',
'title' => esc_html__( 'Text Field w/ Hint', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Field Description', 'your-textdomain-here' ),
'default' => 'Default Text',
'hint' => array(
'title' => 'Hint Title',
'content' => 'Hint content about this field!',
),
),
array(
'id' => 'text-placeholder',
'type' => 'text',
'title' => esc_html__( 'Text Field w/ placeholder using custom data object.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'Field Description', 'your-textdomain-here' ),
'placeholder' => array(
'box1' => 'Box One Placeholder',
'box2' => 'Box Two Placeholder',
),
'data' => array(
'box1' => 'Box One Title',
'box2' => 'Box Two Title',
),
),
),
)
);

View File

@@ -0,0 +1,29 @@
<?php
/**
* Redux Framework textarea config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Textarea', 'your-textdomain-here' ),
'id' => 'basic-textarea',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/textarea.html" target="_blank">https://devs.redux.io/core-fields/textarea.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-textarea',
'type' => 'textarea',
'title' => esc_html__( 'Textarea Option - HTML Validated Custom', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Subtitle', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => 'Default Text',
),
),
)
);

View File

@@ -0,0 +1,41 @@
<?php
/**
* Redux Framework color gradient config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Color Gradient', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color-gradient.html" target="_blank">https://devs.redux.io/core-fields/color-gradient.html</a>',
'id' => 'color-gradient',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-color-header',
'type' => 'color_gradient',
'title' => esc_html__( 'Header Gradient Color Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'output' => '.site-header, header',
'gradient-type' => true,
'gradient-reach' => true,
'gradient-angle' => true,
'preview' => true,
'default' => array(
'from' => '#1e73be',
'to' => '#00897e',
'gradient-reach' => array(
'to' => 50,
'from' => 0,
),
),
),
),
)
);

View File

@@ -0,0 +1,99 @@
<?php
/**
* Redux Color Palette Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Color Palette', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color-palette.html" target="_blank">https://devs.redux.io/core-fields/palette-color.html</a>',
'id' => 'color-palette',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-color-palette-grey',
'type' => 'color_palette',
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'User defined colors with round selectors.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Set the Widget Title color here.', 'your-textdomain-here' ),
'default' => '#888888',
'options' => array(
'colors' => array(
'#000000',
'#222222',
'#444444',
'#666666',
'#888888',
'#aaaaaa',
'#cccccc',
'#eeeeee',
'#ffffff',
),
'style' => 'round',
),
'output' => array(
'color' => '.widget-title',
'important' => true,
),
),
array(
'id' => 'opt-color-palette-mui-all',
'type' => 'color_palette',
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'All Material Design Colors.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => '#F44336',
'options' => array(
'colors' => Redux_Helpers::get_material_design_colors( 'all' ),
'size' => 17,
),
),
array(
'id' => 'opt-color-palette-mui-primary',
'type' => 'color_palette',
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Primary Material Design Colors.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => '#000000',
'options' => array(
'colors' => Redux_Helpers::get_material_design_colors(),
'size' => 25,
'box-shadow' => true,
'margin' => true,
),
),
array(
'id' => 'opt-color-palette-mui-red',
'type' => 'color_palette',
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Red Material Design Colors.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => '#FF1744',
'options' => array(
'colors' => Redux_Helpers::get_material_design_colors( 'red' ),
'size' => 25,
),
),
array(
'id' => 'opt-color-palette-mui-a100',
'type' => 'color_palette',
'title' => esc_html__( 'Color Palette Control', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'A100 Material Design Colors.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => '#FF80AB',
'options' => array(
'colors' => Redux_Helpers::get_material_design_colors( 'A100' ),
'size' => 60,
'style' => 'round',
),
),
),
)
);

View File

@@ -0,0 +1,35 @@
<?php
/**
* Redux Framework color RGBA config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Color RGBA', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color-rgba.html" target="_blank">https://devs.redux.io/core-fields/color-rgba.html</a>',
'id' => 'color-rgba',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-color-rgba',
'type' => 'color_rgba',
'title' => esc_html__( 'Color RGBA', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Gives you the RGBA color.', 'your-textdomain-here' ),
'default' => array(
'color' => '#7e33dd',
'alpha' => '.8',
),
'output' => array(
'color' => '.posted-on, .wp-block-post-date a',
'important' => true,
),
),
),
)
);

View File

@@ -0,0 +1,47 @@
<?php
/**
* Redux Framework color config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Color', 'your-textdomain-here' ),
'id' => 'opt-color',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/color.html" target="_blank">https://devs.redux.io/core-fields/color.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-color-title',
'type' => 'color',
'output' => array(
'color' => '.site-title, .wp-block-site-title a',
'important' => true,
),
'title' => esc_html__( 'Site Title Color', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Pick a title color for the theme (default: #000).', 'your-textdomain-here' ),
'default' => '#000000',
// 'color_alpha' => true,
'transparent' => false,
'validate' => 'color',
),
array(
'id' => 'opt-color-footer',
'type' => 'color',
'title' => esc_html__( 'Footer Background Color', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Pick a background color for the footer (default: #dd9933).', 'your-textdomain-here' ),
'default' => '#dd9933',
'transparent' => false,
'validate' => 'color',
'output' => array(
'background-color' => '.footer, #site-footer, .site-footer, footer',
),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,43 @@
<?php
/**
* Redux Framework link color config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Link Color', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/link-color.html" target="_blank">https://devs.redux.io/core-fields/link-color.html</a>',
'id' => 'color-link',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-link-color',
'type' => 'link_color',
'title' => esc_html__( 'Links Color Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => array(
'regular' => '#aaa',
'hover' => '#bbb',
'active' => '#ccc',
),
'output' => array(
'a',
'important' => true,
),
// phpcs:ignore Squiz.PHP.CommentedOutCode
// 'regular' => false, // Disable Regular Color.
// 'hover' => false, // Disable Hover Color.
// 'active' => false, // Disable Active Color.
// 'visited' => true, // Enable Visited Color.
),
),
)
);

View File

@@ -0,0 +1,50 @@
<?php
/**
* Redux Framework palette config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Palette', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/palette-color.html" target="_blank">https://devs.redux.io/core-fields/palette-color.html</a>',
'id' => 'palette',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-palette-color',
'type' => 'palette',
'title' => esc_html__( 'Palette Color Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => 'red',
'palettes' => array(
'red' => array(
'#ef9a9a',
'#f44336',
'#ff1744',
),
'pink' => array(
'#fce4ec',
'#f06292',
'#e91e63',
'#ad1457',
'#f50057',
),
'cyan' => array(
'#e0f7fa',
'#80deea',
'#26c6da',
'#0097a7',
'#00e5ff',
),
),
),
),
)
);

View File

@@ -0,0 +1,34 @@
<?php
/**
* Redux Framework background config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Background', 'your-textdomain-here' ),
'id' => 'design-background',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/background.html" target="_blank">https://devs.redux.io/core-fields/background.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-background',
'type' => 'background',
'output' => array(
'background-color' => 'body',
'important' => true,
),
'default' => array(
'background-color' => '#d1b7e2',
),
'title' => __( 'Body Background', 'your-textdomain-here' ),
'subtitle' => __( 'Body background with image, color, etc.', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,54 @@
<?php
/**
* Redux Framework border config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Border', 'your-textdomain-here' ),
'id' => 'design-border',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/border.html" target="_blank">https://devs.redux.io/core-fields/border.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-header-border',
'type' => 'border',
'title' => esc_html__( 'Header Border Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
'output' => array( '.site-header, header' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => array(
'border-color' => '#1e73be',
'border-style' => 'solid',
'border-top' => '3px',
'border-right' => '3px',
'border-bottom' => '3px',
'border-left' => '3px',
),
),
array(
'id' => 'opt-header-border-expanded',
'type' => 'border',
'title' => esc_html__( 'Body Border Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Only color validation can be done on this field type', 'your-textdomain-here' ),
'output' => array( 'body' ),
'all' => false,
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => array(
'border-color' => '#1e73be',
'border-style' => 'solid',
'border-top' => '3px',
'border-right' => '3px',
'border-bottom' => '3px',
'border-left' => '3px',
),
),
),
)
);

View File

@@ -0,0 +1,43 @@
<?php
/**
* Redux Box Shadow Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
'id' => 'design-box-shadow',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/box-shadow.html" target="_blank">https://devs.redux.io/core-fields/box_shadow.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-box_shadow',
'type' => 'box_shadow',
'output' => array( '.site-header, header' ),
'media_query' => array(
'output' => true,
'compiler' => true,
'queries' => array(
array(
'rule' => 'screen and (max-width: 360px)',
'selectors' => array( '.box-shadow' ),
),
array(
'rule' => 'screen and (max-width: 1120px)',
'selectors' => array( '.box-shadow-wide' ),
),
),
),
'title' => esc_html__( 'Box Shadow', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Site Header Box Shadow with inset and drop shadows.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,48 @@
<?php
/**
* Redux Framework dimensions config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Dimensions', 'your-textdomain-here' ),
'id' => 'design-dimensions',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/dimensions.html" target="_blank">https://devs.redux.io/core-fields/dimensions.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-dimensions',
'type' => 'dimensions',
'units' => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %.
'units_extended' => 'true', // Allow users to select any type of unit.
'title' => esc_html__( 'Dimensions (Width/Height) Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ),
'desc' => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ),
'default' => array(
'width' => 200,
'height' => 100,
),
),
array(
'id' => 'opt-dimensions-width',
'type' => 'dimensions',
'units' => array( 'em', 'px', '%' ), // You can specify a unit value. Possible: px, em, %.
'units_extended' => 'true', // Allow users to select any type of unit.
'title' => esc_html__( 'Dimensions (Width) Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Allow your users to choose width, height, and/or unit.', 'your-textdomain-here' ),
'desc' => esc_html__( 'You can enable or disable any piece of this field. Width, Height, or Units.', 'your-textdomain-here' ),
'height' => false,
'default' => array(
'width' => 200,
'height' => 100,
),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,74 @@
<?php
/**
* Redux Framework spacing config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Spacing', 'your-textdomain-here' ),
'id' => 'design-spacing',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/spacing.html" target="_blank">https://devs.redux.io/core-fields/spacing.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-spacing',
'type' => 'spacing',
'output' => array( '.site-header, header' ),
// absolute, padding, margin, defaults to padding.
'mode' => 'margin',
// Have one field that applies to all.
'all' => true,
// You can specify a unit value. Possible: px, em, %.
'units' => 'em',
// Set to false to hide the units if the units are specified.
'display_units' => false,
'title' => esc_html__( 'Padding/Margin Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ),
'desc' => esc_html__( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ),
'default' => array(
'margin-top' => '1',
'margin-right' => '2',
'margin-bottom' => '3',
'margin-left' => '4',
'units' => 'em',
),
// phpcs:ignore Squiz.PHP.CommentedOutCode
// Allow users to select any type of unit.
// 'units_extended'=> 'true', // Enable extended units.
// 'top' => false, // Disable the top.
// 'right' => false, // Disable the right.
// 'bottom' => false, // Disable the bottom.
// 'left' => false, // Disable the left.
),
array(
'id' => 'opt-spacing-expanded',
'type' => 'spacing',
'mode' => 'margin',
'all' => false,
'units' => array( 'em', 'px', '%' ),
'units_extended' => true,
'title' => __( 'Padding/Margin Option', 'your-textdomain-here' ),
'subtitle' => __( 'Allow your users to choose the spacing or margin they want.', 'your-textdomain-here' ),
'desc' => __( 'You can enable or disable any piece of this field. Top, Right, Bottom, Left, or Units.', 'your-textdomain-here' ),
'default' => array(
'margin-top' => '1',
'margin-right' => '2',
'margin-bottom' => '3',
'margin-left' => '5',
'units' => 'em',
),
),
),
)
);

View File

@@ -0,0 +1,31 @@
<?php
/**
* Redux Framework disable field config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Disable Field', 'your-textdomain-here' ),
'id' => 'basic-checkbox-disable',
'subsection' => true,
'customizer_width' => '450px',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/checkbox.html" target="_blank">https://devs.redux.io/core-fields/checkbox.html</a>',
'fields' => array(
array(
'id' => 'opt-checkbox-disable',
'type' => 'checkbox',
'title' => esc_html__( 'Checkbox Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'disabled' => true,
'default' => '1', // 1 = on | 0 = off.
),
),
)
);

View File

@@ -0,0 +1,31 @@
<?php
/**
* Redux Framework disable section config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Disable Section', 'your-textdomain-here' ),
'id' => 'basic-checkbox-section-disable',
'subsection' => true,
'customizer_width' => '450px',
'disabled' => true,
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/checkbox.html" target="_blank">https://devs.redux.io/core-fields/checkbox.html</a>',
'fields' => array(
array(
'id' => 'opt-checkbox-section-disable',
'type' => 'checkbox',
'title' => esc_html__( 'Checkbox Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'default' => '1', // 1 = on | 0 = off.
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,55 @@
<?php
/**
* Redux Framework ACE editor config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
'id' => 'editor-ace',
'subsection' => true,
'desc' => esc_html__( 'For full documentation on the this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/ace-editor.html" target="_blank">https://devs.redux.io/core-fields/ace-editor.html</a>',
'fields' => array(
array(
'id' => 'opt-ace-editor-css',
'type' => 'ace_editor',
'title' => esc_html__( 'CSS Code', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Paste your CSS code here.', 'your-textdomain-here' ),
'mode' => 'css',
'theme' => 'monokai',
'desc' => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
'default' => '#header{
margin: 0 auto;
}',
),
array(
'id' => 'opt-ace-editor-js',
'type' => 'ace_editor',
'title' => esc_html__( 'JS Code', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Paste your JS code here.', 'your-textdomain-here' ),
'mode' => 'javascript',
'theme' => 'chrome',
'desc' => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
'default' => 'jQuery(document).ready(function(){\n\n});',
),
array(
'id' => 'opt-ace-editor-php',
'type' => 'ace_editor',
'full_width' => true,
'title' => esc_html__( 'PHP Code', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Paste your PHP code here.', 'your-textdomain-here' ),
'mode' => 'php',
'theme' => 'chrome',
'desc' => 'Possible modes can be found at <a href="//ace.c9.io" target="_blank">ace.c9.io/</a>.',
'default' => '<?php
echo "PHP String";',
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,47 @@
<?php
/**
* Redux Framework WordPress editor config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'WordPress Editor', 'your-textdomain-here' ),
'id' => 'editor-wordpress',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/editor.html" target="_blank">https://devs.redux.io/core-fields/editor.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-editor',
'type' => 'editor',
'title' => esc_html__( 'Editor', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Use any of the features of WordPress editor inside your panel!', 'your-textdomain-here' ),
'default' => 'Powered by Redux Framework.',
),
array(
'id' => 'opt-editor-tiny',
'type' => 'editor',
'title' => esc_html__( 'Editor w/o Media Button', 'your-textdomain-here' ),
'default' => 'Powered by Redux Framework.',
'args' => array(
'wpautop' => false,
'media_buttons' => false,
'textarea_rows' => 5,
'teeny' => false,
'quicktags' => false,
),
),
array(
'id' => 'opt-editor-full',
'type' => 'editor',
'title' => esc_html__( 'Editor - Full Width', 'your-textdomain-here' ),
'full_width' => true,
),
),
)
);

View File

@@ -0,0 +1,69 @@
<?php
/**
* Accordion config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Accordion', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/accordion.html" target="_blank">https://devs.redux.io/core-extensions/accordion.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'accordion-section-1',
'type' => 'accordion',
'title' => esc_html__( 'Accordion Section One', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Section one with subtitle', 'your-textdomain-here' ),
'position' => 'start',
),
array(
'id' => 'opt-blank-text-1',
'type' => 'text',
'title' => esc_html__( 'Text box for some noble purpose.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Frailty, thy name is woman!', 'your-textdomain-here' ),
),
array(
'id' => 'opt-switch-1',
'type' => 'switch',
'title' => esc_html__( 'Switch, for some other important task!', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Physician, heal thyself!', 'your-textdomain-here' ),
),
array(
'id' => 'accordion-section-end-1',
'type' => 'accordion',
'position' => 'end',
),
array(
'id' => 'accordion-section-2',
'type' => 'accordion',
'title' => esc_html__( 'Accordion Section Two (no subtitle)', 'your-textdomain-here' ),
'position' => 'start',
'open' => true,
),
array(
'id' => 'opt-blank-text-3',
'type' => 'text',
'title' => esc_html__( 'Look, another sample text box.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'The tartness of his face sours ripe grapes.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-switch-2',
'type' => 'switch',
'title' => esc_html__( 'Yes, another switch, but you\'re free to use any field you like.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'I scorn you, scurvy companion!', 'your-textdomain-here' ),
),
array(
'id' => 'accordion-section-end-2',
'type' => 'accordion',
'position' => 'end',
),
),
)
);

View File

@@ -0,0 +1,222 @@
<?php
/**
* Redux Color Scheme Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Color Schemes', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/color-schemes.html" target="_blank">https://devs.redux.io/premium/color-schemes.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-color-scheme',
'type' => 'color_scheme',
'title' => esc_html__( 'Color Schemes', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Save and load color schemes', 'your-textdomain-here' ),
'desc' => esc_html__( 'If you\'re using the theme 2023, you will be able to see many changes on the current site.', 'your-textdomain-here' ),
'output' => true,
'compiler' => true,
'simple' => false,
'options' => array(
'show_input' => true,
'show_initial' => true,
'show_alpha' => true,
'show_palette' => true,
'show_palette_only' => false,
'show_selection_palette' => true,
'max_palette_size' => 10,
'allow_empty' => true,
'clickout_fires_change' => false,
'choose_text' => 'Choose',
'cancel_text' => 'Cancel',
'show_buttons' => true,
'use_extended_classes' => true,
'palette' => null, // show default.
),
'groups' => array(
esc_html__( 'Header', 'your-textdomain-here' ) => array(
'desc' => esc_html__( 'Set header and nav colors here. (Group open by default)', 'your-textdomain-here' ),
'hidden' => false,
'accordion_open' => true,
),
esc_html__( 'Body', 'your-textdomain-here' ) => esc_html__( 'Set body and content colors here.', 'your-textdomain-here' ),
esc_html__( 'Widget', 'your-textdomain-here' ) => '',
'' => esc_html__( 'These colors are not assigned to any group.', 'your-textdomain-here' ),
),
'default' => array(
array(
'id' => 'site-header',
'title' => 'site header',
'color' => '#980000',
'alpha' => 1,
'selector' => array(
'background' => '.site-header-main,header',
'color' => '.tester',
),
'mode' => 'background-color',
'important' => true,
'group' => esc_html__( 'Header', 'your-textdomain-here' ),
),
array(
'id' => 'site-header-border',
'title' => 'site header border',
'color' => '#ff0000',
'alpha' => 1,
'selector' => '.site-header,header',
'mode' => 'border-color',
'important' => true,
'group' => esc_html__( 'Header', 'your-textdomain-here' ),
),
array(
'id' => 'home-link', // ID.
'title' => 'home link', // Display text.
'color' => '#fdfdfd', // Default colour.
'alpha' => 1, // Default alpha.
'selector' => '.home-link,.wp-block-site-title a', // CSS selector.
'mode' => 'color', // CSS mode.
'important' => true, // CSS important.
'group' => esc_html__( 'Header', 'your-textdomain-here' ),
),
array(
'id' => 'site-description',
'title' => 'site description',
'color' => '#ededed',
'alpha' => 1,
'selector' => 'h2.site-description,.wp-block-site-tagline',
'mode' => 'color',
'important' => true,
'group' => esc_html__( 'Header', 'your-textdomain-here' ),
),
array(
'id' => 'navbar',
'title' => 'navbar',
'color' => '#e06666',
'alpha' => 1,
'selector' => '.navbar,.wp-block-navigation',
'mode' => 'background-color',
'group' => esc_html__( 'Header', 'your-textdomain-here' ),
),
array(
'id' => 'body-text',
'title' => 'body text',
'color' => '#000000',
'alpha' => 1,
'selector' => 'body p',
'mode' => 'color',
'group' => esc_html__( 'Body', 'your-textdomain-here' ),
),
array(
'id' => 'site-content',
'title' => 'site content',
'color' => '#a4c2f4',
'alpha' => 1,
'selector' => '.site-content',
'mode' => 'background-color',
'group' => esc_html__( 'Body', 'your-textdomain-here' ),
),
array(
'id' => 'entry-content',
'title' => 'entry content',
'color' => '#93c47d',
'alpha' => 1,
'selector' => '.entry-content',
'mode' => 'background-color',
'group' => esc_html__( 'Body', 'your-textdomain-here' ),
),
array(
'id' => 'entry-title',
'title' => 'entry title',
'color' => '#000000',
'alpha' => 1,
'selector' => '.entry-title a',
'mode' => 'color',
'group' => esc_html__( 'Body', 'your-textdomain-here' ),
),
array(
'id' => 'entry-title-hover',
'title' => 'entry title hover',
'color' => '#ffffff',
'alpha' => 1,
'selector' => '.entry-title a:hover',
'mode' => 'color',
'group' => esc_html__( 'Body', 'your-textdomain-here' ),
),
array(
'id' => 'entry-meta',
'title' => 'entry meta',
'color' => '#0b5394',
'alpha' => 1,
'selector' => '.entry-meta a',
'mode' => 'color',
'group' => esc_html__( 'Body', 'your-textdomain-here' ),
),
array(
'id' => 'widget-container',
'title' => 'widget container',
'color' => '#f1c232',
'alpha' => .5,
'selector' => '.widget',
'mode' => 'background-color',
'group' => esc_html__( 'Widget', 'your-textdomain-here' ),
),
array(
'id' => 'widget-title',
'title' => 'widget title',
'color' => '#741b47',
'alpha' => 1,
'selector' => '.widget-title',
'mode' => 'color',
'important' => true,
'group' => esc_html__( 'Widget', 'your-textdomain-here' ),
),
array(
'id' => 'widget-text',
'title' => 'widget text',
'color' => '#fdfdfd',
'alpha' => 1,
'selector' => '.widget a',
'mode' => 'color',
'important' => true,
'group' => esc_html__( 'Widget', 'your-textdomain-here' ),
),
array(
'id' => 'sidebar-container',
'title' => 'sidebar container',
'color' => '#d5a6bd',
'alpha' => 1,
'selector' => '.sidebar-container',
'mode' => 'background-color',
'important' => true,
'group' => '',
),
array(
'id' => 'site-footer',
'title' => 'site footer',
'color' => '#ededed',
'alpha' => 1,
'selector' => '.site-footer,footer',
'mode' => 'background-color',
'group' => '',
),
array(
'id' => 'site-footer-text',
'title' => 'site footer text',
'color' => '#000000',
'alpha' => 1,
'selector' => '.site-footer a, footer a',
'group' => '',
),
),
),
),
)
);

View File

@@ -0,0 +1,35 @@
<?php
/**
* Redux Custom Fonts Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Custom Fonts', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/custom-fonts.html" target="_blank">https://devs.redux.io/premium/custom-fonts.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'custom_fonts',
'type' => 'custom_fonts',
),
array(
'id' => 'custom_fonts_typography',
'type' => 'typography',
'title' => esc_html__( 'Custom Fonts Typography', 'your-textdomain-here' ),
'subtitle' => 'This will modify the font family of the .entry-title classes.',
'output' => '.site-title, .widget-title, .entry-title, .wp-block-site-title',
'font-size' => false,
'line-height' => false,
'text-align' => false,
),
),
)
);

View File

@@ -0,0 +1,49 @@
<?php
/**
* Redux Google Maps Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/google-maps.html" target="_blank">https://devs.redux.io/premium/google-maps.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'location_geocode',
'type' => 'google_maps',
'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This map is set using only address information with a zoom factor of 3. Lat/Long is returned automatically.', 'your-textdomain-here' ),
'show_api_key' => true,
'default' => array(
'zoom' => '17', // Zoom far: 3 zoom close 17.
'street_number' => '1600', // Address.
'route' => 'Pennsylvania Avenue', // STREET.
'locality' => 'Washington', // CITY.
'administrative_area_level_1' => 'DC', // STATE.
'postal_code' => '20500',
'country' => 'United States',
),
),
array(
'id' => 'location_geocode2',
'type' => 'google_maps',
'title' => esc_html__( 'Google Maps', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This map is set using only latitude and longitude with a zoom factor of 7. When setting a Google map using lat/long, address information will not be returned.', 'your-textdomain-here' ),
'show_api_key' => false,
'full_width' => true,
'default' => array(
'latitude' => 38.8976758,
'longitude' => - 77.03648229999999,
'zoom' => 7,
),
),
),
)
);

View File

@@ -0,0 +1,95 @@
<?php
/**
* Redux Icon Select Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
/**
* This file is for backward compatibility. Please do not use.
* FontAwesome 6+ is preinstalled with Redux.
*/
require_once Redux_Core::$dir . 'inc/extensions/icon_select/font-awesome-5-free.php';
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Icon Select', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/icon-select.html" target="_blank">https://devs.redux.io/core-extensions/icon-select.html</a>',
'subsection' => true,
'fields' => array(
/**
* This field was left in the sample config to display that every effort to maintain backward compatibility with older
* versions of Icon Select has been implemented.
* Please do NOT use argument in this field in your projects.
* They are considered deprecated.
*/
array(
'id' => 'icon-select-legacy',
'type' => 'icon_select',
'title' => esc_html__( 'Legacy Icon Select', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Original Icon Select field that maintains backward compatibility with the original extension.', 'your-textdomain-here' ),
'default' => '',
'options' => redux_icon_select_fa_5_free(),
// Disable auto-enqueue of stylesheet if present in the panel.
'enqueue' => true,
// Disable auto-enqueue of stylesheet on the front-end.
'enqueue_frontend' => true,
// Stylesheet URL.
'stylesheet' => 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.css',
// (Optional) Specify a class prefix if one is needed to initialize the icon.
'prefix' => 'fa',
),
/**
* When creating fields for Icon Select, use this as a template instead.
* For detailed documentation, see: https://devs.redux.io/core-extensions/icon-select.html
*/
array(
'id' => 'icon-select',
'type' => 'icon_select',
'title' => esc_html__( 'Icon Select', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Select an icon.', 'your-textdomain-here' ),
'default' => 'fas fa-1',
// Disable auto-enqueue of stylesheet if present in the panel.
'enqueue' => true,
// Disable auto-enqueue of stylesheet on the front-end.
'enqueue_frontend' => true,
// Stylesheet data.
'stylesheet' => array(
array(
'url' => 'https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/7.2.96/css/materialdesignicons.css',
'title' => 'Material Icons',
'prefix' => 'mdi-set',
),
array(
'url' => 'https://icons.getbootstrap.com/assets/font/bootstrap-icons.min.css',
'title' => 'Bootstrap',
'prefix' => 'bi',
),
array(
'url' => 'https://cdn.lineicons.com/4.0/lineicons.css',
'title' => 'Line Icons',
'prefix' => 'lni',
),
array(
'url' => 'https://cdn.jsdelivr.net/gh/devicons/devicon@v2.15.1/devicon.min.css',
'title' => 'Dev Icons',
'prefix' => '',
),
),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,15 @@
/* jshint unused:false */
function redux_add_date() {
(function( $ ) {
var date = new Date();
var text = $( '#opt-blank-text' );
text.val( date.toString() );
})( jQuery );
}
function redux_show_alert() {
alert( 'You clicked the Alert button!' );
}

View File

@@ -0,0 +1,53 @@
<?php
/**
* Redux JS Button Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'JS Button', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/js-button.html" target="_blank">https://devs.redux.io/core-extensions/js-button.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-js-button',
'type' => 'js_button',
'title' => esc_html__( 'JS Button', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Run javascript in the options panel from button clicks.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Click the Add Date button to add the current date into the text field below.', 'your-textdomain-here' ),
'script' => array(
'url' => plugins_url( '/extensions/js-button.js', __DIR__ ),
'dir' => __DIR__ . '/js-button.js',
'dep' => array( 'jquery' ),
'ver' => time(),
'in_footer' => true,
),
'buttons' => array(
array(
'text' => esc_html__( 'Add Date', 'your-textdomain-here' ),
'class' => 'button-primary',
'function' => 'redux_add_date',
),
array(
'text' => esc_html__( 'Alert', 'your-textdomain-here' ),
'class' => 'button-secondary',
'function' => 'redux_show_alert',
),
),
),
array(
'id' => 'opt-blank-text',
'type' => 'text',
'title' => esc_html__( 'Date', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Click the Add Date button above to fill out this field.', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,71 @@
<?php
/**
* Redux Repeater Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => __( 'Repeater', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/repeater.html" target="_blank">https://devs.redux.io/core-extensions/repeater.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'repeater-field-id',
'type' => 'repeater',
'title' => esc_html__( 'Repeater Demo', 'your-textdomain-here' ),
'full_width' => true,
'subtitle' => esc_html__( 'Repeater', 'your-textdomain-here' ),
'item_name' => '',
'sortable' => true,
'active' => false,
'collapsible' => false,
'fields' => array(
array(
'id' => 'title_field',
'type' => 'text',
'placeholder' => esc_html__( 'Title', 'your-textdomain-here' ),
),
array(
'id' => 'textarea_field',
'type' => 'textarea',
'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'default' => 'Text Field here',
'title' => esc_html__( 'Title', 'your-domain-here' ),
),
array(
'id' => 'select_field',
'type' => 'select',
'multi' => true,
'title' => esc_html__( 'Select Field', 'your-textdomain-here' ),
'options' => array(
'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
),
'placeholder' => esc_html__( 'Listing Field', 'your-textdomain-here' ),
),
array(
'id' => 'switch_field',
'type' => 'switch',
'placeholder' => esc_html__( 'Switch Field', 'your-textdomain-here' ),
'default' => true,
),
array(
'id' => 'text_field',
'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'type' => 'text',
'placeholder' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'required' => array( 'switch_field', '=', false ),
'default' => 'Text Field here',
),
),
),
),
)
);

View File

@@ -0,0 +1,22 @@
<?php
/**
* Redux Search Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
// --> Below this line not needed. This is just for demonstration purposes.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Live Search', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/live-search.html" target="_blank">https://devs.redux.io/extensions/live-search.html</a>',
'heading' => esc_html__( 'Try the search box at the top right of every panel or metabox section. It will dynamically filter out the visible fields to match your search.', 'your-textdomain-here' ),
'customizer' => false,
'subsection' => true,
)
);

View File

@@ -0,0 +1,414 @@
<?php
/**
* Redux Search Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
// --> Below this line not needed. This is just for demonstration purposes.
$function = '<strong>' . esc_html__( 'Function', 'your-textdomain-here' ) . ': </strong>';
$example = esc_html__( 'Example output:', 'your-textdomain-here' ) . ' ';
Redux::set_section(
$opt_name,
array(
'customizer' => false,
'title' => esc_html__( 'Shortcodes', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/shortcodes.html" target="_blank">https://devs.redux.io/extensions/shortcodes.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'sc-bloginfo',
'title' => esc_html__( '[bloginfo data="name"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("name")</code>',
'desc' => esc_html__( 'Displays the "Site Title" set in Settings > General. This data is retrieved from the "blogname" record in the wp_options table.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="name"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-description',
'title' => esc_html__( '[bloginfo data="description"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("description")</code>',
'desc' => esc_html__( 'Displays the "Tagline" set in Settings > General. This data is retrieved from the "blogdescription" record in the wp_options table.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="description"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-wpurl',
'title' => esc_html__( '[bloginfo data="wpurl"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("wpurl")</code>',
'desc' => esc_html__( 'Displays the "WordPress address (URL)" set in Settings > General. This data is retrieved from the "siteurl" record in the wp_options table. Consider using *root_url* instead, especially for multi-site configurations using paths instead of subdomains (it will return the root site not the current sub-site).', 'your-textdomain-here' ),
'type' => 'raw',
'markdown' => true,
'content' => $example . do_shortcode( '<strong>[bloginfo data="wpurl"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-rooturl',
'title' => esc_html__( '[bloginfo data="root_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>site_url()</code>',
'desc' => esc_html__( 'Return the root site, not the current sub-site.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="root_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-url',
'title' => esc_html__( '[bloginfo data="url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>home_url()</code>',
'desc' => esc_html__( 'Displays the "Site address (URL)" set in Settings > General. This data is retrieved from the "home" record in the wp_options table.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-adminemail',
'title' => esc_html__( '[bloginfo data="admin_email"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("admin_email")</code>',
'desc' => esc_html__( 'Displays the "E-mail address" set in Settings > General. This data is retrieved from the "admin_email" record in the wp_options table.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="admin_email"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-charset',
'title' => esc_html__( '[bloginfo data="charset"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("charset")</code>',
'desc' => esc_html__( 'Displays the "Encoding for pages and feeds" set in Settings > Reading. This data is retrieved from the "blog_charset" record in the wp_options.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="charset"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-version',
'title' => esc_html__( '[bloginfo data="version"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("version")</code>',
'desc' => esc_html__( 'Displays the WordPress Version you use. This data is retrieved from the $wp_version variable set in wp-includes/version.php.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="version"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-htmltype',
'title' => esc_html__( '[bloginfo data="html_type"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("html_type")</code>',
'desc' => esc_html__( 'Displays the Content-Type of WordPress HTML pages (default: "text/html"). This data is retrieved from the "html_type" record in the wp_options table. Themes and plugins can override the default value using the pre_option_html_type filter.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="html_type"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-multi',
'title' => esc_html__( '[bloginfo data="is_multisite"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>is_multisite()</code>',
'desc' => esc_html__( 'Displays true/false check if WordPress is running in multisite mode.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . ( do_shortcode( '<strong>[bloginfo data="is_multisite"]</strong>' ) ),
'full_width' => false,
),
array(
'id' => 'sc-rtl',
'title' => esc_html__( '[bloginfo data="text_direction"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>is_rtl()</code>',
'desc' => esc_html__( 'Displays true/false check if the Text Direction of WordPress HTML pages is left instead of right.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . ( do_shortcode( '<strong>[bloginfo data="text_direction"]</strong>' ) ),
'full_width' => false,
),
array(
'id' => 'sc-lang',
'title' => esc_html__( '[bloginfo data="language"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("language")</code>',
'desc' => esc_html__( 'Displays the language of WordPress.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="language"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-stylesheet-url',
'title' => esc_html__( '[bloginfo data="stylesheet_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_stylesheet_uri()</code>',
'desc' => esc_html__( 'Displays the primary CSS (usually style.css) file URL of the active theme.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="stylesheet_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-stylesheet-dir',
'title' => esc_html__( '[bloginfo data="stylesheet_directory"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_stylesheet_directory()</code>',
'desc' => esc_html__( 'Displays the stylesheet directory of the active theme.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="stylesheet_directory"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-template-url',
'title' => esc_html__( '[bloginfo data="template_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_template_directory_uri()</code>',
'desc' => esc_html__( 'Displays the "Site Title" set in Settings > General. This data is retrieved from the "blogname" record in the wp_options table.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="template_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-child-template-url',
'title' => esc_html__( '[bloginfo data="child_template_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_stylesheet_directory_uri()</code>',
'desc' => esc_html__( 'Child template URI.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="child_template_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-template-dir',
'title' => esc_html__( '[bloginfo data="template_directory"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_template_directory()</code>',
'desc' => esc_html__( 'Template directory.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="template_directory"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-child-template-dir',
'title' => esc_html__( '[bloginfo data="child_template_directory"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_stylesheet_directory()</code>',
'desc' => esc_html__( 'Child template Directory.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="child_template_directory"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-pingback-url',
'title' => esc_html__( '[bloginfo data="pingback_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("pingback_url")</code>',
'desc' => esc_html__( 'Displays the Pingback XML-RPC file URL (xmlrpc.php).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="pingback_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-atom-url',
'title' => esc_html__( '[bloginfo data="atom_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("atom_url")</code>',
'desc' => esc_html__( 'Displays the Atom feed URL (/feed/atom).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="atom_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-rdf-url',
'title' => esc_html__( '[bloginfo data="rdf_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("rdf_url")</code>',
'desc' => esc_html__( 'Displays the RDF/RSS 1.0 feed URL (/feed/rfd).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="rdf_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-rss-url',
'title' => esc_html__( '[bloginfo data="rss_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("rss_url")</code>',
'desc' => esc_html__( 'Displays the RSS 0.92 feed URL (/feed/rss).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="rss_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-rss2-url',
'title' => esc_html__( '[bloginfo data="rss2_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("rss2_url")</code>',
'desc' => esc_html__( 'Displays the RSS 2.0 feed URL (/feed).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="rss2_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-comments-atom-url',
'title' => esc_html__( '[bloginfo data="comments_atom_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("comments_atom_url")</code>',
'desc' => esc_html__( 'Displays the comments Atom feed URL (/comments/feed).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="comments_atom_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-comments-rss2-url',
'title' => esc_html__( '[bloginfo data="comments_rss2_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>get_bloginfo("comments_rss2_url")</code>',
'desc' => esc_html__( 'Displays the comments RSS 2.0 feed URL (/comments/feed).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="comments_rss2_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-login-url',
'title' => esc_html__( '[bloginfo data="login_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>wp_login_url()</code>',
'desc' => esc_html__( 'Returns the WordPress login URL.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="login_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-logout-url',
'title' => esc_html__( '[bloginfo data="logout_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>wp_logout_url()</code>',
'desc' => esc_html__( 'Returns the WordPress logout URL.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="logout_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-register-url',
'title' => esc_html__( '[bloginfo data="register_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>wp_registration_url()</code>',
'desc' => esc_html__( 'Returns the WordPress register URL.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="register_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-lost-pw-url',
'title' => esc_html__( '[bloginfo data="lost_password_url"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>wp_lostpassword_url()</code>',
'desc' => esc_html__( 'Returns the WordPress lost password URL.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[bloginfo data="lost_password_url"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'opt-divide-1',
'type' => 'divide',
),
array(
'id' => 'sc-date',
'title' => esc_html__( '[date data="Y"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>date("Y")</code>',
// translators: %1$s: PHP Date Format URL.
'desc' => sprintf( esc_html__( 'Returns the current year. Any date format characters as specified by the %1$s may be used.', 'your-textdomain-here' ), '<a href="http://php.net/manual/en/function.date.php" target="_blank">' . esc_html__( 'PHP Date Format Table', 'your-textdomain-here' ) . '</a>' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[date data="Y"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'opt-divide-2',
'type' => 'divide',
),
array(
'id' => 'sc-theme-name',
'title' => esc_html__( '[themeinfo data="name"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Name")</code>',
'desc' => esc_html__( 'Theme name as given in theme\'s style.css.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="name"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-uri',
'title' => esc_html__( '[themeinfo data="theme_uri"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("ThemeURI")</code>',
'desc' => esc_html__( 'The URL to the theme\'s directory.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="theme_uri"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-desc',
'title' => esc_html__( '[themeinfo data="description"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Description")</code>',
'desc' => esc_html__( 'The description of the theme.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="description"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-author',
'title' => esc_html__( '[themeinfo data="author"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Author")</code>',
'desc' => esc_html__( 'The theme\'s author.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="author"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-author-uri',
'title' => esc_html__( '[themeinfo data="author_uri"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("AuthorURI")</code>',
'desc' => esc_html__( 'The website of the theme author.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="author_uri"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-version',
'title' => esc_html__( '[themeinfo data="version"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Version")</code>',
'desc' => esc_html__( 'The version of the theme.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="version"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-template',
'title' => esc_html__( '[themeinfo data="template"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Template")</code>',
'desc' => esc_html__( 'The folder name of the current theme.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="template"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-status',
'title' => esc_html__( '[themeinfo data="status"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Status")</code>',
'desc' => esc_html__( 'If the theme is published.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="status"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-tags',
'title' => esc_html__( '[themeinfo data="tags"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("Tags")</code>',
'desc' => esc_html__( 'Tags used to describe the theme.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="tags"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-text-domain',
'title' => esc_html__( '[themeinfo data="text_domain"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("TextDomain")</code>',
'desc' => esc_html__( 'The text domain used in the theme for translation purposes.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="text_domain"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-domain-path',
'title' => esc_html__( '[themeinfo data="domain_path"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>$theme_info->get("DomainPath")</code>',
'desc' => esc_html__( 'Path to the theme translation files.', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="domain_path"]</strong>' ),
'full_width' => false,
),
array(
'id' => 'sc-theme-is-child',
'title' => esc_html__( '[themeinfo data="is_child"]', 'your-textdomain-here' ),
'subtitle' => $function . '<code>is_child_theme()</code>',
'desc' => esc_html__( 'True/False return for child theme active check (Blank indicates False).', 'your-textdomain-here' ),
'type' => 'raw',
'content' => $example . do_shortcode( '<strong>[themeinfo data="is_child"]</strong>' ),
'full_width' => false,
),
),
)
);

View File

@@ -0,0 +1,28 @@
<?php
/**
* Redux Social Profiles Sample config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Social Profiles', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-extensions/social-profiles.html" target="_blank">https://devs.redux.io/core-extensions/social-profiles.html</a>',
'subtitle' => esc_html__( 'Click an icon to activate it, drag and drop to change the icon order.', 'your-textdomain-here' ),
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-social-profiles',
'type' => 'social_profiles',
'title' => esc_html__( 'Social Profiles', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Click an icon to activate it, drag and drop to change the icon order.', 'your-textdomain-here' ),
'hide_widget_msg' => true,
),
),
)
);

View File

@@ -0,0 +1,185 @@
<?php
/**
* Redux Framework tabbed config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework\Sample\Tabbed
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Tabbed', 'your-textdomain-here' ),
'id' => 'additional-tabbed',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/tabbed.html" target="_blank">https://devs.redux.io/core-fields/tabbed.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-tabbed-1',
'type' => 'tabbed',
'title' => 'Tabbed Layout 1',
'tabs' => array(
array(
'title' => 'Basic Fields',
'icon' => 'fas fa-gear',
'fields' => array(
array(
'id' => 'opt-tab-checkbox-1',
'type' => 'checkbox',
'title' => esc_html__( 'Checkbox', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Basic Checkbox field.', 'your-textdomain-here' ),
'default' => true,
),
array(
'id' => 'opt-tab-radio',
'type' => 'radio',
'title' => esc_html__( 'Radio Button', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Basic Radio Button field.', 'your-textdomain-here' ),
'options' => array(
'1' => esc_html__( 'Option 1', 'your-textdomain-here' ),
'2' => esc_html__( 'Option 2', 'your-textdomain-here' ),
'3' => esc_html__( 'Option 3', 'your-textdomain-here' ),
),
'default' => '2',
),
array(
'id' => 'opt-tab-media',
'type' => 'media',
'url' => true,
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
'compiler' => 'true',
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'default' => array( 'url' => 'http://s.wordpress.org/style/images/codeispoetry.png' ),
),
array(
'id' => 'opt-tab-gallery',
'type' => 'gallery',
'title' => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-tab-slider',
'type' => 'slider',
'title' => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
'default' => '0',
'min' => '0',
'step' => '5',
'max' => '300',
),
array(
'id' => 'opt-tab-spinner',
'type' => 'spinner',
'title' => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
'default' => '40',
'min' => '20',
'step' => '20',
'max' => '100',
),
array(
'id' => 'opt-tab-switch-on',
'type' => 'switch',
'title' => esc_html__( 'Switch On', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
'default' => 1,
),
),
),
array(
'title' => 'Text Fields',
'icon' => 'fas fa-font',
'fields' => array(
array(
'title' => esc_html__( 'Text Field', 'your-textdomain-here' ),
'id' => 'opt-tab-text',
'type' => 'text',
),
array(
'title' => esc_html__( 'Textarea Field', 'your-textdomain-here' ),
'id' => 'opt-tab-textarea',
'type' => 'textarea',
),
),
),
array(
'title' => esc_html__( 'Color Fields', 'your-textdomain-here' ),
'icon' => 'fas fa-palette',
'fields' => array(
array(
'id' => 'opt-tab-color-1',
'type' => 'color',
'title' => esc_html__( 'Color 1', 'your-textdomain-here' ),
),
array(
'id' => 'opt-tab-color-2',
'type' => 'color',
'title' => esc_html__( 'Color 2', 'your-textdomain-here' ),
),
),
),
),
),
array(
'id' => 'opt-tabbed-2',
'type' => 'tabbed',
'title' => 'Tabbed Layout 2',
'tabs' => array(
array(
'title' => 'Layout',
'fields' => array(
array(
'id' => 'opt-tab-homepage_blocks',
'type' => 'sorter',
'title' => 'Homepage Layout Manager',
'desc' => 'Organize how you want the layout to appear on the homepage',
'compiler' => 'true',
'options' => array(
'enabled' => array(
'placebo' => 'placebo',
'highlights' => 'Highlights',
'slider' => 'Slider',
'staticpage' => 'Static Page',
'services' => 'Services',
),
'disabled' => array(
'placebo' => 'placebo',
),
),
),
array(
'id' => 'opt-tab-slides',
'type' => 'slides',
'title' => esc_html__( 'Slides Options', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
),
),
),
array(
'title' => 'Advanced Text',
'fields' => array(
array(
'title' => esc_html__( 'WP Editor', 'your-textdomain-here' ),
'id' => 'opt-tab-editor',
'type' => 'editor',
),
array(
'title' => esc_html__( 'ACE Editor', 'your-textdomain-here' ),
'id' => 'opt-tab-ace',
'type' => 'ace_editor',
),
),
),
),
),
),
)
);

View File

@@ -0,0 +1,226 @@
<?php
/**
* Redux Taxonomy Meta config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'Redux_Taxonomy' ) ) {
return;
}
// Change the priority the Redux_Taxonomy boxes appear.
Redux_Taxonomy::set_args(
$opt_name,
array(
'taxonomy_priority' => 55,
)
);
Redux_Taxonomy::set_term(
$opt_name,
array(
'id' => 'demo-taxonomy',
'title' => esc_html__( 'Cool Options', 'your-textdomain-here' ),
// Slug for every taxonomy you want.
'taxonomy_types' => array( 'category', 'post_tag' ),
'add_visibility' => true,
// Can be set on term, section, or field level. Denote what fields to be displayed on the added {TERM} pages.
'sections' => array(
array(
'title' => esc_html__( 'Home Settings', 'your-textdomain-here' ),
'icon' => 'el-icon-home',
'fields' => array(
array(
'id' => 'tax-text',
'type' => 'text',
'add_visibility' => true,
'title' => esc_html__( 'Input 1', 'your-textdomain-here' ),
),
array(
'id' => 'tax-button-set',
'type' => 'button_set',
'title' => esc_html__( 'Button Set Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'add_visibility' => true,
'options' => array(
'1' => 'Opt 1',
'2' => 'Opt 2',
'3' => 'Opt 3',
),
'default' => '2',
),
array(
'id' => 'tax-text-2',
'type' => 'text',
'add_visibility' => true,
'title' => esc_html__( 'Input 2', 'your-textdomain-here' ),
),
array(
'id' => 'tax-web-fonts',
'type' => 'media',
'title' => esc_html__( 'Web Fonts', 'your-textdomain-here' ),
'compiler' => 'true',
'mode' => false,
// Can be set to false to allow any media type, or can also be set to any mime type.
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'tax-section-media-start',
'type' => 'section',
'title' => esc_html__( 'Media Options', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'With the "section" field you can create indent option sections.', 'your-textdomain-here' ),
'indent' => true,
),
array(
'id' => 'tax-media-url',
'type' => 'media',
'url' => true,
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
'compiler' => 'true',
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'default' => array( 'url' => 'http://s.wordpress.org/style/images/codeispoetry.png' ),
),
array(
'id' => 'tax-section-media-end',
'type' => 'section',
'indent' => false,
),
array(
'id' => 'tax-media-no-url',
'type' => 'media',
'title' => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'tax-media-no-preview',
'type' => 'media',
'preview' => false,
'title' => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'tax-gallery',
'type' => 'gallery',
'title' => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'tax-slider',
'type' => 'slider',
'title' => esc_html__( 'JQuery UI Slider Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45', 'your-textdomain-here' ),
'default' => '46',
'min' => '1',
'step' => '3',
'max' => '500',
),
array(
'id' => 'tax-slider-2',
'type' => 'slider',
'title' => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
'default' => '0',
'min' => '0',
'step' => '5',
'max' => '300',
),
array(
'id' => 'tax-spinner',
'type' => 'spinner',
'title' => esc_html__( 'Spinner Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'Spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
'default' => '40',
'min' => '20',
'step' => '20',
'max' => '100',
),
array(
'id' => 'tax-switch-parent',
'type' => 'switch',
'title' => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
'default' => 0,
'on' => 'Enabled',
'off' => 'Disabled',
),
array(
'id' => 'tax-switch-child',
'type' => 'switch',
'required' => array( 'tax-switch-parent', '=', '1' ),
'title' => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
'default' => false,
),
),
),
array(
'title' => esc_html__( 'Home Layout', 'your-textdomain-here' ),
// translators: %s = Redux GitHub URL.
'desc' => sprintf( esc_html__( '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: %s', 'your-textdomain-here' ), '<a href="https://github.com/reduxframework/redux-framework">https://github.com/reduxframework/redux-framework</a>' ),
'icon' => 'el-icon-home',
'fields' => array(
array(
'id' => 'tax-homepage_blocks',
'type' => 'sorter',
'title' => 'Homepage Layout Manager',
'desc' => 'Organize how you want the layout to appear on the homepage',
'compiler' => 'true',
'add_visibility' => true,
'options' => array(
'enabled' => array(
'highlights' => 'Highlights',
'slider' => 'Slider',
'staticpage' => 'Static Page',
),
'disabled' => array(
'services' => 'Services',
),
),
),
array(
'id' => 'tax-presets',
'type' => 'image_select',
'presets' => true,
'title' => esc_html__( 'Preset', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
'default' => 0,
'desc' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
'options' => array(
'1' => array(
'alt' => 'Preset 1',
'img' => ReduxFramework::$_url . '../sample/presets/preset1.png',
'presets' => array(
'switch-on' => 1,
'switch-off' => 1,
'switch-custom' => 1,
),
),
'2' => array(
'alt' => 'Preset 2',
'img' => ReduxFramework::$_url . '../sample/presets/preset2.png',
'presets' => '{"slider1":"1", "slider2":"0", "switch-on":"0"}',
),
),
),
),
),
),
)
);

View File

@@ -0,0 +1,214 @@
<?php
/**
* Redux User Meta config.
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'Redux_Users' ) ) {
return;
}
// Change the priority the Redux_Users boxes appear.
Redux_Users::set_Args(
$opt_name,
array(
'user_priority' => 50,
)
);
Redux_Users::set_profile(
$opt_name,
array(
'id' => 'demo-users',
'title' => esc_html__( 'Cool Options', 'your-textdomain-here' ),
'style' => 'wp',
'sections' => array(
array(
'title' => esc_html__( 'User Settings', 'your-textdomain-here' ),
'icon' => 'el-icon-home',
'fields' => array(
array(
'id' => 'user-text',
'type' => 'text',
'title' => esc_html__( 'Input 1', 'your-textdomain-here' ),
),
array(
'id' => 'user-text-2',
'type' => 'text',
'required' => array( 'user-text', '=', 'two' ),
'title' => esc_html__( 'Input 2', 'your-textdomain-here' ),
),
array(
'id' => 'user-text-3',
'type' => 'text',
'title' => esc_html__( 'Input 3', 'your-textdomain-here' ),
),
array(
'id' => 'user-web-fonts',
'type' => 'media',
'title' => esc_html__( 'Web Fonts', 'your-textdomain-here' ),
'compiler' => 'true',
'mode' => false,
// Can be set to false allowing for any media type, or can also be set to any mime type.
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'user-section-media-start',
'type' => 'section',
'title' => esc_html__( 'Media Options', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'With the "section" field you can create indent option sections.', 'your-textdomain-here' ),
'indent' => true,
),
array(
'id' => 'user-mediaurl',
'type' => 'media',
'url' => true,
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
'compiler' => 'true',
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'default' => array( 'url' => 'https://s.wordpress.org/style/images/codeispoetry.png' ),
),
array(
'id' => 'user-section-media-end',
'type' => 'section',
'indent' => false,
),
array(
'id' => 'user-media-nourl',
'type' => 'media',
'title' => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'user-media-nopreview',
'type' => 'media',
'preview' => false,
'title' => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'user-gallery',
'type' => 'gallery',
'title' => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'user-slider-one',
'type' => 'slider',
'title' => esc_html__( 'JQuery UI Slider Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI slider description. Min: 1, max: 500, step: 3, default value: 45', 'your-textdomain-here' ),
'default' => '46',
'min' => '1',
'step' => '3',
'max' => '500',
),
array(
'id' => 'user-slider-two',
'type' => 'slider',
'title' => esc_html__( 'JQuery UI Slider Example 2 w/ Steps (5)', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
'default' => '0',
'min' => '0',
'step' => '5',
'max' => '300',
),
array(
'id' => 'user-spinner',
'type' => 'spinner',
'title' => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
'default' => '40',
'min' => '20',
'step' => '20',
'max' => '100',
),
array(
'id' => 'user-switch-parent',
'type' => 'switch',
'title' => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
'default' => 0,
'on' => 'Enabled',
'off' => 'Disabled',
),
array(
'id' => 'user-switch-child',
'type' => 'switch',
'required' => array( 'switch-parent', '=', '1' ),
'title' => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
'default' => false,
),
),
),
array(
'title' => esc_html__( 'Home Layout', 'your-textdomain-here' ),
'icon' => 'el-icon-home',
'fields' => array(
array(
'id' => 'user-homepage_blocks',
'type' => 'sorter',
'title' => 'Homepage Layout Manager',
'desc' => 'Organize how you want the layout to appear on the homepage',
'compiler' => 'true',
'required' => array( 'layout', '=', '1' ),
'options' => array(
'enabled' => array(
'highlights' => 'Highlights',
'slider' => 'Slider',
'staticpage' => 'Static Page',
'services' => 'Services',
),
'disabled' => array(),
),
),
array(
'id' => 'user-presets',
'type' => 'image_select',
'presets' => true,
'title' => esc_html__( 'Preset', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
'default' => 0,
'desc' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
'options' => array(
'1' => array(
'alt' => 'Preset 1',
'img' => Redux_Core::$url . '../sample/presets/preset1.png',
'presets' => array(
'switch-on' => 1,
'switch-off' => 1,
'switch-custom' => 1,
),
),
'2' => array(
'alt' => 'Preset 2',
'img' => Redux_Core::$url . '../sample/presets/preset2.png',
'presets' => "{'slider1':'1', 'slider2':'0', 'switch-on':'0'}",
),
),
),
),
),
),
)
);
// Recovering user data.
$data = Redux_Users::get_user_meta(
array(
'key' => 'user-text', /* If you're only looking for a key within the meta, otherwise all values will be returned. */
'opt_name' => $opt_name, // Optional, but needed to recover default values for unset values.
'user' => '', // User id, else current user ID is returned.
)
);

View File

@@ -0,0 +1,33 @@
<?php
/**
* Redux Widget Areas Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
// --> Below this line not needed. This is just for demonstration purposes.
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Widget Areas', 'your-textdomain-here' ),
// phpcs:ignore
// 'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/extensions/widget-areas.html" target="_blank">https://devs.redux.io/extensions/widget-areas.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'widget_areas',
'type' => 'info',
'style' => 'info',
'notice' => true,
'title' => esc_html__( 'Widget Areas is Already Running!', 'your-textdomain-here' ),
// translators: %1$s: Widget Admin URL.
'subtitle' => sprintf( esc_html__( 'To see it in action, head over to your %1$s', 'your-textdomain-here' ), '<a href="' . admin_url( 'widgets.php' ) . '">' . esc_html__( 'Widgets page', 'your-textdomain-here' ) . '</a> (Applicable for Classic Widgets only).' ),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,28 @@
<?php
/**
* Redux Framework gallery config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Gallery', 'your-textdomain-here' ),
'id' => 'media-gallery',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/gallery.html" target="_blank">https://devs.redux.io/core-fields/gallery.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-gallery',
'type' => 'gallery',
'title' => esc_html__( 'Add/Edit Gallery', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Create a new Gallery by selecting existing or uploading new images using the WordPress native uploader', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,109 @@
<?php
/**
* Redux Framework media config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Media', 'your-textdomain-here' ),
'id' => 'media-media',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/media.html" target="_blank">https://devs.redux.io/core-fields/media.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-media',
'type' => 'media',
'url' => true,
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
'compiler' => 'true',
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'preview_size' => 'full',
),
array(
'id' => 'media-no-url',
'type' => 'media',
'title' => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'url' => false,
'preview' => true,
),
array(
'id' => 'media-no-preview',
'type' => 'media',
'preview' => false,
'title' => esc_html__( 'Media No Preview', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'hint' => array(
'title' => esc_html__( 'Test Hint', 'your-textdomain-here' ),
'content' => wp_kses_post( 'This is a <b>hint</b> tool-tip for the webFonts field.<br/><br/>Add any HTML-based text you like here.' ),
),
),
array(
'id' => 'opt-random-upload',
'type' => 'media',
'title' => esc_html__( 'Upload Anything - Disabled Mode', 'your-textdomain-here' ),
'full_width' => true,
// Can be set to false to allow any media type, or can also be set to any mime type.
'mode' => false,
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
),
array(
'id' => 'opt-media-filter',
'type' => 'media',
'url' => true,
'title' => esc_html__( 'Media w/ URL', 'your-textdomain-here' ),
'compiler' => true,
'desc' => esc_html__( 'Basic media uploader with disabled URL input field.', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'preview_size' => 'full',
'default' => array(
'url' => 'https://s.wordpress.org/style/images/codeispoetry.png',
'filter' => array(
'grayscale' => array(
'checked' => true,
'value' => 50,
),
),
),
'filter' => array(
'grayscale' => true,
'blur' => true,
'sepia' => true,
'saturate' => true,
'opacity' => true,
'brightness' => true,
'contrast' => true,
'hue-rotate' => true,
'invert' => true,
),
'output' => array( '.header-image img, .site-logo, .wp-block-site-logo' ),
),
array(
'id' => 'media-no-url-filter',
'type' => 'media',
'title' => esc_html__( 'Media w/o URL', 'your-textdomain-here' ),
'desc' => esc_html__( 'This represents the minimalistic view. It does not have the preview box or the display URL in an input box. ', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Upload any media using the WordPress native uploader', 'your-textdomain-here' ),
'url' => false,
'filter' => array(
'grayscale' => true,
'blur' => true,
),
'preview' => true,
'preview_size' => 'full',
),
),
)
);

View File

@@ -0,0 +1,29 @@
<?php
/**
* Redux Multi-Media Sample config.
*
* For full documentation, please visit: http:https://devs.redux.io/
*
* @package Redux
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Multi Media', 'your-textdomain-here' ),
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/premium/multi-media.html" target="_blank">https://devs.redux.io/premium/multi-media.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-multi-media',
'type' => 'multi_media',
'title' => esc_html__( 'Multi Media Selector', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Alternative media field which allows for multi selections', 'your-textdomain-here' ),
'desc' => esc_html__( 'max_file_limit has been set to 5.', 'your-textdomain-here' ),
'max_file_upload' => 5,
),
),
)
);

View File

@@ -0,0 +1,33 @@
<?php
/**
* Redux Framework slides config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Slides', 'your-textdomain-here' ),
'id' => 'additional-slides',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/slides.html" target="_blank">https://devs.redux.io/core-fields/slides.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-slides',
'type' => 'slides',
'title' => esc_html__( 'Slides Options', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Unlimited slides with drag and drop sorting.', 'your-textdomain-here' ),
'desc' => esc_html__( 'This field will store all slides values into a multidimensional array to use into a foreach loop.', 'your-textdomain-here' ),
'placeholder' => array(
'title' => esc_html__( 'This is a title', 'your-textdomain-here' ),
'description' => esc_html__( 'Description Here', 'your-textdomain-here' ),
'url' => esc_html__( 'Give us a link!', 'your-textdomain-here' ),
),
),
),
)
);

View File

@@ -0,0 +1,79 @@
<?php
/**
* Redux Framework content config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Content', 'your-textdomain-here' ),
'id' => 'presentation-content',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/content.html" target="_blank">https://devs.redux.io/core-fields/content.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-heading-1',
'type' => 'content',
'mode' => 'heading',
'content' => 'This is a content field using the mode <strong>heading</strong>',
),
array(
'id' => 'opt-subheading-1',
'type' => 'content',
'mode' => 'subheading',
'content' => 'This is a content field using the mode <strong>subheading</strong>',
),
array(
'id' => 'opt-content-1',
'type' => 'content',
'mode' => 'content',
'content' => 'This is a content field using the mode <strong>content</strong>',
),
array(
'id' => 'opt-submessage-1',
'type' => 'content',
'mode' => 'submessage',
'content' => 'This is a content field using the mode <strong>submessage</strong> with <strong>normal</strong> style.',
),
array(
'id' => 'opt-content-2',
'type' => 'content',
'mode' => 'content',
'content' => 'This is a content field using the mode <strong>content</strong>',
),
array(
'id' => 'opt-submessage-2',
'type' => 'content',
'mode' => 'submessage',
'content' => 'This is a content field using the mode <strong>submessage</strong> with <strong>success</strong> style.',
'style' => 'success',
),
array(
'id' => 'opt-submessage-3',
'type' => 'content',
'mode' => 'submessage',
'content' => 'This is a content field using the mode <strong>submessage</strong> with <strong>info</strong> style.',
'style' => 'info',
),
array(
'id' => 'opt-submessage-4',
'type' => 'content',
'mode' => 'submessage',
'content' => 'This is a content field using the mode <strong>submessage</strong> with <strong>warning</strong> style.',
'style' => 'warning',
),
array(
'id' => 'opt-submessage-5',
'type' => 'content',
'mode' => 'submessage',
'content' => 'This is a content field using the mode <strong>submessage</strong> with <strong>critical</strong> style.',
'style' => 'critical',
),
),
)
);

View File

@@ -0,0 +1,25 @@
<?php
/**
* Redux Framework divide config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Divide', 'your-textdomain-here' ),
'id' => 'presentation-divide',
'desc' => esc_html__( 'The spacer to the section menu as seen to the left (after this section block) is the divide "section". Also the divider below is the divide "field".', 'your-textdomain-here' ) . '<br />' . __( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/divide.html" target="_blank">https://devs.redux.io/core-fields/divide.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-divide',
'type' => 'divide',
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,107 @@
<?php
/**
* Redux Framework info config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Info', 'your-textdomain-here' ),
'id' => 'presentation-info',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/info.html" target="_blank">https://devs.redux.io/core-fields/info.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-info-field',
'type' => 'info',
'desc' => esc_html__( 'This is the info field, if you want to break sections up.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-notice-info1',
'type' => 'info',
'style' => 'info',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is an info field with the <strong>info</strong> style applied. By default the <strong>normal</strong> style is applied.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-info-warning',
'type' => 'info',
'style' => 'warning',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is an info field with the <strong>warning</strong> style applied.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-info-success',
'type' => 'info',
'style' => 'success',
'icon' => 'el el-info-circle',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is an info field with the <strong>success</strong> style applied and an icon.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-info-critical',
'type' => 'info',
'style' => 'critical',
'icon' => 'el el-info-circle',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is an info field with the <strong>critical</strong> style applied and an icon.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-info-custom',
'type' => 'info',
'style' => 'custom',
'color' => 'purple',
'icon' => 'el el-info-circle',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is field with the <strong>custom</strong> style applied, color arg passed, and an icon.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-info-normal',
'type' => 'info',
'notice' => false,
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is non-notice field with the <strong>normal</strong> style applied.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-notice-info',
'type' => 'info',
'notice' => false,
'style' => 'info',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is non-notice field with the <strong>info</strong> style applied.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-notice-warning',
'type' => 'info',
'notice' => false,
'style' => 'warning',
'icon' => 'el el-info-circle',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is non-notice field with the <strong>warning</strong> style applied and an icon.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-notice-success',
'type' => 'info',
'notice' => false,
'style' => 'success',
'icon' => 'el el-info-circle',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is non-notice field with the <strong>success</strong> style applied and an icon.', 'your-textdomain-here' ) ),
),
array(
'id' => 'opt-notice-critical',
'type' => 'info',
'notice' => false,
'style' => 'critical',
'icon' => 'el el-info-circle',
'title' => esc_html__( 'This is a title.', 'your-textdomain-here' ),
'desc' => wp_kses_post( __( 'This is a non-notice field with the <strong>critical</strong> style applied and an icon.', 'your-textdomain-here' ) ),
),
),
)
);

View File

@@ -0,0 +1,50 @@
<?php
/**
* Redux Framework section config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Section', 'your-textdomain-here' ),
'id' => 'presentation-section',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/section.html" target="_blank">https://devs.redux.io/core-fields/section.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'section-start',
'type' => 'section',
'title' => esc_html__( 'Section Example', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'With the "section" field you can create indented option sections.', 'your-textdomain-here' ),
'indent' => true, // Indent all options below until the next 'section' option is set.
),
array(
'id' => 'section-test',
'type' => 'text',
'title' => esc_html__( 'Field Title', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Field Subtitle', 'your-textdomain-here' ),
),
array(
'id' => 'section-test-media',
'type' => 'media',
'title' => esc_html__( 'Field Title', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Field Subtitle', 'your-textdomain-here' ),
),
array(
'id' => 'section-end',
'type' => 'section',
'indent' => false, // Indent all options below until the next 'section' option is set.
),
array(
'id' => 'section-info',
'type' => 'info',
'desc' => esc_html__( 'And now you can add more fields below and outside of the indent.', 'your-textdomain-here' ),
),
),
)
);

View File

@@ -0,0 +1,120 @@
<?php
/**
* Redux Framework image select config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Image Select', 'your-textdomain-here' ),
'id' => 'select-image_select',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/image-select.html" target="_blank">https://devs.redux.io/core-fields/image-select.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-image-select-layout',
'type' => 'image_select',
'title' => esc_html__( 'Images Option for Layout', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This uses some of the built in images, you can use them for layout options.', 'your-textdomain-here' ),
// Must provide key => value(array:title|img) pairs for radio options.
'options' => array(
'1' => array(
'alt' => '1 Column',
'img' => Redux_Core::$url . 'assets/img/1col.png',
),
'2' => array(
'alt' => '2 Column Left',
'img' => Redux_Core::$url . 'assets/img/2cl.png',
),
'3' => array(
'alt' => '2 Column Right',
'img' => Redux_Core::$url . 'assets/img/2cr.png',
),
'4' => array(
'alt' => '3 Column Middle',
'img' => Redux_Core::$url . 'assets/img/3cm.png',
),
'5' => array(
'alt' => '3 Column Left',
'img' => Redux_Core::$url . 'assets/img/3cl.png',
),
'6' => array(
'alt' => '3 Column Right',
'img' => Redux_Core::$url . 'assets/img/3cr.png',
),
),
'default' => '2',
),
array(
'id' => 'opt-patterns',
'type' => 'image_select',
'tiles' => true,
'title' => esc_html__( 'Images Option (with tiles => true)', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Select a background pattern.', 'your-textdomain-here' ),
'default' => 0,
'options' => $sample_patterns,
),
array(
'id' => 'opt-image-select',
'type' => 'image_select',
'title' => esc_html__( 'Images Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// Must provide key => value(array:title|img) pairs for radio options.
'options' => array(
'1' => array(
'title' => 'Opt 1',
'img' => admin_url() . 'images/align-none.png',
),
'2' => array(
'title' => 'Opt 2',
'img' => admin_url() . 'images/align-left.png',
),
'3' => array(
'title' => 'Opt 3',
'img' => admin_url() . 'images/align-center.png',
),
'4' => array(
'title' => 'Opt 4',
'img' => admin_url() . 'images/align-right.png',
),
),
'default' => '2',
),
array(
'id' => 'opt-presets',
'type' => 'image_select',
'presets' => true,
'full_width' => true,
'title' => esc_html__( 'Preset', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
'default' => 0,
'desc' => esc_html__( 'This allows you to set a json string or array to override multiple preferences in your theme.', 'your-textdomain-here' ),
'options' => array(
'1' => array(
'alt' => 'Preset 1',
'img' => Redux_Core::$url . '../sample/presets/preset1.png',
'presets' => array(
'switch-on' => 1,
'switch-off' => 1,
'switch-parent' => 1,
),
),
'2' => array(
'alt' => 'Preset 2',
'img' => Redux_Core::$url . '../sample/presets/preset2.png',
'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
),
),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,52 @@
<?php
/**
* Redux Framework select image config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Select Image', 'your-textdomain-here' ),
'id' => 'select-select_image',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select-image.html" target="_blank">https://devs.redux.io/core-fields/select-image.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-select_image',
'type' => 'select_image',
'presets' => true,
'title' => esc_html__( 'Select Image', 'your-textdomain-here' ),
'options' => array(
array(
'alt' => 'Preset 1',
'img' => Redux_Core::$url . '../sample/presets/preset1.png',
'presets' => array(
'switch-on' => 1,
'switch-off' => 1,
'switch-parent' => 1,
),
),
array(
'alt' => 'Preset 2',
'img' => Redux_Core::$url . '../sample/presets/preset2.png',
'presets' => '{"opt-slider-label":"1", "opt-slider-text":"10"}',
),
),
'default' => Redux_Core::$url . '../sample/presets/preset2.png',
),
array(
'id' => 'opt-select-image',
'type' => 'select_image',
'title' => esc_html__( 'Select Image', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'A preview of the selected image will appear underneath the select box.', 'your-textdomain-here' ),
'options' => $sample_patterns,
'default' => Redux_Core::$url . '../sample/patterns/triangular.png',
),
),
)
);

View File

@@ -0,0 +1,284 @@
<?php
/**
* Redux Framework select config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Select', 'your-textdomain-here' ),
'id' => 'select-select',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/select.html" target="_blank">https://devs.redux.io/core-fields/select.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-select',
'type' => 'select',
'title' => esc_html__( 'Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// Must provide key => value pairs for select options.
'options' => array(
'1' => 'Opt 1',
'2' => 'Opt 2',
'3' => 'Opt 3',
),
'default' => '2',
),
array(
'id' => 'opt-select-stylesheet',
'type' => 'select',
'title' => esc_html__( 'Theme Stylesheet', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Select your themes alternative color scheme.', 'your-textdomain-here' ),
'options' => array(
'default.css' => 'default.css',
'color1.css' => 'color1.css',
),
'default' => 'default.css',
),
array(
'id' => 'opt-select-optgroup',
'type' => 'select',
'title' => esc_html__( 'Select Option with optgroup', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// Must provide key => value pairs for select options.
'options' => array(
'Group 1' => array(
'1' => 'Opt 1',
'2' => 'Opt 2',
'3' => 'Opt 3',
),
'Group 2' => array(
'4' => 'Opt 4',
'5' => 'Opt 5',
'6' => 'Opt 6',
),
'7' => 'Opt 7',
'8' => 'Opt 8',
'9' => 'Opt 9',
),
'default' => '2',
),
array(
'id' => 'opt-multi-select',
'type' => 'select',
'multi' => true,
'title' => esc_html__( 'Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// 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',
'type' => 'info',
'desc' => esc_html__( 'You can easily add a variety of data from WordPress.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-categories',
'type' => 'select',
'data' => 'roles',
'title' => esc_html__( 'Categories Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-categories-multi',
'type' => 'select',
'data' => 'categories',
'multi' => true,
'title' => esc_html__( 'Categories Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-pages',
'type' => 'select',
'data' => 'pages',
'title' => esc_html__( 'Pages Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-pages',
'type' => 'select',
'data' => 'pages',
'multi' => true,
'title' => esc_html__( 'Pages Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-tags',
'type' => 'select',
'data' => 'tags',
'title' => esc_html__( 'Tags Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-tags',
'type' => 'select',
'data' => 'terms',
'multi' => true,
'title' => esc_html__( 'Tags Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-terms',
'type' => 'select',
'data' => 'terms',
'title' => esc_html__( 'Terms Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-terms',
'type' => 'select',
'data' => 'terms',
'multi' => true,
'title' => esc_html__( 'Terms Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-menus',
'type' => 'select',
'data' => 'menus',
'title' => esc_html__( 'Menus Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-menus',
'type' => 'select',
'data' => 'menu',
'multi' => true,
'title' => esc_html__( 'Menus Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-post-type',
'type' => 'select',
'data' => 'post_type',
'title' => esc_html__( 'Post Type Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-post-type',
'type' => 'select',
'data' => 'post_type',
'multi' => true,
'title' => esc_html__( 'Post Type Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-sortable',
'type' => 'select',
'data' => 'post_type',
'multi' => true,
'sortable' => true,
'title' => esc_html__( 'Post Type Multi Select Option + Sortable', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This field also has sortable enabled!', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-posts',
'type' => 'select',
'data' => 'post',
'title' => esc_html__( 'Posts Select Option2', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-multi-select-posts',
'type' => 'select',
'data' => 'post',
'multi' => true,
'title' => esc_html__( 'Posts Multi Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-roles',
'type' => 'select',
'data' => 'roles',
'title' => esc_html__( 'User Role Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-capabilities',
'type' => 'select',
'data' => 'capabilities',
'multi' => false,
'ajax' => true,
'min_input_length' => 3,
'title' => esc_html__( 'Capabilities Select Option w/ AJAX Loading', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-elusive',
'type' => 'select',
'data' => 'elusive-icons',
'title' => esc_html__( 'Elusive Icons Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'Here\'s a list of all the elusive icons by name and icon.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-users',
'type' => 'select',
'data' => 'users',
'ajax' => true,
'min_input_length' => 3,
'title' => esc_html__( 'Users Select Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
),
array(
'id' => 'opt-select-callback',
'type' => 'select',
'data' => 'callback',
'args' => 'redux_select_callback',
'title' => esc_html__( 'Select Option using a Callback', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'The items in this select were added via a callback function.', 'your-textdomain-here' ),
),
),
)
);
/**
* Select callback function.
*
* @return array
*/
function redux_select_callback(): array {
$options = array();
$options[0] = esc_html__( 'Zero', 'your-textdomain-here' );
$options[1] = esc_html__( 'One', 'your-textdomain-here' );
$options[2] = esc_html__( 'Two', 'your-textdomain-here' );
$options[3] = esc_html__( 'Three', 'your-textdomain-here' );
return $options;
}

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,74 @@
<?php
/**
* Redux Framework slider config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Slider', 'your-textdomain-here' ),
'id' => 'slider_spinner-slider',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/slider.html" target="_blank">https://devs.redux.io/core-fields/slider.html</a>',
'fields' => array(
array(
'id' => 'opt-slider-label',
'type' => 'slider',
'title' => esc_html__( 'Slider Example 1', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This slider displays the value as a label.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Slider description. Min: 1, max: 500, step: 1, default value: 250', 'your-textdomain-here' ),
'default' => 250,
'min' => 1,
'step' => 1,
'max' => 500,
'display_value' => 'label',
),
array(
'id' => 'opt-slider-text',
'type' => 'slider',
'title' => esc_html__( 'Slider Example 2 with Steps (5)', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This example displays the value in a text box', 'your-textdomain-here' ),
'desc' => esc_html__( 'Slider description. Min: 0, max: 300, step: 5, default value: 75', 'your-textdomain-here' ),
'default' => 75,
'min' => 0,
'step' => 5,
'max' => 300,
'display_value' => 'text',
),
array(
'id' => 'opt-slider-select',
'type' => 'slider',
'title' => esc_html__( 'Slider Example 3 with two sliders', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This example displays the values in select boxes', 'your-textdomain-here' ),
'desc' => esc_html__( 'Slider description. Min: 0, max: 500, step: 5, slider 1 default value: 100, slider 2 default value: 300', 'your-textdomain-here' ),
'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' => esc_html__( 'Slider Example 4 with float values', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'This example displays float values', 'your-textdomain-here' ),
'desc' => esc_html__( 'Slider description. Min: 0, max: 1, step: .1, default value: .5', 'your-textdomain-here' ),
'default' => .5,
'min' => 0,
'step' => .1,
'max' => 1,
'resolution' => 0.1,
'display_value' => 'text',
),
),
'subsection' => true,
)
);

View File

@@ -0,0 +1,34 @@
<?php
/**
* Redux Framework spinner config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Spinner', 'your-textdomain-here' ),
'id' => 'slider_spinner-spinner',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/spinner.html" target="_blank">https://devs.redux.io/core-fields/spinner.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-spinner',
'type' => 'spinner',
'title' => esc_html__( 'JQuery UI Spinner Example 1', 'your-textdomain-here' ),
'desc' => esc_html__( 'JQuery UI spinner description. Min:20, max: 100, step:20, default value: 40', 'your-textdomain-here' ),
'default' => '40',
'min' => '20',
'step' => '20',
'max' => '100',
'suffix' => '',
'output_unit' => '',
'output' => array( '.heck-with-it' => 'max-width' ),
),
),
)
);

View File

@@ -0,0 +1,52 @@
<?php
/**
* Redux Framework button set config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Button Set', 'your-textdomain-here' ),
'id' => 'switch_buttonset-set',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/button-set.html" target="_blank">https://devs.redux.io/core-fields/button-set.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'opt-button-set',
'type' => 'button_set',
'title' => esc_html__( 'Button Set Option', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
// 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' => esc_html__( 'Button Set, Multi Select', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'No validation can be done on this field type', 'your-textdomain-here' ),
'desc' => esc_html__( 'This is the description field, again good for additional info.', 'your-textdomain-here' ),
'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' ),
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,62 @@
<?php
/**
* Redux Framework switch config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Switch', 'your-textdomain-here' ),
'id' => 'switch_buttonset-switch',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/switch.html" target="_blank">https://devs.redux.io/core-fields/switch.html</a>',
'subsection' => true,
'fields' => array(
array(
'id' => 'switch-on',
'type' => 'switch',
'title' => esc_html__( 'Switch On', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
'default' => true,
),
array(
'id' => 'switch-off',
'type' => 'switch',
'title' => esc_html__( 'Switch Off', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on!', 'your-textdomain-here' ),
'default' => false,
),
array(
'id' => 'switch-parent',
'type' => 'switch',
'title' => esc_html__( 'Switch - Nested Children, Enable to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Look, it\'s on! Also hidden child elements!', 'your-textdomain-here' ),
'default' => false,
'on' => 'Enabled',
'off' => 'Disabled',
),
array(
'id' => 'switch-child1',
'type' => 'switch',
'required' => array( 'switch-parent', '=', true ),
'title' => esc_html__( 'Switch - This and the next switch required for patterns to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
'default' => false,
),
array(
'id' => 'switch-child2',
'type' => 'switch',
'required' => array( 'switch-parent', '=', true ),
'title' => esc_html__( 'Switch2 - Enable the above switch and this one for patterns to show', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Also called a "fold" parent.', 'your-textdomain-here' ),
'desc' => esc_html__( 'Items set with a fold to this ID will hide unless this is set to the appropriate value.', 'your-textdomain-here' ),
'default' => false,
),
),
)
);

View File

@@ -0,0 +1,8 @@
<?php
/**
* Silence is golden.
*
* @package Redux Framework
*/
echo null;

View File

@@ -0,0 +1,113 @@
<?php
/**
* Redux Framework typography config.
* For full documentation, please visit: http://devs.redux.io/
*
* @package Redux Framework
*/
defined( 'ABSPATH' ) || exit;
Redux::set_section(
$opt_name,
array(
'title' => esc_html__( 'Typography', 'your-textdomain-here' ),
'id' => 'typography',
'desc' => esc_html__( 'For full documentation on this field, visit: ', 'your-textdomain-here' ) . '<a href="https://devs.redux.io/core-fields/typography.html" target="_blank">https://devs.redux.io/core-fields/typography.html</a>',
'icon' => 'el el-font',
'fields' => array(
array(
'id' => 'opt-typography-body',
'type' => 'typography',
'title' => esc_html__( 'Body Font', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Specify the body font properties.', 'your-textdomain-here' ),
'google' => true,
'font_family_clear' => false,
'default' => array(
'color' => '#dd9933',
'font-size' => '30px',
'font-family' => 'Arial, Helvetica, sans-serif',
'font-weight' => 'Normal',
),
'output' => array( 'p' ),
),
array(
'id' => 'opt-typography',
'type' => 'typography',
'title' => esc_html__( 'Typography Site Description', 'your-textdomain-here' ),
// Use if you want to hook in your own CSS compiler.
'compiler' => true,
// Select a backup non-google font in addition to a Google font.
'font-backup' => true,
// Enable all Google Font style/weight variations to be added to the page.
'all-styles' => true,
'all-subsets' => true,
'units' => 'px',
'subtitle' => esc_html__( 'Typography option with each property can be called individually.', 'your-textdomain-here' ),
'default' => array(
'color' => '#333',
'font-style' => '700',
'font-family' => 'Abel',
'google' => true,
'font-size' => '33px',
'line-height' => '40px',
),
'output' => array( 'h2.site-description, h2.entry-title, .site-description, h2.wp-block-post-title' ),
// Disable google fonts.
// 'google' => false,.
// Includes font-style and weight. Can use font-style or font-weight to declare.
// 'font-style' => false,.
// Only appears if Google is true and subsets not set to false.
// 'subsets' => false,.
// Hide or show the font size input.
// 'font-size' => false,.
// Hide or show the line height input.
// 'line-height' => false,.
// Hide or show the word spacing input. Defaults to false.
// 'word-spacing' => true,.
// Hide or show the word spacing input. Defaults to false.
// 'letter-spacing'=> true,.
// Hide or show the font color picker.
// 'color' => false,.
// Disable the font previewer
// 'preview' => false,.
// An array of CSS selectors in which to apply dynamically to this font style.
// 'compiler' => array( 'h2.site-description-compiler' ),.
),
array(
'id' => 'opt-typography-body-shadow',
'type' => 'typography',
'title' => esc_html__( 'Title Font', 'your-textdomain-here' ),
'subtitle' => esc_html__( 'Specify the body font properties.', 'your-textdomain-here' ),
'google' => true,
'font_family_clear' => false,
'text-shadow' => true,
'color_alpha' => true,
'margin-top' => true,
'margin-bottom' => true,
'default' => array(
'color' => '',
'font-size' => '30px',
'font-family' => 'Arial, Helvetica, sans-serif',
'font-weight' => 'Normal',
'margin-top' => '20px',
'margin-bottom' => '20px',
),
'output' => array( '.site-title, .wp-block-site-title' ),
),
),
)
);