Fill in these first
- What the shortcode shows: [e.g. today's store timings and a closed-on-holidays notice]
- Shortcode name and attributes: [e.g. store_hours with branch and style]
- Where the data comes from: [e.g. a custom post type, an options page, a remote JSON feed]
- How fresh it must be: [e.g. refresh every 30 minutes]
- PHP and WordPress versions on the site: [paste]
Template to complete
Plugin header
Name, description, version and text domain.
Attribute handling
Defaults with shortcode_atts, then each attribute sanitised for its type.
Data fetch
The query or remote request, wrapped in a transient with the chosen expiry, and a clear failure path.
Output
Markup built with escaping on every value, returned as a string and never echoed.
Usage
Three examples an editor can paste, with what each shows.
Rules
- Escape late: esc_html, esc_attr and esc_url at the point of output.
- Prefix every function and option name to avoid clashes.
- No SQL built by joining strings; use prepared queries if a direct query is needed.
- The page still renders if the data source is down.






