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

Fix: deprecated FILTER_SANITIZE_STRING warning #68

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
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
8 changes: 4 additions & 4 deletions classes/class-wp-nr-dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct() {
* Save settings
*/
public function save_settings() {
$nonce = filter_input( INPUT_POST, 'wp_nr_settings', FILTER_SANITIZE_STRING );
$nonce = filter_input( INPUT_POST, 'wp_nr_settings', FILTER_SANITIZE_SPECIAL_CHARS );

if ( wp_verify_nonce( $nonce, 'wp_nr_settings' ) ) {
$capture_url = filter_input( INPUT_POST, 'wp_nr_capture_urls' );
Expand Down Expand Up @@ -75,7 +75,7 @@ public function dashboard_page() {
$is_capture = WP_NR_Helper::is_capture_url();
?>
<div class="wrap">
<h1><?php esc_html_e( 'New Relic for WordPress', 'wp-newrelic' ) ?></h1>
<h1><?php esc_html_e( 'New Relic for WordPress', 'wp-newrelic' ); ?></h1>
<form method="post" action="">
<?php
wp_nonce_field( 'wp_nr_settings', 'wp_nr_settings' );
Expand All @@ -84,8 +84,8 @@ public function dashboard_page() {
<tr>
<th scope="row"><label for="wp_nr_capture_urls"><?php esc_html_e( 'Capture URL Parameters', 'wp-newrelic' ); ?></label></th>
<td>
<input type="checkbox" name="wp_nr_capture_urls" <?php checked( true, $is_capture ) ?>>
<p class="description"><?php esc_html_e( 'Enable this to record parameter passed to PHP script via the URL (everything after the "?" in the URL).', 'wp-newrelic' ) ?></p>
<input type="checkbox" name="wp_nr_capture_urls" <?php checked( true, $is_capture ); ?>>
<p class="description"><?php esc_html_e( 'Enable this to record parameter passed to PHP script via the URL (everything after the "?" in the URL).', 'wp-newrelic' ); ?></p>
</td>
</tr>
</table>
Expand Down
Loading