-
-
Save hirejordansmith/b145df06248f03db01e7213f399f5bff to your computer and use it in GitHub Desktop.
Customizing the Multi-File Merge Tag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>' | |
) | |
) | |
) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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