Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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-01-31T16:39:29.000Z (15 days ago)
- Last Synced: 2025-02-05T18:08:53.520Z (10 days ago)
- Language: PHP
- Homepage: https://wp-rocket.me/support/
- Size: 4.35 MB
- Stars: 207
- Watchers: 53
- Forks: 70
- Open Issues: 34
-
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