WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
17 | if ( ! isset( $_REQUEST['action'] ) ) |
18 | die('-1'); |
19 |
|
20 | require_once('../wp-load.php'); |
21 |
|
22 | require_once('./includes/admin.php'); |
23 | @header('Content-Type: text/html; charset=' . get_option('blog_charset')); |
24 | send_nosniff_header(); |
25 |
|
26 | do_action('admin_init'); |
27 |
|
28 | if ( ! is_user_logged_in() ) { |
29 |
|
30 | if ( isset( $_POST['action'] ) && $_POST['action'] == 'autosave' ) { |
31 | $id = isset($_POST['post_ID'])? (int) $_POST['post_ID'] : 0; |
32 |
|
33 | if ( ! $id ) |
34 | die('-1'); |
35 |
|