wp_upload_bits хук-фильтр . WP 3.0.0
Filters whether to treat the upload bits as an error.
Returning a non-array from the filter will effectively short-circuit preparing the upload bits and return that value instead. An error message should be returned as a string.
Использование
add_filter( 'wp_upload_bits', 'filter_function_name_1711' ); function filter_function_name_1711( $upload_bits_error ){ // filter... return $upload_bits_error; }
- $upload_bits_error(массив/строка)
- An array of upload bits data, or error message to return.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
wp_upload_bits
wp-includes/functions.php 2697-2704
$upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time, ) );
Где используется хук в ядре WordPress
wp-includes/functions.php 96
add_filter( 'wp_upload_bits', 'upload_is_file_too_big' );