WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp add id3 tag data

Description

Extracts usable ID3v2, ID3v1, and getID3 data from an array of file metadata and adds it to another array.

  • Comment field (ID3v1)
  • Comment frames (ID3v2)
  • Attached picture MIME type, height, and width (where available)

Parameters

&$metadata
(Array) (required) Array to be filled with metadata. Passed by reference.
Default: None
$data
(Array) (required) File metadata from ID3v2, ID3v1, or getID3.
Default: None

Usage

 <?php wp_add_id3_tag_data$metadata$data ); ?> 

Example

$metadata = array();
if ( ! class_exists( 'getID3' ) ) {
	require( ABSPATH . WPINC . '/ID3/getid3.php' );
}
$id3 = new getID3();
$data = $id3->analyze( $file );
wp_add_id3_tag_data( $metadata, $data );

Change Log

Source File

wp_add_id3_tag_data() is located in wp-admin/includes/media.php.

Related

wp_read_video_metadata, wp_read_audio_metadata

This article is marked as in need of editing. You can help Codex by editing it.