WordPress 4.6 link edit dialog is too rudimentary

To disable the inline link tool and revert it back to a pop-up screen instead, do the following:

In your child theme directory, add the following to your function.php:

add_filter( 'mce_external_plugins', 'wpse_236590_link_editor' );

function wpse_236590_link_editor( $plugins ) {
    $plugins['full_link_dialog'] = plugins_url( 'js/', __FILE__ ) . 'editor.js';
    return $plugins;
}

Next create a directory inside your child theme folder called js and create a file called editor.js with the following code:

jQuery( function () {
    tinymce.PluginManager.add( 'full_link_dialog', function ( editor, url ) {
        if ( editor ) {
            // Open the full link window instead of the inline linker
            editor.onExecCommand.add( function( ed, cmd, ui, val ) {
                if ( cmd == 'WP_Link' ) {
                    window.wpLink.open( editor.id );
                }
            } );
        }
    } );
} );

Leave a Comment