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 |
---|---|
303 | /** |
304 | * Determines the language to use for CodePress syntax highlighting, |
305 | * based only on a filename. |
306 | * |
307 | * @since 2.8 |
308 | * |
309 | * @param string $filename The name of the file to be highlighting |
310 | **/ |
311 | function codepress_get_lang( $filename ) { |
312 | $codepress_supported_langs = apply_filters( 'codepress_supported_langs', |
313 | array( '.css' => 'css', |
314 | '.js' => 'javascript', |
315 | '.php' => 'php', |
316 | '.html' => 'html', |
317 | '.htm' => 'html', |
318 | '.txt' => 'text' |
319 | ) ); |
320 | $extension = substr( $filename, strrpos( $filename, '.' ) ); |
321 | if ( $extension && array_key_exists( $extension, $codepress_supported_langs ) ) |