Astra_Mobile_Header::add_mobile_logo_svg_class( bool $is_logo_attachment, array $attachment )

Add svg class to mobile logo.


Description


Parameters

$is_logo_attachment

(bool) (Required) is attachment is logo image?.

$attachment

(array) (Required) attachment data.


Return

(bool) return if attachment is mobile logo image.


Source

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

		public function add_mobile_logo_svg_class( $is_logo_attachment, $attachment ) {

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

			if ( $custom_logo_id === $attachment->ID ) {
				return true;
			}

			return $is_logo_attachment;
		}

Changelog

Changelog
Version Description
2.1.0 Introduced.

User Contributed Notes

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