: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/* global redux, document */
$.fn.isOnScreen = function() {
viewport.right = viewport.left + win.width();
viewport.bottom = viewport.top + win.height();
bounds.right = bounds.left + this.outerWidth();
bounds.bottom = bounds.top + this.outerHeight();
return ( ! ( viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.top || viewport.top > bounds.bottom ) );
$( 'fieldset.redux-container-divide' ).css( 'display', 'none' );
// Weed out multiple instances of duplicate Redux instance.
if ( redux.customizer ) {
$( '.wp-full-overlay-sidebar' ).addClass( 'redux-container' );
container = $( '.redux-container' );
opt_name = $.redux.getOptName( this );
if ( $.inArray( opt_name, tempArr ) === -1 ) {
tempArr.push( opt_name );
$.redux.checkRequired( $( this ) );
$.redux.initEvents( $( this ) );
opt_name = $.redux.getOptName( this );
if ( undefined !== redux.optName ) {
$.redux.disableSections();
if ( 'undefined' === typeof $.redux.flyoutSubmenus ) {
$.redux.flyoutSubmenu = function() {
// Close flyouts when a new menu item is activated.
$( '.redux-group-tab-link-li a' ).on(
if ( true === redux.optName.args.flyout_submenus ) {
$( '.redux-group-tab-link-li' ).removeClass( 'redux-section-hover' );
if ( true === redux.optName.args.flyout_submenus ) {
// Submenus flyout when a main menu item is hovered.
$( '.redux-group-tab-link-li.hasSubSections' ).each(
if ( ! $( this ).hasClass( 'active' ) && ! $( this ).hasClass( 'activeChild' ) ) {
$( this ).addClass( 'redux-section-hover' );
$( this ).removeClass( 'redux-section-hover' );
$.redux.disableSections = function() {
$( '.redux-group-tab' ).each(
if ( $( this ).hasClass( 'disabled' ) ) {
$( this ).find( 'input, select, textarea' ).attr( 'name', '' );
$.redux.disableFields = function() {
$( 'tr.redux_disable_field' ).each(
$( this ).parents( 'tr' ).find( 'fieldset:first' ).find( 'input, select, textarea' ).attr( 'name', '' );
$.redux.hideFields = function() {
$( 'tr.redux_hide_field' ).each(
$( this ).addClass( 'hidden' );
$.redux.getOptName = function( el ) {
if ( redux.customizer ) {
optName = item.find( '.redux-customizer-opt-name' ).data( 'opt-name' );
optName = $( el ).parents( '.redux-wrap-div' ).data( 'opt-name' );
// Compatibility for metaboxes.
if ( undefined === optName ) {
metabox = $( el ).parents( '.postbox' );
if ( 0 === metabox.length ) {
metabox = $( el ).parents( '.redux-metabox' );
if ( 0 !== metabox.length ) {
optName = metabox.attr( 'id' ).replace( 'redux-', '' ).split( '-metabox-' )[0];
if ( undefined === optName ) {
optName = metabox.attr( 'class' )
.replace( 'redux-metabox', '' )
.replace( 'postbox', '' )
optName = $( '.redux-ajax-security' ).data( 'opt-name' );
if ( undefined === optName ) {
optName = $( el ).find( '.redux-form-wrapper' ).data( 'opt-name' );
// Shim, let's just get an opt_name shall we?!
if ( undefined === optName ) {
optName = redux.opt_names[0];
if ( undefined !== optName ) {
redux.optName = window['redux_' + optName.replace( /\-/g, '_' )];
$.redux.getSelector = function( selector, fieldType ) {
selector = '.redux-container-' + fieldType + ':visible';
if ( redux.customizer ) {
selector = $( document ).find( '.control-section-redux.open' ).find( selector );
selector = $( document ).find( '.redux-group-tab:visible' ).find( selector );