WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about media_meta

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-admin/includes/media.php apply_filters 1666 /**
* Filters the media metadata.
*
* @since 2.5.0
*
* @param string $media_dims The HTML markup containing the media dimensions.
* @param WP_Post $post The WP_Post attachment object.
*/
wp-admin/includes/media.php apply_filters 1937 /** This filter is documented in wp-admin/includes/media.php */
$args = apply_filters( 'get_media_item_args', $args );

$form_fields = array();

if ( $args['in_modal'] ) {
foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) {
$t = (array) get_taxonomy( $taxonomy );

if ( ! $t['public'] || ! $t['show_ui'] ) {
continue;
}

if ( empty( $t['label'] ) ) {
$t['label'] = $taxonomy;
}

if ( empty( $t['args'] ) ) {
$t['args'] = array();
}

$terms = get_object_term_cache( $post->ID, $taxonomy );

if ( false === $terms ) {
$terms = wp_get_object_terms( $post->ID, $taxonomy, $t['args'] );
}

$values = array();

foreach ( $terms as $term ) {
$values[] = $term->slug;
}

$t['value'] = implode( ', ', $values );
$t['taxonomy'] = true;

$form_fields[ $taxonomy ] = $t;
}
}

/*
* Merge default fields with their errors, so any key passed with the error
* (e.g. 'error', 'helps', 'value') will replace the default.
* The recursive merge is easily traversed with array casting:
* foreach ( (array) $things as $thing )
*/
wp-admin/includes/media.php apply_filters 3287 /**
* Displays non-editable attachment metadata in the publish meta box.
*
* @since 3.5.0
*/

Hook Parameters

Parameter Type Name Description
string $media_dims The HTML markup containing the media dimensions.
WP_Post $post The WP_Post attachment object.
string $media_dims The HTML markup containing the media dimensions.
WP_Post $post The WP_Post attachment object.
string $media_dims The HTML markup containing the media dimensions.
WP_Post $post The WP_Post attachment object.