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
1046
1047      /**
1048       * Filter the default gallery shortcode CSS styles.
1049       *
1050       * @since 2.5.0
1051       *
1052       * @param string $gallery_style Default gallery shortcode CSS styles.
1053       * @param string $gallery_div   Opening HTML div container for the gallery shortcode output.
1054       */
1055      $output = apply_filters( 'gallery_style', $gallery_style . $gallery_div );
1056
1057      $i = 0;
1058      foreach ( $attachments as $id => $attachment ) {
1059           if ( ! empty( $atts['link'] ) && 'file' === $atts['link'] ) {
1060                $image_output = wp_get_attachment_link( $id, $atts['size'], false, false );
1061           } elseif ( ! empty( $atts['link'] ) && 'none' === $atts['link'] ) {
1062                $image_output = wp_get_attachment_image( $id, $atts['size'], false );
1063           } else {
1064                $image_output = wp_get_attachment_link( $id, $atts['size'], true, false );