wppaste
WordPress

apply_filters( 'post_playlist', string $output, array $attr, int $instance )

Since
3.9.0, 4.2.0
Filters the playlist output.

Description

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

Compatibility

WordPress
since 4.2.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$outputstring
Playlist output. Default empty.
$attrarray
An array of shortcode attributes.
$instanceint
Unique numeric ID of this playlist shortcode instance.

Where this hook fires · 1

  • wp-includes/media.php:3222wp_playlist_shortcode()

Source code

	 * @since 4.2.0 The `$instance` parameter was added.	 *	 * @param string $output   Playlist output. Default empty.	 * @param array  $attr     An array of shortcode attributes.	 * @param int    $instance Unique numeric ID of this playlist shortcode instance.	 */	$output = apply_filters( 'post_playlist', '', $attr, $instance ); 	if ( ! empty( $output ) ) {		return $output;	} 	$atts = shortcode_atts(

Changelog

Introduced in 3.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

4.2.0
The $instance parameter was added.from the docblock
3.9.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.