Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: gettext_with_context

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
139       * Filter text with its translation based on context information.
140       *
141       * @since 2.8.0
142       *
143       * @param string $translations Translated text.
144       * @param string $text         Text to translate.
145       * @param string $context      Context information for the translators.
146       * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
147       */
148      return apply_filters( 'gettext_with_context', $translations, $text, $context, $domain );
149 }
150
151 /**
152  * Retrieve the translation of $text. If there is no translation,
153  * or the text domain isn't loaded, the original text is returned.
154  *
155  * @since 2.1.0
156  *
157  * @param string $text   Text to translate.