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

  1. if ( !function_exists( 'attachment_id3_data_meta_box' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/meta-boxes.php'; 
  3.  
  4. // A post object. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = attachment_id3_data_meta_box($post); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/meta-boxes.php  
  1. function attachment_id3_data_meta_box( $post ) { 
  2. $meta = array(); 
  3. if ( ! empty( $post->ID ) ) { 
  4. $meta = wp_get_attachment_metadata( $post->ID ); 
  5.  
  6. foreach ( wp_get_attachment_id3_keys( $post, 'edit' ) as $key => $label ) : ?> 
  7. <p> 
  8. <label for="title"><?php echo $label ?></label><br /> 
  9. <input type="text" name="id3_<?php echo esc_attr( $key ) ?>" id="id3_<?php echo esc_attr( $key ) ?>" class="large-text" value="<?php 
  10. if ( ! empty( $meta[ $key ] ) ) { 
  11. echo esc_attr( $meta[ $key ] ); 
  12. ?>" /> 
  13. </p> 
  14. <?php 
  15. endforeach;