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

load_image_to_edit() WP 2.9.0

Load an image resource for editing.

Хуки из функции
Возвращает

resource/false. The resulting image resource on success, false on failure.

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

load_image_to_edit( $attachment_id, $mime_type, $size );
$attachment_id(строка) (обязательный)
Attachment ID.
$mime_type(строка) (обязательный)
Image mime type.
$size(строка)
Image size.
По умолчанию: 'full'

Код load image to edit: wp-admin/includes/image.php WP 5.2.2

<?php
function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) {
	$filepath = _load_image_to_edit_path( $attachment_id, $size );
	if ( empty( $filepath ) ) {
		return false;
	}

	switch ( $mime_type ) {
		case 'image/jpeg':
			$image = imagecreatefromjpeg( $filepath );
			break;
		case 'image/png':
			$image = imagecreatefrompng( $filepath );
			break;
		case 'image/gif':
			$image = imagecreatefromgif( $filepath );
			break;
		default:
			$image = false;
			break;
	}
	if ( is_resource( $image ) ) {
		/**
		 * Filters the current image being loaded for editing.
		 *
		 * @since 2.9.0
		 *
		 * @param resource $image         Current image.
		 * @param string   $attachment_id Attachment ID.
		 * @param string   $size          Image size.
		 */
		$image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size );
		if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
			imagealphablending( $image, false );
			imagesavealpha( $image, true );
		}
	}
	return $image;
}