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 |
|---|---|
| 245 | * A hybrid of _n() and _x(). It supports contexts and plurals. |
| 246 | * |
| 247 | * @see _n() |
| 248 | * @see _x() |
| 249 | * |
| 250 | */ |
| 251 | function _nx($single, $plural, $number, $context, $domain = 'default') { |
| 252 | $translations = get_translations_for_domain( $domain ); |
| 253 | $translation = $translations->translate_plural( $single, $plural, $number, $context ); |
| 254 | return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain ); |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Register plural strings in POT file, but don't translate them. |
| 259 | * |
| 260 | * Used when you want to keep structures with translatable plural strings and |
| 261 | * use them later. |
| 262 | * |
| 263 | * Example: |