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.

git-svn-id: https://develop.svn.wordpress.org/trunk@27726 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi
2014-03-25 21:09:34 +00:00
parent 101863ea1d
commit ccc5f363c0
12 changed files with 4 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

View File

@@ -602,7 +602,7 @@ function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon =
$src = false;
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);
@list($width, $height) = getimagesize($src_file);
}

View File

@@ -4479,8 +4479,8 @@ function wp_mime_type_icon( $mime = 0 ) {
$icon_files = wp_cache_get('icon_files');
if ( !is_array($icon_files) ) {
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
$icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/crystal') );
$icon_dir = apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/media' );
$icon_dir_uri = apply_filters( 'icon_dir_uri', includes_url('images/media') );
$dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) );
$icon_files = array();
while ( $dirs ) {

View File

@@ -149,7 +149,7 @@ CAP;
$this->assertEquals( '', $prepped['type'] );
$this->assertEquals( '', $prepped['subtype'] );
$this->assertEquals( '', $prepped['url'] );
$this->assertEquals( site_url( 'wp-includes/images/crystal/default.png' ), $prepped['icon'] );
$this->assertEquals( site_url( 'wp-includes/images/media/default.png' ), $prepped['icon'] );
// Fake a mime
$post->post_mime_type = 'image/jpeg';