[wp-trac] [WordPress Trac] #29476: Hide the 'Title' field on the 'Insert from URL' tab until it's needed

WordPress Trac noreply at wordpress.org
Tue Apr 21 13:27:16 UTC 2015


#29476: Hide the 'Title' field on the 'Insert from URL' tab until it's needed
-------------------------+-----------------------
 Reporter:  johnbillion  |       Owner:  helen
     Type:  enhancement  |      Status:  reopened
 Priority:  high         |   Milestone:  4.2
Component:  Media        |     Version:  3.5
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+-----------------------

Comment (by afercia):

 Noticed one small thing:
 - paste an embeddable URL
 - then empty the field
 - at this point `url` is an empty string
 - the AJAX call fires
 - the "Link Text" field appears

 You will also see an error in your console:
 {{{
 <b>Notice</b>:  Undefined variable: url in <b>.../ajax-actions.php</b> on
 line <b>2749
 }}}

 that's because
 {{{
 if ( url && url.length < 6 ) {
   ...
 }}}
 should also check when `url` is falsey.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29476#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list