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 |
|---|---|
| 1048 | $thumb_url = $thumb_url[0]; |
| 1049 | else |
| 1050 | $thumb_url = false; |
| 1051 | |
| 1052 | $post = get_post( $attachment_id ); |
| 1053 | $current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0; |
| 1054 | |
| 1055 | $default_args = array( 'errors' => null, 'send' => $current_post_id ? post_type_supports( get_post_type( $current_post_id ), 'editor' ) : true, 'delete' => true, 'toggle' => true, 'show_title' => true ); |
| 1056 | $args = wp_parse_args( $args, $default_args ); |
| 1057 | $args = apply_filters( 'get_media_item_args', $args ); |
| 1058 | extract( $args, EXTR_SKIP ); |
| 1059 | |
| 1060 | $toggle_on = __( 'Show' ); |
| 1061 | $toggle_off = __( 'Hide' ); |
| 1062 | |
| 1063 | $filename = esc_html( basename( $post->guid ) ); |
| 1064 | $title = esc_attr( $post->post_title ); |
| 1065 | |
| 1066 | if ( $_tags = get_the_tags( $attachment_id ) ) { |