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 |
---|---|
4407 | * |
4408 | * @since 4.7.4 |
4409 | * @since 4.8.0 The filter's default value is `true` rather than `null`. |
4410 | * |
4411 | * @link https://core.trac.wordpress.org/ticket/31071 |
4412 | * |
4413 | * @param bool|null $show Whether to show the button, or `null` to decide based |
4414 | * on whether any audio files exist in the media library. |
4415 | */ |
4416 | $show_audio_playlist = apply_filters( 'media_library_show_audio_playlist', true ); |
4417 | if ( null === $show_audio_playlist ) { |
4418 | $show_audio_playlist = $wpdb->get_var( |
4419 | " |
4420 | SELECT ID |
4421 | FROM $wpdb->posts |
4422 | WHERE post_type = 'attachment' |
4423 | AND post_mime_type LIKE 'audio%' |
4424 | LIMIT 1 |
4425 | " |