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 |
---|---|
1189 | @ chmod( $new_file, $perms ); |
1190 |
|
1191 | // Compute the URL |
1192 | $url = $upload['url'] . "/$filename"; |
1193 |
|
1194 | return array( 'file' => $new_file, 'url' => $url, 'error' => false ); |
1195 | } |
1196 |
|
1197 | function wp_ext2type( $ext ) { |
1198 | $ext2type = apply_filters('ext2type', array( |
1199 | 'audio' => array('aac','ac3','aif','aiff','mp1','mp2','mp3','m3a','m4a','m4b','ogg','ram','wav','wma'), |
1200 | 'video' => array('asf','avi','divx','dv','mov','mpg','mpeg','mp4','mpv','ogm','qt','rm','vob','wmv'), |
1201 | 'document' => array('doc','pages','odt','rtf','pdf'), |
1202 | 'spreadsheet' => array('xls','numbers','ods'), |
1203 | 'interactive' => array('ppt','key','odp','swf'), |
1204 | 'text' => array('txt'), |
1205 | 'archive' => array('tar','bz2','gz','cab','dmg','rar','sea','sit','sqx','zip'), |
1206 | 'code' => array('css','html','php','js'), |
1207 | )); |