WP_REST_Attachments_Controller::get_special_image_sizes
Returns the image size names which name a single file rather than a sub-size.
Each of these is handled on its own in {@see self::sideload_item()} and stored under its own key by {@see self::finalize_item()}, so unlike a regular sub-size none of them may appear in an array of names sharing one file.
Метод класса: WP_REST_Attachments_Controller{}
Хуков нет.
Возвращает
string[]. Special image size names.
Использование
$result = WP_REST_Attachments_Controller::get_special_image_sizes(): array;
Список изменений
| С версии 7.1.0 | Введена. |
Код WP_REST_Attachments_Controller::get_special_image_sizes() WP REST Attachments Controller::get special image sizes WP 7.1.4
private static function get_special_image_sizes(): array {
return array(
'original',
'scaled',
// Source-format original (e.g. the HEIC kept alongside its JPEG derivative).
self::IMAGE_SIZE_SOURCE_ORIGINAL,
// Converted-video companions for an animated GIF (the MP4/WebM and its poster).
'animated_video',
'animated_video_poster',
);
}