diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index 195d0f9..d3ba104 100644
a
|
b
|
function wp_enqueue_media( $args = array() ) { |
3333 | 3333 | * |
3334 | 3334 | * @link https://core.trac.wordpress.org/ticket/31071 |
3335 | 3335 | * |
3336 | | * @return bool|null Whether to show the button, or `null` for default behavior. |
| 3336 | * @param bool|null Whether to show the button, or `null` for default behavior. |
3337 | 3337 | */ |
3338 | | $has_audio = apply_filters( 'media_has_audio', null ); |
3339 | | if ( is_null( $has_audio ) ) { |
3340 | | $has_audio = $wpdb->get_var( " |
| 3338 | $show_audio_playlist = apply_filters( 'media_library_show_audio_playlist', null ); |
| 3339 | if ( null === $show_audio_playlist ) { |
| 3340 | $show_audio_playlist = $wpdb->get_var( " |
3341 | 3341 | SELECT ID |
3342 | 3342 | FROM $wpdb->posts |
3343 | 3343 | WHERE post_type = 'attachment' |
… |
… |
function wp_enqueue_media( $args = array() ) { |
3358 | 3358 | * |
3359 | 3359 | * @link https://core.trac.wordpress.org/ticket/31071 |
3360 | 3360 | * |
3361 | | * @return bool|null Whether to show the button, or `null` for default behavior. |
| 3361 | * @param bool|null Whether to show the button, or `null` for default behavior. |
3362 | 3362 | */ |
3363 | | $has_video = apply_filters( 'media_has_video', null ); |
3364 | | if ( is_null( $has_video ) ) { |
3365 | | $has_video = $wpdb->get_var( " |
| 3363 | $show_video_playlist = apply_filters( 'media_library_show_video_playlist', null ); |
| 3364 | if ( null === $show_video_playlist ) { |
| 3365 | $show_video_playlist = $wpdb->get_var( " |
3366 | 3366 | SELECT ID |
3367 | 3367 | FROM $wpdb->posts |
3368 | 3368 | WHERE post_type = 'attachment' |
… |
… |
function wp_enqueue_media( $args = array() ) { |
3383 | 3383 | * |
3384 | 3384 | * @link https://core.trac.wordpress.org/ticket/31071 |
3385 | 3385 | * |
3386 | | * @return array|null An array of objects with `month` and `year` |
3387 | | * properties, or `null` (or any other non-array value) |
3388 | | * for default behavior. |
| 3386 | * @param array|null An array of objects with `month` and `year` |
| 3387 | * properties, or `null` (or any other non-array value) |
| 3388 | * for default behavior. |
3389 | 3389 | */ |
3390 | | $months = apply_filters( 'media_months', null ); |
| 3390 | $months = apply_filters( 'media_library_months_with_files', null ); |
3391 | 3391 | if ( ! is_array( $months ) ) { |
3392 | 3392 | $months = $wpdb->get_results( $wpdb->prepare( " |
3393 | 3393 | SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month |
… |
… |
function wp_enqueue_media( $args = array() ) { |
3414 | 3414 | ), |
3415 | 3415 | 'defaultProps' => $props, |
3416 | 3416 | 'attachmentCounts' => array( |
3417 | | 'audio' => ( $has_audio ) ? 1 : 0, |
3418 | | 'video' => ( $has_video ) ? 1 : 0 |
| 3417 | 'audio' => ( $show_audio_playlist ) ? 1 : 0, |
| 3418 | 'video' => ( $show_video_playlist ) ? 1 : 0, |
3419 | 3419 | ), |
3420 | 3420 | 'embedExts' => $exts, |
3421 | 3421 | 'embedMimes' => $ext_mimes, |
3422 | 3422 | 'contentWidth' => $content_width, |
3423 | 3423 | 'months' => $months, |
3424 | | 'mediaTrash' => MEDIA_TRASH ? 1 : 0 |
| 3424 | 'mediaTrash' => MEDIA_TRASH ? 1 : 0, |
3425 | 3425 | ); |
3426 | 3426 | |
3427 | 3427 | $post = null; |