wp_media_insert_url_form
函数
wp_media_insert_url_form ( $default_view = 'image' )
- 参数
-
-
(string)
$default_view- Required: 否
- Default: ‘image’
-
(string)
- 返回值
-
- (string) HTML content of the form.
- 定义位置
-
-
wp-admin/includes/media.php
, line 2899
-
wp-admin/includes/media.php
- 引入
- 2.7.0
- 弃用
- –
Creates the form for external url.
function wp_media_insert_url_form( $default_view = 'image' ) {
/** This filter is documented in wp-admin/includes/media.php */
if ( ! apply_filters( 'disable_captions', '' ) ) {
$caption = '
';
} else {
$caption = '';
}
$default_align = get_option( 'image_default_align' );
if ( empty( $default_align ) ) {
$default_align = 'none';
}
if ( 'image' === $default_view ) {
$view = 'image-only';
$table_class = '';
} else {
$view = 'not-image';
$table_class = $view;
}
return '
' .
wp_required_field_message() .
'
|
|
|
|---|---|
|
‘ . __( ‘Link text, e.g. “Ransom Demands (PDF)”’ ) . ‘ |
|
|
‘ . __( ‘Alt text for the image, e.g. “The Mona Lisa”’ ) . ‘ |
|
|
|
|
|
‘ . __( ‘Enter a link URL or click above for presets.’ ) . ‘ |
|
| ‘ . get_submit_button( __( ‘Insert into Post’ ), ”, ‘insertonlybutton’, false ) . ‘ |
‘;
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。