#32074 closed defect (bug) (fixed)
get_image_send_to_editor() improperly documented
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.1 |
Component: | Media | Keywords: | |
Focuses: | docs | Cc: |
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.
Hi @tychay, would you like to try your hand at creating a patch?