Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentythirteen_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
384 /**
385  * Prints the attached image with a link to the next attached image.
386  *
387  * @since Twenty Thirteen 1.0
388  *
389  * @return void
390  */
391 function twentythirteen_the_attached_image() {
392      $post                = get_post();
393      $attachment_size     = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) );
394      $next_attachment_url = wp_get_attachment_url();
395
396      /**
397       * Grab the IDs of all the image attachments in a gallery so we can get the URL
398       * of the next adjacent image in a gallery, or the first image (if we're
399       * looking at the last image in a gallery), or, in a gallery of one, just the
400       * link to that image file.
401       */
402      $attachment_ids = get_posts( array(