Make WordPress Core

Changeset 39601


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

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

Fixes #39276 for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wplink.js

    r38808 r39601  
    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.