Un motore di ricerca WordPress per sviluppatori e autori di temi



attachment_id3_data_meta_box ›

Da3.9.0
Deprecaton/a
attachment_id3_data_meta_box ( $post )
Parametri:
  • (WP_Post) $post A post object.
    Richiesto:
Definito a:
Codex:

Display fields for ID3 data



Sorgenti

function attachment_id3_data_meta_box( $post ) {
	$meta = array();
	if ( ! empty( $post->ID ) ) {
		$meta = wp_get_attachment_metadata( $post->ID );
	}

	foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) :
		$value = '';
		if ( ! empty( $meta[ $key ] ) ) {
			$value = $meta[ $key ];
		}
		?>
	<p>
		<label for="title"><?php echo $label; ?></label><br />
		<input type="text" name="id3_<?php echo esc_attr( $key ); ?>" id="id3_<?php echo esc_attr( $key ); ?>" class="large-text" value="<?php echo esc_attr( $value ); ?>" />
	</p>
		<?php
	endforeach;
}