Core Function
View Source on Trac ↗ get_image_send_to_editor()
get_image_send_to_editor(
mixed $id,
mixed $caption,
mixed $title,
mixed $align,
mixed $url = '',
mixed $rel = false,
mixed $size = 'medium',
mixed $alt = ''
) Retrieves the image HTML to send to the editor.
Parameters 6 required
| Name / Type | Description |
|---|---|
| $id int | Image attachment ID. Required |
| $caption string | Image caption. Required |
| $title string | Image title attribute. Required |
| $align string | Image CSS alignment property. Required |
| $url string | Optional. Image src URL. Default empty. |
| (bool | | string) $rel Optional. Value for rel attribute or whether to add a default value. Default false. 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 'medium'. Required |
| $alt string | Optional. Image alt attribute. Default empty. |
Return Value
(string)
The HTML output to insert into the editor.
Function Information
Since Version
2.5.0
Source File
wp-admin/includes/media.php
Advertisement