Skip to the content.

Global Namespaces

Sometimes we need to execute code in a global namespace in PHP or JavaScript, or key data in databases and caches in environments we don’t control.

Common database keys like api_url, plugin_config or system_status could be set by another codebase – so we need to be defensive with our naming.

General Best Practice

Examples

The notable exception being something well-prefixed where the nfd is overly-verbose:

wp-plugin-bluehost-admin is a fine asset handle, a nfd- prefix is overkill.