wp_get_attachment_id3_keys

Advertisement

Summery Summery

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

Syntax Syntax

wp_get_attachment_id3_keys( WP_Post $attachment, string $context = 'display' )

Parameters Parameters

$attachment

(WP_Post) (Required) The current attachment, provided for context.

$context

(string) (Optional) The context. Accepts 'edit', 'display'.

Default value: 'display'

Return Return

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

Source Source

File: wp-includes/media.php

/**
 * Builds the Playlist shortcode output.
 *
 * This implements the functionality of the playlist shortcode for displaying
 * a collection of WordPress audio or video files in a post.
 *
 * @since 3.9.0
 *
 * @global int $content_width
 *
 * @param array $attr {
 *     Array of default playlist attributes.
 *
 *     @type string  $type         Type of playlist to display. Accepts 'audio' or 'video'. Default 'audio'.
 *     @type string  $order        Designates ascending or descending order of items in the playlist.
 *                                 Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type string  $orderby      Any column, or columns, to sort the playlist. If $ids are
 *                                 passed, this defaults to the order of the $ids array ('post__in').
 *                                 Otherwise default is 'menu_order ID'.
 *     @type int     $id           If an explicit $ids array is not present, this parameter
 *                                 will determine which attachments are used for the playlist.
 *                                 Default is the current post ID.
 *     @type array   $ids          Create a playlist out of these explicit attachment IDs. If empty,
 *                                 a playlist will be created from all $type attachments of $id.
 *                                 Default empty.
 *     @type array   $exclude      List of specific attachment IDs to exclude from the playlist. Default empty.

Advertisement

Changelog Changelog

Changelog
Version Description
3.9.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.