: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
class ET_Builder_Module_Settings_Migration_RowCustomWidthToSizing extends ET_Builder_Module_Settings_Migration {
public $version = '3.22';
public function get_modules() {
return array( 'et_pb_row', 'et_pb_section', );
public function get_fields() {
'affected_fields' => array(
'make_fullwidth' => $this->get_modules(),
foreach ( $this->get_modules() as $module ) {
foreach ( $this->get_keys() as $key ) {
$field = $module === 'et_pb_section' ? "inner_$key" : $key;
$fields[ $field ] = array(
'affected_fields' => array(
'make_fullwidth' => array( $module ),
'use_custom_width' => array( $module ),
'width_unit' => array( $module ),
'custom_width_px' => array( $module ),
'custom_width_px__hover' => array( $module ),
'custom_width_px__hover_enabled' => array( $module ),
'custom_width_percent' => array( $module ),
'custom_width_percent__hover' => array( $module ),
'custom_width_percent__hover_enabled' => array( $module ),
$raw_field = str_replace( 'inner_', '', $field_name );
if ( et_builder_module_prop( 'use_custom_width', $attrs, '' ) === 'on' ) {
$percent = et_builder_module_prop( 'width_unit', $attrs, '' ) === 'off';
$field = $percent ? 'custom_width_percent' : 'custom_width_px';
// If the field is set to % only the max-width is defined
return ! $percent ? $saved_value : et_builder_module_prop( $field, $attrs, '' );
return ! $percent ? $saved_value : et_builder_module_prop( "{$field}__hover", $attrs, '' );
case 'width__hover_enabled':
return ! $percent ? $saved_value : et_builder_module_prop( "{$field}__hover_enabled", $attrs, '' );
return et_builder_module_prop( $field, $attrs, $percent ? '80%' : '' );
return et_builder_module_prop( "{$field}__hover", $attrs, '' );
case 'max_width__hover_enabled':
return et_builder_module_prop( "{$field}__hover_enabled", $attrs, '' );
if ( et_builder_module_prop( 'make_fullwidth', $attrs, '' ) === 'on' ) {
$gutter = (int) et_builder_module_prop( 'gutter_width', $attrs, '' );
return $saved_value . ' ' . $this->class_name( $module_slug );
case 'width_last_edited':
case 'max_width_last_edited':
return 1 === $gutter ? '100%' : '80%';
return $this->get_width( $gutter );
if ( et_builder_module_prop( 'gutter_width__hover_enabled', $attrs, '' ) === 'on' ) {
$gutter = (int) et_builder_module_prop( 'gutter_width__hover', $attrs, '' );
case 'width__hover_enabled':
case 'max_width__hover_enabled':
return $this->get_width( $gutter );
private function get_keys() {
return array_merge( $this->to_fields( 'width' ), $this->to_fields( 'max_width' ) );
private function to_fields( $field ) {
"{$field}__hover_enabled",
private function get_width( $gutter ) {
private function class_name( $module ) {
return 'et_pb_row_fullwidth';
return 'et_pb_specialty_fullwidth';
return new ET_Builder_Module_Settings_Migration_RowCustomWidthToSizing();