[wp-trac] [WordPress Trac] #36084: Link to media images now get a rel=attachment
    WordPress Trac 
    noreply at wordpress.org
       
    Wed Mar 16 21:25:37 UTC 2016
    
    
  
#36084: Link to media images now get a rel=attachment
--------------------------------------+------------------------
 Reporter:  csschris                  |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  accepted
 Priority:  normal                    |   Milestone:  4.5
Component:  Media                     |     Version:  4.4.2
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------
Changes (by joemcgill):
 * keywords:  has-patch needs-unit-tests => has-patch has-unit-tests
Comment:
 [attachment:36084.3.diff] adds unit tests to cover a few different uses of
 `get_image_send_to_editor()`. The patch in [attachment:36084.2.diff] fixes
 the breakage in the third test,
 `Tests_Media::test_get_image_send_to_editor_defaults_no_caption_no_rel()`.
 In my tests, this restores the previous behavior for the `rel` attributes
 on links to media. However, I would caution that changes to
 `wp_ajax_send_attachment_to_editor()` could reintroduce this issue by
 changing the `$rel` value being passed to `get_image_send_to_editor()`.
 From what I can tell, the fact that `rel` attributes were only being
 applied on links to attachment pages was not intentional (but I don't know
 the full history), so relying on that attribute for plugin behavior should
 be considered fragile from my opinion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36084#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
    
    
More information about the wp-trac
mailing list