Skip to content

Commit 6a20d03

Browse files
committed
deploy: 5dccffb
1 parent abd66ee commit 6a20d03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wp-accessibility-stats.php.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
if ( $admin_only && ! current_user_can( 'manage_options' ) ) {
105105
return;
106106
}
107-
$stats = json_encode( $stats );
107+
$stats = wp_json_encode( $stats );
108108
$title = str_replace( home_url(), '', $title );
109109
$exists = wpa_get_post_by_title( $title );
110110
if ( $exists ) {
@@ -130,7 +130,7 @@
130130
// If decode fails for any reason, move on, don't try to unset the timestamp.
131131
$test_old->timestamp = '';
132132
}
133-
if ( json_encode( $test_stats ) !== json_encode( $test_old ) ) {
133+
if ( wp_json_encode( $test_stats ) !== wp_json_encode( $test_old ) ) {
134134
add_post_meta( $exists, '_wpa_old_event', array( $test_stats, $test_old ) );
135135
// stats have changed; record the change.
136136
add_post_meta( $exists, '_wpa_event', $stats );
@@ -159,7 +159,7 @@
159159
$terms = array( $type );
160160
require_once ABSPATH . '/wp-admin/includes/dashboard.php';
161161
$browser = wp_check_browser_version();
162-
add_post_meta( $stat, '_wpa_browser', json_encode( $browser ) );
162+
add_post_meta( $stat, '_wpa_browser', wp_json_encode( $browser ) );
163163
$terms[] = $browser['name'];
164164
$terms[] = $browser['platform'];
165165
wp_set_object_terms( $stat, $terms, 'wpa-stats-type' );

0 commit comments

Comments
 (0)