__('Background Image Opacity', 'brazil-colors'), 'type' => 'select', 'group' => 'design', 'description' => __('Change the background image opacity.', 'brazil-colors'), 'priority' => 8, 'options' => array( '1' => '', '0.1' => '10%', '0.2' => '20%', '0.3' => '30%', '0.4' => '40%', '0.5' => '50%', '0.6' => '60%', '0.7' => '70%', '0.8' => '80%', '0.9' => '90%', ) ); $fields['bg-overlay-color'] = array( 'name' => __('Background Overlay Color', 'brazil-colors'), 'type' => 'color', 'group' => 'design', 'description' => __('Change the background overlay color.', 'brazil-colors'), 'priority' => 8, ); return $fields; } add_filter( 'siteorigin_panels_row_style_fields', 'brazilcolors_custom_row_style_fields' ); // Add new data attribute and style to render in the Page Builder contents function brazilcolors_custom_row_style_attributes( $attributes, $args ) { if( !empty( $args['bg-overlay'] ) ) { $attributes['data-bg-overlay'] = $args['bg-overlay']; } if( !empty( $args['bg-overlay-color'] ) ) { $style[] = $attributes['style']; array_push($style, 'background-color:' . $args['bg-overlay-color'] ); $attributes['data-bg-color'] = $args['bg-overlay-color']; } return $attributes; } add_filter('siteorigin_panels_row_style_attributes', 'brazilcolors_custom_row_style_attributes', 10, 2);