#32074 closed defect (bug) (fixed)
get_image_send_to_editor() improperly documented
| Reported by: | tychay | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Media | Version: | 4.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | docs |
Description
https://developer.wordpress.org/reference/functions/get_image_send_to_editor/#source-code
https://core.trac.wordpress.org/browser/tags/4.1/src/wp-admin/includes/media.php#101
$rel does not support string input as written. Either change the documentation on line 112 to be bool only, or change line 120 to read
<?php if ( !$rel || !is_string($rel) ) { $rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : ''; } else { $rel = ' rel="' . esc_attr($rel).'"'; }
or…
<?php if ( !$rel || !is_string($rel) ) { $rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : ''; }
depending on what the doc means (it's not clear).
Attachments (1)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @tychay, would you like to try your hand at creating a patch?