Skip to content

Commit e466bee

Browse files
committed
Media: Set https as placeholder for embedding media from URL.
Change the "Insert from URL" field in the media library to use a placeholder suggesting the `https://` protocol instead of a value attribute with `http://`. Props Presskopp, adamsilverstein, joyously, thijso, joedolson, costdev. Fixes #53404. git-svn-id: https://develop.svn.wordpress.org/trunk@54228 602fd350-edb4-49c9-b593-d223f7449a82
1 parent f33c8c4 commit e466bee

File tree

1 file changed

+6
-1
lines changed
  • src/js/media/views/embed

1 file changed

+6
-1
lines changed

src/js/media/views/embed/url.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,12 @@ EmbedUrl = View.extend(/** @lends wp.media.view.EmbedUrl.prototype */{
4848
return;
4949
}
5050

51-
this.input.value = this.model.get('url') || 'http://';
51+
if ( this.model.get( 'url' ) ) {
52+
this.input.value = this.model.get('url');
53+
} else {
54+
this.input.setAttribute( 'placeholder', 'https://' );
55+
}
56+
5257
/**
5358
* Call `render` directly on parent class with passed arguments
5459
*/

0 commit comments

Comments
 (0)