Use Dashicon-style images for mime type icons. Actually moving to Dashicons via the font can be explored later, but has theme/plugin implications and requires too many changes to make it for 3.9. props melchoyce for the icons. fixes #26650.
Built from https://develop.svn.wordpress.org/trunk@27726 git-svn-id: http://core.svn.wordpress.org/trunk@27563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After Width: | Height: | Size: 584 B |
After Width: | Height: | Size: 583 B |
After Width: | Height: | Size: 274 B |
After Width: | Height: | Size: 168 B |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 188 B |
After Width: | Height: | Size: 283 B |
|
@ -602,7 +602,7 @@ function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon =
|
||||||
$src = false;
|
$src = false;
|
||||||
|
|
||||||
if ( $icon && $src = wp_mime_type_icon($attachment_id) ) {
|
if ( $icon && $src = wp_mime_type_icon($attachment_id) ) {
|
||||||
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
|
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
|
||||||
$src_file = $icon_dir . '/' . wp_basename($src);
|
$src_file = $icon_dir . '/' . wp_basename($src);
|
||||||
@list($width, $height) = getimagesize($src_file);
|
@list($width, $height) = getimagesize($src_file);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4479,8 +4479,8 @@ function wp_mime_type_icon( $mime = 0 ) {
|
||||||
$icon_files = wp_cache_get('icon_files');
|
$icon_files = wp_cache_get('icon_files');
|
||||||
|
|
||||||
if ( !is_array($icon_files) ) {
|
if ( !is_array($icon_files) ) {
|
||||||
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
|
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
|
||||||
$icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/crystal') );
|
$icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/media') );
|
||||||
$dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) );
|
$dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) );
|
||||||
$icon_files = array();
|
$icon_files = array();
|
||||||
while ( $dirs ) {
|
while ( $dirs ) {
|
||||||
|
|