post_playlist filter-hookWP 3.9.0

Filters the playlist output.

Returning a non-empty value from the filter will short-circuit generation of the default playlist output, returning the passed value instead.

Usage

add_filter( 'post_playlist', 'wp_kama_post_playlist_filter', 10, 3 );

/**
 * Function for `post_playlist` filter-hook.
 * 
 * @param string $output   Playlist output.
 * @param array  $attr     An array of shortcode attributes.
 * @param int    $instance Unique numeric ID of this playlist shortcode instance.
 *
 * @return string
 */
function wp_kama_post_playlist_filter( $output, $attr, $instance ){

	// filter...
	return $output;
}
$output(string)
Playlist output.
Default: ''
$attr(array)
An array of shortcode attributes.
$instance(int)
Unique numeric ID of this playlist shortcode instance.

Changelog

Since 3.9.0 Introduced.
Since 4.2.0 The $instance parameter was added.

Where the hook is called

wp_playlist_shortcode()
post_playlist
wp-includes/media.php 2675
$output = apply_filters( 'post_playlist', '', $attr, $instance );

Where the hook is used in WordPress

Usage not found.