A WordPress-centric search engine for devs and theme authors



media_send_to_editor ›

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;
}