media_meta filter-hookWP 2.5.0

Filters the media metadata.

Usage

add_filter( 'media_meta', 'wp_kama_media_meta_filter', 10, 2 );

/**
 * Function for `media_meta` filter-hook.
 * 
 * @param string  $media_dims The HTML markup containing the media dimensions.
 * @param WP_Post $post       The WP_Post attachment object.
 *
 * @return string
 */
function wp_kama_media_meta_filter( $media_dims, $post ){

	// filter...
	return $media_dims;
}
$media_dims(string)
The HTML markup containing the media dimensions.
$post(WP_Post)
The WP_Post attachment object.

Changelog

Since 2.5.0 Introduced.

Where the hook is called

get_media_item()
media_meta
get_compat_media_markup()
media_meta
attachment_submitbox_metadata()
media_meta
wp-admin/includes/media.php 1661
$media_dims = apply_filters( 'media_meta', $media_dims, $post );
wp-admin/includes/media.php 1933
$media_meta = apply_filters( 'media_meta', '', $post );
wp-admin/includes/media.php 3285
$media_dims = apply_filters( 'media_meta', $media_dims, $post );

Where the hook is used in WordPress

Usage not found.