Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/wpforms-.../template.../admin/componen...
File: datepicker.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Popover (range) datepicker template.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 1.8.2
[4] Fix | Delete
* @since 1.8.8 Added the `$hidden_fields` parameter.
[5] Fix | Delete
*
[6] Fix | Delete
* @var string $action The URL that processes the form submission. Ideally points out to the current admin page URL.
[7] Fix | Delete
* @var string $id Identifier to outline the context of where the datepicker will be used. e.g., "entries".
[8] Fix | Delete
* @var string $chosen_filter Currently selected filter or date range values. Last "X" days, or i.e. Feb 8, 2023 - Mar 9, 2023.
[9] Fix | Delete
* @var array $choices A list of date filter options for the datepicker module.
[10] Fix | Delete
* @var string $value Assigned timespan dates.
[11] Fix | Delete
* @var array $hidden_fields An array of hidden fields to be included in the form.
[12] Fix | Delete
*/
[13] Fix | Delete
[14] Fix | Delete
defined( 'ABSPATH' ) || exit; // Exit if accessed directly.
[15] Fix | Delete
[16] Fix | Delete
// An array of allowed HTML elements and attributes for the datepicker choices.
[17] Fix | Delete
$choices_allowed_html = [
[18] Fix | Delete
'li' => [],
[19] Fix | Delete
'label' => [],
[20] Fix | Delete
'input' => [
[21] Fix | Delete
'type' => [],
[22] Fix | Delete
'name' => [],
[23] Fix | Delete
'value' => [],
[24] Fix | Delete
'checked' => [],
[25] Fix | Delete
'aria-hidden' => [],
[26] Fix | Delete
],
[27] Fix | Delete
];
[28] Fix | Delete
[29] Fix | Delete
// Hidden fields to be included in the form submission.
[30] Fix | Delete
// `orderby` and `order` are always included by default.
[31] Fix | Delete
$default_hidden_fields = [ 'orderby', 'order' ];
[32] Fix | Delete
$hidden_fields = array_merge( $default_hidden_fields, $hidden_fields ?? [] );
[33] Fix | Delete
[34] Fix | Delete
?>
[35] Fix | Delete
<form class="wpforms-overview-top-bar-filter-form" method="get" action="<?php echo esc_url( $action ); ?>">
[36] Fix | Delete
<input type="hidden" name="page" value="wpforms-<?php echo esc_attr( $id ); ?>" />
[37] Fix | Delete
<?php
[38] Fix | Delete
// Output hidden fields for the current orderby and order values.
[39] Fix | Delete
[40] Fix | Delete
// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
[41] Fix | Delete
foreach ( $hidden_fields as $field ) {
[42] Fix | Delete
if ( empty( $_REQUEST[ $field ] ) ) {
[43] Fix | Delete
continue;
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( wp_unslash( $_REQUEST[ $field ] ) ) . '" />';
[47] Fix | Delete
}
[48] Fix | Delete
// phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
[49] Fix | Delete
?>
[50] Fix | Delete
[51] Fix | Delete
<button id="wpforms-datepicker-popover-button" class="button" role="button" aria-haspopup="true">
[52] Fix | Delete
<?php echo esc_html( $chosen_filter ); ?>
[53] Fix | Delete
</button>
[54] Fix | Delete
<div class="wpforms-datepicker-popover">
[55] Fix | Delete
<div class="wpforms-datepicker-popover-content">
[56] Fix | Delete
<ul class="wpforms-datepicker-choices" aria-label="<?php esc_attr_e( 'Datepicker options', 'wpforms-lite' ); ?>" aria-orientation="vertical">
[57] Fix | Delete
<?php echo wp_kses( '<li>' . implode( '</li><li>', (array) $choices ) . '</li>', $choices_allowed_html ); ?>
[58] Fix | Delete
</ul>
[59] Fix | Delete
<div class="wpforms-datepicker-calendar">
[60] Fix | Delete
<input
[61] Fix | Delete
type="text"
[62] Fix | Delete
name="date"
[63] Fix | Delete
tabindex="-1"
[64] Fix | Delete
aria-hidden="true"
[65] Fix | Delete
id="wpforms-<?php echo esc_attr( $id ); ?>-overview-datepicker"
[66] Fix | Delete
value="<?php echo esc_attr( $value ); ?>"
[67] Fix | Delete
>
[68] Fix | Delete
</div>
[69] Fix | Delete
<div class="wpforms-datepicker-action">
[70] Fix | Delete
<button class="button-secondary" type="reset"><?php esc_html_e( 'Cancel', 'wpforms-lite' ); ?></button>
[71] Fix | Delete
<button class="button-primary wpforms-btn-blue" type="submit"><?php esc_html_e( 'Apply', 'wpforms-lite' ); ?></button>
[72] Fix | Delete
</div>
[73] Fix | Delete
</div>
[74] Fix | Delete
</div>
[75] Fix | Delete
</form>
[76] Fix | Delete
[77] Fix | Delete
<?php
[78] Fix | Delete
/* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */
[79] Fix | Delete
[80] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function