Source View: wp_mime_type_icon

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3140                if ( isset($types[$wilds[0]])) {
3141                     $icon = $types[$wilds[0]];
3142                     if ( !is_numeric($mime) )
3143                          wp_cache_set("mime_type_icon_$mime", $icon);
3144                     break;
3145                }
3146           }
3147      }
3148
3149      return apply_filters( 'wp_mime_type_icon', $icon, $mime, $post_id ); // Last arg is 0 if function pass mime type.
3150 }
3151
3152 /**
3153  * Checked for changed slugs for published posts and save old slug.
3154  *
3155  * The function is used along with form POST data. It checks for the wp-old-slug
3156  * POST field. Will only be concerned with published posts and the slug actually
3157  * changing.
3158  *