WP_Site_Icon::intermediate_image_sizes() WordPress Method

The WP_Site_Icon::intermediate_image_sizes() method is used to retrieve the image sizes that are used by the Wordpress site icon. This is useful for plugins that need to know the sizes of the icon in order to generate appropriate markup.

WP_Site_Icon::intermediate_image_sizes( string[] $sizes = array() ) #

Adds Site Icon sizes to the array of image sizes on demand.


Parameters

$sizes

(string[])(Optional)Array of image size names.

Default value: array()


Top ↑

Return

(string[]) Array of image size names.


Top ↑

Source

File: wp-admin/includes/class-wp-site-icon.php

	public function intermediate_image_sizes( $sizes = array() ) {
		/** This filter is documented in wp-admin/includes/class-wp-site-icon.php */
		$this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes );
		foreach ( $this->site_icon_sizes as $size ) {
			$sizes[] = 'site_icon-' . $size;
		}

		return $sizes;
	}


Top ↑

Changelog

Changelog
VersionDescription
4.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.