Namespaced code can import classes with use, but until 5.6 functions and constants had no equivalent. Calling a namespaced function meant either fully qualifying it every time or…
A nonce proves the request came from a form your site rendered, recently. It says nothing about whether the person submitting it is allowed to perform the action…
$wpdb->prepare() looks like sprintf() and behaves differently in the one way that matters: %s adds the surrounding quotes itself. Writing them by hand produces a doubly-quoted value and…
MySQL’s utf8 encodes at most three bytes per character. Real UTF-8 needs four for anything above the basic plane, which is where emoji and a good deal of…
CSV is not a format you should parse with explode() — quoted fields containing the delimiter, and escaped quotes inside those, break it immediately. fgetcsv() handles all of…
The two caching APIs in WordPress look interchangeable and are not. wp_cache_* is per-request by default and lives only for that request unless a persistent backend is installed.…
Configuration files are read top to bottom, so location blocks look like they are evaluated that way. They are not: nginx picks the longest matching prefix, then lets…