Only use a bare URL when the link text field is used.

Fixes bug that would remove images on edit, in some circumstances.

fixes #33293
props azaozz
Built from https://develop.svn.wordpress.org/trunk@33591


git-svn-id: http://core.svn.wordpress.org/trunk@33558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith 2015-08-06 20:58:25 +00:00
parent 309516a6c1
commit d60e2eea84
3 changed files with 6 additions and 3 deletions

View File

@ -365,7 +365,10 @@ var wpLink;
} }
link = getLink(); link = getLink();
text = inputs.text.val() || attrs.href;
if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
text = inputs.text.val() || attrs.href;
}
if ( link ) { if ( link ) {
if ( text ) { if ( text ) {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-RC2-33590'; $wp_version = '4.3-RC2-33591';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.