diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 58734452f9..4da1878051 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -197,8 +197,10 @@ function wp_ajax_wp_compression_test() { echo $out; wp_die(); } elseif ( 'no' == $_GET['test'] ) { + check_ajax_referer( 'update_can_compress_scripts' ); update_site_option('can_compress_scripts', 0); } elseif ( 'yes' == $_GET['test'] ) { + check_ajax_referer( 'update_can_compress_scripts' ); update_site_option('can_compress_scripts', 1); } } diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index e65c7d0f23..42a57eef16 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -1784,6 +1784,7 @@ function _media_states( $post ) { function compression_test() { ?>