: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* ReduxFramework Sample Config File
* For full documentation, please visit: http://devs.redux.io/
* @package Redux Framework
defined( 'ABSPATH' ) || exit;
if ( ! class_exists( 'Redux' ) ) {
// 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(
'img' => $sample_patterns_url . $sample_patterns_file,
// Used to except HTML tags in description arguments where esc_html would remove.
$kses_exceptions = array(
* 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.
// This is where your data is stored in the database and also becomes your global variable 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).
// 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.
// 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).
// Enable basic customizer support.
// 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.
// 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.
// Force your panel to always open to a specific tab (by id).
// 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.
// Display the default value next to each field when not set to the default value.
// What to print by the field's title if the value shown is default.
// 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.
// Allows dynamic CSS to be generated for customizer and google fonts,
// but stops the dynamic CSS from going to the page head.
// Disable the footer credit of Redux. Please leave if you can help it.
// 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.
// Set the theme of the option panel. Use 'wp' to use a more modern style, default is classic.
// 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',
'icon' => 'el el-question-sign',
'icon_position' => 'right',
'icon_color' => 'lightgray',
'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!
// 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(
'href' => '//devs.redux.io/',
'title' => __( 'Documentation', 'your-textdomain-here' ),
$args['admin_bar_links'][] = array(
'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'];
$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>';
$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 );
'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>',
'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 );
$content = '<p>' . esc_html__( 'This is the sidebar content, HTML is allowed.', 'your-textdomain-here' ) . '</p>';
Redux::set_help_sidebar( $opt_name, $content );
'title' => esc_html__( 'Basic Fields', 'your-textdomain-here' ),
'desc' => esc_html__( 'These are really basic fields!', 'your-textdomain-here' ),
'customizer_width' => '400px',
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';
'title' => esc_html__( 'Editors', 'your-textdomain-here' ),
'customizer_width' => '500px',
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.
'title' => esc_html__( 'Color Selection', 'your-textdomain-here' ),
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.
'title' => esc_html__( 'Design Fields', 'your-textdomain-here' ),
'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.
'title' => esc_html__( 'Media Uploads', 'your-textdomain-here' ),
'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.
'title' => esc_html__( 'Presentation Fields', 'your-textdomain-here' ),
'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';
'id' => 'presentation-divide-sample',
// -> START Switch & Button Set.
'title' => esc_html__( 'Switch / Button Set', 'your-textdomain-here' ),
'id' => 'switch_buttonset',
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.
'title' => esc_html__( 'Select Fields', 'your-textdomain-here' ),
'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.
'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';
require_once Redux_Core::$dir . '../sample/sections/typography/typography.php';
// -> START Additional Types.
'title' => esc_html__( 'Additional Types', 'your-textdomain-here' ),
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';
'title' => esc_html__( 'Advanced Features', 'your-textdomain-here' ),
'icon' => 'el el-thumbs-up',
require_once Redux_Core::$dir . '../sample/sections/advanced-features/callback.php';
require_once Redux_Core::$dir . '../sample/sections/advanced-features/field-validation.php';
require_once Redux_Core::$dir . '../sample/sections/advanced-features/field-sanitizing.php';
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';
'title' => esc_html__( 'Disabling', 'your-textdomain-here' ),