Changeset 28191 for trunk/src/wp-includes/media.php
- Timestamp:
- 04/23/2014 10:04:03 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/media.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r28182 r28191 2696 2696 } 2697 2697 2698 $audio = $video = 0;2699 $counts = (array) wp_count_attachments();2700 foreach ( $counts as $mime => $total ) {2701 if ( 0 === strpos( $mime, 'audio/' ) ) {2702 $audio += (int) $total;2703 } elseif ( 0 === strpos( $mime, 'video/' ) ) {2704 $video += (int) $total;2705 }2706 }2707 2708 2698 $settings = array( 2709 2699 'tabs' => $tabs, … … 2720 2710 'defaultProps' => $props, 2721 2711 'attachmentCounts' => array( 2722 'audio' => $audio,2723 'video' => $video2712 'audio' => wp_has_mime_type_attachments( 'audio' ) ? 1 : 0, 2713 'video' => wp_has_mime_type_attachments( 'video' ) ? 1 : 0 2724 2714 ), 2725 2715 'embedExts' => $exts,
Note: See TracChangeset
for help on using the changeset viewer.