wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



_c › WordPress Function

Desde2.2.0
Obsoleto2.9.0
_c ( $text, $domain = 'default' )
Parâmetros: (2)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $domain Optional. Domain to retrieve the translated text.
    Required: No
    Padrão: 'default'
Ver:
Retorna:
  • (string) Translated context string without pipe.
Definido em:
Codex:

Retrieve translated string with vertical bar context

Quite a few times, there will be collisions with similar translatable text found in more than two places but with different translated context. In order to use the separate contexts, the _c() function is used and the translatable string uses a pipe ('|') which has the context the string is in. When the translated string is returned, it is everything before the pipe, not including the pipe character. If there is no pipe in the translated text then everything is returned.


Funções relacionadas: _nc, _, __, _e, _n

Fonte

function _c( $text, $domain = 'default' ) {
	_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
	return before_last_bar( translate( $text, $domain ) );
}