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