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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wpforms-.../includes/provider...
File: class-constant-contact.php
'name' => 'Address',
[500] Fix | Delete
'field_type' => 'address',
[501] Fix | Delete
'tag' => 'address',
[502] Fix | Delete
],
[503] Fix | Delete
[
[504] Fix | Delete
'name' => 'Job Title',
[505] Fix | Delete
'field_type' => 'text',
[506] Fix | Delete
'tag' => 'job_title',
[507] Fix | Delete
],
[508] Fix | Delete
[
[509] Fix | Delete
'name' => 'Company',
[510] Fix | Delete
'field_type' => 'text',
[511] Fix | Delete
'tag' => 'company_name',
[512] Fix | Delete
],
[513] Fix | Delete
];
[514] Fix | Delete
[515] Fix | Delete
return $provider_fields;
[516] Fix | Delete
}
[517] Fix | Delete
[518] Fix | Delete
[519] Fix | Delete
/*************************************************************************
[520] Fix | Delete
* Output methods - these methods generally return HTML for the builder. *
[521] Fix | Delete
*************************************************************************/
[522] Fix | Delete
[523] Fix | Delete
/**
[524] Fix | Delete
* Provider account authorize fields HTML.
[525] Fix | Delete
*
[526] Fix | Delete
* @since 1.3.6
[527] Fix | Delete
*
[528] Fix | Delete
* @return string
[529] Fix | Delete
*/
[530] Fix | Delete
public function output_auth() {
[531] Fix | Delete
[532] Fix | Delete
$providers = wpforms_get_providers_options();
[533] Fix | Delete
$class = ! empty( $providers[ $this->slug ] ) ? 'hidden' : '';
[534] Fix | Delete
[535] Fix | Delete
ob_start();
[536] Fix | Delete
?>
[537] Fix | Delete
[538] Fix | Delete
<div class="wpforms-provider-account-add <?php echo sanitize_html_class( $class ); ?> wpforms-connection-block">
[539] Fix | Delete
[540] Fix | Delete
<h4><?php esc_html_e( 'Add New Account', 'wpforms-lite' ); ?></h4>
[541] Fix | Delete
[542] Fix | Delete
<p>
[543] Fix | Delete
<?php esc_html_e( 'Please fill out all of the fields below to register your new Constant Contact account.', 'wpforms-lite' ); ?>
[544] Fix | Delete
<br>
[545] Fix | Delete
<a href="<?php echo esc_url( wpforms_utm_link( 'https://wpforms.com/docs/how-to-connect-constant-contact-with-wpforms/', 'Marketing Integrations', 'Constant Contact Documentation' ) ); ?>" target="_blank" rel="noopener noreferrer">
[546] Fix | Delete
<?php esc_html_e( 'Click here for documentation on connecting WPForms with Constant Contact.', 'wpforms-lite' ); ?>
[547] Fix | Delete
</a>
[548] Fix | Delete
</p>
[549] Fix | Delete
[550] Fix | Delete
<p class="wpforms-alert wpforms-alert-warning">
[551] Fix | Delete
<?php esc_html_e( 'Because Constant Contact requires external authentication, you will need to register WPForms with Constant Contact before you can proceed.', 'wpforms-lite' ); ?>
[552] Fix | Delete
</p>
[553] Fix | Delete
[554] Fix | Delete
<p>
[555] Fix | Delete
<strong>
[556] Fix | Delete
<a onclick="window.open(this.href,'','resizable=yes,location=no,width=750,height=500,status'); return false" href="https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?response_type=code&client_id=c58xq3r27udz59h9rrq7qnvf&redirect_uri=https://wpforms.com/oauth/constant-contact/" class="btn">
[557] Fix | Delete
<?php esc_html_e( 'Click here to register with Constant Contact', 'wpforms-lite' ); ?>
[558] Fix | Delete
</a>
[559] Fix | Delete
</strong>
[560] Fix | Delete
</p>
[561] Fix | Delete
[562] Fix | Delete
<?php
[563] Fix | Delete
printf(
[564] Fix | Delete
'<input type="text" data-name="authcode" placeholder="%s %s *" class="wpforms-required">',
[565] Fix | Delete
esc_attr( $this->name ),
[566] Fix | Delete
esc_attr__( 'Authorization Code', 'wpforms-lite' )
[567] Fix | Delete
);
[568] Fix | Delete
[569] Fix | Delete
printf(
[570] Fix | Delete
'<input type="text" data-name="label" placeholder="%s %s *" class="wpforms-required">',
[571] Fix | Delete
esc_attr( $this->name ),
[572] Fix | Delete
esc_attr__( 'Account Nickname', 'wpforms-lite' )
[573] Fix | Delete
);
[574] Fix | Delete
[575] Fix | Delete
printf(
[576] Fix | Delete
'<button data-provider="%s">%s</button>',
[577] Fix | Delete
esc_attr( $this->slug ),
[578] Fix | Delete
esc_html__( 'Connect', 'wpforms-lite' )
[579] Fix | Delete
);
[580] Fix | Delete
[581] Fix | Delete
?>
[582] Fix | Delete
</div>
[583] Fix | Delete
[584] Fix | Delete
<?php
[585] Fix | Delete
[586] Fix | Delete
return ob_get_clean();
[587] Fix | Delete
}
[588] Fix | Delete
[589] Fix | Delete
/**
[590] Fix | Delete
* Provider account list groups HTML.
[591] Fix | Delete
*
[592] Fix | Delete
* @since 1.3.6
[593] Fix | Delete
*
[594] Fix | Delete
* @param string $connection_id Connection Id.
[595] Fix | Delete
* @param array $connection Connection data.
[596] Fix | Delete
*
[597] Fix | Delete
* @return string
[598] Fix | Delete
*/
[599] Fix | Delete
public function output_groups( $connection_id = '', $connection = [] ) {
[600] Fix | Delete
[601] Fix | Delete
// No groups or segments for this provider.
[602] Fix | Delete
return '';
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
/**
[606] Fix | Delete
* Default content for the provider settings panel in the form builder.
[607] Fix | Delete
*
[608] Fix | Delete
* @since 1.6.8
[609] Fix | Delete
*
[610] Fix | Delete
* @param string $content Default content.
[611] Fix | Delete
*
[612] Fix | Delete
* @return string
[613] Fix | Delete
*/
[614] Fix | Delete
public function builder_settings_default_content( $content ) {
[615] Fix | Delete
[616] Fix | Delete
ob_start();
[617] Fix | Delete
?>
[618] Fix | Delete
<p>
[619] Fix | Delete
<a href="<?php echo esc_url( $this->sign_up ); ?>" class="wpforms-btn wpforms-btn-md wpforms-btn-orange" target="_blank" rel="noopener noreferrer">
[620] Fix | Delete
<?php esc_html_e( 'Try Constant Contact for Free', 'wpforms-lite' ); ?>
[621] Fix | Delete
</a>
[622] Fix | Delete
</p>
[623] Fix | Delete
<p>
[624] Fix | Delete
<?php
[625] Fix | Delete
printf(
[626] Fix | Delete
'<a href="%s" target="_blank" rel="noopener noreferrer" class="secondary-text">%s</a>',
[627] Fix | Delete
esc_url( admin_url( 'admin.php?page=wpforms-page&view=constant-contact' ) ),
[628] Fix | Delete
esc_html__( 'Learn more about the power of email marketing.', 'wpforms-lite' )
[629] Fix | Delete
);
[630] Fix | Delete
?>
[631] Fix | Delete
</p>
[632] Fix | Delete
<?php
[633] Fix | Delete
[634] Fix | Delete
return $content . ob_get_clean();
[635] Fix | Delete
}
[636] Fix | Delete
[637] Fix | Delete
/*************************************************************************
[638] Fix | Delete
* Integrations tab methods - these methods relate to the settings page. *
[639] Fix | Delete
*************************************************************************/
[640] Fix | Delete
[641] Fix | Delete
/**
[642] Fix | Delete
* AJAX to add a provider from the settings integrations tab.
[643] Fix | Delete
*
[644] Fix | Delete
* @since 1.7.6
[645] Fix | Delete
*/
[646] Fix | Delete
public function integrations_tab_add() {
[647] Fix | Delete
[648] Fix | Delete
// phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput
[649] Fix | Delete
if ( $_POST['provider'] !== $this->slug ) {
[650] Fix | Delete
return;
[651] Fix | Delete
}
[652] Fix | Delete
[653] Fix | Delete
// phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput
[654] Fix | Delete
$data = ! empty( $_POST['data'] ) ? wp_parse_args( wp_unslash( $_POST['data'] ), [] ) : [];
[655] Fix | Delete
[656] Fix | Delete
if ( empty( $data['authcode'] ) ) {
[657] Fix | Delete
wp_send_json_error(
[658] Fix | Delete
[
[659] Fix | Delete
'error_msg' => esc_html__( 'The "Authorization Code" is required.', 'wpforms-lite' ),
[660] Fix | Delete
]
[661] Fix | Delete
);
[662] Fix | Delete
}
[663] Fix | Delete
[664] Fix | Delete
if ( empty( $data['label'] ) ) {
[665] Fix | Delete
wp_send_json_error(
[666] Fix | Delete
[
[667] Fix | Delete
'error_msg' => esc_html__( 'The "Account Nickname" is required.', 'wpforms-lite' ),
[668] Fix | Delete
]
[669] Fix | Delete
);
[670] Fix | Delete
}
[671] Fix | Delete
[672] Fix | Delete
parent::integrations_tab_add();
[673] Fix | Delete
}
[674] Fix | Delete
[675] Fix | Delete
/**
[676] Fix | Delete
* Form fields to add a new provider account.
[677] Fix | Delete
*
[678] Fix | Delete
* @since 1.3.6
[679] Fix | Delete
*/
[680] Fix | Delete
public function integrations_tab_new_form() {
[681] Fix | Delete
[682] Fix | Delete
?>
[683] Fix | Delete
<p>
[684] Fix | Delete
<a href="<?php echo esc_url( wpforms_utm_link( 'https://wpforms.com/docs/how-to-connect-constant-contact-with-wpforms/', 'Settings - Integration', 'Constant Contact Documentation' ) ); ?>" target="_blank" rel="noopener noreferrer">
[685] Fix | Delete
<?php esc_html_e( 'Click here for documentation on connecting WPForms with Constant Contact.', 'wpforms-lite' ); ?>
[686] Fix | Delete
</a>
[687] Fix | Delete
</p>
[688] Fix | Delete
[689] Fix | Delete
<p class="wpforms-alert wpforms-alert-warning">
[690] Fix | Delete
<?php esc_html_e( 'Because Constant Contact requires external authentication, you will need to register WPForms with Constant Contact before you can proceed.', 'wpforms-lite' ); ?>
[691] Fix | Delete
</p>
[692] Fix | Delete
[693] Fix | Delete
<p>
[694] Fix | Delete
<strong>
[695] Fix | Delete
<a onclick="window.open(this.href,'','resizable=yes,location=no,width=800,height=600,status'); return false" href="https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?response_type=code&client_id=c58xq3r27udz59h9rrq7qnvf&redirect_uri=https://wpforms.com/oauth/constant-contact/" class="btn">
[696] Fix | Delete
<?php esc_html_e( 'Click here to register with Constant Contact', 'wpforms-lite' ); ?>
[697] Fix | Delete
</a>
[698] Fix | Delete
</strong>
[699] Fix | Delete
</p>
[700] Fix | Delete
[701] Fix | Delete
<?php
[702] Fix | Delete
printf(
[703] Fix | Delete
'<input type="text" name="authcode" placeholder="%s %s *" class="wpforms-required">',
[704] Fix | Delete
esc_attr( $this->name ),
[705] Fix | Delete
esc_attr__( 'Authorization Code', 'wpforms-lite' )
[706] Fix | Delete
);
[707] Fix | Delete
[708] Fix | Delete
printf(
[709] Fix | Delete
'<input type="text" name="label" placeholder="%s %s *" class="wpforms-required">',
[710] Fix | Delete
esc_attr( $this->name ),
[711] Fix | Delete
esc_attr__( 'Account Nickname', 'wpforms-lite' )
[712] Fix | Delete
);
[713] Fix | Delete
}
[714] Fix | Delete
[715] Fix | Delete
/************************
[716] Fix | Delete
* Other functionality. *
[717] Fix | Delete
************************/
[718] Fix | Delete
[719] Fix | Delete
/**
[720] Fix | Delete
* Add admin notices to connect to Constant Contact.
[721] Fix | Delete
*
[722] Fix | Delete
* @since 1.3.6
[723] Fix | Delete
*/
[724] Fix | Delete
public function connect_request() {
[725] Fix | Delete
[726] Fix | Delete
// Only consider showing the review request to admin users.
[727] Fix | Delete
if ( ! is_super_admin() ) {
[728] Fix | Delete
return;
[729] Fix | Delete
}
[730] Fix | Delete
[731] Fix | Delete
// Don't display on WPForms admin content pages.
[732] Fix | Delete
// phpcs:disable WordPress.Security.NonceVerification.Recommended
[733] Fix | Delete
if ( ! empty( $_GET['wpforms-page'] ) ) {
[734] Fix | Delete
return;
[735] Fix | Delete
}
[736] Fix | Delete
[737] Fix | Delete
// Don't display if user is about to connect via Settings page.
[738] Fix | Delete
if ( ! empty( $_GET['wpforms-integration'] ) && $this->slug === $_GET['wpforms-integration'] ) {
[739] Fix | Delete
return;
[740] Fix | Delete
}
[741] Fix | Delete
// phpcs:enable WordPress.Security.NonceVerification.Recommended
[742] Fix | Delete
[743] Fix | Delete
// Only display the notice if the Constant Contact option is set and
[744] Fix | Delete
// there are previous Constant Contact connections created.
[745] Fix | Delete
// Please do not delete 'wpforms_constant_contact' option check from the code.
[746] Fix | Delete
$cc_notice = get_option( 'wpforms_constant_contact', false );
[747] Fix | Delete
$providers = wpforms_get_providers_options();
[748] Fix | Delete
[749] Fix | Delete
if ( ! $cc_notice || ! empty( $providers[ $this->slug ] ) ) {
[750] Fix | Delete
return;
[751] Fix | Delete
}
[752] Fix | Delete
[753] Fix | Delete
// Output the notice message.
[754] Fix | Delete
$connect = admin_url( 'admin.php?page=wpforms-settings&view=integrations&wpforms-integration=constant-contact#!wpforms-tab-providers' );
[755] Fix | Delete
$learn_more = admin_url( 'admin.php?page=wpforms-page&view=constant-contact' );
[756] Fix | Delete
[757] Fix | Delete
ob_start();
[758] Fix | Delete
?>
[759] Fix | Delete
<p>
[760] Fix | Delete
<?php
[761] Fix | Delete
echo wp_kses(
[762] Fix | Delete
__( 'Get the most out of the <strong>WPForms</strong> plugin &mdash; use it with an active Constant Contact account.', 'wpforms-lite' ),
[763] Fix | Delete
[
[764] Fix | Delete
'strong' => [],
[765] Fix | Delete
]
[766] Fix | Delete
);
[767] Fix | Delete
?>
[768] Fix | Delete
</p>
[769] Fix | Delete
<p>
[770] Fix | Delete
<a href="<?php echo esc_url( $this->sign_up ); ?>" class="button-primary" target="_blank" rel="noopener noreferrer">
[771] Fix | Delete
<?php esc_html_e( 'Try Constant Contact for Free', 'wpforms-lite' ); ?>
[772] Fix | Delete
</a>
[773] Fix | Delete
<a href="<?php echo esc_url( $connect ); ?>" class="button-secondary">
[774] Fix | Delete
<?php esc_html_e( 'Connect your existing account', 'wpforms-lite' ); ?>
[775] Fix | Delete
</a>
[776] Fix | Delete
<?php
[777] Fix | Delete
echo wp_kses(
[778] Fix | Delete
sprintf( /* translators: %s - WPForms Constant Contact internal URL. */
[779] Fix | Delete
__( 'Learn More about the <a href="%s">power of email marketing</a>', 'wpforms-lite' ),
[780] Fix | Delete
esc_url( $learn_more )
[781] Fix | Delete
),
[782] Fix | Delete
[
[783] Fix | Delete
'a' => [
[784] Fix | Delete
'href' => [],
[785] Fix | Delete
],
[786] Fix | Delete
]
[787] Fix | Delete
);
[788] Fix | Delete
?>
[789] Fix | Delete
</p>
[790] Fix | Delete
[791] Fix | Delete
<style>
[792] Fix | Delete
.wpforms-constant-contact-notice p:first-of-type {
[793] Fix | Delete
margin: 16px 0 8px;
[794] Fix | Delete
}
[795] Fix | Delete
[796] Fix | Delete
.wpforms-constant-contact-notice p:last-of-type {
[797] Fix | Delete
margin: 8px 0 16px;
[798] Fix | Delete
}
[799] Fix | Delete
[800] Fix | Delete
.wpforms-constant-contact-notice .button-primary,
[801] Fix | Delete
.wpforms-constant-contact-notice .button-secondary {
[802] Fix | Delete
margin: 0 10px 0 0;
[803] Fix | Delete
}
[804] Fix | Delete
</style>
[805] Fix | Delete
<?php
[806] Fix | Delete
[807] Fix | Delete
$notice = ob_get_clean();
[808] Fix | Delete
[809] Fix | Delete
\WPForms\Admin\Notice::info(
[810] Fix | Delete
$notice,
[811] Fix | Delete
[
[812] Fix | Delete
'dismiss' => \WPForms\Admin\Notice::DISMISS_GLOBAL,
[813] Fix | Delete
'slug' => 'constant_contact_connect',
[814] Fix | Delete
'autop' => false,
[815] Fix | Delete
'class' => 'wpforms-constant-contact-notice',
[816] Fix | Delete
]
[817] Fix | Delete
);
[818] Fix | Delete
}
[819] Fix | Delete
[820] Fix | Delete
/**
[821] Fix | Delete
* Dismiss the Constant Contact admin notice.
[822] Fix | Delete
*
[823] Fix | Delete
* @since 1.3.6
[824] Fix | Delete
* @since 1.6.7.1 Added parameter $notice_id.
[825] Fix | Delete
*
[826] Fix | Delete
* @param string $notice_id Notice ID (slug).
[827] Fix | Delete
*/
[828] Fix | Delete
public function connect_dismiss( $notice_id = '' ) {
[829] Fix | Delete
[830] Fix | Delete
if ( $notice_id !== 'global-constant_contact_connect' ) {
[831] Fix | Delete
return;
[832] Fix | Delete
}
[833] Fix | Delete
[834] Fix | Delete
delete_option( 'wpforms_constant_contact' );
[835] Fix | Delete
[836] Fix | Delete
wp_send_json_success();
[837] Fix | Delete
}
[838] Fix | Delete
}
[839] Fix | Delete
[840] Fix | Delete
new WPForms_Constant_Contact();
[841] Fix | Delete
[842] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function