Skip to content

Instantly share code, notes, and snippets.

@hirejordansmith hirejordansmith/functions.php Secret

Created Mar 3, 2017
Embed
What would you like to do?
Customizing the Multi-File Merge Tag
<?php
#Usage
gw_multi_file_merge_tag()->register_settings( array(
'form_id' => 1,
'markup' => array(
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>'
),
array(
'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.
</video>'
)
)
) );
.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
You can’t perform that action at this time.