/** * Prints the name of the file associated to the given post * * @see get_the_attached_file_name * * @param int $post_id Defaults to the current post ID from the loop * @param array $file The file description * * @return string|mixed */ function cuar_the_attached_file_name($post_id = null, $file) { echo cuar_get_the_attached_file_name($post_id, $file); }
/** @var string $file_id */ /** @var array $attached_file */ ?> <div class="cuar-file-attachment <?php if ($file_id != null) { echo 'cuar-state-success'; } ?> " data-post-id="<?php echo esc_attr($post_id); ?> " 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>