media_send_to_editor filter-hook . WP 2.5.0
Filters the HTML markup for a media item sent to the editor.
Usage
add_filter( 'media_send_to_editor', 'filter_function_name_6812', 10, 3 ); function filter_function_name_6812( $html, $send_id, $attachment ){ // filter... return $html; }
- $html(string)
- HTML markup for a media item sent to the editor.
- $send_id(int)
- The first key from the $_POST['send'] data.
- $attachment(array)
- Array of attachment metadata.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
media_send_to_editor
media_send_to_editor
wp-admin/includes/media.php 830
$html = apply_filters( 'media_send_to_editor', $html, $send_id, $attachment );
wp-admin/includes/ajax-actions.php 3266
$html = apply_filters( 'media_send_to_editor', $html, $id, $attachment );
Where in WP core the hook is used WordPress
wp-admin/includes/media.php 3239
remove_filter( 'media_send_to_editor', 'image_media_send_to_editor' );
wp-admin/includes/media.php 569
add_filter( 'media_send_to_editor', 'image_media_send_to_editor', 10, 3 );