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 |
|---|---|
| 46 | |
| 47 | // Simple browser detection |
| 48 | $is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = false; |
| 49 | |
| 50 | if ( isset($_SERVER['HTTP_USER_AGENT']) ) { |
| 51 | if ( strpos($_SERVER['HTTP_USER_AGENT'], 'Lynx') !== false ) { |
| 52 | $is_lynx = true; |
| 53 | } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'chrome') !== false ) { |
| 54 | if ( stripos( $_SERVER['HTTP_USER_AGENT'], 'chromeframe' ) !== false ) { |
| 55 | if ( $is_chrome = apply_filters( 'use_google_chrome_frame', is_admin() ) ) |
| 56 | header( 'X-UA-Compatible: chrome=1' ); |
| 57 | $is_winIE = ! $is_chrome; |
| 58 | } else { |
| 59 | $is_chrome = true; |
| 60 | } |
| 61 | } elseif ( stripos($_SERVER['HTTP_USER_AGENT'], 'safari') !== false ) { |
| 62 | $is_safari = true; |
| 63 | } elseif ( strpos($_SERVER['HTTP_USER_AGENT'], 'Gecko') !== false ) { |
| 64 | $is_gecko = true; |