Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup + add translations + fix escapes #90

Merged
merged 3 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions admin/CF7_AntiSpam_Admin_Customizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,12 @@ public function cf7a_honeyform_excluded_pages_callback() {
}
}
wp_reset_postdata();
$allowed_html = array(
'option' => array(
'selected' => array(),
'value' => array(),
),
);
printf(
'<div class="honeyform-container">
<div class="row">
Expand All @@ -1552,9 +1558,9 @@ public function cf7a_honeyform_excluded_pages_callback() {
</div>
</div>
</div>',
esc_html( $options ),
wp_kses( $options, $allowed_html ),
esc_html__( 'Add', 'cf7-antispam' ),
esc_html( $str_excluded ),
wp_kses( $str_excluded, $allowed_html ),
esc_html__( 'Remove', 'cf7-antispam' )
);
}
Expand Down
2 changes: 1 addition & 1 deletion core/CF7_AntiSpam_Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ public function cf7a_check_resend( $cf7, &$abort, $submission ) {
return;
}

$hash = sanitize_text_field( preg_replace( '/[^A-Za-z0-9 ]/', '', $raw_hash ) );
$hash = preg_replace( '/[^A-Za-z0-9 ]/', '', $raw_hash );
// get the expiration time
$expire = apply_filters( 'cf7a_resend_timeout', 5 );

Expand Down
2 changes: 1 addition & 1 deletion core/CF7_Antispam_Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function display( $action = '' ) {
// Display the form
echo '<div class="wrap">';
echo '<form method="post" action="">';
echo '<input type="submit" name="cf7a_submit" class="button button-primary" value="' . $checked ? 'Disable' : 'Enable' . '">';
echo sprintf( '<input type="submit" name="cf7a_submit" class="button button-primary" value="%s">', $checked ? __( 'Disable', 'cf7-antispam' ) : __( 'Enable', 'cf7-antispam' ) );
erikyo marked this conversation as resolved.
Show resolved Hide resolved
if ( $checked ) {
echo '<a class="button" href="' . esc_url_raw( admin_url( 'admin.php?page=cf7-antispam' ) ) . '">Settings Page</a>';
}
Expand Down