Opened 16 years ago
Closed 16 years ago
#4435 closed enhancement (invalid)
Better display for non-image attachments with long filenames
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Severity: | normal | Version: | 2.2 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
Index: wp-admin/upload-functions.php =================================================================== --- wp-admin/upload-functions.php (revision 5682) +++ wp-admin/upload-functions.php (working copy) @@ -26,6 +26,14 @@ $image_rel = wp_make_link_relative($image_src); $innerHTML = ' ' . str_replace($image_src, $image_rel, $innerHTML); $class = 'image'; + } elseif ( strlen($innerHTML) > 15 ) { + $dot_position = strrpos($innerHTML, '.') + 1; + $addendum = ''; + if ( $dot_position > 1 ) { + $extension = strtoupper(substr($innerHTML, $dot_position)); + $addendum = '<br /><br />('.$extension.')'; + } + $innerHTML = substr($innerHTML, 0, 11).'...'.$addendum; } $src_base = wp_get_attachment_url(); @@ -356,4 +364,4 @@ } } -?> \ No newline at end of file +?>
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Closing as INVALID.
The patch does still apply but the code in wp-admin/includes/upload.php is not used anywhere in the new admin pages.