Menu Adam R Brown

WP hooks navigation: Home/browse • Actions index • Filters index

Source View: media_library_show_video_playlist

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
4298       *
4299       * @since 4.7.4
4300       * @since 4.8.0 The filter's default value is `true` rather than `null`.
4301       *
4302       * @link https://core.trac.wordpress.org/ticket/31071
4303       *
4304       * @param bool|null $show Whether to show the button, or `null` to decide based
4305       *                        on whether any video files exist in the media library.
4306       */
4307      $show_video_playlist = apply_filters( 'media_library_show_video_playlist', true );
4308      if ( null === $show_video_playlist ) {
4309           $show_video_playlist = $wpdb->get_var(
4310                "
4311                SELECT ID
4312                FROM $wpdb->posts
4313                WHERE post_type = 'attachment'
4314                AND post_mime_type LIKE 'video%'
4315                LIMIT 1
4316           "