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 |
---|---|
1556 | check_ajax_referer( 'update-' . $post->post_type . '_' . $post_id ); |
1557 |
|
1558 | if ( ! current_user_can( 'edit_post', $post_id ) ) |
1559 | die( '-1' ); |
1560 |
|
1561 | $active_lock = array_map( 'absint', explode( ':', $_POST['active_post_lock'] ) ); |
1562 | if ( $active_lock[1] != get_current_user_id() ) |
1563 | die( '0' ); |
1564 |
|
1565 | $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', AUTOSAVE_INTERVAL * 2 ) + 5 ) . ':' . $active_lock[1]; |
1566 | update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) ); |
1567 | die( '1' ); |
1568 | case 'dismiss-wp-pointer' : |
1569 | $pointer = $_POST['pointer']; |
1570 | if ( $pointer != sanitize_key( $pointer ) ) |
1571 | die( '0' ); |
1572 |
|
1573 | // check_ajax_referer( 'dismiss-pointer_' . $pointer ); |
1574 |
|