Changeset 40421
- Timestamp:
- 04/13/2017 08:21:45 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r40382 r40421 3334 3334 * @link https://core.trac.wordpress.org/ticket/31071 3335 3335 * 3336 * @ returnbool|null Whether to show the button, or `null` for default behavior.3337 */ 3338 $ has_audio = apply_filters( 'media_has_audio', null );3339 if ( is_null( $has_audio )) {3340 $ has_audio= $wpdb->get_var( "3336 * @param bool|null Whether to show the button, or `null` for default behavior. 3337 */ 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 … … 3359 3359 * @link https://core.trac.wordpress.org/ticket/31071 3360 3360 * 3361 * @ returnbool|null Whether to show the button, or `null` for default behavior.3362 */ 3363 $ has_video = apply_filters( 'media_has_video', null );3364 if ( is_null( $has_video )) {3365 $ has_video= $wpdb->get_var( "3361 * @param bool|null Whether to show the button, or `null` for default behavior. 3362 */ 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 … … 3384 3384 * @link https://core.trac.wordpress.org/ticket/31071 3385 3385 * 3386 * @ returnarray|null An array of objects with `month` and `year`3387 * 3388 * 3389 */ 3390 $months = apply_filters( 'media_ months', null );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 */ 3390 $months = apply_filters( 'media_library_months_with_files', null ); 3391 3391 if ( ! is_array( $months ) ) { 3392 3392 $months = $wpdb->get_results( $wpdb->prepare( " … … 3415 3415 'defaultProps' => $props, 3416 3416 'attachmentCounts' => array( 3417 'audio' => ( $ has_audio) ? 1 : 0,3418 'video' => ( $ has_video ) ? 1 : 03417 'audio' => ( $show_audio_playlist ) ? 1 : 0, 3418 'video' => ( $show_video_playlist ) ? 1 : 0, 3419 3419 ), 3420 3420 'embedExts' => $exts, … … 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
Note: See TracChangeset
for help on using the changeset viewer.