Editor: Remove target=_blank when unchecked in the link modal.
Fixes #39276 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@39601 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ca92da24da
commit
79ded07a1a
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue