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 |
---|---|
1038 | $thumb_url = $thumb_url[0]; |
1039 | else |
1040 | $thumb_url = false; |
1041 |
|
1042 | $post = get_post( $attachment_id ); |
1043 | $current_post_id = !empty( $_GET['post_id'] ) ? (int) $_GET['post_id'] : 0; |
1044 |
|
1045 | $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 ); |
1046 | $args = wp_parse_args( $args, $default_args ); |
1047 | $args = apply_filters( 'get_media_item_args', $args ); |
1048 | extract( $args, EXTR_SKIP ); |
1049 |
|
1050 | $toggle_on = __( 'Show' ); |
1051 | $toggle_off = __( 'Hide' ); |
1052 |
|
1053 | $filename = esc_html( basename( $post->guid ) ); |
1054 | $title = esc_attr( $post->post_title ); |
1055 |
|
1056 | if ( $_tags = get_the_tags( $attachment_id ) ) { |