Translates $text like translate() , but assumes that the text contains a context after its last vertical bar.
$textstringrequired
$domainstringoptional
Default:'default'
function translate_with_context( $text, $domain = 'default' ) {
_deprecated_function( __FUNCTION__, '2.9.0', '_x()' );
return before_last_bar( translate( $text, $domain ) );
}
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/translate_with_context