: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
global $et_pb_half_width_counter;
$et_pb_half_width_counter = 0;
$multi_view = et_pb_multi_view_options( $this );
$title = $multi_view->render_element( array(
'tag' => et_pb_process_header_level( $this->props['header_level'], 'h2' ),
'content' => '{{title}}',
'class' => 'et_pb_module_header',
$use_background_color = $this->props['use_background_color'];
$provider = $this->props['provider'];
$list = ( 'feedburner' !== $provider ) ? $this->props[ $provider . '_list' ] : array();
$form_field_text_color = $this->props['form_field_text_color'];
$success_action = $this->props['success_action'];
$success_message = $this->props['success_message'];
$success_redirect_url = $this->props['success_redirect_url'];
$success_redirect_query = $this->props['success_redirect_query'];
$use_focus_border_color = $this->props['use_focus_border_color'];
$use_custom_fields = $this->props['use_custom_fields'];
if ( 'feedburner' !== $provider ) {
$_provider = self::providers()->get( $provider, '', 'builder' );
$_name_field = $_provider->name_field_only ? 'name_field_only' : 'name_field';
$name_field = 'on' === $this->props[ $_name_field ];
$first_name_field = 'on' === $this->props['first_name_field'] && ! $_provider->name_field_only;
$last_name_field = 'on' === $this->props['last_name_field'] && ! $_provider->name_field_only;
// Apply text color on background color of radio button.
if ( '' !== $form_field_text_color ) {
ET_Builder_Element::set_style( $render_slug, array(
'selector' => '%%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label i:before',
'declaration' => sprintf(
'background-color: %1$s%2$s;',
esc_html( $form_field_text_color ),
et_is_builder_plugin_active() ? ' !important' : ''
if ( $this->props['layout'] ) {
$this->add_classname( "et_pb_newsletter_layout_{$this->props['layout']}" );
if ( 'message' === $success_action || empty( $success_redirect_url ) ) {
$success_redirect_url = $success_redirect_query = '';
if ( 'redirect' === $success_action && ! empty( $success_redirect_url ) ) {
$success_redirect_url = et_html_attr( 'data-redirect_url', esc_url( $success_redirect_url ) );
if ( ! empty( $success_redirect_query ) ) {
$value_map = array( 'name', 'last_name', 'email', 'ip_address', 'css_id' );
$success_redirect_query = $this->process_multiple_checkboxes_field_value( $value_map, $success_redirect_query );
$success_redirect_query = et_html_attr( 'data-redirect_query', $success_redirect_query );
if ( false !== strpos( $success_redirect_query, 'ip_address' ) ) {
$success_redirect_query .= et_html_attr( 'data-ip_address', et_core_get_ip_address() );
$success_redirect_query = '';
$video_background = $this->video_background();
$parallax_image_background = $this->get_parallax_image_background();
$list_selected = ! in_array( $list, array( '', 'none' ) );
if ( $list_selected && 'feedburner' === $provider ) {
<div class="et_pb_newsletter_form et_pb_feedburner_form">
<form action="https://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow">
$this->get_form_field_html( 'email' ),
$this->get_form_field_html( 'submit_button' ),
$this->get_form_field_html( 'hidden' )
} else if ( $list_selected ) {
$last_name_field_html = '';
if ( $first_name_field || $name_field ) {
$name_field_html = $this->get_form_field_html( 'name', $name_field );
if ( $last_name_field && ! $name_field ) {
$last_name_field_html = $this->get_form_field_html( 'last_name' );
$footer_content = $multi_view->render_element( array(
'content' => '{{footer_content}}',
'class' => 'et_pb_newsletter_footer',
<div class="et_pb_newsletter_form">
<div class="et_pb_newsletter_result et_pb_newsletter_error"></div>
<div class="et_pb_newsletter_result et_pb_newsletter_success">
<div class="et_pb_newsletter_fields">
esc_html( $success_message ),
$this->get_form_field_html( 'email' ),
'on' === $use_custom_fields ? $this->content : '',
$this->get_form_field_html( 'submit_button' ),
$this->get_form_field_html( 'hidden' ),
'on' === $use_custom_fields ? ' class="et_pb_newsletter_custom_fields"' : ''
// Background layout data attributes.
$data_background_layout = et_pb_background_layout_options()->get_background_layout_attrs( $this->props );
$this->add_classname( array(
$this->get_text_orientation_classname(),
// 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 ( 'on' !== $use_background_color ) {
$this->add_classname( 'et_pb_no_bg' );
if ( 'on' === $use_focus_border_color ) {
$this->add_classname( 'et_pb_with_focus_border' );
if ( ! $multi_view->has_value( 'title' ) ) {
$this->add_classname( 'et_pb_newsletter_description_no_title' );
if ( ! $multi_view->has_value( 'content' ) ) {
$this->add_classname( 'et_pb_newsletter_description_no_content' );
// Remove automatically added classnames
$this->remove_classname( array(
$description = $multi_view->render_element( array(
'content' => '{{description}}',
$content_wrapper = $multi_view->render_element( array(
'content' => "{$title}{$description}",
'class' => 'et_pb_newsletter_description',
'et_multi_view_hidden' => array(
'description' => '__empty',
$wrapper_multi_view_classes = $multi_view->render_attrs( array(
'et_pb_newsletter_description_no_title' => array(
'et_pb_newsletter_description_no_content' => array(
'<div%5$s class="%3$s"%4$s%8$s%9$s%10$s%11$s>
et_core_esc_previously( $content_wrapper ),
$this->module_classname( $render_slug ),
$this->module_id(), // #5
$parallax_image_background,
et_core_esc_previously( $data_background_layout ), // #10,
$wrapper_multi_view_classes
* 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 = array(
if ( 'content' === $context && $raw_value && in_array( $name, $fields_need_escape, true ) ) {
return $this->_esc_attr( $multi_view->get_name_by_mode( $name, $mode ), 'none', $raw_value );
if ( $raw_value && in_array( $name, array( 'description', 'footer_content' ), true ) ) {
$raw_value = preg_replace( '/^[\w]?<\/p>/smi', '', $raw_value );
$raw_value = preg_replace( '/<p>$/smi', '', $raw_value );
new ET_Builder_Module_Signup;