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 |
---|---|
12 | * @since unknown |
13 | */ |
14 | define('DOING_AJAX', true); |
15 | define('WP_ADMIN', true); |
16 |
|
17 | require_once('../wp-load.php'); |
18 | require_once('includes/admin.php'); |
19 | @header('Content-Type: text/html; charset=' . get_option('blog_charset')); |
20 |
|
21 | do_action('admin_init'); |
22 |
|
23 | if ( ! is_user_logged_in() ) { |
24 |
|
25 | if ( $_POST['action'] == 'autosave' ) { |
26 | $id = isset($_POST['post_ID'])? (int) $_POST['post_ID'] : 0; |
27 |
|
28 | if ( ! $id ) |
29 | die('-1'); |
30 |
|