Formatting, adding/updating links
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* Re-create the [gallery] shortcode and use thumbnails styling from Bootstrap
|
||||
* The number of columns must be a factor of 12.
|
||||
*
|
||||
* @link http://twbs.github.io/bootstrap/components/#thumbnails
|
||||
* @link http://getbootstrap.com/components/#thumbnails
|
||||
*/
|
||||
function roots_gallery($attr) {
|
||||
$post = get_post();
|
||||
@@ -88,16 +88,16 @@ function roots_gallery($attr) {
|
||||
$image = ('file' == $link) ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
|
||||
$output .= ($i % $columns == 0) ? '<div class="row gallery-row">': '';
|
||||
$output .= '<div class="' . $grid .'">' . $image;
|
||||
|
||||
|
||||
if (trim($attachment->post_excerpt)) {
|
||||
$output .= '<div class="caption hidden">' . wptexturize($attachment->post_excerpt) . '</div>';
|
||||
}
|
||||
|
||||
|
||||
$output .= '</div>';
|
||||
$i++;
|
||||
$output .= ($i % $columns == 0) ? '</div>' : '';
|
||||
}
|
||||
|
||||
|
||||
$output .= ($i % $columns != 0 ) ? '</div>' : '';
|
||||
$output .= '</div>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user