Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: extra_{$context}_headers

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.

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
4443      $fp = fopen( $file, 'r' );
4444
4445      // Pull only the first 8kiB of the file in.
4446      $file_data = fread( $fp, 8192 );
4447
4448      // PHP will close file handle, but we are good citizens.
4449      fclose( $fp );
4450
4451      if ( $context != '' ) {
4452           $extra_headers = apply_filters( "extra_{$context}_headers", array() );
4453
4454           $extra_headers = array_flip( $extra_headers );
4455           foreach( $extra_headers as $key=>$value ) {
4456                $extra_headers[$key] = $key;
4457           }
4458           $all_headers = array_merge( $extra_headers, (array) $default_headers );
4459      } else {
4460           $all_headers = $default_headers;
4461      }