Custom Fields
Re-Envisioned
Support General Field file_upload change options Reply To: Field file_upload change options

#10324

Anh Tran
Keymaster

Hi, this can be done with CSS. Here is a trick to output quick CSS for the field without enqueuing new CSS file:

<?php
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
    $meta_boxes[] = [
        'title' => 'Test Meta Box',
        'fields' => [
            [
                'type' => 'file_upload',
                'id'   => 'test',
                'name' => 'File Upload',
                'after' => '<style>.rwmb-edit-media { display: none; }</style>'
            ]
        ],
    ];
    return $meta_boxes;
} );