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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
1291 | /** |
1292 | * Filter the arguments used to retrieve an image for the edit image form. |
1293 | * |
1294 | * @since 3.1.0 |
1295 | * |
1296 | * @see get_media_item |
1297 | * |
1298 | * @param array $args An array of arguments. |
1299 | */ |
1300 | $args = apply_filters( 'get_media_item_args', $args ); |
1301 | extract( $args, EXTR_SKIP ); |
1302 |
|
1303 | $toggle_on = __( 'Show' ); |
1304 | $toggle_off = __( 'Hide' ); |
1305 |
|
1306 | $filename = esc_html( wp_basename( $post->guid ) ); |
1307 | $title = esc_attr( $post->post_title ); |
1308 |
|
1309 | if ( $_tags = get_the_tags( $attachment_id ) ) { |
Line | Code |
1519 | 'errors' => null, |
1520 | 'in_modal' => false, |
1521 | ); |
1522 |
|
1523 | $user_can_edit = current_user_can( 'edit_post', $attachment_id ); |
1524 |
|
1525 | $args = wp_parse_args( $args, $default_args ); |
1526 |
|
1527 | /** This filter is documented in wp-admin/includes/media.php */ |
1528 | $args = apply_filters( 'get_media_item_args', $args ); |
1529 |
|
1530 | $form_fields = array(); |
1531 |
|
1532 | if ( $args['in_modal'] ) { |
1533 | foreach ( get_attachment_taxonomies($post) as $taxonomy ) { |
1534 | $t = (array) get_taxonomy($taxonomy); |
1535 | if ( ! $t['public'] || ! $t['show_ui'] ) |
1536 | continue; |
1537 | if ( empty($t['label']) ) |