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.
This hook occurs 2 times in this file.
Line | Code |
---|---|
31 |
|
32 | if ( isset( $locale ) ) { |
33 | /** |
34 | * Filter WordPress install's locale ID. |
35 | * |
36 | * @since 1.5.0 |
37 | * |
38 | * @param string $locale The locale ID. |
39 | */ |
40 | return apply_filters( 'locale', $locale ); |
41 | } |
42 |
|
43 | if ( isset( $wp_local_package ) ) { |
44 | $locale = $wp_local_package; |
45 | } |
46 |
|
47 | // WPLANG was defined in wp-config. |
48 | if ( defined( 'WPLANG' ) ) { |
49 | $locale = WPLANG; |
Line | Code |
65 | $locale = $db_locale; |
66 | } |
67 | } |
68 |
|
69 | if ( empty( $locale ) ) { |
70 | $locale = 'en_US'; |
71 | } |
72 |
|
73 | /** This filter is documented in wp-includes/l10n.php */ |
74 | return apply_filters( 'locale', $locale ); |
75 | } |
76 |
|
77 | /** |
78 | * Retrieve the translation of $text. |
79 | * |
80 | * If there is no translation, or the text domain isn't loaded, the original text is returned. |
81 | * |
82 | * *Note:* Don't use {@see translate()} directly, use `{@see __()} or related functions. |
83 | * |