Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( $captiontag && trim($attachment->post_excerpt) ) {
- $output .= "
- <{$captiontag} class='wp-caption-text gallery-caption'>
- " . wptexturize($attachment->post_excerpt) . "
- </{$captiontag}>";
- }
- function modified_gallery_shortcode( $attr ) {
- $attr['size'] = "thumbnail";
- $attr['link'] = "file";
- $attr['itemtag'] = "";
- $attr['icontag'] = "";
- $attr['captiontag'] = "";
- $output = gallery_shortcode( $attr );
- $output = strip_tags( $output, '<a><img><li><p>' );
- $from = array(
- "class='gallery-item'",
- "class='gallery-icon landscape'",
- "a href=",
- "class='wp-caption-text gallery-caption'"
- );
- $to = array(
- "",
- "",
- "a class="swipebox" rel="group" href=",
- "",
- );
- $output = str_replace( $from, $to, $output );
- $output = sprintf( '<div class="gallery">%s</div>', $output );
- return $output;
- }
- add_shortcode( 'gallery', 'modified_gallery_shortcode' );
- ( function( $ ) {
- function function_name() {
- $( '.gallery-caption').css({display:'none'});
- }
- function_name();
- } )( jQuery );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement