wpseek.com
A WordPress-centric search engine for devs and theme authors



media_send_to_editor › WordPress Function

Since2.5.0
Deprecatedn/a
media_send_to_editor ( $html )
Parameters:
  • (string) $html
    Required: Yes
Defined at:
Codex:

Adds image HTML to editor.



Source

function media_send_to_editor( $html ) {
	?>
	<script type="text/javascript">
	var win = window.dialogArguments || opener || parent || top;
	win.send_to_editor( <?php echo wp_json_encode( $html ); ?> );
	</script>
	<?php
	exit;
}