Astra_Ext_Advanced_Headers_Meta::logo_image_sizes( array $sizes, array $metadata )

Add logo image sizes in filter.


Description


Parameters

$sizes

(array) (Required) Sizes.

$metadata

(array) (Required) attachment data.


Return

(array)


Source

File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-meta.php

		public static function logo_image_sizes( $sizes, $metadata ) {

			$logo_width = sanitize_key( $_POST['ast-advanced-headers-design']['header-logo-width'] );

			if ( is_array( $sizes ) && '' != $logo_width ) {

				$sizes['ast-adv-header-logo-size'] = array(
					'width'  => (int) $logo_width,
					'height' => 0,
					'crop'   => false,
				);
			}

			return $sizes;
		}

Changelog

Changelog
Version Description
1.0.0 Introduced.

User Contributed Notes

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