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