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
BIN
src/wp-includes/images/media/archive.png
Normal file
|
After Width: | Height: | Size: 584 B |
BIN
src/wp-includes/images/media/audio.png
Normal file
|
After Width: | Height: | Size: 583 B |
BIN
src/wp-includes/images/media/code.png
Normal file
|
After Width: | Height: | Size: 274 B |
BIN
src/wp-includes/images/media/default.png
Normal file
|
After Width: | Height: | Size: 168 B |
BIN
src/wp-includes/images/media/document.png
Normal file
|
After Width: | Height: | Size: 200 B |
BIN
src/wp-includes/images/media/interactive.png
Normal file
|
After Width: | Height: | Size: 319 B |
BIN
src/wp-includes/images/media/spreadsheet.png
Normal file
|
After Width: | Height: | Size: 188 B |
BIN
src/wp-includes/images/media/text.png
Normal file
|
After Width: | Height: | Size: 188 B |
BIN
src/wp-includes/images/media/video.png
Normal file
|
After Width: | Height: | Size: 283 B |
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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';
|
||||
|
||||