wp_get_attachment_id3_keys( WP_Post $attachment, string $context = ‘display’ ): string[]

In this article

Returns useful keys to use to lookup data from an attachment’s stored metadata.

Parameters

$attachmentWP_Postrequired
The current attachment, provided for context.
$contextstringoptional
The context. Accepts 'edit', 'display'. Default 'display'.

Default:'display'

Return

string[] Key/value pairs of field keys to labels.

Source

		<div class="wp-playlist-current-item"></div>
	<?php endif; ?>
	<<?php echo $safe_type; ?> controls="controls" preload="none" width="<?php echo (int) $theme_width; ?>"
		<?php
		if ( 'video' === $safe_type ) {
			echo ' height="', (int) $theme_height, '"';
		}
		?>
	></<?php echo $safe_type; ?>>
	<div class="wp-playlist-next"></div>
	<div class="wp-playlist-prev"></div>
	<noscript>
	<ol>
		<?php
		foreach ( $attachments as $att_id => $attachment ) {
			printf( '<li>%s</li>', wp_get_attachment_link( $att_id ) );
		}
		?>
	</ol>
	</noscript>
	<script type="application/json" class="wp-playlist-script"><?php echo wp_json_encode( $data ); ?></script>
</div>
	<?php
	return ob_get_clean();
}
add_shortcode( 'playlist', 'wp_playlist_shortcode' );

Changelog

VersionDescription
3.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.