image_send_to_editor_url хук-фильтрWP 2.8.0

Filters the image URL sent to the editor.

Использование

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(строка)
HTML markup sent to the editor for an image.
$src(строка)
Image source URL.
$alt(строка)
Image alternate, or alt, text.
$align(строка)
The image alignment. Possible values include 'alignleft', 'aligncenter', 'alignright', 'alignnone'.
По умолчанию: 'alignnone'

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

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

Где используется хук в WordPress

Использование не найдено.