Make WordPress Core

Changeset 42533


Ignore:
Timestamp:
01/22/2018 04:51:16 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-media-image.php

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