Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/themify-.../template...
File: template-optin.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Template Newsletter
[2] Fix | Delete
*
[3] Fix | Delete
* This template can be overridden by copying it to your child_theme_folder/themify-builder/template-optin.php.
[4] Fix | Delete
*
[5] Fix | Delete
* Access original fields: $mod_settings
[6] Fix | Delete
* @author Themify
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
defined( 'ABSPATH' ) || exit;
[10] Fix | Delete
[11] Fix | Delete
$mod_name=$args['mod_name'];
[12] Fix | Delete
$element_id = $args['module_ID'];
[13] Fix | Delete
$fields_args = $args['mod_settings']+ array(
[14] Fix | Delete
'mod_title' => '',
[15] Fix | Delete
'provider' => 'mailchimp',
[16] Fix | Delete
'layout' => 'tb_optin_inline_block',
[17] Fix | Delete
'label_firstname' => '',
[18] Fix | Delete
'fn_placeholder' => '',
[19] Fix | Delete
'fname_hide' => 0,
[20] Fix | Delete
'default_fname' => '',
[21] Fix | Delete
'lname_hide' => 0,
[22] Fix | Delete
'label_lastname' => '',
[23] Fix | Delete
'ln_placeholder' => '',
[24] Fix | Delete
'default_lname' => '',
[25] Fix | Delete
'label_email' => '',
[26] Fix | Delete
'email_placeholder' => '',
[27] Fix | Delete
'label_submit' => '',
[28] Fix | Delete
'button_icon' => '',
[29] Fix | Delete
'success_action' => 's2',
[30] Fix | Delete
'redirect_to' => '',
[31] Fix | Delete
'message' => '',
[32] Fix | Delete
'errmsg' => __( 'There was an error. Please try again later.', 'themify' ),
[33] Fix | Delete
'captcha' => '',
[34] Fix | Delete
'gdpr' => '',
[35] Fix | Delete
'gdpr_label' => '',
[36] Fix | Delete
'css' => '',
[37] Fix | Delete
'animation_effect' => '',
[38] Fix | Delete
);
[39] Fix | Delete
[40] Fix | Delete
$instance = Builder_Optin_Service::get_providers( $fields_args['provider'],true );
[41] Fix | Delete
$container_class = apply_filters( 'themify_builder_module_classes', array(
[42] Fix | Delete
'module',
[43] Fix | Delete
'module-' . $mod_name,
[44] Fix | Delete
$element_id,
[45] Fix | Delete
$fields_args['css'],
[46] Fix | Delete
$fields_args['layout']
[47] Fix | Delete
), $mod_name, $element_id, $fields_args
[48] Fix | Delete
);
[49] Fix | Delete
if(!empty($fields_args['global_styles']) && Themify_Builder::$frontedit_active===false){
[50] Fix | Delete
$container_class[] = $fields_args['global_styles'];
[51] Fix | Delete
}
[52] Fix | Delete
$container_props = apply_filters( 'themify_builder_module_container_props', self::parse_animation_effect($fields_args,array(
[53] Fix | Delete
'id' => $element_id,
[54] Fix | Delete
'class' => implode(' ', $container_class ),
[55] Fix | Delete
)), $fields_args, $mod_name, $element_id );
[56] Fix | Delete
$icon =$fields_args['button_icon']? sprintf( '<em>%s</em>', themify_get_icon($fields_args['button_icon'] )):'';
[57] Fix | Delete
if(Themify_Builder::$frontedit_active===false){
[58] Fix | Delete
$container_props['data-lazy']=1;
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
self::sticky_element_props($container_props, $fields_args);
[62] Fix | Delete
$builder_id = $args['builder_id'];
[63] Fix | Delete
?>
[64] Fix | Delete
<!-- module optin -->
[65] Fix | Delete
<div <?php echo themify_get_element_attributes($container_props); ?>>
[66] Fix | Delete
<?php $container_props=$container_class=$args=null;
[67] Fix | Delete
?>
[68] Fix | Delete
<?php if (!empty($instance) ):?>
[69] Fix | Delete
<?php
[70] Fix | Delete
echo Themify_Builder_Component_Module::get_module_title($fields_args);
[71] Fix | Delete
if ( ( $error_msg = $instance::validate_data( $fields_args ))!=='' ) :
[72] Fix | Delete
if ( current_user_can( 'manage_options' ) ) {
[73] Fix | Delete
echo $error_msg;
[74] Fix | Delete
}
[75] Fix | Delete
?>
[76] Fix | Delete
<?php else: ?>
[77] Fix | Delete
<form class="tb_optin_form" name="tb_optin" method="post" action="<?php echo admin_url( 'admin-ajax.php' ); ?>" data-success="<?php esc_attr_e( $fields_args['success_action'] ); ?>">
[78] Fix | Delete
<input type="hidden" name="action" value="tb_optin_subscribe">
[79] Fix | Delete
<input type="hidden" name="tb_optin_redirect" value="<?php esc_attr_e( $fields_args['redirect_to'] ); ?>">
[80] Fix | Delete
<input type="hidden" name="tb_optin_provider" value="<?php esc_attr_e( $fields_args['provider'] ); ?>">
[81] Fix | Delete
<input type="hidden" name="tb_post_id" value="<?php echo $builder_id; ?>">
[82] Fix | Delete
<input type="hidden" name="tb_element_id" value="<?php echo str_replace( 'tb_', '', $element_id ); ?>">
[83] Fix | Delete
<?php
[84] Fix | Delete
foreach ( $instance::get_settings() as $provider_field ) :
[85] Fix | Delete
if ( isset( $provider_field['id'] ) && isset( $fields_args[ $provider_field['id'] ] ) ) : ?>
[86] Fix | Delete
<input type="hidden" name="tb_optin_<?php echo $provider_field['id']; ?>" value="<?php esc_attr_e( $fields_args[ $provider_field['id'] ] ); ?>" />
[87] Fix | Delete
<?php endif;
[88] Fix | Delete
endforeach;
[89] Fix | Delete
?>
[90] Fix | Delete
<?php if ( $fields_args['fname_hide'] ) : ?>
[91] Fix | Delete
<input type="hidden" name="tb_optin_fname" value="<?php esc_attr_e( $fields_args['default_fname'] ); ?>">
[92] Fix | Delete
<?php else : ?>
[93] Fix | Delete
<div class="tb_optin_fname">
[94] Fix | Delete
<label class="tb_optin_fname_text">
[95] Fix | Delete
<?php echo !empty($fields_args['label_firstname'])?esc_html( $fields_args['label_firstname']):'<span class="screen-reader-text">'.__('First name','themify').'</span>'; ?>
[96] Fix | Delete
<input type="text" name="tb_optin_fname" required="required" class="tb_optin_input"<?php echo !empty($fields_args['fn_placeholder'])?' placeholder="'.esc_attr($fields_args['fn_placeholder']).'"':''; ?>>
[97] Fix | Delete
</label>
[98] Fix | Delete
[99] Fix | Delete
</div>
[100] Fix | Delete
<?php endif; ?>
[101] Fix | Delete
<?php if ( $fields_args['lname_hide'] ) : ?>
[102] Fix | Delete
<input type="hidden" name="tb_optin_lname" value="<?php esc_attr_e( $fields_args['default_lname'] ); ?>">
[103] Fix | Delete
<?php else : ?>
[104] Fix | Delete
<div class="tb_optin_lname">
[105] Fix | Delete
<label class="tb_optin_lname_text">
[106] Fix | Delete
<?php echo !empty($fields_args['label_lastname'])?esc_html( $fields_args['label_lastname']):'<span class="screen-reader-text">'.__('Last name','themify').'</span>'; ?>
[107] Fix | Delete
<input type="text" name="tb_optin_lname" required="required" class="tb_optin_input"<?php echo !empty($fields_args['ln_placeholder'])?' placeholder="'.esc_attr($fields_args['ln_placeholder']).'"':''; ?>>
[108] Fix | Delete
</label>
[109] Fix | Delete
</div>
[110] Fix | Delete
<?php endif; ?>
[111] Fix | Delete
<div class="tb_optin_email">
[112] Fix | Delete
<label class="tb_optin_email_text">
[113] Fix | Delete
<?php echo !empty($fields_args['label_email'])?esc_html( $fields_args['label_email']):'<span class="screen-reader-text">'.__('Email','themify').'</span>'; ?>
[114] Fix | Delete
<input type="email" name="tb_optin_email" required="required" class="tb_optin_input"<?php echo !empty($fields_args['email_placeholder'])?' placeholder="'.esc_attr($fields_args['email_placeholder']).'"':''; ?>>
[115] Fix | Delete
</label>
[116] Fix | Delete
</div>
[117] Fix | Delete
<?php if ( $fields_args['gdpr'] === 'on' ) : ?>
[118] Fix | Delete
<div class="tb_optin_gdpr">
[119] Fix | Delete
<label class="tb_optin_gdpr_text">
[120] Fix | Delete
<input type="checkbox" name="tb_optin_gdpr" required="required">
[121] Fix | Delete
<?php echo $fields_args['gdpr_label']; ?>
[122] Fix | Delete
</label>
[123] Fix | Delete
</div>
[124] Fix | Delete
<?php endif; ?>
[125] Fix | Delete
<?php if ( ! empty( $fields_args['captcha'] ) ) {
[126] Fix | Delete
echo Themify_Builder_Model::get_captcha_field( $fields_args['captcha'] === 'on' ? 'recaptcha' : 'hcaptcha', '<div class="tb_optin_captcha">', '</div>' );
[127] Fix | Delete
}
[128] Fix | Delete
?>
[129] Fix | Delete
<div class="tb_optin_submit">
[130] Fix | Delete
<button>
[131] Fix | Delete
<?php if( $icon!==''):?>
[132] Fix | Delete
<?php echo $icon?>
[133] Fix | Delete
<?php endif;?>
[134] Fix | Delete
<span><?php echo esc_html( $fields_args['label_submit'] ) ?></span>
[135] Fix | Delete
</button>
[136] Fix | Delete
</div>
[137] Fix | Delete
</form>
[138] Fix | Delete
<div class="tb_optin_error_message tb_text_wrap" style="display:none">
[139] Fix | Delete
<?php echo $fields_args['errmsg'] !== '' ? apply_filters( 'themify_builder_module_content', $fields_args['errmsg'] ) : ''; ?>
[140] Fix | Delete
</div>
[141] Fix | Delete
<div class="tb_optin_success_message tb_text_wrap" style="display:none">
[142] Fix | Delete
<?php echo $fields_args['message']!==''?apply_filters( 'themify_builder_module_content', $fields_args['message'] ):''; ?>
[143] Fix | Delete
</div>
[144] Fix | Delete
<?php endif; ?>
[145] Fix | Delete
<?php endif; ?>
[146] Fix | Delete
</div><!-- /module optin -->
[147] Fix | Delete
<?php unset($instance)?>
[148] Fix | Delete
[149] Fix | Delete
[150] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function