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/wpforms-.../includes/admin/builder/panels
File: class-providers.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Providers panel.
[7] Fix | Delete
*
[8] Fix | Delete
* @since 1.0.0
[9] Fix | Delete
*/
[10] Fix | Delete
class WPForms_Builder_Panel_Providers extends WPForms_Builder_Panel {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* All systems go.
[14] Fix | Delete
*
[15] Fix | Delete
* @since 1.0.0
[16] Fix | Delete
*/
[17] Fix | Delete
public function init() {
[18] Fix | Delete
[19] Fix | Delete
// Define panel information.
[20] Fix | Delete
$this->name = esc_html__( 'Marketing', 'wpforms-lite' );
[21] Fix | Delete
$this->slug = 'providers';
[22] Fix | Delete
$this->icon = 'fa-bullhorn';
[23] Fix | Delete
$this->order = 10;
[24] Fix | Delete
$this->sidebar = true;
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Enqueue assets for the Providers panel.
[29] Fix | Delete
*
[30] Fix | Delete
* @since 1.0.0
[31] Fix | Delete
* @since 1.6.8 All the builder stylesheets enqueues moved to the `\WPForms_Builder::enqueues()`.
[32] Fix | Delete
*/
[33] Fix | Delete
public function enqueues() {
[34] Fix | Delete
[35] Fix | Delete
$min = wpforms_get_min_suffix();
[36] Fix | Delete
[37] Fix | Delete
wp_enqueue_script(
[38] Fix | Delete
'wpforms-builder-providers',
[39] Fix | Delete
WPFORMS_PLUGIN_URL . "assets/js/admin/builder/admin-builder-providers{$min}.js",
[40] Fix | Delete
[ 'jquery' ],
[41] Fix | Delete
WPFORMS_VERSION,
[42] Fix | Delete
false
[43] Fix | Delete
);
[44] Fix | Delete
[45] Fix | Delete
wp_localize_script(
[46] Fix | Delete
'wpforms-builder-providers',
[47] Fix | Delete
'wpforms_builder_providers',
[48] Fix | Delete
[
[49] Fix | Delete
'url' => esc_url( remove_query_arg( 'newform', add_query_arg( [ 'view' => 'providers' ] ) ) ),
[50] Fix | Delete
'confirm_save' => esc_html__( 'We need to save your progress to continue to the Marketing panel. Is that OK?', 'wpforms-lite' ),
[51] Fix | Delete
'confirm_connection' => esc_html__( 'Are you sure you want to delete this connection?', 'wpforms-lite' ),
[52] Fix | Delete
/* translators: %s - connection type. */
[53] Fix | Delete
'prompt_connection' => esc_html( sprintf( __( 'Enter a %s nickname', 'wpforms-lite' ), '%type%' ) ),
[54] Fix | Delete
'prompt_placeholder' => esc_html__( 'Eg: Newsletter Optin', 'wpforms-lite' ),
[55] Fix | Delete
'error_name' => esc_html__( 'You must provide a connection nickname.', 'wpforms-lite' ),
[56] Fix | Delete
'required_field' => esc_html__( 'Field required', 'wpforms-lite' ),
[57] Fix | Delete
]
[58] Fix | Delete
);
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* Output the Provider panel sidebar.
[63] Fix | Delete
*
[64] Fix | Delete
* @since 1.0.0
[65] Fix | Delete
*/
[66] Fix | Delete
public function panel_sidebar() {
[67] Fix | Delete
[68] Fix | Delete
// Sidebar contents are not valid unless we have a form.
[69] Fix | Delete
if ( ! $this->form ) {
[70] Fix | Delete
return;
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
$this->panel_sidebar_section( esc_html__( 'Default', 'wpforms-lite' ), 'default' );
[74] Fix | Delete
[75] Fix | Delete
do_action( 'wpforms_providers_panel_sidebar', $this->form );
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
/**
[79] Fix | Delete
* Output the Provider panel primary content.
[80] Fix | Delete
*
[81] Fix | Delete
* @since 1.0.0
[82] Fix | Delete
*/
[83] Fix | Delete
public function panel_content() {
[84] Fix | Delete
[85] Fix | Delete
if ( ! $this->form ) {
[86] Fix | Delete
[87] Fix | Delete
// Check if there is a form created. When no form has been created
[88] Fix | Delete
// yet let the user know we need a form to setup a provider.
[89] Fix | Delete
echo '<div class="wpforms-alert wpforms-alert-info">';
[90] Fix | Delete
echo wp_kses(
[91] Fix | Delete
__( 'You need to <a href="#" class="wpforms-panel-switch" data-panel="setup">setup your form</a> before you can manage these settings.', 'wpforms-lite' ),
[92] Fix | Delete
[
[93] Fix | Delete
'a' => [
[94] Fix | Delete
'href' => [],
[95] Fix | Delete
'class' => [],
[96] Fix | Delete
'data-panel' => [],
[97] Fix | Delete
],
[98] Fix | Delete
]
[99] Fix | Delete
);
[100] Fix | Delete
echo '</div>';
[101] Fix | Delete
[102] Fix | Delete
return;
[103] Fix | Delete
}
[104] Fix | Delete
[105] Fix | Delete
// An array of all the active provider addons.
[106] Fix | Delete
$providers_active = wpforms_get_providers_available();
[107] Fix | Delete
[108] Fix | Delete
if ( empty( $providers_active ) ) {
[109] Fix | Delete
[110] Fix | Delete
// Check for active provider addons. When no provider addons are
[111] Fix | Delete
// activated let the user know they need to install/activate an
[112] Fix | Delete
// addon to setup a provider.
[113] Fix | Delete
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-info">';
[114] Fix | Delete
echo '<h5>' . esc_html__( 'Install Your Marketing Integration', 'wpforms-lite' ) . '</h5>';
[115] Fix | Delete
echo '<p>' .
[116] Fix | Delete
sprintf(
[117] Fix | Delete
wp_kses(
[118] Fix | Delete
/* translators: %s - plugin admin area Addons page. */
[119] Fix | Delete
__( 'It seems you do not have any marketing addons activated. You can head over to the <a href="%s">Addons page</a> to install and activate the addon for your provider.', 'wpforms-lite' ),
[120] Fix | Delete
[
[121] Fix | Delete
'a' => [
[122] Fix | Delete
'href' => [],
[123] Fix | Delete
],
[124] Fix | Delete
]
[125] Fix | Delete
),
[126] Fix | Delete
esc_url( admin_url( 'admin.php?page=wpforms-addons' ) )
[127] Fix | Delete
) .
[128] Fix | Delete
'</p>';
[129] Fix | Delete
echo '</div>';
[130] Fix | Delete
} else {
[131] Fix | Delete
[132] Fix | Delete
// Everything is good - display default instructions.
[133] Fix | Delete
echo '<div class="wpforms-panel-content-section wpforms-panel-content-section-default">
[134] Fix | Delete
<div class="illustration illustration-marketing"></div>
[135] Fix | Delete
<h5>' . esc_html__( 'Select Your Marketing Integration', 'wpforms-lite' ) . '</h5>
[136] Fix | Delete
<p>' . esc_html__( 'Select your email marketing service provider or CRM from the options on the left. If you don\'t see your email marketing service listed, then let us know and we\'ll do our best to get it added as fast as possible.', 'wpforms-lite' ) . '</p>
[137] Fix | Delete
</div>';
[138] Fix | Delete
}
[139] Fix | Delete
[140] Fix | Delete
do_action( 'wpforms_providers_panel_content', $this->form );
[141] Fix | Delete
}
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
new WPForms_Builder_Panel_Providers();
[145] Fix | Delete
[146] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function