Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $nm_theme_options;
- // Logo URL
- if ( isset( $nm_theme_options['logo'] ) && strlen( $nm_theme_options['logo']['url'] ) > 0 ) {
- $logo_href = ( is_ssl() ) ? str_replace( 'http://', 'https://', $nm_theme_options['logo']['url'] ) : $nm_theme_options['logo']['url'];
- } else {
- $logo_href = NM_THEME_URI . '/assets/img/logo@2x.png';
- }
- // Alternative logo
- $has_alt_logo = false;
- if ( $nm_theme_options['alt_logo'] ) {
- $has_alt_logo = true;
- // Logo URL
- if ( isset( $nm_theme_options['alt_logo_image'] ) && strlen( $nm_theme_options['alt_logo_image']['url'] ) > 0 ) {
- $alt_logo_href = ( is_ssl() ) ? str_replace( 'http://', 'https://', $nm_theme_options['alt_logo_image']['url'] ) : $nm_theme_options['alt_logo_image']['url'];
- } else {
- $alt_logo_href = NM_THEME_URI . '/assets/img/logo-light@2x.png';
- }
- }
- ?>
- <div class="nm-header-logo">
- <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
- <img src="<?php echo esc_url( $logo_href ); ?>" class="nm-logo" alt="<?php bloginfo( 'name' ); ?>">
- <?php if ( $has_alt_logo ) : ?>
- <img src="<?php echo esc_url( $alt_logo_href ); ?>" class="nm-alt-logo" alt="<?php bloginfo( 'name' ); ?>">
- <?php endif; ?>
- </a>
- <style type="text/css">
- #flags_language_selector img{
- margin:1px;
- border:1px solid #333;
- }
- #flags_language_selector, .desktop {
- /*margin-left: 930px;
- padding-top: 12px;*/
- float: right;
- }
- .country-flag {
- height: 18px !important;
- }
- #flags_language_selector a{
- cursor: pointer;
- }
- #flags_language_selector img {
- opacity: 0.5;
- }
- #flags_language_selector a img{
- opacity: 1;
- }
- .mobile { display: none; }
- @media only screen and (max-width: 768px) {
- #flags_language_selector {
- float: initial;
- }
- #flags_language_selector a{
- display: inline;
- }
- .country-flag {
- height: initial !important;
- }
- #flags_language_selector img {
- vertical-align: middle;
- }
- .mobile { display: block; }
- .desktop { display: none; }
- }
- </style>
- <div class="desktop">
- <div id="flags_language_selector"><?php language_selector_flags_opposite(); ?></div >
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement