Created
January 29, 2015 12:33
-
-
Save KingYes/5b28ee5a6939c2ef307f to your computer and use it in GitHub Desktop.
Polylang multilang Logo with Pojo theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pojo_polylang_get_multilang_sticky_logo( $value ) { | |
if ( function_exists( 'pll_current_language' ) ) { | |
$logos = array( | |
'en' => 'logo-sticky-en.png', | |
'he' => 'logo-sticky-he.png', | |
); | |
$default_logo = $logos['en']; | |
$current_lang = pll_current_language(); | |
$assets_url = get_stylesheet_directory_uri() . '/assets/images/'; | |
if ( isset( $logos[ $current_lang ] ) ) | |
$value = $assets_url . $logos[ $current_lang ]; | |
else | |
$value = $assets_url . $default_logo; | |
} | |
return $value; | |
} | |
add_filter( 'theme_mod_image_sticky_header_logo', 'pojo_polylang_get_multilang_sticky_logo' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment