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/wp-conte.../plugins/wpforms-.../src/Provider.../Provider/Settings
File: FormBuilder.php
[500] Fix | Delete
<button class="wpforms-builder-provider-title-add js-wpforms-builder-provider-account-add <?php echo ! $is_configured ? '' : 'hidden'; ?>"
[501] Fix | Delete
data-form_id="<?php echo \absint( $_GET['form_id'] ); ?>"
[502] Fix | Delete
data-provider="<?php echo \esc_attr( $this->core->slug ); ?>">
[503] Fix | Delete
<?php \esc_html_e( 'Add New Account', 'wpforms-lite' ); ?>
[504] Fix | Delete
</button>
[505] Fix | Delete
[506] Fix | Delete
</div>
[507] Fix | Delete
[508] Fix | Delete
<?php
[509] Fix | Delete
}
[510] Fix | Delete
[511] Fix | Delete
/**
[512] Fix | Delete
* Determine whether the lock field is required.
[513] Fix | Delete
*
[514] Fix | Delete
* @WPFormsBackCompat Support Drip v1.7.0 and earlier, support Uncanny Automator.
[515] Fix | Delete
*
[516] Fix | Delete
* @since 1.8.9
[517] Fix | Delete
*
[518] Fix | Delete
* @param string $provider The provider slug.
[519] Fix | Delete
*
[520] Fix | Delete
* @return bool
[521] Fix | Delete
*/
[522] Fix | Delete
protected function is_lock_field_required( string $provider ): bool {
[523] Fix | Delete
[524] Fix | Delete
// Compatibility with the legacy Drip addon versions where the lock field was not needed.
[525] Fix | Delete
// Uncanny Automator do not have lock field.
[526] Fix | Delete
if ( in_array( $provider, [ 'uncanny-automator', 'drip' ], true ) ) {
[527] Fix | Delete
return false;
[528] Fix | Delete
}
[529] Fix | Delete
[530] Fix | Delete
return true;
[531] Fix | Delete
}
[532] Fix | Delete
[533] Fix | Delete
/**
[534] Fix | Delete
* Temporary fix to remove __lock__ field with value 1 from the form post_content.
[535] Fix | Delete
* In the future, it will be handled in save_form() method in the core for all providers.
[536] Fix | Delete
*
[537] Fix | Delete
* @since 1.8.9
[538] Fix | Delete
*
[539] Fix | Delete
* @param array $form Form array, usable with wp_update_post.
[540] Fix | Delete
* @param array $data Data retrieved from $_POST and processed.
[541] Fix | Delete
* @param array $args Update form arguments.
[542] Fix | Delete
*
[543] Fix | Delete
* @return array
[544] Fix | Delete
*/
[545] Fix | Delete
public function remove_connection_locks( $form, $data, $args ) {
[546] Fix | Delete
[547] Fix | Delete
$form_data = json_decode( stripslashes( $form['post_content'] ), true );
[548] Fix | Delete
[549] Fix | Delete
if ( empty( $form_data['providers'][ $this->core->slug ] ) ) {
[550] Fix | Delete
return $form;
[551] Fix | Delete
}
[552] Fix | Delete
[553] Fix | Delete
$provider = $form_data['providers'][ $this->core->slug ];
[554] Fix | Delete
$lock = '__lock__';
[555] Fix | Delete
[556] Fix | Delete
// Remove the lock field if it's the only one and it's locked.
[557] Fix | Delete
if ( isset( $provider[ $lock ] ) && count( $provider ) === 1 && absint( $provider[ $lock ] ) === 1 ) {
[558] Fix | Delete
unset( $form_data['providers'][ $this->core->slug ]['__lock__'] );
[559] Fix | Delete
$form['post_content'] = wpforms_encode( $form_data );
[560] Fix | Delete
}
[561] Fix | Delete
[562] Fix | Delete
return $form;
[563] Fix | Delete
}
[564] Fix | Delete
}
[565] Fix | Delete
[566] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function