wpseek.com
WordPress开发者和主题制作者的搜索引擎



media_send_to_editor › WordPress Function

Since2.5.0
已弃用n/a
› media_send_to_editor ( $html )
参数:
  • (string) $html
    Required: Yes
返回:
  • (never)
定义在:
文档:

Adds image HTML to editor.



源码

function media_send_to_editor( $html ) {
	wp_print_inline_script_tag(
		sprintf(
			'( window.dialogArguments || opener || parent || top ).send_to_editor( %s );',
			wp_json_encode( $html, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
		)
	);
	exit;
}