<?php 
foreach ($attached_files as $file_id => $file) {
    ?>
                        <li>
                            <a href="<?php 
    cuar_the_attached_file_link($post->ID, $file);
    ?>
" title="<?php 
    esc_attr_e('Get file', 'cuar');
    ?>
">
                                <?php 
    do_action('cuar/templates/file-attachment-item/before-caption', $post->ID, $file);
    ?>
                                <span class="cuar-file-caption"><?php 
    cuar_the_attached_file_caption($post->ID, $file);
    ?>
</span>
                                <?php 
    do_action('cuar/templates/file-attachment-item/after-caption', $post->ID, $file);
    ?>
                                <span class="cuar-file-size">(<?php 
    cuar_the_attached_file_size($post->ID, $file);
    ?>
)</span>
                            </a>
                        </li>
                    <?php 
}
?>
                </ul>
?>
"
     data-filename="<?php 
if ($attached_file != null) {
    echo esc_attr(cuar_get_the_attached_file_name($post_id, $attached_file));
}
?>
">

    <?php 
do_action('cuar/templates/attachment-manager/before-file-attachment-caption', $post_id, $attached_file);
?>

    <span class="cuar-caption"><?php 
if ($attached_file != null) {
    cuar_the_attached_file_caption($post_id, $attached_file);
}
?>
</span>

    <?php 
do_action('cuar/templates/attachment-manager/after-file-attachment-caption', $post_id, $attached_file);
?>

    <span class="cuar-actions">
        <?php 
do_action('cuar/templates/attachment-manager/file-attachment-actions', $post_id, $attached_file);
?>
        <?php 
if ($file_id != null) {
    ?>