首页 WordPress函数大全 get_image_send_to_editor()

get_image_send_to_editor()

2020-05-01 / 4215阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_image_send_to_editor( int $id, string $caption, string $title, string $align, string $url = '', bool|string $rel = false, string|array $size = 'medium', string $alt = '' )

Retrieves the image HTML to send to the editor.

描述

参数

$id

(int)
(Required)
Image attachment id.

$caption

(string)
(Required)
Image caption.

$title

(string)
(Required)
Image title attribute.

$align

(string)
(Required)
Image CSS alignment property.

$url

(string)
(Optional)
Image src URL.

Default value: ''

$rel

(bool|string)
(Optional)
Value for rel attribute or whether to add a default value.

Default value: false

$size

(string|array)
(Optional)
Image size. Accepts any valid image size, or an array of width and height values in pixels (in that order).

Default value: 'medium'

$alt

(string)
(Optional)
Image alt attribute.

Default value: ''

返回

(string) The HTML output to insert into the editor.

大家谈论
    我的见解