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 |
---|---|
3452 | $post_states[] = __('Private'); |
3453 | if ( 'draft' == $post->post_status && 'draft' != $post_status ) |
3454 | $post_states[] = __('Draft'); |
3455 | if ( 'pending' == $post->post_status && 'pending' != $post_status ) |
3456 | /* translators: post state */ |
3457 | $post_states[] = _x('Pending', 'post state'); |
3458 | if ( is_sticky($post->ID) ) |
3459 | $post_states[] = __('Sticky'); |
3460 |
|
3461 | $post_states = apply_filters( 'display_post_states', $post_states ); |
3462 |
|
3463 | if ( ! empty($post_states) ) { |
3464 | $state_count = count($post_states); |
3465 | $i = 0; |
3466 | echo ' - '; |
3467 | foreach ( $post_states as $state ) { |
3468 | ++$i; |
3469 | ( $i == $state_count ) ? $sep = '' : $sep = ', '; |
3470 | echo "<span class='post-state'>$state$sep</span>"; |