Plugin API/Action Reference/init

来自WordPress中文文档
跳转至: 导航搜索

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.

includeonlydiv style=clear:both; background-color:#FAEBD7; border:1px solid #CCCCCC; color:#000000; padding:7px; margin:0.5em auto 0.5em auto; vertical-align:middle;This page is marked as incomplete. You can help Codex by expanding it./div/includeonlynoinclude

Description

This Template is used by Codex:Template Messages.

Usage

pre 检查到模板循环:模板:Message /pre

Result

检查到模板循环:模板:Message

/noinclude