Changeset 28261 for branches/3.9/src/wp-includes/media.php
- Timestamp:
- 05/06/2014 03:21:56 AM (11 years ago)
- Location:
- branches/3.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
- Property svn:mergeinfo changed
/trunk merged: 28191,28194
- Property svn:mergeinfo changed
-
branches/3.9/src/wp-includes/media.php
r28233 r28261 2655 2655 return; 2656 2656 2657 global $content_width ;2657 global $content_width, $wpdb; 2658 2658 2659 2659 $defaults = array( … … 2694 2694 } 2695 2695 2696 $audio = $video = 0; 2697 $counts = (array) wp_count_attachments(); 2698 foreach ( $counts as $mime => $total ) { 2699 if ( 0 === strpos( $mime, 'audio/' ) ) { 2700 $audio += (int) $total; 2701 } elseif ( 0 === strpos( $mime, 'video/' ) ) { 2702 $video += (int) $total; 2703 } 2704 } 2696 $has_audio = $wpdb->get_var( " 2697 SELECT ID 2698 FROM $wpdb->posts 2699 WHERE post_type = 'attachment' 2700 AND post_mime_type LIKE 'audio%' 2701 LIMIT 1 2702 " ); 2703 $has_video = $wpdb->get_var( " 2704 SELECT ID 2705 FROM $wpdb->posts 2706 WHERE post_type = 'attachment' 2707 AND post_mime_type LIKE 'video%' 2708 LIMIT 1 2709 " ); 2705 2710 2706 2711 $settings = array( … … 2718 2723 'defaultProps' => $props, 2719 2724 'attachmentCounts' => array( 2720 'audio' => $audio,2721 'video' => $video2725 'audio' => (int) $has_audio, 2726 'video' => (int) $has_video, 2722 2727 ), 2723 2728 'embedExts' => $exts,
Note: See TracChangeset
for help on using the changeset viewer.