WordPress at a glance
function is not described

getid3_id3v1::GenerateID3v1Tag() public WP 1.0

{} It's a method of the class: getid3_id3v1{}

No Hooks.

Return

String. Nothing.

Usage

$result = getid3_id3v1::GenerateID3v1Tag( $title, $artist, $album, $year, $genreid, $comment, $track );
$title(string) (required)
-
$artist(string) (required)
-
$album(string) (required)
-
$year(string) (required)
-
$genreid(int) (required)
-
$comment(string) (required)
-
$track *(int string)*

Code of getid3_id3v1::GenerateID3v1Tag() WP 5.7.2

<?php
public static function GenerateID3v1Tag($title, $artist, $album, $year, $genreid, $comment, $track='') {
	$ID3v1Tag  = 'TAG';
	$ID3v1Tag .= str_pad(trim(substr($title,  0, 30)), 30, "\x00", STR_PAD_RIGHT);
	$ID3v1Tag .= str_pad(trim(substr($artist, 0, 30)), 30, "\x00", STR_PAD_RIGHT);
	$ID3v1Tag .= str_pad(trim(substr($album,  0, 30)), 30, "\x00", STR_PAD_RIGHT);
	$ID3v1Tag .= str_pad(trim(substr($year,   0,  4)),  4, "\x00", STR_PAD_LEFT);
	if (!empty($track) && ($track > 0) && ($track <= 255)) {
		$ID3v1Tag .= str_pad(trim(substr($comment, 0, 28)), 28, "\x00", STR_PAD_RIGHT);
		$ID3v1Tag .= "\x00";
		if (gettype($track) == 'string') {
			$track = (int) $track;
		}
		$ID3v1Tag .= chr($track);
	} else {
		$ID3v1Tag .= str_pad(trim(substr($comment, 0, 30)), 30, "\x00", STR_PAD_RIGHT);
	}
	if (($genreid < 0) || ($genreid > 147)) {
		$genreid = 255; // 'unknown' genre
	}
	switch (gettype($genreid)) {
		case 'string':
		case 'integer':
			$ID3v1Tag .= chr(intval($genreid));
			break;
		default:
			$ID3v1Tag .= chr(255); // 'unknown' genre
			break;
	}

	return $ID3v1Tag;
}