Astra_Mobile_Header::astra_mobile_header_custom_logo( sting $html, int $blog_id )

Replace logo with Mobile Header logo.


Description


Parameters

$html

(sting) (Required) Size name.

$blog_id

(int) (Required) Icon.


Return

(string) html markup of logo.


Source

File: inc/class-astra-mobile-header.php

		public function astra_mobile_header_custom_logo( $html, $blog_id ) {

			$mobile_header_logo = astra_get_option( 'mobile-header-logo' );

			$custom_logo_id = attachment_url_to_postid( $mobile_header_logo );

			$size = 'ast-mobile-header-logo-size';

			if ( is_customize_preview() ) {
				$size = 'full';
			}

			$logo = sprintf(
				'<a href="%1$s" class="custom-mobile-logo-link" rel="home" itemprop="url">%2$s</a>',
				esc_url( home_url( '/' ) ),
				wp_get_attachment_image(
					$custom_logo_id,
					$size,
					false,
					array(
						'class' => 'ast-mobile-header-logo',
					)
				)
			);

			return $html . $logo;

		}

Changelog

Changelog
Version Description
1.4.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.