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

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

Built from https://develop.svn.wordpress.org/trunk@42533


git-svn-id: http://core.svn.wordpress.org/trunk@42362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2018-01-22 04:52:33 +00:00
parent 11af5ae5cd
commit fa460ab32f
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42531';
$wp_version = '5.0-alpha-42533';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -329,7 +329,7 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
<# if ( data.url ) { #>
<p class="media-widget-image-link">
<label for="{{ elementIdPrefix }}linkUrl"><?php esc_html_e( 'Link to:' ); ?></label>
<input id="{{ elementIdPrefix }}linkUrl" type="url" class="widefat link" value="{{ data.link_url }}" placeholder="http://">
<input id="{{ elementIdPrefix }}linkUrl" type="text" class="widefat link" value="{{ data.link_url }}" placeholder="http://" pattern="((\w+:)?\/\/\w.*|\w+:(?!\/\/$)|\/|\?|#).*">
</p>
<# } #>
</script>