Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Fixing issues #209, #182 and #204 #213

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions library/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@
add_shortcode('gallery', 'gallery_shortcode_tbs');

function gallery_shortcode_tbs($attr) {
global $post, $wp_locale;

$output = "";

$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts($args);
if ($attachments) {
$output = '<div class="row-fluid"><ul class="thumbnails">';
foreach ( $attachments as $attachment ) {
$output .= '<li class="span2">';
$att_title = apply_filters( 'the_title' , $attachment->post_title );
$output .= wp_get_attachment_link( $attachment->ID , 'thumbnail', true );
$output .= '</li>';
}
$output .= '</ul></div>';
}
global $post, $wp_locale;

return $output;
$output = "";

$args = array( 'post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post->ID );
$attachments = get_posts($args);
if ($attachments) {
$output = '<div class="row">';
foreach ( $attachments as $attachment ) {

$output .= '<div class="col-sm-3">';
$att_title = apply_filters( 'the_title' , $attachment->post_title );
$output .= wp_get_attachment_link( $attachment->ID , 'medium', false );
$output .= '</div>';
}
$output .= '</div>';
}

return $output;
}


Expand Down