before_last_bar example


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

/** * Translates $text like translate(), but assumes that the text * contains a context after its last vertical bar. * * @since 2.5.0 * @deprecated 3.0.0 Use _x() * @see _x() * * @param string $text Text to translate. * @param string $domain Domain to retrieve the translated text. * @return string Translated text. */

function translate_user_role( $name$domain = 'default' ) {
    return translate_with_gettext_context( before_last_bar( $name ), 'User role', $domain );
}

/** * Gets all available languages based on the presence of *.mo files in a given directory. * * The default directory is WP_LANG_DIR. * * @since 3.0.0 * @since 4.7.0 The results are now filterable with the {@see 'get_available_languages'} filter. * * @param string $dir A directory to search for language files. * Default WP_LANG_DIR. * @return string[] An array of language codes or an empty array if no languages are present. * Language codes are formed by stripping the .mo extension from the language file names. */
Home | Imprint | This part of the site doesn't use cookies.