<?php
function pg_metabox_downloads($meta_boxes)
{
  $downloads_metaboxes = [
    "id" => "downloads",
    "title" => esc_html__("Konfigurácia súboru", "inoby"),
    "post_types" => ["downloads"],
    "context" => "side",
    "priority" => "default",
    "autosave" => "false",
    "fields" => [
      [
        'id'               => 'downloads_file',
        'name'             => __('Súbor', 'inoby'),
        'type'             => 'file_advanced', 
        'force_delete'     => false,
        'max_file_uploads' => 1,
      ],
    ], 
  ];

  $meta_boxes[] = apply_filters("inoby_downloads_metaboxes", $downloads_metaboxes);

  return $meta_boxes;
}
add_filter("rwmb_meta_boxes", "pg_metabox_downloads");
?>