Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: gallery_style

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
840                     border: 2px solid #cfcfcf;
841                }
842                #{$selector} .gallery-caption {
843                     margin-left: 0;
844                }
845           </style>
846           <!-- see gallery_shortcode() in wp-includes/media.php -->";
847      $size_class = sanitize_html_class( $size );
848      $gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
849      $output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
850
851      $i = 0;
852      foreach ( $attachments as $id => $attachment ) {
853           $link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
854
855           $output .= "<{$itemtag} class='gallery-item'>";
856           $output .= "
857                <{$icontag} class='gallery-icon'>
858                     $link