Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentyten_attachment_size

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
80           else
81                // or get the URL of the first image attachment
82                $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
83      } else {
84           // or, if there's only 1 image attachment, get the URL of the image
85           $next_attachment_url = wp_get_attachment_url();
86      }
87 ?>
88                               <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
89                                    $attachment_width  = apply_filters( 'twentyten_attachment_size', 900 );
90                                    $attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
91                                    echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height.
92                               ?></a></p>
93
94                               <div id="nav-below" class="navigation">
95                                    <div class="nav-previous"><?php previous_image_link( false ); ?></div>
96                                    <div class="nav-next"><?php next_image_link( false ); ?></div>
97                               </div><!-- #nav-below -->
98 <?php else : ?>