RWMB_Media_Field::get_attributes PHP Method

get_attributes() public static method

Get the attributes for a field
public static get_attributes ( array $field, mixed $value = null ) : array
$field array
$value mixed
return array
    public static function get_attributes($field, $value = null)
    {
        $attributes = parent::get_attributes($field, $value);
        $attributes['type'] = 'hidden';
        $attributes['name'] .= !$field['clone'] && $field['multiple'] ? '[]' : '';
        $attributes['disabled'] = true;
        $attributes['id'] = false;
        $attributes['value'] = $value;
        return $attributes;
    }