WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 3687 | * |
| 3688 | * @since 4.7.4 |
| 3689 | * @since 4.8.0 The filter's default value is `true` rather than `null`. |
| 3690 | * |
| 3691 | * @link https://core.trac.wordpress.org/ticket/31071 |
| 3692 | * |
| 3693 | * @param bool|null Whether to show the button, or `null` to decide based |
| 3694 | * on whether any video files exist in the media library. |
| 3695 | */ |
| 3696 | $show_video_playlist = apply_filters( 'media_library_show_video_playlist', true ); |
| 3697 | if ( null === $show_video_playlist ) { |
| 3698 | $show_video_playlist = $wpdb->get_var( |
| 3699 | " |
| 3700 | SELECT ID |
| 3701 | FROM $wpdb->posts |
| 3702 | WHERE post_type = 'attachment' |
| 3703 | AND post_mime_type LIKE 'video%' |
| 3704 | LIMIT 1 |
| 3705 | " |