You decide which snippets go into the Scripts Organizer library for one-click import. Every snippet below is tested and ready; it moves into the library when it collects 10 votes. One vote per snippet per person.
15 snippets up for a vote, page 1 of 2.
Add Tailwind v4 to a WordPress Block Theme Without a Plugin
Integrate Tailwind v4 with a WordPress block theme without a plugin: theme.json colors as Tailwind classes, scanned templates, styles in the editor.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
1 of 10 votes
Lock the Publish Button but Allow Save Draft in WordPress
Lock the Publish button in WordPress until a featured image is set, while Save Draft keeps working. Enforced in the editor and the REST API.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
PHP 8 Attributes Example: Register WordPress Hooks
A PHP 8 attributes example for WordPress: put #[Dpc_Hook] on class methods and one small registrar wires every action and filter for you.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
Tailwind v4 Design Tokens From WordPress theme.json
Generate Tailwind v4 design tokens from WordPress theme.json presets, so bg-primary and text-large use the same CSS variables as the block editor.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
WordPress Enqueue Script Example for wp-scripts Builds
A WordPress enqueue script example for @wordpress/scripts builds: reads index.asset.php for dependencies and version, loads CSS, RTL and JS translations.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
WordPress theme.json Button Hover, Focus and Active Styles
Add hover, focus-visible and active states to every WordPress block theme button through theme.json data, without editing the theme's files.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
WordPress Clear Transients With One Admin Bar Button
Clear all WordPress transients from the admin bar with one click: nonce-checked, admin-only, safe with or without a persistent object cache.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
WP CLI List Cron Jobs in WordPress With Overdue Events
A WP-CLI command that lists WordPress cron jobs and flags overdue events and hooks with no callback. Add –strict and it can fail a deploy check.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
WordPress Nonce Lifetime: Change Expiration per Action
Change the WordPress nonce lifetime for individual actions: shorter for risky admin actions, longer for cached front-end forms, without touching the rest.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
WordPress REST API Restricted to Authenticated Users
Restrict the WordPress REST API to logged-in users with one filter. Keep an allowlist of public routes such as oEmbed or the WooCommerce Store API.
Snippet poll. Should this snippet be in the Scripts Organizer library for one-click import? 10 votes put it there.
0 of 10 votes
