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
This commit is contained in:
Joe Dolson
2022-09-19 23:32:10 +00:00
parent f33c8c464a
commit e466bee571

View File

@@ -48,7 +48,12 @@ EmbedUrl = View.extend(/** @lends wp.media.view.EmbedUrl.prototype */{
return;
}
this.input.value = this.model.get('url') || 'http://';
if ( this.model.get( 'url' ) ) {
this.input.value = this.model.get('url');
} else {
this.input.setAttribute( 'placeholder', 'https://' );
}
/**
* Call `render` directly on parent class with passed arguments
*/