file_send_to_editor_url хук-фильтрWP 3.3.0

Filters the URL sent to the editor for a specific media type.

Это один из вариантов динамического хука (type)_send_to_editor_url

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

add_filter( 'file_send_to_editor_url', 'wp_kama_file_send_to_editor_url_filter', 10, 3 );

/**
 * Function for `file_send_to_editor_url` filter-hook.
 * 
 * @param string $html  HTML markup sent to the editor.
 * @param string $src   Media source URL.
 * @param string $title Media title.
 *
 * @return string
 */
function wp_kama_file_send_to_editor_url_filter( $html, $src, $title ){

	// filter...
	return $html;
}
$html(строка)
HTML markup sent to the editor.
$src(строка)
Media source URL.
$title(строка)
Media title.

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

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

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

wp_media_upload_handler()
file_send_to_editor_url
wp-admin/includes/media.php 934
$html = apply_filters( "{$type}_send_to_editor_url", $html, sanitize_url( $src ), $title );

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

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