diff --git a/functions.php b/functions.php index 9485636abd..4742db3e38 100644 --- a/functions.php +++ b/functions.php @@ -18,7 +18,6 @@ 'lib/assets.php', // Scripts and stylesheets 'lib/titles.php', // Page titles 'lib/nav.php', // Custom nav modifications - 'lib/gallery.php', // Custom [gallery] modifications 'lib/extras.php', // Custom functions ]; diff --git a/lib/config.php b/lib/config.php index 96d77e8244..073b15a574 100644 --- a/lib/config.php +++ b/lib/config.php @@ -11,7 +11,6 @@ add_theme_support('soil-relative-urls'); // Enable relative URLs from Soil add_theme_support('soil-nice-search'); // Enable nice search from Soil add_theme_support('soil-jquery-cdn'); // Enable to load jQuery from the Google CDN -add_theme_support('bootstrap-gallery'); // Enable Bootstrap's thumbnails component on [gallery] /** * Configuration values diff --git a/lib/gallery.php b/lib/gallery.php deleted file mode 100644 index 9443c8d5fa..0000000000 --- a/lib/gallery.php +++ /dev/null @@ -1,132 +0,0 @@ - 'ASC', - 'orderby' => 'menu_order ID', - 'id' => $post->ID, - 'itemtag' => '', - 'icontag' => '', - 'captiontag' => '', - 'columns' => 3, - 'size' => 'thumbnail', - 'include' => '', - 'exclude' => '', - 'link' => '' - ], $attr)); - - $id = intval($id); - $columns = (12 % $columns == 0) ? $columns : 3; - $grid = sprintf('col-sm-%1$s col-lg-%1$s', 12 / $columns); - - if ($order === 'RAND') { - $orderby = 'none'; - } - - if (!empty($include)) { - $_attachments = get_posts(['include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby]); - - $attachments = []; - foreach ($_attachments as $key => $val) { - $attachments[$val->ID] = $_attachments[$key]; - } - } elseif (!empty($exclude)) { - $attachments = get_children(['post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby]); - } else { - $attachments = get_children(['post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby]); - } - - if (empty($attachments)) { - return ''; - } - - if (is_feed()) { - $output = "\n"; - foreach ($attachments as $att_id => $attachment) { - $output .= wp_get_attachment_link($att_id, $size, true) . "\n"; - } - return $output; - } - - $unique = (get_query_var('page')) ? $instance . '-p' . get_query_var('page') : $instance; - $output = '