#61862 closed defect (bug) (fixed)
Redundant code and potential inaccurate check in script-loader.php
| Reported by: | MattyRob | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.7 |
| Component: | Script Loader | Version: | 5.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description (last modified by )
Since [44651] removed the build steps for a gzipped version of TinyMCE that has remained code in script-loader.php that checks if gzip is supported on the server, these checks are redundant and superfluous.
They may also result in the uncompressed files being used when the compressed files are available and could be used.
$compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed;
can are replaced with:
$compressed = $compress_scripts && $concatenate_scripts && ! $force_uncompressed;
The documentation further down may also need updating.
Change History (9)
This ticket was mentioned in PR #7191 on WordPress/wordpress-develop by @hbhalodia.
2 years ago
#1
- Keywords has-patch added
#4
@
2 years ago
@hbhalodia - patch looks good but inline documentation further down still references wp-tinymce.js.gz so that many also need adjusting.
#6
@
2 years ago
Hi @MattyRob @SergeyBiryukov, I have updated the inline documentation to not reference the gz. Can you please take a look if that is needs to be updated?
Thank You,
@SergeyBiryukov commented on PR #7191:
2 years ago
#9
Thanks for the PR! Merged in r58902.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/61862