Skip to content

Commit

Permalink
Fix: deprecated FILTER_SANITIZE_STRING warning
Browse files Browse the repository at this point in the history
  • Loading branch information
burhandodhy committed May 28, 2024
1 parent 11cf010 commit 4d5782e
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 4d5782e

Please sign in to comment.