Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.64.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : logo.php
<?php
if (is_home() && !is_front_page() || is_home() && is_front_page()){
  $page_custom_logo_data = get_post_meta( get_queried_object_id(), '_custom_page_header_options', true );
  if (!empty($page_custom_logo_data['page_custom_logo_switch'])) {
      $page_custom_logo_switch = $page_custom_logo_data['page_custom_logo_switch'];
  } else {
      $page_custom_logo_switch = '';
  }
  if (!empty($page_custom_logo_data['page_custom_logo_upload'])) {
      $custom_img_id  = $page_custom_logo_data['page_custom_logo_upload'];
      $attachment = wp_get_attachment_image_src( $custom_img_id, 'full' );
      $custom_page_logo     = ($attachment) ? $attachment[0] : $custom_img_id;
  }
  if (!empty($page_custom_logo_data['page_custom_sticky_logo_upload'])) {
      $custom_img_id  = $page_custom_logo_data['page_custom_sticky_logo_upload'];
      $attachment = wp_get_attachment_image_src( $custom_img_id, 'full' );
      $page_custom_sticky_logo_upload     = ($attachment) ? $attachment[0] : $custom_img_id;
  }
} else {
  $page_custom_logo_data = get_post_meta( get_queried_object_id(), '_custom_page_header_options', true );
  if (!empty($page_custom_logo_data['page_custom_logo_switch'])) {
      $page_custom_logo_switch = $page_custom_logo_data['page_custom_logo_switch'];
  } else {
      $page_custom_logo_switch = '';
  }
  if (!empty($page_custom_logo_data['page_custom_logo_upload'])) {
      $custom_img_id  = $page_custom_logo_data['page_custom_logo_upload'];
      $attachment = wp_get_attachment_image_src( $custom_img_id, 'full' );
      $custom_page_logo     = ($attachment) ? $attachment[0] : $custom_img_id;
  }
  if (!empty($page_custom_logo_data['page_custom_sticky_logo_upload'])) {
      $custom_img_id  = $page_custom_logo_data['page_custom_sticky_logo_upload'];
      $attachment = wp_get_attachment_image_src( $custom_img_id, 'full' );
      $page_custom_sticky_logo_upload     = ($attachment) ? $attachment[0] : $custom_img_id;
  }
}
?>

<div class="logo">
  <?php
    $custom_logo_id = get_theme_mod( 'custom_logo' );
    $logo           = wp_get_attachment_image_src( $custom_logo_id , 'full' );
    if ( has_custom_logo() ) {
      echo '<a href="'.esc_url(home_url('/')).'" class="brand-logo"><img src="'. esc_url( $logo[0] ) .'" alt="'.esc_attr__( 'Dustrial logo', 'dustrial' ).'"></a>';
    } elseif(function_exists( 'dustrial_framework_init' ) ) {
      if ( $page_custom_logo_switch == 1 && !empty( $custom_page_logo ) ){
        echo'<a href="'.esc_url(home_url('/')).'" class="navbar-brand brand-logo no-sticky"><img alt="'.esc_attr__( 'Chariton logo', 'dustrial' ).'" src="'.esc_url( $custom_page_logo ).'"></a>';
        if ( !empty( $page_custom_sticky_logo_upload ) ) {
          echo'<a href="'.esc_url( home_url('/') ).'" class="yes-sticky"><img alt="'.esc_attr__( 'Chariton logo', 'dustrial' ).'" src="'.esc_url( $page_custom_sticky_logo_upload ).'"></a>';
        } else {
           echo'<a href="'.esc_url( home_url('/') ).'" class="navbar-brand brand-logo yes-sticky"><img alt="'.esc_attr__( 'Chariton logo', 'dustrial' ).'" src="'.esc_url( $custom_page_logo ).'"></a>';
        }
      }elseif( dustrial_get_option( 'dustrial_logo_img' ) ){
        $site_logo_id        = dustrial_get_option('dustrial_logo_img');
        $attachment          = wp_get_attachment_image_src( $site_logo_id, 'full' );
        $site_logo           = ($attachment) ? $attachment[0] : $site_logo_id;

        $site_sticky_logo_id = dustrial_get_option( 'dustrial_sticky_logo' );
        $sticky_attachment   = wp_get_attachment_image_src( $site_sticky_logo_id, 'full' );
        $site_sticky_logo    = ( $sticky_attachment ) ? $sticky_attachment[0] : $site_sticky_logo_id;

        if ( !empty( $site_logo ) ) {
          echo'<a href="'.esc_url(home_url('/')).'" class="navbar-brand brand-logo no-sticky"><img alt="'.esc_attr__( 'Dustrial logo', 'dustrial' ).'" src="'.esc_url( $site_logo ).'"></a>';
          if ( !empty( $site_sticky_logo ) ) {
            echo'<a href="'.esc_url( home_url('/') ).'" class="yes-sticky"><img alt="'.esc_attr__( 'Dustrial logo', 'dustrial' ).'" src="'.esc_url( $site_sticky_logo ).'"></a>';
          } else {
             echo'<a href="'.esc_url(home_url('/')).'" class="navbar-brand brand-logo yes-sticky"><img alt="'.esc_attr__( 'Dustrial logo', 'dustrial' ).'" src="'.esc_url( $site_logo ).'"></a>';
          }
        }else{
          echo '<div class="default-logo"><a href="'.esc_url(home_url('/')).'" class="navbar-brand brand-logo">'. get_bloginfo( 'name' ) .'</a></div>';
        }
      }else{
        echo '<div class="default-logo"><a href="'.esc_url(home_url('/')).'" class="navbar-brand brand-logo">'. get_bloginfo( 'name' ) .'</a></div>';
      }
    } else {
      echo '<div class="default-logo"><a href="'.esc_url(home_url('/')).'" class="navbar-brand brand-logo">'. get_bloginfo( 'name' ) .'</a></div>';
    }
  ?>
  <?php
    if ( display_header_text() == true ) {
      $description = get_bloginfo( 'description', 'display' );
      if ( $description || is_customize_preview() ) : ?>
        <div class="site-description"><?php echo esc_attr( $description ); ?></div>
      <?php endif;
    }
  ?>
</div>
© 2025 XylotrechusZ