: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
'name_fullwidth' => array(
'label' => esc_html__( 'Name Fullwidth', 'et_builder' ),
'description' => esc_html__( 'Enabling this will extend the input field to 100% of the width of the module.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'toggle_slug' => 'layout',
'tab_slug' => 'advanced',
'mobile_options' => true,
'first_name_field' => array(
'label' => esc_html__( 'Show First Name Field', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'provider' => array_merge( $name_field_only, array( 'feedburner' ) ),
'toggle_slug' => 'fields',
'description' => esc_html__( 'Whether or not the First Name field should be included in the opt-in form.', 'et_builder' ),
'first_name_fullwidth' => array(
'label' => esc_html__( 'First Name Fullwidth', 'et_builder' ),
'description' => esc_html__( 'Enabling this will extend the input field to 100% of the width of the module.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'toggle_slug' => 'layout',
'tab_slug' => 'advanced',
'first_name_field' => 'on',
'mobile_options' => true,
'last_name_field' => array(
'label' => esc_html__( 'Show Last Name Field', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'provider' => array_merge( $name_field_only, array( 'feedburner' ) ),
'toggle_slug' => 'fields',
'description' => esc_html__( 'Whether or not the Last Name field should be included in the opt-in form.', 'et_builder' ),
'last_name_fullwidth' => array(
'label' => esc_html__( 'Last Name Fullwidth', 'et_builder' ),
'description' => esc_html__( 'Enabling this will extend the input field to 100% of the width of the module.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'toggle_slug' => 'layout',
'tab_slug' => 'advanced',
'last_name_field' => 'on',
'mobile_options' => true,
'name_field_only' => array(
'label' => esc_html__( 'Name', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'provider' => $name_field_only,
'toggle_slug' => 'fields',
'description' => esc_html__( 'Whether or not the Name field should be included in the opt-in form.', 'et_builder' ),
'email_fullwidth' => array(
'label' => esc_html__( 'Email Fullwidth', 'et_builder' ),
'description' => esc_html__( 'Enabling this will extend the input field to 100% of the width of the module.', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'toggle_slug' => 'layout',
'tab_slug' => 'advanced',
'mobile_options' => true,
'use_custom_fields' => array(
'label' => esc_html__( 'Use Custom Fields', 'et_builder' ),
'type' => 'yes_no_button',
'option_category' => 'configuration',
'on' => et_builder_i18n( 'Yes' ),
'off' => et_builder_i18n( 'No' ),
'allow_dynamic' => array_keys( self::providers()->names_by_slug( 'all', 'dynamic_custom_fields' ) ),
'provider' => $no_custom_fields,
'${provider}_list' => array( '0|none', '' ),
'toggle_slug' => 'fields',
'description' => esc_html__( 'Enable this option to use custom fields in your opt-in form. Learn more <a href="https://www.elegantthemes.com/documentation/divi/modules/adding-custom-fields-to-the-divi-email-optin-module">here</a>', 'et_builder' ),
'use_custom_fields_notice' => array(
'message' => esc_html__( 'You have not defined any custom fields in your email provider account. Once you have defined some fields, click the "Fetch Lists" button in the Email Account toggle above. Learn more <a href="https://www.elegantthemes.com/documentation/divi/modules/adding-custom-fields-to-the-divi-email-optin-module">here</a>', 'et_builder' ),
'option_category' => 'configuration',
'function.hasPredefinedFields' => 'off',
'use_custom_fields' => 'on',
'provider' => $no_custom_fields,
'${provider}_list' => array( '0|none', '' ),
'toggle_slug' => 'fields',
'success_action' => array(
'label' => esc_html__( 'Action', 'et_builder' ),
'option_category' => 'configuration',
'message' => esc_html__( 'Display a message.', 'et_builder' ),
'redirect' => esc_html__( 'Redirect to a custom URL.', 'et_builder' ),
'toggle_slug' => 'success_action',
'description' => esc_html__( 'Choose what happens when a site visitor has been successfully subscribed to your list.', 'et_builder' ),
'success_message' => array(
'label' => esc_html__( 'Message', 'et_builder' ),
'option_category' => 'configuration',
'default' => esc_html__( 'Success!', 'et_builder' ),
'success_action' => 'message',
'toggle_slug' => 'success_action',
'description' => esc_html__( 'The message that will be shown to site visitors who subscribe to your list.', 'et_builder' ),
'success_redirect_url' => array(
'label' => esc_html__( 'Redirect URL', 'et_builder' ),
'option_category' => 'configuration',
'success_action' => 'redirect',
'toggle_slug' => 'success_action',
'description' => esc_html__( 'Site visitors who subscribe to your list will be redirected to this URL.', 'et_builder' ),
'success_redirect_query' => array(
'label' => esc_html__( 'Redirect URL Query', 'et_builder' ),
'type' => 'multiple_checkboxes',
'option_category' => 'configuration',
'name' => esc_html__( 'Name', 'et_builder' ),
'last_name' => esc_html__( 'Last Name', 'et_builder' ),
'email' => esc_html__( 'Email', 'et_builder' ),
'ip_address' => esc_html__( 'IP Address', 'et_builder' ),
'css_id' => esc_html__( 'CSS ID', 'et_builder' ),
'success_action' => 'redirect',
'toggle_slug' => 'success_action',
'description' => esc_html__( 'Choose what data (if any) to include in the redirect URL as query arguments.', 'et_builder' ),
'label' => et_builder_i18n( 'Title' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'Choose a title of your signup box.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'mobile_options' => true,
'label' => et_builder_i18n( 'Button' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'Define custom text for the subscribe button.', 'et_builder' ),
'toggle_slug' => 'main_content',
'default_on_front' => esc_html__( 'Subscribe', 'et_builder' ),
'dynamic_content' => 'text',
'dynamic_content' => 'text',
'mobile_options' => true,
'label' => et_builder_i18n( 'Body' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'This content will appear below the title.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'mobile_options' => true,
'footer_content' => array(
'label' => esc_html__( 'Footer', 'et_builder' ),
'option_category' => 'basic_option',
'description' => esc_html__( 'This content will appear below the subscribe button.', 'et_builder' ),
'toggle_slug' => 'main_content',
'dynamic_content' => 'text',
'mobile_options' => true,
self::_get_spam_provider_fields()
public function get_transition_fields_css_props() {
$fields = parent::get_transition_fields_css_props();
// Custom selector for Signup background color.
$bg_color_declaration = array( 'background-color' => implode( ',', array(
'%%order_class%% .et_pb_newsletter_form p input[type="text"]',
'%%order_class%% .et_pb_newsletter_form p textarea',
'%%order_class%% .et_pb_newsletter_form p select',
'%%order_class%% .et_pb_newsletter_form p .input[type="checkbox"] + label i',
'%%order_class%% .et_pb_newsletter_form p .input[type="radio"] + label i',
$fields['form_field_background_color'] = $bg_color_declaration;
$fields['form_field_focus_background_color'] = $bg_color_declaration;
public static function get_lists() {
static $migrated = false;
et_builder_email_maybe_migrate_accounts();
$all_accounts = self::providers()->accounts();
foreach ( $all_accounts as $provider_slug => $accounts ) {
if ( ! in_array( $provider_slug, array_keys( self::$enabled_providers ) ) ) {
$lists[ $provider_slug ] = array(
0 => array( 'none' => esc_html__( 'Select a list', 'et_builder' ) ),
foreach ( $accounts as $account_name => $account_details ) {
if ( empty( $account_details['lists'] ) ) {
foreach ( (array) $account_details['lists'] as $list_id => $list_details ) {
if ( empty( $list_details['name'] ) ) {
$lists[ $provider_slug ][ $account_name ][ $list_id ] = esc_html( $list_details['name'] );
$lists[ $provider_slug ]['manage'] = array(
'fetch_lists' => esc_html__( 'Fetching lists...', 'et_builder' ),
public static function get_account_name_for_list_id( $provider_slug, $list_id ) {
$providers = ET_Core_API_Email_Providers::instance();
$all_accounts = $providers->accounts();
if ( ! isset( $all_accounts[ $provider_slug ] ) ) {
foreach ( $all_accounts[ $provider_slug ] as $account_name => $account_details ) {
if ( ! empty( $account_details['lists'][ $list_id ] ) ) {
public function get_form_field_html( $field, $single_name_field = false ) {
$label = $single_name_field ? __( 'Name', 'et_builder' ) : __( 'First Name', 'et_builder' );
$fullwidth_prop = $single_name_field ? 'name_fullwidth' : 'first_name_fullwidth';
$fullwidth = 'on' === self::$_->array_get( $this->props, $fullwidth_prop, 'on' );
$fullwidth_values = et_pb_responsive_options()->get_property_values( $this->props, $fullwidth_prop, 'on', true );
$fullwidth_tablet = isset( $fullwidth_values['tablet'] ) ? $fullwidth_values['tablet'] : '';
$fullwidth_phone = isset( $fullwidth_values['phone'] ) ? $fullwidth_values['phone'] : '';
<p class="et_pb_newsletter_field%1$s%4$s%5$s">
<label class="et_pb_contact_form_label" for="et_pb_signup_firstname" style="display: none;">%2$s</label>
<input id="et_pb_signup_firstname" class="input" type="text" placeholder="%3$s" name="et_pb_signup_firstname">
$fullwidth ? ' et_pb_contact_field_last' : ' et_pb_contact_field_half',
'on' === $fullwidth_tablet ? ' et_pb_contact_field_last_tablet' : ' et_pb_contact_field_half_tablet',
'on' === $fullwidth_phone ? ' et_pb_contact_field_last_phone' : ' et_pb_contact_field_half_phone'
$label = __( 'Last Name', 'et_builder' );
$fullwidth = 'on' === self::$_->array_get( $this->props, 'last_name_fullwidth', 'on' );
$fullwidth_values = et_pb_responsive_options()->get_property_values( $this->props, 'last_name_fullwidth', 'on', true );
$fullwidth_tablet = isset( $fullwidth_values['tablet'] ) ? $fullwidth_values['tablet'] : '';
$fullwidth_phone = isset( $fullwidth_values['phone'] ) ? $fullwidth_values['phone'] : '';
<p class="et_pb_newsletter_field%1$s%4$s%5$s">
<label class="et_pb_contact_form_label" for="et_pb_signup_lastname" style="display: none;">%2$s</label>
<input id="et_pb_signup_lastname" class="input" type="text" placeholder="%3$s" name="et_pb_signup_lastname">
$fullwidth ? ' et_pb_contact_field_last' : ' et_pb_contact_field_half',
'on' === $fullwidth_tablet ? ' et_pb_contact_field_last_tablet' : ' et_pb_contact_field_half_tablet',
'on' === $fullwidth_phone ? ' et_pb_contact_field_last_phone' : ' et_pb_contact_field_half_phone'
$label = __( 'Email', 'et_builder' );
$fullwidth = 'on' === self::$_->array_get( $this->props, 'email_fullwidth', 'on' );
$fullwidth_values = et_pb_responsive_options()->get_property_values( $this->props, 'email_fullwidth', 'on', true );
$fullwidth_tablet = isset( $fullwidth_values['tablet'] ) ? $fullwidth_values['tablet'] : '';
$fullwidth_phone = isset( $fullwidth_values['phone'] ) ? $fullwidth_values['phone'] : '';
<p class="et_pb_newsletter_field%1$s%4$s%5$s">
<label class="et_pb_contact_form_label" for="et_pb_signup_email" style="display: none;">%2$s</label>
<input id="et_pb_signup_email" class="input" type="text" placeholder="%3$s" name="et_pb_signup_email">
$fullwidth ? ' et_pb_contact_field_last' : ' et_pb_contact_field_half',
'on' === $fullwidth_tablet ? ' et_pb_contact_field_last_tablet' : ' et_pb_contact_field_half_tablet',
'on' === $fullwidth_phone ? ' et_pb_contact_field_last_phone' : ' et_pb_contact_field_half_phone'
$custom_icon_values = et_pb_responsive_options()->get_property_values( $this->props, 'button_icon' );
$custom_icon = isset( $custom_icon_values['desktop'] ) ? $custom_icon_values['desktop'] : '';
$custom_icon_tablet = isset( $custom_icon_values['tablet'] ) ? $custom_icon_values['tablet'] : '';
$custom_icon_phone = isset( $custom_icon_values['phone'] ) ? $custom_icon_values['phone'] : '';
$button_icon = $custom_icon && 'on' === $this->props['custom_button'];
$button_icon_tablet = $custom_icon_tablet && 'on' === $this->props['custom_button'];
$button_icon_phone = $custom_icon_phone && 'on' === $this->props['custom_button'];
$button_rel = $this->props['button_rel'];
$icon_class = $button_icon || $button_icon_tablet || $button_icon_phone ? ' et_pb_custom_button_icon' : '';
$icon_attr = $button_icon ? et_pb_process_font_icon( $custom_icon ) : '';
$icon_attr_tablet = $button_icon_tablet ? et_pb_process_font_icon( $custom_icon_tablet ) : '';
$icon_attr_phone = $button_icon_phone ? et_pb_process_font_icon( $custom_icon_phone ) : '';
<p class="et_pb_newsletter_button_wrap">
<a class="et_pb_newsletter_button et_pb_button%1$s" href="#"%2$s data-icon="%3$s"%5$s%6$s>
<span class="et_subscribe_loader"></span>
$this->get_rel_attributes( $button_rel ),
et_pb_multi_view_options( $this )->render_element( array(
'content' => '{{button_text}}',
'class' => 'et_pb_newsletter_button_text',
'' !== $icon_attr_tablet ? sprintf( ' data-icon-tablet="%1$s"', esc_attr( $icon_attr_tablet ) ) : '', // #5
'' !== $icon_attr_phone ? sprintf( ' data-icon-phone="%1$s"', esc_attr( $icon_attr_phone ) ) : ''
$provider = $this->props['provider'];
if ( 'feedburner' === $provider ) {
<input type="hidden" value="%1$s" name="uri" />
<input type="hidden" name="loc" value="%2$s" />',
esc_attr( $this->props['feedburner_uri'] ),
$list = $this->props[ $provider . '_list' ];
$ip_address = 'on' === $this->props['ip_address'] ? 'true' : 'false';
if ( false !== strpos( $list, '|' ) ) {
list( $account_name, $list ) = explode( '|', $list );
$account_name = self::get_account_name_for_list_id( $provider, $list );
<input type="hidden" value="%1$s" name="et_pb_signup_provider" />
<input type="hidden" value="%2$s" name="et_pb_signup_list_id" />
<input type="hidden" value="%3$s" name="et_pb_signup_account_name" />
<input type="hidden" value="%4$s" name="et_pb_signup_ip_address" />',
esc_attr( $account_name ),
$html .= sprintf( '<input type="hidden" value="%1$s" name="et_pb_signup_checksum" />', $this->_checksum );
* Filters the html output for individual opt-in form fields. The dynamic portion of the filter
* name ("$field"), will be one of: 'name', 'last_name', 'email', 'submit_button', 'hidden'.
* @param string $html The form field's HTML.
* @param bool $single_name_field Whether or not a single name field is being used.
* Only applicable when "$field" is 'name'.
return apply_filters( "et_pb_signup_form_field_html_{$field}", $html, $single_name_field );
public static function providers() {
if ( null === self::$_providers ) {
self::$_providers = ET_Core_API_Email_Providers::instance();
return self::$_providers;
function render( $attrs, $content = null, $render_slug ) {
parent::render( $attrs, $content, $render_slug );