filtrod 2.1.0
pre_upload_error
Opis — z kodu źródłowego
Filters whether to preempt the XML-RPC media upload.
Returning a truthy value will effectively short-circuit the media upload, returning that value as a 500 error instead.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$error | bool | Whether to pre-empt the media upload. Default false. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'pre_upload_error', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'pre_upload_error', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii