WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
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.
Line | Code |
---|---|
1163 |
|
1164 | // Compute the URL |
1165 | $url = $upload['url'] . "/$filename"; |
1166 |
|
1167 | return array('file' => $new_file, 'url' => $url, 'error' => false); |
1168 | } |
1169 |
|
1170 | function wp_check_filetype($filename, $mimes = null) { |
1171 | // Accepted MIME types are set here as PCRE unless provided. |
1172 | $mimes = is_array($mimes) ? $mimes : apply_filters('upload_mimes', array ( |
1173 | 'jpg|jpeg|jpe' => 'image/jpeg', |
1174 | 'gif' => 'image/gif', |
1175 | 'png' => 'image/png', |
1176 | 'bmp' => 'image/bmp', |
1177 | 'tif|tiff' => 'image/tiff', |
1178 | 'ico' => 'image/x-icon', |
1179 | 'asf|asx|wax|wmv|wmx' => 'video/asf', |
1180 | 'avi' => 'video/avi', |
1181 | 'mov|qt' => 'video/quicktime', |