WordPress.org

Make WordPress Core

Changeset 12378


Ignore:
Timestamp:
12/12/09 07:02:26 (4 years ago)
Author:
azaozz
Message:

Display "Dimensions" only for image attachments, fixes #11403

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r12377 r12378  
    11941194    if ( is_array($meta) && array_key_exists('width', $meta) && array_key_exists('height', $meta) ) 
    11951195        $media_dims .= "<span id='media-dims-{$post->ID}'>{$meta['width']}&nbsp;&times;&nbsp;{$meta['height']}</span> "; 
     1196    $media_dims = apply_filters('media_meta', $media_dims, $post); 
    11961197 
    11971198    $image_edit_button = ''; 
     
    12131214        </tr> 
    12141215        <tr><td><strong>" . __('File type:') . "</strong> $post->post_mime_type</td></tr> 
    1215         <tr><td><strong>" . __('Upload date:') . "</strong> " . mysql2date( get_option('date_format'), $post->post_date ) . "</td></tr> 
    1216         <tr><td><strong>" . __('Dimensions:') . "</strong> " . apply_filters('media_meta', $media_dims, $post) . "</td></tr> 
     1216        <tr><td><strong>" . __('Upload date:') . "</strong> " . mysql2date( get_option('date_format'), $post->post_date ) . "</td></tr>\n"; 
     1217 
     1218    if ( !empty($media_dims) ) 
     1219        $item .= "<tr><td><strong>" . __('Dimensions:') . "</strong> $media_dims</td></tr>\n"; 
     1220 
     1221    $item .= " 
    12171222        <tr><td class='A1B1'>$image_edit_button</td></tr> 
    12181223        </thead> 
Note: See TracChangeset for help on using the changeset viewer.