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.
Built from https://develop.svn.wordpress.org/trunk@54228


git-svn-id: http://core.svn.wordpress.org/trunk@53787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2022-09-19 23:34:10 +00:00
parent af253aa544
commit c5d200cb52
3 changed files with 8 additions and 3 deletions

View File

@ -5671,7 +5671,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
*/

File diff suppressed because one or more lines are too long

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-54227';
$wp_version = '6.1-alpha-54228';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.