The failure mode is not a slow query. It is one option holding a megabyte of serialised data, fetched and unserialised on every request, quietly adding both to…
wp_die() in an AJAX handler sends an HTML error page with a 200 status, so the JavaScript sees a successful response containing markup and fails while parsing it.…
Hooking save_post to react to an order being paid works occasionally and misses every transition made from a payment gateway callback, the REST API or WP-CLI. The status…
The two look interchangeable and differ on whether the key already exists: set() overwrites unconditionally, add() fails and returns false. That failure is the useful part. With a…
WP_POST_REVISIONS is a constant, so it applies to the whole site. A catalogue whose products are updated by a nightly import does not want a revision per product…
An import loop calling wp_insert_post() is doing everything a human clicking Publish does: revisions, term counting, ping status, and every plugin listening on save_post. For ten posts that…
4.4 shipped the REST API infrastructure — the server, the routing, register_rest_route() — and none of the content endpoints. So the function exists on a stock install and…
add_option() takes an autoload argument. update_option() takes one too — and until recently ignored it for an option that already existed, so a plugin that only ever calls…