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

_wp_add_additional_image_sizes() WP 5.3.0

Add additional default image sub-sizes.

These sizes are meant to enhance the way WordPress displays images on the front-end on larger, high-density devices. They make it possible to generate more suitable srcset and sizes attributes when the users upload large images.

The sizes can be changed or removed by themes and plugins but that is not recommended. The size "names" reflect the image dimensions, so changing the sizes would be quite misleading.

Хуков нет.

Возвращает

Null. Ничего.

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

_wp_add_additional_image_sizes();

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

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

Код _wp_add_additional_image_sizes() WP 5.5.1

<?php
function _wp_add_additional_image_sizes() {
	// 2x medium_large size.
	add_image_size( '1536x1536', 1536, 1536 );
	// 2x large size.
	add_image_size( '2048x2048', 2048, 2048 );
}