Contributing
If you plan to contribute or extend the plugin, follow these notes:
- Follow the coding style used in the plugin (see
CLAUDE.mdandcopilot-instructions.mdin repo). - Keep
templatecontext layout-only. A new widget'scontextsarray must not includetemplateif it fetches data (see Page Builder). - Templates render live — there is no compile step to keep in sync. A change to
SANILWB_Frontend_Renderer's render loop affects both real pages and every referenced template at once (see Dynamic Template Widget), so test both when touching it. - When adding AJAX endpoints, follow the existing pattern in
includes/class-sanilwb-ajax.php: nonce checks, capability checks, input sanitization andwp_send_json_*responses.
Local testing
- Use a local WP install and activate the plugin to verify UI changes in the admin and rendered output on the frontend.