Editor: Remove target=_blank when unchecked in the link modal.

Merges [39601] to the 4.7 branch.
Fixes #39276.


Built from https://develop.svn.wordpress.org/branches/4.7@39602


git-svn-id: http://core.svn.wordpress.org/branches/4.7@39542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ella Iseulde Van Dorpe 2016-12-14 20:59:37 +00:00
parent 3db97bd725
commit 948379bde8
3 changed files with 5 additions and 10 deletions

View File

@ -302,15 +302,10 @@ var wpLink;
getAttrs: function() { getAttrs: function() {
wpLink.correctURL(); wpLink.correctURL();
var attrs = { return {
href: $.trim( inputs.url.val() ) href: $.trim( inputs.url.val() ),
target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null
}; };
if ( inputs.openInNewTab.prop( 'checked' ) ) {
attrs.target = '_blank';
}
return attrs;
}, },
buildHtml: function(attrs) { buildHtml: function(attrs) {

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.7.1-alpha-39587'; $wp_version = '4.7.1-alpha-39602';
/** /**
* 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.