media_upload_form_url хук-фильтрWP 2.6.0

Filters the media upload form action URL.

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

add_filter( 'media_upload_form_url', 'wp_kama_media_upload_form_url_filter', 10, 2 );

/**
 * Function for `media_upload_form_url` filter-hook.
 * 
 * @param string $form_action_url The media upload form action URL.
 * @param string $type            The type of media.
 *
 * @return string
 */
function wp_kama_media_upload_form_url_filter( $form_action_url, $type ){

	// filter...
	return $form_action_url;
}
$form_action_url(строка)
The media upload form action URL.
$type(строка)
The type of media.
По умолчанию: 'file'

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

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

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

media_upload_type_form()
media_upload_form_url
media_upload_type_url_form()
media_upload_form_url
media_upload_gallery_form()
media_upload_form_url
media_upload_library_form()
media_upload_form_url
wp-admin/includes/media.php 2321
$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
wp-admin/includes/media.php 2390
$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
wp-admin/includes/media.php 2537
$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );
wp-admin/includes/media.php 2700
$form_action_url = apply_filters( 'media_upload_form_url', $form_action_url, $type );

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

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