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

In this article

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

Parameters

$sizesstring[]optional
Array of image size names.

Default:array()

Return

string[] Array of image size names.

Source

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;
}

Hooks

apply_filters( ‘site_icon_image_sizes’, int[] $site_icon_sizes )

Filters the different dimensions that a site icon is saved in.

Changelog

VersionDescription
4.3.0Introduced.

User Contributed Notes

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