WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #26623


Ignore:
Timestamp:
12/15/2013 05:40:47 PM (6 years ago)
Author:
DrewAPicture
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26623 – Description

    v1 v2  
    1414
    1515{{{
    16 #!div style="font-size: 80%"
    1716[gallery class="foobar"]
    1817}}}
     
    2120
    2221{{{
    23 #!div style="font-size: 80%"
    2422<div id="gallery-1" class="gallery galleryid-4 gallery-columns-2 gallery-size-thumbnail foobar">
    2523}}}
     
    3937{{{
    4038#!php
     39<?php
    4140//add a class to the gallery depending on a template tag
    4241
    43 function gallery_intercept_class($class, $selector, $attr) {
     42function gallery_intercept_class( $class, $selector, $attr ) {
    4443        if ( is_page() ) {
    4544                return $class . ' page-gallery';
     
    4746        return $class;
    4847}
    49 add_filter('gallery_class', 'gallery_intercept_class', 10, 3);
     48add_filter( 'gallery_class', 'gallery_intercept_class', 10, 3 );
    5049}}}
    5150
     
    6564{{{
    6665#!php
     66<?php
    6767///change the tag to rather be a ul
    6868
    69 function gallery_intercept_container_start($html, $selector, $gallery_class, $attr) {
     69function gallery_intercept_container_start( $html, $selector, $gallery_class, $attr ) {
    7070        return "<ul id='$selector' data-class='$gallery_class'>";
    7171}
    72 add_filter('gallery_container_start', 'gallery_intercept_container_start', 10, 4);
     72add_filter( 'gallery_container_start', 'gallery_intercept_container_start', 10, 4 );
    7373}}}
    7474
     
    8787{{{
    8888#!php
     89<?php
    8990///change the closing tag to a ul
    9091
    91 function gallery_intercept_container_end($html, $selector, $attr) {
     92function gallery_intercept_container_end( $html, $selector, $attr ) {
    9293        return "</ul> <!-- $selector gallery -->";
    9394}
    94 add_filter('gallery_container_end', 'gallery_intercept_container_end', 10, 3);
     95add_filter( 'gallery_container_end', 'gallery_intercept_container_end', 10, 3 );
    9596}}}
    9697
     
    109110{{{
    110111#!php
     112<?php
    111113//do not output any separator
    112114
    113 function gallery_intercept_separator($html, $selector, $attr) {
     115function gallery_intercept_separator( $html, $selector, $attr ) {
    114116        return "<!-- no separator please -->";
    115117}
    116 add_filter('gallery_column_separator', 'gallery_intercept_separator', 10, 3);
     118add_filter( 'gallery_column_separator', 'gallery_intercept_separator', 10, 3 );
    117119}}}