From 03f9517d5f036de4018ae79a928e74ba388f5523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Ko=CC=88nemann?= Date: Thu, 26 Jan 2017 19:51:55 +0100 Subject: [PATCH] remove bootstrap wp gallery --- inc/bootstrap-wp-gallery.php | 146 ----------------------------------- 1 file changed, 146 deletions(-) delete mode 100644 inc/bootstrap-wp-gallery.php diff --git a/inc/bootstrap-wp-gallery.php b/inc/bootstrap-wp-gallery.php deleted file mode 100644 index ec6e9d5..0000000 --- a/inc/bootstrap-wp-gallery.php +++ /dev/null @@ -1,146 +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 = '' : ''; - $output .= ''; - - return $output; -} - -add_shortcode( 'gallery', 'shortcode_gallery' ); - -/** - * Add class="thumbnail img-thumbnail" to attachment items - * - * @param string $html Markup. - * - * @return mixed - */ -function attachment_link_class( $html ) { - $html = str_replace( '