Skip to content

Instantly share code, notes, and snippets.

@KingYes
Created January 29, 2015 12:33
Show Gist options
  • Save KingYes/5b28ee5a6939c2ef307f to your computer and use it in GitHub Desktop.
Save KingYes/5b28ee5a6939c2ef307f to your computer and use it in GitHub Desktop.
Polylang multilang Logo with Pojo theme
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