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 |
---|---|
4284 | $fp = fopen( $file, 'r' ); |
4285 |
|
4286 | // Pull only the first 8kiB of the file in. |
4287 | $file_data = fread( $fp, 8192 ); |
4288 |
|
4289 | // PHP will close file handle, but we are good citizens. |
4290 | fclose( $fp ); |
4291 |
|
4292 | if ( $context != '' ) { |
4293 | $extra_headers = apply_filters( "extra_{$context}_headers", array() ); |
4294 |
|
4295 | $extra_headers = array_flip( $extra_headers ); |
4296 | foreach( $extra_headers as $key=>$value ) { |
4297 | $extra_headers[$key] = $key; |
4298 | } |
4299 | $all_headers = array_merge( $extra_headers, (array) $default_headers ); |
4300 | } else { |
4301 | $all_headers = $default_headers; |
4302 | } |