diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index d3ba104..6253bd5 100644
a
|
b
|
function wp_enqueue_media( $args = array() ) { |
3324 | 3324 | /** |
3325 | 3325 | * Allows showing or hiding the "Create Audio Playlist" button in the media library. |
3326 | 3326 | * |
3327 | | * By default (if this filter returns `null`), a query will be run to |
3328 | | * determine whether the media library contains any audio items. This |
3329 | | * query is expensive for large media libraries, so it may be desirable for |
3330 | | * sites to override this behavior. |
| 3327 | * By default, the "Create Audio Playlist" button will always be shown in |
| 3328 | * the media library. If this filter returns `null`, a query will be run |
| 3329 | * to determine whether the media library contains any audio items. This |
| 3330 | * was the default behavior prior to version 4.8.0, but this query is |
| 3331 | * expensive for large media libraries. |
3331 | 3332 | * |
3332 | 3333 | * @since 4.7.4 |
| 3334 | * @since 4.8.0 The filter's default value is `true` rather than `null`. |
3333 | 3335 | * |
3334 | 3336 | * @link https://core.trac.wordpress.org/ticket/31071 |
3335 | 3337 | * |
3336 | | * @param bool|null Whether to show the button, or `null` for default behavior. |
| 3338 | * @param bool|null Whether to show the button, or `null` to decide based |
| 3339 | * on whether any audio files exist in the media library. |
3337 | 3340 | */ |
3338 | | $show_audio_playlist = apply_filters( 'media_library_show_audio_playlist', null ); |
| 3341 | $show_audio_playlist = apply_filters( 'media_library_show_audio_playlist', true ); |
3339 | 3342 | if ( null === $show_audio_playlist ) { |
3340 | 3343 | $show_audio_playlist = $wpdb->get_var( " |
3341 | 3344 | SELECT ID |
… |
… |
function wp_enqueue_media( $args = array() ) { |
3349 | 3352 | /** |
3350 | 3353 | * Allows showing or hiding the "Create Video Playlist" button in the media library. |
3351 | 3354 | * |
3352 | | * By default (if this filter returns `null`), a query will be run to |
3353 | | * determine whether the media library contains any video items. This |
3354 | | * query is expensive for large media libraries, so it may be desirable for |
3355 | | * sites to override this behavior. |
| 3355 | * By default, the "Create Video Playlist" button will always be shown in |
| 3356 | * the media library. If this filter returns `null`, a query will be run |
| 3357 | * to determine whether the media library contains any video items. This |
| 3358 | * was the default behavior prior to version 4.8.0, but this query is |
| 3359 | * expensive for large media libraries. |
3356 | 3360 | * |
3357 | 3361 | * @since 4.7.4 |
| 3362 | * @since 4.8.0 The filter's default value is `true` rather than `null`. |
3358 | 3363 | * |
3359 | 3364 | * @link https://core.trac.wordpress.org/ticket/31071 |
3360 | 3365 | * |
3361 | | * @param bool|null Whether to show the button, or `null` for default behavior. |
| 3366 | * @param bool|null Whether to show the button, or `null` to decide based |
| 3367 | * on whether any video files exist in the media library. |
3362 | 3368 | */ |
3363 | | $show_video_playlist = apply_filters( 'media_library_show_video_playlist', null ); |
| 3369 | $show_video_playlist = apply_filters( 'media_library_show_video_playlist', true ); |
3364 | 3370 | if ( null === $show_video_playlist ) { |
3365 | 3371 | $show_video_playlist = $wpdb->get_var( " |
3366 | 3372 | SELECT ID |