: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'label' => __( 'Line Height', 'popup-maker' ),
'label' => __( 'Font Family', 'popup-maker' ),
'options' => $font_family_options,
'label' => __( 'Font Weight', 'popup-maker' ),
'options' => $font_weight_options,
'label' => __( 'Style', 'popup-maker' ),
'' => __( 'Normal', 'popup-maker' ),
'italic' => __( 'Italic', 'popup-maker' ),
'close_border_style' => [
'label' => __( 'Style', 'popup-maker' ),
'options' => $border_style_options,
'close_border_color' => [
'label' => __( 'Color', 'popup-maker' ),
'close_border_style' => array_keys( PUM_Utils_Array::remove_keys( $border_style_options, [ 'none' ] ) ),
'close_border_width' => [
'label' => __( 'Thickness', 'popup-maker' ),
'close_border_style' => array_keys( PUM_Utils_Array::remove_keys( $border_style_options, [ 'none' ] ) ),
'close_boxshadow_color' => [
'label' => __( 'Color', 'popup-maker' ),
'close_boxshadow_opacity' => [
'label' => __( 'Opacity', 'popup-maker' ),
'close_boxshadow_horizontal' => [
'label' => __( 'Horizontal Position', 'popup-maker' ),
'close_boxshadow_vertical' => [
'label' => __( 'Vertical Position', 'popup-maker' ),
'close_boxshadow_blur' => [
'label' => __( 'Blur Radius', 'popup-maker' ),
'close_boxshadow_spread' => [
'label' => __( 'Spread', 'popup-maker' ),
'close_boxshadow_inset' => [
'label' => __( 'Inset (inner shadow)', 'popup-maker' ),
'no' => __( 'No', 'popup-maker' ),
'yes' => __( 'Yes', 'popup-maker' ),
'close_textshadow_color' => [
'label' => __( 'Color', 'popup-maker' ),
'close_textshadow_opacity' => [
'label' => __( 'Opacity', 'popup-maker' ),
'close_textshadow_horizontal' => [
'label' => __( 'Horizontal Position', 'popup-maker' ),
'close_textshadow_vertical' => [
'label' => __( 'Vertical Position', 'popup-maker' ),
'close_textshadow_blur' => [
'label' => __( 'Blur Radius', 'popup-maker' ),
'advanced' => apply_filters(
'pum_theme_advanced_settings_fields',
$fields = self::append_deprecated_fields( $fields );
$fields = PUM_Utils_Fields::parse_tab_fields(
'name' => 'theme_settings[%s]',
public static function append_deprecated_fields( $fields = [] ) {
if ( class_exists( 'PUM_ATB' ) && has_action( 'popmake_popup_theme_overlay_meta_box_fields' ) ) {
do_action( 'popmake_popup_theme_overlay_meta_box_fields', $post->ID );
$content = self::fix_deprecated_fields( ob_get_clean() );
$fields['overlay']['background']['deprecated_fields'] = [
// Remove duplicate fields.
unset( $fields['overlay']['background']['overlay_background_color'] );
unset( $fields['overlay']['background']['overlay_background_opacity'] );
if ( class_exists( 'PUM_ATB' ) && has_action( 'popmake_popup_theme_container_meta_box_fields' ) ) {
do_action( 'popmake_popup_theme_container_meta_box_fields', $post->ID );
$content = self::fix_deprecated_fields( ob_get_clean() );
$fields['container']['background']['deprecated_fields'] = [
// Remove duplicate fields.
unset( $fields['container']['background']['container_background_color'] );
unset( $fields['container']['background']['container_background_opacity'] );
if ( class_exists( 'PUM_ATB' ) && has_action( 'popmake_popup_theme_close_meta_box_fields' ) ) {
do_action( 'popmake_popup_theme_close_meta_box_fields', $post->ID );
$content = self::fix_deprecated_fields( ob_get_clean() );
$fields['close']['background']['deprecated_fields'] = [
// Remove duplicate fields.
unset( $fields['close']['background']['close_background_color'] );
unset( $fields['close']['background']['close_background_opacity'] );
public static function fix_deprecated_fields( $content = '' ) {
// Remove "Background" heading.
'<tr class="title-divider">
<h3 class="title">Background</h3>
// Fix broken opacity fields.
$content = str_replace( [ 'class="bg_opacity"', 'class="bg_overlay_opacity"' ], [ 'class="bg_opacity pum-field-rangeslider"', 'class="bg_overlay_opacity pum-field-rangeslider"' ], $content );
// TEMPORARY. REMOVE THIS
$content = '<table class="form-table"><tbody>' . $content . '</tbody></table>';
public static function defaults() {
return PUM_Utils_Fields::get_form_default_values( self::fields() );