WP HOOKS
filtrdynamicznyod 2.5.0

async_upload_{$type}

Args 1Plik wp-admin/async-upload.php

Opis — z kodu źródłowego

Filters the returned ID of an uploaded attachment.

The dynamic portion of the hook name, $type, refers to the attachment type. Possible hook names include:

  • async_upload_audio
  • async_upload_file
  • async_upload_image
  • async_upload_video

Hook dynamiczny — możliwe nazwy

async_upload_audioasync_upload_fileasync_upload_imageasync_upload_video

Parametry

ParametrTypOpis
$idintUploaded attachment ID.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'async_upload_{$type}', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii