https://github.com/wp-media/wp-rocket-helpers
🚀 Helper plugins for specific use cases with WP Rocket. ☝️ TEST BEFORE USE! ☝️
https://github.com/wp-media/wp-rocket-helpers
Last synced: 3 days ago
JSON representation
🚀 Helper plugins for specific use cases with WP Rocket. ☝️ TEST BEFORE USE! ☝️
- Host: GitHub
- URL: https://github.com/wp-media/wp-rocket-helpers
- Owner: wp-media
- License: gpl-2.0
- Created: 2016-09-30T12:36:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-10T16:13:42.000Z (5 days ago)
- Last Synced: 2025-04-12T06:13:25.221Z (3 days ago)
- Language: PHP
- Homepage: https://wp-rocket.me/support/
- Size: 4.4 MB
- Stars: 212
- Watchers: 51
- Forks: 72
- Open Issues: 36
-
Metadata Files:
- Readme: README 2.md
- License: LICENSE
Awesome Lists containing this project
- awesome-wp-speed-up - WP Rocket Helpers - This repository hosts a number of helper plugins that target some specific use cases for WP Rocket. (Caching Helping Plugins)
README
# WP Rocket | Fix encoded characters in the Used CSS
In some cases the Used CSS contains encoded characters, so for example a space " " will be replaced by a "%20" and this causes layout errors. This helper decodes the encoded characters in the Used CSS fixing the issue.
Current replacements:
$css = str_replace('%20', ' ', $css);
$css = str_replace('%7B', '{', $css);
$css = str_replace('%7D', '}', $css);
$css = str_replace('%3E', '>', $css);
$css = str_replace('%3c', '>', $css);
$css = str_replace(' ', ' ', $css);How to use it:
* Check to see if there are more encoded elements, you can search for % in the wpr-usedcss inline style.
* Tweak and onstall the helper
* Clear WP Rocket's cache
Last tested with:
* WP Rocket 3.15.x
* WordPress 6.4.x