Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'theme_mod_jnews_header_logo', 'change_logo_other_lang' );
- add_filter( 'theme_mod_jnews_header_logo_retina', 'change_retina_logo_other_lang' );
- add_filter( 'theme_mod_jnews_mobile_logo', 'change_mobile_logo_other_lang' );
- add_filter( 'theme_mod_jnews_mobile_logo_retina', 'change_mobile_retina_logo_other_lang' );
- /**
- * Change desktop logo in other language
- */
- function change_logo_other_lang( $value ) {
- if ( function_exists( 'pll_get_term' ) ) {
- if ( 'id' === pll_current_language() ) { /* change id with your language code */
- $value = 'https://jnews.io/default/wp-content/uploads/sites/3/2017/01/logo1.png'; /* change the $value with your logo URL */
- }
- }
- return $value;
- }
- /**
- * Change desktop retina logo in other language
- */
- function change_retina_logo_other_lang( $value ) {
- if ( function_exists( 'pll_get_term' ) ) {
- if ( 'id' === pll_current_language() ) { /* change id with your language code */
- $value = 'https://jnews.io/default/wp-content/uploads/sites/3/2017/01/logo1@2x.png'; /* change the $value with your logo URL */
- }
- }
- return $value;
- }
- /**
- * Change mobile logo in other language
- */
- function change_mobile_logo_other_lang( $value ) {
- if ( function_exists( 'pll_get_term' ) ) {
- if ( 'id' === pll_current_language() ) { /* change id with your language code */
- $value = 'https://jnews.io/default/wp-content/uploads/sites/3/2017/01/logo1.png'; /* change the $value with your logo URL */
- }
- }
- return $value;
- }
- /**
- * Change mobile retina logo in other language
- */
- function change_mobile_retina_logo_other_lang( $value ) {
- if ( function_exists( 'pll_get_term' ) ) {
- if ( 'id' === pll_current_language() ) { /* change id with your language code */
- $value = 'https://jnews.io/default/wp-content/uploads/sites/3/2017/01/logo1@2x.png'; /* change the $value with your logo URL */
- }
- }
- return $value;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement