Thank you, David.
I think you can add published, duration, channelid, channeltitle.
I’m sorry that I advise you what to do with your code, but I thinks it’s better to explain what do I mean.
I’d add to api-access.php:
$return_data = array(
….
‘channelid’ => ”,
‘channeltitle’ => ”,
‘duration’ => ”,
)
and
if ( isset( $api_data[‘snippet’][‘channelId’] ) ) {
$return_data[‘channelid’] = htmlspecialchars( $api_data[‘snippet’][‘channelId’] );
}
if ( isset( $api_data[‘snippet’][‘channelTitle’] ) ) {
$return_data[‘channeltitle’] = htmlspecialchars( $api_data[‘snippet’][‘channelTitle’] );
}
if ( isset( $api_data[‘contentDetails’][‘duration’] ) ) {
$return_data[‘duration’] = htmlspecialchars( $api_data[‘contentDetails’][‘duration’] );
}`
and to generate-other-code.php :
$output = str_ireplace( ‘%published%’, $data[‘published’], $output );
$output = str_ireplace( ‘%channelid%’, $data[‘channelid’], $output );
$output = str_ireplace( ‘%channeltitle%’, $data[‘channeltitle’], $output );
$output = str_ireplace( ‘%duration%’, $data[‘duration’], $output );
probably would change all str_replace to str_ireplace.
I’m sorry :)))