Uses
Uses | Description |
---|---|
wp-includes/functions.php: wp_json_encode() | Encode a variable into JSON, with some sanity checks. |
Adds image HTML to editor.
(string) (Required)
File: wp-admin/includes/media.php
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; }
Version | Description |
---|---|
2.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/media_send_to_editor