image_send_to_editor_url filter-hookWP 2.8.0

Filters the image URL sent to the editor.

Usage

add_filter( 'image_send_to_editor_url', 'wp_kama_image_send_to_editor_url_filter', 10, 4 );

/**
 * Function for `image_send_to_editor_url` filter-hook.
 * 
 * @param string $html  HTML markup sent to the editor for an image.
 * @param string $src   Image source URL.
 * @param string $alt   Image alternate, or alt, text.
 * @param string $align The image alignment. Possible values include 'alignleft', 'aligncenter', 'alignright', 'alignnone'.
 *
 * @return string
 */
function wp_kama_image_send_to_editor_url_filter( $html, $src, $alt, $align ){

	// filter...
	return $html;
}
$html(string)
HTML markup sent to the editor for an image.
$src(string)
Image source URL.
$alt(string)
Image alternate, or alt, text.
$align(string)
The image alignment. Possible values include 'alignleft', 'aligncenter', 'alignright', 'alignnone'.
Default: 'alignnone'

Changelog

Since 2.8.0 Introduced.

Where the hook is called

wp_media_upload_handler()
image_send_to_editor_url
wp-admin/includes/media.php 957
$html = apply_filters( 'image_send_to_editor_url', $html, sanitize_url( $src ), $alt, $align );

Where the hook is used in WordPress

Usage not found.