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 |
|---|---|
| 599 | if ( $post_type_object->public ) { |
| 600 | if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { |
| 601 | if ( $can_edit_post ) |
| 602 | $actions['view'] = '<a href="' . esc_url( apply_filters( 'preview_post_link', set_url_scheme( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; |
| 603 | } elseif ( 'trash' != $post->post_status ) { |
| 604 | $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>'; |
| 605 | } |
| 606 | } |
| 607 | |
| 608 | $actions = apply_filters( is_post_type_hierarchical( $post->post_type ) ? 'page_row_actions' : 'post_row_actions', $actions, $post ); |
| 609 | echo $this->row_actions( $actions ); |
| 610 | |
| 611 | get_inline_data( $post ); |
| 612 | echo '</td>'; |
| 613 | break; |
| 614 | |
| 615 | case 'date': |
| 616 | if ( '0000-00-00 00:00:00' == $post->post_date ) { |
| 617 | $t_time = $h_time = __( 'Unpublished' ); |