WPDev.one
Core Function
View Source on Trac ↗

_load_image_to_edit_path()

_load_image_to_edit_path( mixed $attachment_id, mixed $size = 'full' )

Retrieves the path or URL of an attachment's attached file.

Parameters 2 required

Name / Type Description
$attachment_id
int

Attachment ID.

Required
mixed

(string | int[]) $size Optional. Image size. Accepts any registered image size name, or an array of width and height values in pixels (in that order). Default 'full'.

Required

Return Value

((string)
| false) File path or URL on success, false on failure.

Function Information

Since Version
3.4.0
Source File
wp-admin/includes/image.php
Advertisement