: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'option_category' => 'basic_option',
'depends_show_if' => 'on',
'description' => esc_html__( 'This defines the HTML ALT text. A short description of your image can be placed here.', 'et_builder' ),
'tab_slug' => 'custom_css',
'toggle_slug' => 'attributes',
'dynamic_content' => 'text',
'label' => esc_html__( 'Header Image Title', 'et_builder' ),
'option_category' => 'basic_option',
'depends_show_if' => 'on',
'description' => esc_html__( 'This defines the HTML Title text.', 'et_builder' ),
'tab_slug' => 'custom_css',
'toggle_slug' => 'attributes',
'dynamic_content' => 'text',
'image_orientation' => array(
'label' => esc_html__( 'Image Alignment', 'et_builder' ),
'option_category' => 'layout',
'center' => esc_html__( 'Vertically Centered', 'et_builder' ),
'bottom' => et_builder_i18n( 'Bottom' ),
'default_on_front' => 'center',
'tab_slug' => 'advanced',
'toggle_slug' => 'image',
'description' => esc_html__( 'This controls the orientation of the image within the module.', 'et_builder' ),
'label' => et_builder_i18n( 'Body' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'Content entered here will appear below the subheading text.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'mobile_options' => true,
'content_max_width' => array(
'label' => esc_html__( 'Content Width', 'et_builder' ),
'description' => esc_html__( 'Adjust the width of the image within the fullwidth header.', 'et_builder' ),
'option_category' => 'layout',
'tab_slug' => 'advanced',
'toggle_slug' => 'width',
'mobile_options' => true,
'allowed_units' => array( '%', 'em', 'rem', 'px', 'cm', 'mm', 'in', 'pt', 'pc', 'ex', 'vh', 'vw' ),
'default_on_front' => '',
'range_settings' => array(
'title_font_color' => array(
'subhead_font_color' => array(
'content_font_color' => array(
public function get_transition_fields_css_props() {
$fields = parent::get_transition_fields_css_props();
$fields['scroll_down_icon_color'] = array( 'color' => '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a .et-pb-icon' );
$fields['scroll_down_icon_size'] = array( 'font-size' => '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a .et-pb-icon' );
$fields['background_overlay_color'] = array( 'background-color' => '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_overlay' );
function render( $attrs, $content = null, $render_slug ) {
$multi_view = et_pb_multi_view_options( $this );
// Allowing full html for backwards compatibility.
$title = $this->_esc_attr( 'title', 'full' );
// Allowing full html for backwards compatibility.
$subhead = $this->_esc_attr( 'subhead', 'full' );
$text_orientation = $this->get_text_orientation();
$button_one_text = $this->_esc_attr( 'button_one_text', 'limited' );
$button_one_url = $this->props['button_one_url'];
$button_one_rel = $this->props['button_one_rel'];
$button_two_text = $this->_esc_attr( 'button_two_text', 'limited' );
$button_two_url = $this->props['button_two_url'];
$button_two_rel = $this->props['button_two_rel'];
$header_fullscreen = $this->props['header_fullscreen'];
$header_scroll_down = $this->props['header_scroll_down'];
$scroll_down_icon_size = $this->props['scroll_down_icon_size'];
$scroll_down_icon_size_hover = $this->get_hover_value( 'scroll_down_icon_size' );
$scroll_down_icon_size_tablet = $this->props['scroll_down_icon_size_tablet'];
$scroll_down_icon_size_phone = $this->props['scroll_down_icon_size_phone'];
$scroll_down_icon_size_last_edited = $this->props['scroll_down_icon_size_last_edited'];
$background_image = $this->props['background_image'];
$parallax = $this->props['parallax'];
$parallax_method = $this->props['parallax_method'];
$logo_image_url = $this->props['logo_image_url'];
$header_image_url = $this->props['header_image_url'];
$content_orientation = $this->props['content_orientation'];
$image_orientation = $this->props['image_orientation'];
$button_custom_1 = $this->props['custom_button_one'];
$button_custom_2 = $this->props['custom_button_two'];
$logo_title = $this->_esc_attr( 'logo_title' );
$logo_alt_text = $this->_esc_attr( 'logo_alt_text' );
$image_alt_text = $this->_esc_attr( 'image_alt_text' );
$image_title = $this->_esc_attr( 'image_title' );
$header_level = $this->props['title_level'];
$content_max_width = $this->props['content_max_width'];
$content_max_width_tablet = $this->props['content_max_width_tablet'];
$content_max_width_phone = $this->props['content_max_width_phone'];
$content_max_width_last_edited = $this->props['content_max_width_last_edited'];
$scroll_down_icon_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'scroll_down_icon_color' );
$scroll_down_icon_color_hover = $this->get_hover_value( 'scroll_down_icon_color' );
$background_overlay_color_values = et_pb_responsive_options()->get_property_values( $this->props, 'background_overlay_color' );
$background_overlay_color_hover = $this->get_hover_value( 'background_overlay_color' );
$scroll_down_icon = $this->props['scroll_down_icon'];
$scroll_down_icon_values = et_pb_responsive_options()->get_property_values( $this->props, 'scroll_down_icon' );
$scroll_down_icon_tablet = isset( $scroll_down_icon_values['tablet'] ) ? $scroll_down_icon_values['tablet'] : '';
$scroll_down_icon_phone = isset( $scroll_down_icon_values['phone'] ) ? $scroll_down_icon_values['phone'] : '';
$custom_icon_1_values = et_pb_responsive_options()->get_property_values( $this->props, 'button_one_icon' );
$custom_icon_1 = isset( $custom_icon_1_values['desktop'] ) ? $custom_icon_1_values['desktop'] : '';
$custom_icon_1_tablet = isset( $custom_icon_1_values['tablet'] ) ? $custom_icon_1_values['tablet'] : '';
$custom_icon_1_phone = isset( $custom_icon_1_values['phone'] ) ? $custom_icon_1_values['phone'] : '';
$custom_icon_2_values = et_pb_responsive_options()->get_property_values( $this->props, 'button_two_icon' );
$custom_icon_2 = isset( $custom_icon_2_values['desktop'] ) ? $custom_icon_2_values['desktop'] : '';
$custom_icon_2_tablet = isset( $custom_icon_2_values['tablet'] ) ? $custom_icon_2_values['tablet'] : '';
$custom_icon_2_phone = isset( $custom_icon_2_values['phone'] ) ? $custom_icon_2_values['phone'] : '';
// Scroll Down Icon color.
et_pb_responsive_options()->generate_responsive_css( $scroll_down_icon_color_values, '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a .et-pb-icon', 'color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'scroll_down_icon_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:hover .et-pb-icon',
'declaration' => sprintf(
esc_html( $scroll_down_icon_color_hover )
if ( '' !== $scroll_down_icon_size || '' !== $scroll_down_icon_size_tablet || '' !== $scroll_down_icon_size_phone ) {
$icon_size_responsive_active = et_pb_get_responsive_status( $scroll_down_icon_size_last_edited );
$icon_size_values = array(
'desktop' => $scroll_down_icon_size,
'tablet' => $icon_size_responsive_active ? $scroll_down_icon_size_tablet : '',
'phone' => $icon_size_responsive_active ? $scroll_down_icon_size_phone : '',
et_pb_generate_responsive_css( $icon_size_values, '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a .et-pb-icon', 'font-size', $render_slug );
if ( et_builder_is_hover_enabled( 'scroll_down_icon_size', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_scroll a:hover .et-pb-icon',
'declaration' => sprintf(
esc_html( $scroll_down_icon_size_hover )
if ( '' !== $content_max_width_tablet || '' !== $content_max_width_phone || '' !== $content_max_width ) {
$content_max_width_responsive_active = et_pb_get_responsive_status( $content_max_width_last_edited );
$content_max_width_values = array(
'desktop' => $content_max_width,
'tablet' => $content_max_width_responsive_active ? $content_max_width_tablet : '',
'phone' => $content_max_width_responsive_active ? $content_max_width_phone : '',
et_pb_generate_responsive_css( $content_max_width_values, '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_container .header-content', 'max-width', $render_slug );
// Background Overlay color.
et_pb_responsive_options()->generate_responsive_css( $background_overlay_color_values, '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_overlay', 'background-color', $render_slug, '', 'color' );
if ( et_builder_is_hover_enabled( 'background_overlay_color', $this->props ) ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => $this->add_hover_to_order_class( '%%order_class%%.et_pb_fullwidth_header .et_pb_fullwidth_header_overlay' ),
'declaration' => sprintf(
'background-color: %1$s;',
esc_html( $background_overlay_color_hover )
$button_output .= $this->render_button( array(
'button_classname' => array( 'et_pb_more_button', 'et_pb_button_one' ),
'button_custom' => $button_custom_1,
'button_rel' => $button_one_rel,
'button_text' => $button_one_text,
'button_text_escaped' => true,
'button_url' => $button_one_url,
'custom_icon' => $custom_icon_1,
'custom_icon_tablet' => $custom_icon_1_tablet,
'custom_icon_phone' => $custom_icon_1_phone,
'multi_view_data' => $multi_view->render_attrs( array(
'content' => '{{button_one_text}}',
'button_one_text' => '__not_empty',
$button_output .= $this->render_button( array(
'button_classname' => array( 'et_pb_more_button', 'et_pb_button_two' ),
'button_custom' => $button_custom_2,
'button_rel' => $button_two_rel,
'button_text' => $button_two_text,
'button_text_escaped' => true,
'button_url' => $button_two_url,
'custom_icon' => $custom_icon_2,
'custom_icon_tablet' => $custom_icon_2_tablet,
'custom_icon_phone' => $custom_icon_2_phone,
'multi_view_data' => $multi_view->render_attrs( array(
'content' => '{{button_two_text}}',
'button_two_text' => '__not_empty',
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
// Images: Add CSS Filters and Mix Blend Mode rules (if set)
if ( array_key_exists( 'image', $this->advanced_fields ) && array_key_exists( 'css', $this->advanced_fields['image'] ) ) {
$this->add_classname($this->generate_css_filters(
self::$data_utils->array_get( $this->advanced_fields['image']['css'], 'main', '%%order_class%%' )
if ( $multi_view->has_value( 'title' ) || $multi_view->has_value( 'subhead' ) || $multi_view->has_value( 'content' ) || '' !== $button_output || $multi_view->has_value( 'logo_image_url' ) ) {
$title = $multi_view->render_element( array(
'tag' => et_pb_process_header_level( $header_level, 'h1' ),
'content' => '{{title}}',
'class' => 'et_pb_module_header',
$subhead = $multi_view->render_element( array(
'content' => '{{subhead}}',
'class' => 'et_pb_fullwidth_header_subhead',
$logo_image_url = $multi_view->render_element( array(
'src' => '{{logo_image_url}}',
'class' => 'header-logo',
'title' => esc_attr( $logo_title ),
'alt' => esc_attr( $logo_alt_text ),
'required' => 'logo_image_url',
$content = $multi_view->render_element( array(
'content' => '{{content}}',
'class' => 'et_pb_header_content_wrapper',
$header_content = sprintf(
'<div class="header-content-container%6$s">
<div class="header-content">
( '' !== $button_output ? $button_output : '' ),
( '' !== $content_orientation ? sprintf( ' %1$s', esc_attr( $content_orientation ) ) : '' )
if ( $multi_view->has_value( 'header_image_url' ) ) {
'<div class="header-image-container%2$s">
<div class="header-image">
$multi_view->render_element( array(
'src' => '{{header_image_url}}',
'alt' => esc_attr( $image_alt_text ),
'title' => esc_attr( $image_title ),
( '' !== $image_orientation ? sprintf( ' %1$s', esc_attr( $image_orientation ) ) : '' )
$this->add_classname( 'et_pb_header_with_image' );
// Responsive Scroll Down Icon.
$scroll_down_output = '';
if ( 'off' !== $header_scroll_down || '' !== $scroll_down_icon || '' !== $scroll_down_icon_tablet || '' !== $scroll_down_icon_phone ) {
$scroll_down_container_classes = '';
$scroll_down_icon_markup_tablet = '';
if ( '' !== $scroll_down_icon_tablet ) {
$scroll_down_container_classes .= ' scroll-down-container-tablet';
$scroll_down_icon_markup_tablet = sprintf(
'<span class="scroll-down-tablet et-pb-icon">%1$s</span>',
esc_html( et_pb_process_font_icon( $scroll_down_icon_tablet, 'et_pb_get_font_down_icon_symbols' ) )
$scroll_down_icon_markup_phone = '';
if ( '' !== $scroll_down_icon_phone ) {
$scroll_down_container_classes .= ' scroll-down-container-phone';
$scroll_down_icon_markup_phone = sprintf(
'<span class="scroll-down-phone et-pb-icon">%1$s</span>',
esc_html( et_pb_process_font_icon( $scroll_down_icon_phone, 'et_pb_get_font_down_icon_symbols' ) )
$scroll_down_output .= sprintf(
'<a href="#" class="scroll-down-container%4$s">
<span class="scroll-down et-pb-icon">%1$s</span>
esc_html( et_pb_process_font_icon( $scroll_down_icon, 'et_pb_get_font_down_icon_symbols' ) ),
$scroll_down_icon_markup_tablet,
$scroll_down_icon_markup_phone,
$scroll_down_container_classes
// Background layout data attributes.
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
$this->add_classname( array(
"et_pb_text_align_{$text_orientation}",
// Background layout class names.
$background_layout_class_names = et_pb_background_layout_options()->get_background_layout_class( $this->props );
$this->add_classname( $background_layout_class_names );
if ( 'off' !== $header_fullscreen ) {
$this->add_classname( 'et_pb_fullscreen' );
$muti_view_data_attr = $multi_view->render_attrs( array(
'et_pb_header_with_image' => array(
'header_image_url' => '__not_empty',
'<section%7$s class="%1$s"%9$s%10$s>
<div class="et_pb_fullwidth_header_container%5$s">
<div class="et_pb_fullwidth_header_overlay"></div>
<div class="et_pb_fullwidth_header_scroll">%4$s</div>
$this->module_classname( $render_slug ),
( '' !== $header_content ? $header_content : '' ),
( '' !== $header_image ? $header_image : '' ),
( 'off' !== $header_scroll_down ? $scroll_down_output : '' ),
( '' !== $text_orientation ? sprintf( ' %1$s', esc_attr( $text_orientation ) ) : '' ), // #5
$parallax_image_background,
et_core_esc_previously( $data_background_layout ),
et_core_esc_previously( $muti_view_data_attr ) // #10
* Filter multi view value.
* @see ET_Builder_Module_Helper_MultiViewOptions::filter_value
* @param mixed $raw_value Props raw value.
* @type string $context Context param: content, attrs, visibility, classes.
* @type string $name Module options props name.
* @type string $mode Current data mode: desktop, hover, tablet, phone.
* @type string $attr_key Attribute key for attrs context data. Example: src, class, etc.
* @type string $attr_sub_key Attribute sub key that availabe when passing attrs value as array such as styes. Example: padding-top, margin-botton, etc.
* @param ET_Builder_Module_Helper_MultiViewOptions $multi_view Multiview object instance.
public function multi_view_filter_value( $raw_value, $args, $multi_view ) {
$name = isset( $args['name'] ) ? $args['name'] : '';
$mode = isset( $args['mode'] ) ? $args['mode'] : '';
$context = isset( $args['context'] ) ? $args['context'] : '';
$fields_need_escape_full = array(
if ( $raw_value && 'content' === $context && in_array( $name, $fields_need_escape_full, true ) ) {
return $this->_esc_attr( $multi_view->get_name_by_mode( $name, $mode ), 'full', $raw_value );
$fields_need_escape_limited = array(
if ( $raw_value && 'content' === $context && in_array( $name, $fields_need_escape_limited, true ) ) {
return $this->_esc_attr( $multi_view->get_name_by_mode( $name, $mode ), 'limited');
new ET_Builder_Module_Fullwidth_Header;