WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

getid3_quicktime::CopyToAppropriateCommentsSection() public WP 1.0

Это метод класса: getid3_quicktime{}

Хуков нет.

Возвращает

true/false.

Использование

$getid3_quicktime = new getid3_quicktime();
$getid3_quicktime->CopyToAppropriateCommentsSection( $keyname, $data, $boxname );
$keyname(строка) (обязательный)
$data(строка/массив) (обязательный)
$boxname(строка)

По умолчанию: ''

Код getid3 quicktime::CopyToAppropriateCommentsSection: wp-includes/ID3/module.audio-video.quicktime.php WP 5.5.1

<?php
public function CopyToAppropriateCommentsSection($keyname, $data, $boxname='') {
	static $handyatomtranslatorarray = array();
	if (empty($handyatomtranslatorarray)) {
		// http://www.geocities.com/xhelmboyx/quicktime/formats/qtm-layout.txt
		// http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt
		// http://atomicparsley.sourceforge.net/mpeg-4files.html
		// https://code.google.com/p/mp4v2/wiki/iTunesMetadata
		$handyatomtranslatorarray["\xA9".'alb'] = 'album';               // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'ART'] = 'artist';
		$handyatomtranslatorarray["\xA9".'art'] = 'artist';              // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'aut'] = 'author';
		$handyatomtranslatorarray["\xA9".'cmt'] = 'comment';             // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'com'] = 'comment';
		$handyatomtranslatorarray["\xA9".'cpy'] = 'copyright';
		$handyatomtranslatorarray["\xA9".'day'] = 'creation_date';       // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'dir'] = 'director';
		$handyatomtranslatorarray["\xA9".'ed1'] = 'edit1';
		$handyatomtranslatorarray["\xA9".'ed2'] = 'edit2';
		$handyatomtranslatorarray["\xA9".'ed3'] = 'edit3';
		$handyatomtranslatorarray["\xA9".'ed4'] = 'edit4';
		$handyatomtranslatorarray["\xA9".'ed5'] = 'edit5';
		$handyatomtranslatorarray["\xA9".'ed6'] = 'edit6';
		$handyatomtranslatorarray["\xA9".'ed7'] = 'edit7';
		$handyatomtranslatorarray["\xA9".'ed8'] = 'edit8';
		$handyatomtranslatorarray["\xA9".'ed9'] = 'edit9';
		$handyatomtranslatorarray["\xA9".'enc'] = 'encoded_by';
		$handyatomtranslatorarray["\xA9".'fmt'] = 'format';
		$handyatomtranslatorarray["\xA9".'gen'] = 'genre';               // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'grp'] = 'grouping';            // iTunes 4.2
		$handyatomtranslatorarray["\xA9".'hst'] = 'host_computer';
		$handyatomtranslatorarray["\xA9".'inf'] = 'information';
		$handyatomtranslatorarray["\xA9".'lyr'] = 'lyrics';              // iTunes 5.0
		$handyatomtranslatorarray["\xA9".'mak'] = 'make';
		$handyatomtranslatorarray["\xA9".'mod'] = 'model';
		$handyatomtranslatorarray["\xA9".'nam'] = 'title';               // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'ope'] = 'composer';
		$handyatomtranslatorarray["\xA9".'prd'] = 'producer';
		$handyatomtranslatorarray["\xA9".'PRD'] = 'product';
		$handyatomtranslatorarray["\xA9".'prf'] = 'performers';
		$handyatomtranslatorarray["\xA9".'req'] = 'system_requirements';
		$handyatomtranslatorarray["\xA9".'src'] = 'source_credit';
		$handyatomtranslatorarray["\xA9".'swr'] = 'software';
		$handyatomtranslatorarray["\xA9".'too'] = 'encoding_tool';       // iTunes 4.0
		$handyatomtranslatorarray["\xA9".'trk'] = 'track_number';
		$handyatomtranslatorarray["\xA9".'url'] = 'url';
		$handyatomtranslatorarray["\xA9".'wrn'] = 'warning';
		$handyatomtranslatorarray["\xA9".'wrt'] = 'composer';
		$handyatomtranslatorarray['aART'] = 'album_artist';
		$handyatomtranslatorarray['apID'] = 'purchase_account';
		$handyatomtranslatorarray['catg'] = 'category';            // iTunes 4.9
		$handyatomtranslatorarray['covr'] = 'picture';             // iTunes 4.0
		$handyatomtranslatorarray['cpil'] = 'compilation';         // iTunes 4.0
		$handyatomtranslatorarray['cprt'] = 'copyright';           // iTunes 4.0?
		$handyatomtranslatorarray['desc'] = 'description';         // iTunes 5.0
		$handyatomtranslatorarray['disk'] = 'disc_number';         // iTunes 4.0
		$handyatomtranslatorarray['egid'] = 'episode_guid';        // iTunes 4.9
		$handyatomtranslatorarray['gnre'] = 'genre';               // iTunes 4.0
		$handyatomtranslatorarray['hdvd'] = 'hd_video';            // iTunes 4.0
		$handyatomtranslatorarray['ldes'] = 'description_long';    //
		$handyatomtranslatorarray['keyw'] = 'keyword';             // iTunes 4.9
		$handyatomtranslatorarray['pcst'] = 'podcast';             // iTunes 4.9
		$handyatomtranslatorarray['pgap'] = 'gapless_playback';    // iTunes 7.0
		$handyatomtranslatorarray['purd'] = 'purchase_date';       // iTunes 6.0.2
		$handyatomtranslatorarray['purl'] = 'podcast_url';         // iTunes 4.9
		$handyatomtranslatorarray['rtng'] = 'rating';              // iTunes 4.0
		$handyatomtranslatorarray['soaa'] = 'sort_album_artist';   //
		$handyatomtranslatorarray['soal'] = 'sort_album';          //
		$handyatomtranslatorarray['soar'] = 'sort_artist';         //
		$handyatomtranslatorarray['soco'] = 'sort_composer';       //
		$handyatomtranslatorarray['sonm'] = 'sort_title';          //
		$handyatomtranslatorarray['sosn'] = 'sort_show';           //
		$handyatomtranslatorarray['stik'] = 'stik';                // iTunes 4.9
		$handyatomtranslatorarray['tmpo'] = 'bpm';                 // iTunes 4.0
		$handyatomtranslatorarray['trkn'] = 'track_number';        // iTunes 4.0
		$handyatomtranslatorarray['tven'] = 'tv_episode_id';       //
		$handyatomtranslatorarray['tves'] = 'tv_episode';          // iTunes 6.0
		$handyatomtranslatorarray['tvnn'] = 'tv_network_name';     // iTunes 6.0
		$handyatomtranslatorarray['tvsh'] = 'tv_show_name';        // iTunes 6.0
		$handyatomtranslatorarray['tvsn'] = 'tv_season';           // iTunes 6.0

		// boxnames:
		/*
		$handyatomtranslatorarray['iTunSMPB']                    = 'iTunSMPB';
		$handyatomtranslatorarray['iTunNORM']                    = 'iTunNORM';
		$handyatomtranslatorarray['Encoding Params']             = 'Encoding Params';
		$handyatomtranslatorarray['replaygain_track_gain']       = 'replaygain_track_gain';
		$handyatomtranslatorarray['replaygain_track_peak']       = 'replaygain_track_peak';
		$handyatomtranslatorarray['replaygain_track_minmax']     = 'replaygain_track_minmax';
		$handyatomtranslatorarray['MusicIP PUID']                = 'MusicIP PUID';
		$handyatomtranslatorarray['MusicBrainz Artist Id']       = 'MusicBrainz Artist Id';
		$handyatomtranslatorarray['MusicBrainz Album Id']        = 'MusicBrainz Album Id';
		$handyatomtranslatorarray['MusicBrainz Album Artist Id'] = 'MusicBrainz Album Artist Id';
		$handyatomtranslatorarray['MusicBrainz Track Id']        = 'MusicBrainz Track Id';
		$handyatomtranslatorarray['MusicBrainz Disc Id']         = 'MusicBrainz Disc Id';

		// http://age.hobba.nl/audio/tag_frame_reference.html
		$handyatomtranslatorarray['PLAY_COUNTER']                = 'play_counter'; // Foobar2000 - https://www.getid3.org/phpBB3/viewtopic.php?t=1355
		$handyatomtranslatorarray['MEDIATYPE']                   = 'mediatype';    // Foobar2000 - https://www.getid3.org/phpBB3/viewtopic.php?t=1355
		*/
	}
	$info = &$this->getid3->info;
	$comment_key = '';
	if ($boxname && ($boxname != $keyname)) {
		$comment_key = (isset($handyatomtranslatorarray[$boxname]) ? $handyatomtranslatorarray[$boxname] : $boxname);
	} elseif (isset($handyatomtranslatorarray[$keyname])) {
		$comment_key = $handyatomtranslatorarray[$keyname];
	}
	if ($comment_key) {
		if ($comment_key == 'picture') {
			// already copied directly into [comments][picture] elsewhere, do not re-copy here
			return true;
		}
		$gooddata = array($data);
		if ($comment_key == 'genre') {
			// some other taggers separate multiple genres with semicolon, e.g. "Heavy Metal;Thrash Metal;Metal"
			$gooddata = explode(';', $data);
		}
		foreach ($gooddata as $data) {
			if (!empty($info['quicktime']['comments'][$comment_key]) && in_array($data, $info['quicktime']['comments'][$comment_key], true)) {
				// avoid duplicate copies of identical data
				continue;
			}
			$info['quicktime']['comments'][$comment_key][] = $data;
		}
	}
	return true;
}