Wordpress

Elementor: noopener for links opening in a new tab

I only needed this on the button element.

To fix it I opened the file:
wp-content/plugins/elementor/includes/widgets/button.php

And changed:

if ( $settings['link']['is_external'] ) {
    $this->add_render_attribute( 'button', 'target', '_blank' );
}
if ( $settings['link']['nofollow'] ) {
    $this->add_render_attribute( 'button', 'rel', 'nofollow' );
}

To this:

if ( $settings['link']['is_external'] && $settings['link']['nofollow'] ) {
    $this->add_render_attribute( 'button', 'target', '_blank' );
    $this->add_render_attribute( 'button', 'rel', 'noopener' );
} else {
    if ( $settings['link']['is_external'] ) {
        $this->add_render_attribute( 'button', 'target', '_blank' );
    }
    if ( $settings['link']['nofollow'] ) {
        $this->add_render_attribute( 'button', 'rel', 'nofollow' );
    }
}