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 |
---|---|
2479 | * @param array $fields { |
2480 | * An array of the attachment metadata keys and labels. |
2481 | * |
2482 | * @type string 'mime_type' Label to be shown before the field mime_type. |
2483 | * @type string 'year' Label to be shown before the field year. |
2484 | * @type string 'genre' Label to be shown before the field genre. |
2485 | * @type string 'length_formatted' Label to be shown before the field length_formatted. |
2486 | * } |
2487 | */ |
2488 | $fields = apply_filters( 'media_submitbox_misc_sections', array( |
2489 | 'mime_type' => __( 'Mime-type:' ), |
2490 | 'year' => __( 'Year:' ), |
2491 | 'genre' => __( 'Genre:' ), |
2492 | 'length_formatted' => __( 'Length:' ), |
2493 | ) ); |
2494 |
|
2495 | foreach ( $fields as $key => $label ): |
2496 | if ( ! empty( $meta[$key] ) ) : ?> |
2497 | <div class="misc-pub-section misc-pub-mime-meta misc-pub-<?php echo sanitize_html_class( $key ); ?>"> |