Make WordPress Core

Changeset 39602 for branches/4.7


Ignore:
Timestamp:
12/14/2016 08:58:36 PM (8 years ago)
Author:
iseulde
Message:

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

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

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/js/wplink.js

    r38808 r39602  
    303303            wpLink.correctURL();
    304304
    305             var attrs = {
    306                 href: $.trim( inputs.url.val() )
     305            return {
     306                href: $.trim( inputs.url.val() ),
     307                target: inputs.openInNewTab.prop( 'checked' ) ? '_blank' : null
    307308            };
    308 
    309             if ( inputs.openInNewTab.prop( 'checked' ) ) {
    310                 attrs.target = '_blank';
    311             }
    312 
    313             return attrs;
    314309        },
    315310
Note: See TracChangeset for help on using the changeset viewer.