Displays non-editable attachment metadata in the publish metabox

Signature

attachment_submitbox_metadata()

Return

(void)

Source

function attachment_submitbox_metadata() {
	$post = get_post();

	$filename = esc_html( wp_basename( $post->guid ) );

	$media_dims = '';
	$meta = wp_get_attachment_metadata( $post->ID );
	if ( isset( $meta['width'], $meta['height'] ) )
		$media_dims .= "<span id='media-dims-$post->ID'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> ";
	/** This filter is documented in wp-admin/includes/media.php */
	$media_dims = apply_filters( 'media_meta', $media_dims, $post );

	$att_url = wp_get_attachment_url( $post->ID );
?>
	<div class="misc-pub-section misc-pub-attachment">
			<label for="attachment_url"><?php _e( 'File URL:' ); ?></label>
			<input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" value="<?php echo esc_attr($att_url); ?>" />
	</div>
	<div class="misc-pub-section misc-pub-filename">
		<?php _e( 'File name:' ); ?> <strong><?php echo $filename; ?></strong>
108 more lines...
WP Trac GitHub

Link here