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-.../src/Lite/Admin/Educatio.../Builder
File: Confirmations.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace WPForms\Lite\Admin\Education\Builder;
[2] Fix | Delete
[3] Fix | Delete
use WPForms_Builder_Panel_Settings;
[4] Fix | Delete
use WPForms\Admin\Education\EducationInterface;
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Confirmations Education feature.
[8] Fix | Delete
*
[9] Fix | Delete
* @since 1.6.9
[10] Fix | Delete
*/
[11] Fix | Delete
class Confirmations implements EducationInterface {
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Indicate if current Education feature is allowed to load.
[15] Fix | Delete
*
[16] Fix | Delete
* @since 1.6.9
[17] Fix | Delete
*
[18] Fix | Delete
* @return bool
[19] Fix | Delete
*/
[20] Fix | Delete
public function allow_load() {
[21] Fix | Delete
[22] Fix | Delete
return wpforms_is_admin_page( 'builder' );
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Init.
[27] Fix | Delete
*
[28] Fix | Delete
* @since 1.6.9
[29] Fix | Delete
*/
[30] Fix | Delete
public function init() {
[31] Fix | Delete
[32] Fix | Delete
if ( ! $this->allow_load() ) {
[33] Fix | Delete
return;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
$this->hooks();
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Load hooks.
[41] Fix | Delete
*
[42] Fix | Delete
* @since 1.6.9
[43] Fix | Delete
*/
[44] Fix | Delete
private function hooks() {
[45] Fix | Delete
[46] Fix | Delete
add_action( 'wpforms_lite_form_settings_confirmations_single_after', [ $this, 'entry_preview_settings' ], 10, 2 );
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Add education settings located in confirmation inside the message block.
[51] Fix | Delete
*
[52] Fix | Delete
* @since 1.6.9
[53] Fix | Delete
*
[54] Fix | Delete
* @param WPForms_Builder_Panel_Settings $settings Builder panel settings.
[55] Fix | Delete
* @param int $field_id Field ID.
[56] Fix | Delete
*/
[57] Fix | Delete
public function entry_preview_settings( $settings, $field_id ) {
[58] Fix | Delete
[59] Fix | Delete
wpforms_panel_field(
[60] Fix | Delete
'toggle',
[61] Fix | Delete
'confirmations',
[62] Fix | Delete
'message_entry_preview',
[63] Fix | Delete
$settings->form_data,
[64] Fix | Delete
esc_html__( 'Show entry preview after confirmation', 'wpforms-lite' ),
[65] Fix | Delete
[
[66] Fix | Delete
'input_id' => 'wpforms-panel-field-confirmations-message_entry_preview-' . wpforms_validate_field_id( $field_id ),
[67] Fix | Delete
'input_class' => 'wpforms-panel-field-confirmations-message_entry_preview education-modal',
[68] Fix | Delete
'parent' => 'settings',
[69] Fix | Delete
'subsection' => wpforms_validate_field_id( $field_id ),
[70] Fix | Delete
'pro_badge' => true,
[71] Fix | Delete
'data' => [
[72] Fix | Delete
'action' => 'upgrade',
[73] Fix | Delete
'name' => esc_html__( 'Show Entry Preview', 'wpforms-lite' ),
[74] Fix | Delete
'utm-content' => 'Show Entry Preview',
[75] Fix | Delete
'licence' => 'pro',
[76] Fix | Delete
],
[77] Fix | Delete
'attrs' => [
[78] Fix | Delete
'disabled' => 'disabled',
[79] Fix | Delete
],
[80] Fix | Delete
'value' => false,
[81] Fix | Delete
]
[82] Fix | Delete
);
[83] Fix | Delete
}
[84] Fix | Delete
}
[85] Fix | Delete
[86] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function