Фронтенд-архитектура плагина WP Rocket
★ 6.9 · web-development
Plugin Frontend Architecture is a Claude Code skill that enforces rules for writing and modifying JavaScript, CSS, and Twig templates inside WP Rocket's admin UI. Reach for it when you need to add a new settings control to the plugin interface, restyle the options page, wire up a new JS module, or understand why inline event handlers are off-limits in this codebase. The skill covers: no jQuery — native DOM APIs only; no inline handlers — addEventListener exclusively; no unsafe innerHTML — use textContent or createElement instead; event delegation for dynamically loaded admin content. Templates live in views/, scripts in assets/js/, styles in assets/css/. PHP data is passed to JS via wp_localize_script, nonces are always localized and never hardcoded, and new JS entry points must be registered through a Subscriber. REST calls use native fetch with a localized nonce; legacy admin-ajax.php calls use wp.ajax; errors are always handled explicitly — no silent failures. The direction is frontend work inside an existing WP Rocket installation, not general WordPress plugin development from scratch. A good fit for teams maintaining or extending WP Rocket; not applicable if the project is unrelated to this plugin.
- #wordpress
- #wp-rocket
- #frontend
- #javascript
- #css
- #admin-ui
- #twig