Versioning a plugin’s REST API: v1 and v2 side by side Once an app, a theme or another site uses a plugin’s REST routes, changing what they return breaks them. Core solves it with versions in the namespace (wp/v2), and a plugin can do the same: keep ha/v1 exactly as it is, add ha/v2 with…
Cookies in WordPress: set, read and delete them safely A dismissed banner, a list or grid view, the last visited category: small preferences like these are often stored in a cookie. PHP’s setcookie() does the job, but in WordPress there are details to get right: when to call it, which path and domain to use,…