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

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

Built from https://develop.svn.wordpress.org/branches/4.9@42534


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2018-01-22 04:53:43 +00:00
parent 0685e3e2f3
commit 2e8c881ff4
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -320,7 +320,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>