: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
public static function get_elements() {
protected function fetch_preset( array $preset, $suffix ) {
"box_shadow_horizontal{$suffix}" => $preset['horizontal'],
"box_shadow_vertical{$suffix}" => $preset['vertical'],
"box_shadow_blur{$suffix}" => $preset['blur'],
"box_shadow_spread{$suffix}" => $preset['spread'],
"box_shadow_position{$suffix}" => $preset['position'],
protected function get_preset_field( $name, $field ) {
$preset = $this->get_preset( $name );
return $preset[ $field ];
* Get box shadow property value based on current active device.
* @since 3.23 Add responsive support. Check last edited value first for tablet/phone.
* @param string $key Box shadow property.
* @param array $atts All module attributes.
* @param boolean $hover Hover mode status.
* @param string $device Current device.
* @return string Box shadow property value.
protected function get_key_value( $key, $atts = array(), $hover = false, $device = 'desktop' ) {
$hover_options = et_pb_hover_options();
// Add device name as suffix.
$is_desktop = 'desktop' === $device;
if ( ! $hover && ! $is_desktop ) {
$device_suffix = "_{$device}";
// Get current active device value.
$attr_value = et_pb_responsive_options()->get_any_value( $atts, "box_shadow_{$key}{$device_suffix}", '', true );
// Bail early if current mode is hover or desktop mode.
return $hover_options->get_value( "box_shadow_{$key}", $atts, $attr_value );
} elseif ( $is_desktop ) {
// Ensure responsive settings is enabled before return tablet/phone value.
$is_responsive = et_pb_responsive_options()->is_responsive_enabled( $atts, "box_shadow_{$key}" );
if ( ! $is_responsive ) {
// To avoid any issue when no box shadow defined on tablet and phone, we should return
// desktop value instead. By doing this, tablet and phone box shadow will be identical
// with desktop box shadow value.
return et_pb_responsive_options()->get_any_value( $atts, "box_shadow_{$key}" );
function _action_et_pb_box_shadow_overlay() {
apply_filters( 'et_builder_modules_script_handle', 'et-builder-modules-script' ),
'et_pb_box_shadow_elements',
ET_Builder_Module_Field_BoxShadow::get_elements()
add_action( 'wp_footer', '_action_et_pb_box_shadow_overlay' );
return new ET_Builder_Module_Field_BoxShadow();