Languages: English • Italiano • (Add your language)
Runs after WordPress has finished loading but before any headers are sent. Useful for intercepting $_GET or $_POST triggers.
For example, to act on $_POST data:add_action('init', 'process_post');
function process_post(){
if(isset($_POST['unique_hidden_field'])) {
// process $_POST data here
}
}
Also load_plugin_textdomain calls should be made during init, otherwise users cannot hook into it.