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 |
---|---|
1070 | $actions['delete'] = "<a class='submitdelete' title='" . esc_attr__( 'Delete this item permanently' ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; |
1071 | } |
1072 |
|
1073 | if ( $post_type_object->public ) { |
1074 | $title = _draft_or_post_title(); |
1075 | if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) { |
1076 | if ( $can_edit_post ) { |
1077 | $preview_link = set_url_scheme( get_permalink( $post->ID ) ); |
1078 | /** This filter is documented in wp-admin/includes/meta-boxes.php */ |
1079 | $preview_link = apply_filters( 'preview_post_link', add_query_arg( 'preview', 'true', $preview_link ), $post ); |
1080 | $actions['view'] = '<a href="' . esc_url( $preview_link ) . '" title="' . esc_attr( sprintf( __( 'Preview “%s”' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>'; |
1081 | } |
1082 | } elseif ( 'trash' != $post->post_status ) { |
1083 | $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”' ), $title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>'; |
1084 | } |
1085 | } |
1086 |
|
1087 | if ( is_post_type_hierarchical( $post->post_type ) ) { |
1088 |
|