Changes between Version 1 and Version 2 of Ticket #26623
- Timestamp:
- 12/15/2013 05:40:47 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26623 – Description
v1 v2 14 14 15 15 {{{ 16 #!div style="font-size: 80%"17 16 [gallery class="foobar"] 18 17 }}} … … 21 20 22 21 {{{ 23 #!div style="font-size: 80%"24 22 <div id="gallery-1" class="gallery galleryid-4 gallery-columns-2 gallery-size-thumbnail foobar"> 25 23 }}} … … 39 37 {{{ 40 38 #!php 39 <?php 41 40 //add a class to the gallery depending on a template tag 42 41 43 function gallery_intercept_class( $class, $selector, $attr) {42 function gallery_intercept_class( $class, $selector, $attr ) { 44 43 if ( is_page() ) { 45 44 return $class . ' page-gallery'; … … 47 46 return $class; 48 47 } 49 add_filter( 'gallery_class', 'gallery_intercept_class', 10, 3);48 add_filter( 'gallery_class', 'gallery_intercept_class', 10, 3 ); 50 49 }}} 51 50 … … 65 64 {{{ 66 65 #!php 66 <?php 67 67 ///change the tag to rather be a ul 68 68 69 function gallery_intercept_container_start( $html, $selector, $gallery_class, $attr) {69 function gallery_intercept_container_start( $html, $selector, $gallery_class, $attr ) { 70 70 return "<ul id='$selector' data-class='$gallery_class'>"; 71 71 } 72 add_filter( 'gallery_container_start', 'gallery_intercept_container_start', 10, 4);72 add_filter( 'gallery_container_start', 'gallery_intercept_container_start', 10, 4 ); 73 73 }}} 74 74 … … 87 87 {{{ 88 88 #!php 89 <?php 89 90 ///change the closing tag to a ul 90 91 91 function gallery_intercept_container_end( $html, $selector, $attr) {92 function gallery_intercept_container_end( $html, $selector, $attr ) { 92 93 return "</ul> <!-- $selector gallery -->"; 93 94 } 94 add_filter( 'gallery_container_end', 'gallery_intercept_container_end', 10, 3);95 add_filter( 'gallery_container_end', 'gallery_intercept_container_end', 10, 3 ); 95 96 }}} 96 97 … … 109 110 {{{ 110 111 #!php 112 <?php 111 113 //do not output any separator 112 114 113 function gallery_intercept_separator( $html, $selector, $attr) {115 function gallery_intercept_separator( $html, $selector, $attr ) { 114 116 return "<!-- no separator please -->"; 115 117 } 116 add_filter( 'gallery_column_separator', 'gallery_intercept_separator', 10, 3);118 add_filter( 'gallery_column_separator', 'gallery_intercept_separator', 10, 3 ); 117 119 }}}