wp_upload_bits filter-hook . 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.
Usage
add_filter( 'wp_upload_bits', 'filter_function_name_3398' ); function filter_function_name_3398( $upload_bits_error ){ // filter... return $upload_bits_error; }
- $upload_bits_error(array/string)
- An array of upload bits data, or error message to return.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
wp_upload_bits
wp-includes/functions.php 2697-2704
$upload_bits_error = apply_filters( 'wp_upload_bits', array( 'name' => $name, 'bits' => $bits, 'time' => $time, ) );
Where in WP core the hook is used WordPress
wp-includes/functions.php 96
add_filter( 'wp_upload_bits', 'upload_is_file_too_big' );