[wp-trac] [WordPress Trac] #32074: get_image_send_to_editor() improperly documented

WordPress Trac noreply at wordpress.org
Thu Apr 23 00:51:51 UTC 2015


#32074: get_image_send_to_editor() improperly documented
--------------------------+-----------------------------
 Reporter:  tychay        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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
 <?php
         if ( !$rel || !is_string($rel) ) {
                 $rel = $rel ? ' rel="attachment wp-att-' .
 esc_attr($id).'"' : '';
         } else {
                 $rel = ' rel="' . esc_attr($rel).'"';
         }
 }}}

 or…

 {{{#!php
 <?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).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32074>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list