post_playlist
Filter HookDescription
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.Hook Information
File Location |
wp-includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3072 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$output
|
Playlist output. Default empty. |
array
|
$attr
|
An array of shortcode attributes. |
int
|
$instance
|
Unique numeric ID of this playlist shortcode instance. |
Usage Examples
Basic Usage
<?php
// Hook into post_playlist
add_filter('post_playlist', 'my_custom_filter', 10, 3);
function my_custom_filter($output, $attr, $instance) {
// Your custom filtering logic here
return $output;
}
Source Code Context
wp-includes/media.php:3072
- How this hook is used in WordPress core
<?php
3067 *
3068 * @param string $output Playlist output. Default empty.
3069 * @param array $attr An array of shortcode attributes.
3070 * @param int $instance Unique numeric ID of this playlist shortcode instance.
3071 */
3072 $output = apply_filters( 'post_playlist', '', $attr, $instance );
3073
3074 if ( ! empty( $output ) ) {
3075 return $output;
3076 }
3077
PHP Documentation
<?php
/**
* 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.
*
* @since 3.9.0
* @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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.