Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Temporary Fix for Bug JNews - Frontend Translation */
- function temporary_fix_jnews_print_alt_translation( $string, $domain, $key ) {
- if ( true ) { /* Temporary Fix JNews - Frontend Translation */
- echo esc_html( vp_option( 'jnews_translate.' . $key, $string ) );
- } else {
- esc_html_e( $string, $domain );
- }
- }
- /* Temporary Fix for Bug JNews - Frontend Translation */
- function temporary_fix_jnews_return_alt_translation( $string, $domain, $key, $escape = true ) {
- if ( true ) { /* Temporary Fix JNews - Frontend Translation */
- if ( $escape ) {
- return esc_html( vp_option( 'jnews_translate.' . $key, $string ) );
- } else {
- return vp_option( 'jnews_translate.' . $key, $string );
- }
- } else {
- if ( $escape ) {
- return esc_html__( $string, $domain );
- } else {
- return __( $string, $domain );
- }
- }
- }
- /* Temporary Fix for Bug JNews - Frontend Translation */
- function temporary_fix_jnews_frontend_translation() {
- remove_all_actions( 'jnews_print_translation' );
- add_action( 'jnews_print_translation', 'temporary_fix_jnews_print_alt_translation', null, 3 );
- remove_filter( 'jnews_return_translation', 'jnews_return_main_translation', 10 );
- add_filter( 'jnews_return_translation', 'temporary_fix_jnews_return_alt_translation', null, 4 );
- }
- add_action( 'init', 'temporary_fix_jnews_frontend_translation' );
Add Comment
Please, Sign In to add comment