wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



media_send_to_editor › WordPress Function

Depuis2.5.0
Dépréciéen/a
› media_send_to_editor ( $html )
Paramètres:
  • (string) $html
    Requis: Oui
Retourne:
  • (never)
Défini(e) dans:
Codex:

Adds image HTML to editor.



Source

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