attachment_id3_data_meta_box
Display fields for ID3 data.
Description
attachment_id3_data_meta_box( (WP_Post) $post );
Parameters (1)
- 0. $post (WP_Post)
- A post object.
Usage
if ( !function_exists( 'attachment_id3_data_meta_box' ) ) { require_once ABSPATH . '/wp-admin/includes/meta-boxes.php'; } // A post object. $post = null; // NOTICE! Understand what this does before running. $result = attachment_id3_data_meta_box($post);
Defined (1)
The function is defined in the following location(s).
- /wp-admin/includes/meta-boxes.php
- 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 ) : ?>
- <p>
- <label for="title"><?php echo $label ?></label><br />
- if ( ! empty( $meta[ $key ] ) ) {
- echo esc_attr( $meta[ $key ] );
- }
- ?>" />
- </p>
- <?php
- endforeach;
- }