jetpack_upload_handler_can_upload

jetpack_upload_handler_can_upload

Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.14.5

apply_filters('jetpack_upload_handler_can_upload') is found 1 times:

  • /class.jetpack.php line 3377
    3373
    3374
    3375
    3376
    3377
    3378
    3379
    3380
    3381
    3382
    3383
    *
     * @param bool|WP_Error $allowed If false or WP_Error, block the upload. If true, allow the upload.
     * @param mixed $_FILES The $_FILES attempting to be uploaded.
     */
    $can_upload = apply_filters( 'jetpack_upload_handler_can_upload', true, $_FILES );
    if ( ! $can_upload || is_wp_error( $can_upload ) ) {
        if ( is_wp_error( $can_upload ) ) {
            return $can_upload;
        }
        return new WP_Error( 'handler_cannot_upload', __( 'The upload handler cannot upload files', 'jetpack' ), 400 );
    }