[wp-trac] [WordPress Trac] #23543: Twenty Thirteen: Add image navigation to attachment pages

WordPress Trac noreply at wordpress.org
Sun Feb 24 22:17:28 UTC 2013


#23543: Twenty Thirteen: Add image navigation to attachment pages
---------------------------+--------------------
 Reporter:  obenland       |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  3.6
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |
---------------------------+--------------------
Changes (by DrewAPicture):

 * cc: xoodrew@… (added)
 * keywords:  needs-patch => has-patch


Comment:

 [attachment:23543.diff] appends the `#main` anchor to the attachment
 links.

 I chose `#main` because it's the latest-running div where the
 next/previous links aren't hidden below the fixed navbar.

 And, because it took me several minutes to work my way through the chain,
 I'll explain the filter.

 1. `next/previous_image_link()` calls `adjacent_image_link()`.
 2. `adjacent_image_link()` retrieves the formatted link via
 `wp_get_attachment_link()`.
 3. `wp_get_attachment_link()` calls `get_attachment_link()` to retrieve
 the actual URL.
 4. We filter the attachment link URL via the `attachment_link` filter in
 `get_attachment_link()`.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23543#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list