: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
<?php // phpcs:ignore WordPress.Files.FileName
* Redux Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* Redux Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
* The addition of the noinspection tags is because there are devs writing their
* in-house extensions improperly, and we have to compensate for that.
* @package Redux_Framework
* @author Redux Framework Team
* @noinspection PhpMissingParamTypeInspection
* @noinspection PhpMissingReturnTypeInspection
* @noinspection PhpUnhandledExceptionInspection
* @noinspection PhpDeprecationInspection
* @noinspection PhpUnused
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
require_once __DIR__ . '/class-redux-core.php';
Redux_Core::$version = '4.4.18';
Redux_Core::$redux_path = __DIR__;
if ( ! class_exists( 'ReduxFramework', false ) ) {
* Main ReduxFramework class
* ReduxFramework instance storage.
public static $instance = null;
public static $_version = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
* Absolute directory of the Redux instance.
public static $_dir = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
* Full URL of the Redux instance.
public static $_url = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
* Current WordPress upload directory.
public static $_upload_dir = ''; // phpcs:ignore PSR2.Classes.PropertyDeclaration
* Current WordPress upload URL
public static $_upload_url; // phpcs:ignore PSR2.Classes.PropertyDeclaration
* Backward compatibility for previous versions of Redux.
public static function init() {
// Backward compatibility for extensions.
self::$_version = Redux_Core::$version;
self::$_dir = Redux_Core::$dir;
self::$_url = Redux_Core::$url;
self::$_upload_dir = Redux_Core::$upload_dir;
self::$_upload_url = Redux_Core::$upload_url;
self::$_as_plugin = Redux_Core::$as_plugin;
self::$_is_plugin = Redux_Core::$is_plugin;
public $fields = array();
public $field_types = array();
public $field_head = array();
* Array of extensions by type used in the panel.
public $extensions = array();
* Array of sections and fields arrays.
public $sections = array();
* Array of generated errors from the panel for localization.
public $errors = array();
* Array of generated warnings from the panel for localization.
public $warnings = array();
* Array of generated sanitize notices from the panel for localization.
public $sanitize = array();
* Array of current option values.
public $options = array();
* Array of option defaults.
public $options_defaults = null;
* Array of fields set to trigger the compiler hook.
public $compiler_fields = array();
* Field folding information for localization.
public $required = array();
* Field child-folding information for localization.
public $required_child = array();
* Array of fonts used by the panel for localization.
* Array of Google fonts used by the panel for localization.
public $google_array = array();
* Array of fields to be folded.
* Array of fields with CSS output selectors.
public $output = array();
* Autogenerated CSS appended to the header (snake case maintained for backward compatibility).
public $outputCSS = ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
* Autogenerated variables appended to dynamic output.
public $output_variables = array();
* CSS sent to the compiler hook (snake case maintained for backward compatibility).
public $compilerCSS = ''; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
* Array of fields that didn't pass the fold dependency test and are hidden.
public $fields_hidden = array();
* Array of fields to use as pointers in extensions.
public $field_sections = array();
* Values to generate google font CSS.
public $typography = array();
* Array of global arguments.
* Used in customizer hooks.
public $old_opt_name = '';
* File system object used for I/O file operations. DOnr the WordPress way.
public $filesystem = null;
* Array of various font groups used within the typography field.
public $font_groups = array();
* Pointer to the Redux_Options_Default class.
* @var null|Redux_Options_Defaults
public $options_defaults_class = null;
* Pointer to the Redux_Options class.
* @var null|Redux_Options_Constructor
public $options_class = null;
* Pointer to the Redux_Required class
* @var null|Redux_Required
public $required_class = null;
* Pointer to the Redux_Output class.
public $output_class = null;
* Pointer to the Redux_Page_Render class.
* @var null|Redux_Page_Render
public $render_class = null;
* Pointer to the Redux_Enqueue class.
* @var null|Redux_Enqueue
public $enqueue_class = null;
* Pointer to the Redux_Transients class.
* @var null|Redux_Transients
public $transient_class = null;
* Pointer to the Redux_wordPress_Data class.
* @var null|Redux_WordPress_Data
public $wordpress_data = null;
* Pointer to the Redux_Validation class.
* @var null|Redux_Validation
public $validate_class = null;
* Pointer to the Redux_Sanitize class.
* @var null|Redux_Validation
public $sanitize_class = null;
* Pointer to the Redux_Args class.
public $args_class = null;
* Array of active transients used by Redux.
public $transients = array();
* Array of localized repeater data.
public $repeater_data = array();
* Array of localized data.
public $localize_data = array();
* Array of checked transients used by Redux.
public $transients_check = array();
* Never save to DB flag for metaboxes.
public $never_save_to_db;
* Deprecated shim for v3 templates.
public $hidden_perm_sections = array();
* Deprecated shim for v3 as plugin check.
public static $_as_plugin = false; // phpcs:ignore PSR2.Classes.PropertyDeclaration
* Deprecated shim for v3 as plugin check.
public static $_is_plugin = false; // phpcs:ignore PSR2.Classes.PropertyDeclaration
public function __clone() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ eh?', 'redux-framework' ), '4.0' );
* Un-serializing instances of this class are forbidden.
public function __wakeup() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ eh?', 'redux-framework' ), '4.0' );
* Class Constructor. Defines the args for the theme options class
* @param array $sections Panel sections.
* @param array $args Class constructor arguments.
* @throws ReflectionException Exception.
public function __construct( array $sections = array(), array $args = array() ) {
if ( Redux_Core::is_heartbeat() ) {
$args['load_on_cron'] = $args['load_on_cron'] ?? false;