You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 518cd65
Browse filesBrowse the repository at this point in the historyBrowse files
Script Loader: Remove the unused compression test.
The compression test ran on admin screens until it stored its result in the `can_compress_scripts` option, but that result has had no effect since PHP compression was removed from `load-scripts.php` and `load-styles.php` in r43580, and the last code reading it was removed in r64485. The test also failed with a 400 error when `admin_url()` was filtered to add a query string, as translation plugins do, since it appended a second `?` to the AJAX URL. Users without `manage_options` were sent the test on every admin page, since the AJAX handler rejected their requests and the option was never set. Rather than fixing the URL, the test is removed.
The `compression_test()` and `wp_ajax_wp_compression_test()` functions are deprecated as no-ops so that existing callers do not cause fatal errors, and the `wp-compression-test` AJAX action is no longer registered. On single sites, the option is already deleted on a database upgrade since it is in the list of unused options. On multisite it is a network option, so it is no longer primed and is now deleted by `upgrade_network()`, with the database version bumped for that step.
Developed in WordPress#14412.
Follow-up to r10357, r43580, r64485.
Props azaozz, juzar, tofandel, szepeviktor, irozum, oglekler, peterwilsoncc, westonruter.
See #57548, #63017.
Fixes #58302, #65750, #65980.
git-svn-id: https://develop.svn.wordpress.org/trunk@64486 602fd350-edb4-49c9-b593-d223f7449a82
$test_str = '"wpCompressionTest Lorem ipsum dolor sit amet consectetuer mollis sapien urna ut a. Eu nonummy condimentum fringilla tempor pretium platea vel nibh netus Maecenas. Hac molestie amet justo quis pellentesque est ultrices interdum nibh Morbi. Cras mattis pretium Phasellus ante ipsum ipsum ut sociis Suspendisse Lorem. Ante et non molestie. Porta urna Vestibulum egestas id congue nibh eu risus gravida sit. Ac augue auctor Ut et non a elit massa id sodales. Elit eu Nulla at nibh adipiscing mattis lacus mauris at tempus. Netus nibh quis suscipit nec feugiat eget sed lorem et urna. Pellentesque lacus at ut massa consectetuer ligula ut auctor semper Pellentesque. Ut metus massa nibh quam Curabitur molestie nec mauris congue. Volutpat molestie elit justo facilisis neque ac risus Ut nascetur tristique. Vitae sit lorem tellus et quis Phasellus lacus tincidunt nunc Fusce. Pharetra wisi Suspendisse mus sagittis libero lacinia Integer consequat ac Phasellus. Et urna ac cursus tortor aliquam Aliquam amet tellus volutpat Vestibulum. Justo interdum condimentum In augue congue tellus sollicitudin Quisque quis nibh."';
207
-
208
-
if ( '1' === $_GET['test'] ) {
209
-
echo$test_str;
210
-
wp_die();
211
-
} elseif ( '2' === $_GET['test'] ) {
212
-
if ( ! isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
0 commit comments