Changeset 48136
- Timestamp:
- 06/23/2020 10:00:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r48131 r48136 130 130 */ 131 131 $determined_locale = apply_filters( 'pre_determine_locale', null ); 132 132 133 if ( ! empty( $determined_locale ) && is_string( $determined_locale ) ) { 133 134 return $determined_locale; … … 182 183 * @since 2.0.11 183 184 * 184 * @param string $translation 185 * @param string $text 186 * @param string $domain 185 * @param string $translation Translated text. 186 * @param string $text Text to translate. 187 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 187 188 */ 188 189 $translation = apply_filters( 'gettext', $translation, $text, $domain ); … … 191 192 * Filters text with its translation for a domain. 192 193 * 194 * The dynamic portion of the hook, `$domain`, refers to the text domain. 195 * 193 196 * @since 5.5.0 194 197 * 195 * @param string $translation Translated text. 196 * @param string $text Text to translate. 197 */ 198 return apply_filters( 'gettext-' . $domain, $translation, $text ); 198 * @param string $translation Translated text. 199 * @param string $text Text to translate. 200 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 201 */ 202 $translation = apply_filters( "gettext_{$domain}", $translation, $text, $domain ); 203 204 return $translation; 199 205 } 200 206 … … 244 250 * @since 2.8.0 245 251 * 246 * @param string $translation 247 * @param string $text 248 * @param string $context 249 * @param string $domain 252 * @param string $translation Translated text. 253 * @param string $text Text to translate. 254 * @param string $context Context information for the translators. 255 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 250 256 */ 251 257 $translation = apply_filters( 'gettext_with_context', $translation, $text, $context, $domain ); … … 254 260 * Filters text with its translation based on context information for a domain. 255 261 * 262 * The dynamic portion of the hook, `$domain`, refers to the text domain. 263 * 256 264 * @since 5.5.0 257 265 * 258 * @param string $translation Translated text. 259 * @param string $text Text to translate. 260 * @param string $context Context information for the translators. 261 */ 262 return apply_filters( 'gettext_with_context-' . $domain, $translation, $text, $context ); 266 * @param string $translation Translated text. 267 * @param string $text Text to translate. 268 * @param string $context Context information for the translators. 269 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 270 */ 271 $translation = apply_filters( "gettext_with_context_{$domain}", $translation, $text, $context, $domain ); 272 273 return $translation; 263 274 } 264 275 … … 473 484 * Filters the singular or plural form of a string for a domain. 474 485 * 486 * The dynamic portion of the hook, `$domain`, refers to the text domain. 487 * 475 488 * @since 5.5.0 476 489 * … … 479 492 * @param string $plural The text to be used if the number is plural. 480 493 * @param string $number The number to compare against to use either the singular or plural form. 481 */ 482 return apply_filters( 'ngettext-' . $domain, $translation, $single, $plural, $number ); 494 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 495 */ 496 $translation = apply_filters( "ngettext_{$domain}", $translation, $single, $plural, $number, $domain ); 497 498 return $translation; 483 499 } 484 500 … … 528 544 * Filters the singular or plural form of a string with gettext context for a domain. 529 545 * 546 * The dynamic portion of the hook, `$domain`, refers to the text domain. 547 * 530 548 * @since 5.5.0 531 549 * … … 535 553 * @param string $number The number to compare against to use either the singular or plural form. 536 554 * @param string $context Context information for the translators. 537 */ 538 return apply_filters( 'ngettext_with_context-' . $domain, $translation, $single, $plural, $number, $context ); 555 * @param string $domain Text domain. Unique identifier for retrieving translated strings. 556 */ 557 $translation = apply_filters( "ngettext_with_context_{$domain}", $translation, $single, $plural, $number, $context, $domain ); 558 559 return $translation; 539 560 } 540 561 … … 692 713 $plugin_override = apply_filters( 'override_load_textdomain', false, $domain, $mofile ); 693 714 694 if ( true == $plugin_override ) {715 if ( true === (bool) $plugin_override ) { 695 716 unset( $l10n_unloaded[ $domain ] ); 696 717
Note: See TracChangeset
for help on using the changeset viewer.