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.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

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
389       * Filter the image attachment size to use.
390       *
391       * @since Twenty thirteen 1.0
392       *
393       * @param array $size {
394       *     @type int The attachment height in pixels.
395       *     @type int The attachment width in pixels.
396       * }
397       */
398      $attachment_size     = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) );
399      $next_attachment_url = wp_get_attachment_url();
400      $post                = get_post();
401
402      /*
403       * Grab the IDs of all the image attachments in a gallery so we can get the URL
404       * of the next adjacent image in a gallery, or the first image (if we're
405       * looking at the last image in a gallery), or, in a gallery of one, just the
406       * link to that image file.
407       */