Skip to content

Instantly share code, notes, and snippets.

Created March 3, 2017 12:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Customizing the Multi-File Merge Tag
gw_multi_file_merge_tag()->register_settings( array(
'form_id' => 1,
'markup' => array(
'file_types' => array( 'jpg', 'jpeg', 'png', 'gif' ),
'markup' => '<div class="gw-file gw-image gw-{ext}"><a href="{url}"><img src="{url}"></a></div>'
'file_types' => array( 'mp4', 'ogg', 'webm' ),
'markup' => '<video width="320" height="240" controls>
<source src="{url}" type="video/{ext}">
Your browser does not support the video tag.
) );
.gw-file {
float: left;
margin: 0 5px 20px;
margin: 0 1% 20px;
width: 31.3333%;
.gw-file a {
text-transform: uppercase;
font-size: 11px;
.gw-file a:first-child {
display: block;
min-height: 120px;
max-height: 120px;
overflow: hidden;
border-radius: 3px;
background-color: #eee;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment