Make WordPress Core

Changeset 42534


Ignore:
Timestamp:
01/22/2018 04:52:46 AM (7 years ago)
Author:
westonruter
Message:

Widgets: Allow relative/partial URLs in Image Widget's link field.

Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740 for 4.9 branch.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/widgets/class-wp-widget-media-image.php

    r42030 r42534  
    321321            <p class="media-widget-image-link">
    322322                <label for="{{ elementIdPrefix }}linkUrl"><?php esc_html_e( 'Link to:' ); ?></label>
    323                 <input id="{{ elementIdPrefix }}linkUrl" type="url" class="widefat link" value="{{ data.link_url }}" placeholder="http://">
     323                <input id="{{ elementIdPrefix }}linkUrl" type="text" class="widefat link" value="{{ data.link_url }}" placeholder="http://" pattern="((\w+:)?\/\/\w.*|\w+:(?!\/\/$)|\/|\?|#).*">
    324324            </p>
    325325            <# } #>
Note: See TracChangeset for help on using the changeset viewer.