WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Site_Icon::additional_sizes() public WP 4.3.0

Adds additional sizes to be made when creating the site icon images.

Это метод класса: WP_Site_Icon{}

Хуки из метода
Возвращает

Массив[]. Array of arrays containing additional image sizes.

Использование

$WP_Site_Icon = new WP_Site_Icon();
$WP_Site_Icon->additional_sizes( $sizes );
$sizes(массив[])
Array of arrays containing information for additional sizes.
По умолчанию: array()

Список изменений

С версии 4.3.0 Введена.

Код WP Site Icon::additional sizes: wp-admin/includes/class-wp-site-icon.php WP 5.5.1

<?php
public function additional_sizes( $sizes = array() ) {
	$only_crop_sizes = array();

	/**
	 * Filters the different dimensions that a site icon is saved in.
	 *
	 * @since 4.3.0
	 *
	 * @param int[] $site_icon_sizes Array of sizes available for the Site Icon.
	 */
	$this->site_icon_sizes = apply_filters( 'site_icon_image_sizes', $this->site_icon_sizes );

	// Use a natural sort of numbers.
	natsort( $this->site_icon_sizes );
	$this->site_icon_sizes = array_reverse( $this->site_icon_sizes );

	// Ensure that we only resize the image into sizes that allow cropping.
	foreach ( $sizes as $name => $size_array ) {
		if ( isset( $size_array['crop'] ) ) {
			$only_crop_sizes[ $name ] = $size_array;
		}
	}

	foreach ( $this->site_icon_sizes as $size ) {
		if ( $size < $this->min_size ) {
			$only_crop_sizes[ 'site_icon-' . $size ] = array(
				'width ' => $size,
				'height' => $size,
				'crop'   => true,
			);
		}
	}

	return $only_crop_sizes;
}