Sanitization Callbacks for Settings
Always pass a sanitize_callback to register_setting(). Without one, anyone with the right capability can write arbitrary data into the option.Match the callback to the data: saniti…
Read article →Always pass a sanitize_callback to register_setting(). Without one, anyone with the right capability can write arbitrary data into the option.Match the callback to the data: saniti…
Read article →Check capabilities, never roles. current_user_can('manage_options') survives custom roles; current_user_can('administrator') breaks the first time someone adds a new admin-equivale…
Read article →