| Server IP : 43.153.74.48 / Your IP : 216.73.216.28 Web Server : LiteSpeed System : Linux VM-0-13-ubuntu 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64 User : www ( 1002) PHP Version : 8.1.29 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/stainlesstint.com/wp-content/themes/woodmart/header-elements/ |
Upload File : |
<?php
$logo_url = WOODMART_IMAGES . '/wood-logo-dark.svg';
$protocol = woodmart_http() . '://';
$has_sticky_logo = ( isset( $params['sticky_image']['url'] ) && ! empty( $params['sticky_image']['url'] ) );
$width_height_needed = isset( $params['width_height'] ) && $params['width_height'];
if ( isset( $params['image']['url'] ) && $params['image']['url'] ) {
$logo_url = $params['image']['url'];
}
$logo_url = $protocol . str_replace( array( 'http://', 'https://' ), '', $logo_url );
$width = isset( $params['width'] ) ? (int) $params['width'] : 150;
$sticky_width = isset( $params['sticky_width'] ) ? (int) $params['sticky_width'] : 150;
$logo = '<img src="' . $logo_url . '" alt="' . get_bloginfo( 'name' ) . '" style="max-width: ' . esc_attr( $width ) . 'px;" />';
if ( isset( $params['image']['id'] ) && $params['image']['id'] && $width_height_needed ) {
woodmart_lazy_loading_deinit( true );
$logo = wp_get_attachment_image( $params['image']['id'], 'full', false, array( 'style' => 'max-width:' . $width . 'px;' ) );
woodmart_lazy_loading_init();
} elseif ( $width_height_needed ) {
$logo = '<img src="' . $logo_url . '" width="370" height="50" alt="' . get_bloginfo( 'name' ) . '" style="max-width: ' . esc_attr( $width ) . 'px;" />';
}
$logo_classes = '';
if ( $has_sticky_logo ) {
$logo_classes .= ' wd-switch-logo';
}
?>
<div class="site-logo<?php echo esc_attr( $logo_classes ); ?>">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="wd-logo wd-main-logo<?php echo woodmart_get_old_classes( ' woodmart-logo woodmart-main-logo' ); ?>" rel="home">
<?php echo $logo; // phpcs:ignore ?>
</a>
<?php if ( $has_sticky_logo ) : ?>
<?php
$logo_sticky_url = $protocol . str_replace( array( 'http://', 'https://' ), '', $params['sticky_image']['url'] );
$logo_sticky = '<img src="' . $logo_sticky_url . '" alt="' . get_bloginfo( 'name' ) . '" style="max-width: ' . esc_attr( $sticky_width ) . 'px;" />';
if ( isset( $params['sticky_image']['id'] ) && $params['sticky_image']['id'] && $width_height_needed ) {
woodmart_lazy_loading_deinit( true );
$logo_sticky = wp_get_attachment_image( $params['sticky_image']['id'], 'full', false, array( 'style' => 'max-width:' . $sticky_width . 'px;' ) );
woodmart_lazy_loading_init();
}
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="wd-logo wd-sticky-logo" rel="home">
<?php echo $logo_sticky; // phpcs:ignore ?>
</a>
<?php endif ?>
</div>