Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function before_section_render(Element_Base $element) {
- $link_settings = $element->get_settings_for_display('ra_element_link');
- if ($link_settings && !empty($link_settings['url'])) {
- $target = ( isset( $link_settings['is_external'] ) && $link_settings['is_external'] == 'on' ) ? '_blank' : '_self';
- $element->add_render_attribute(
- '_wrapper',
- [
- 'data-ra-element-link' => json_encode($link_settings),
- 'style' => 'cursor: pointer',
- 'target' => $target,
- 'onClick' => 'window.open("' . $link_settings['url'] . '", "'. $target .'")',
- ]
- );
- }
- }
Advertisement
Comments
-
- fix the "always open in a new tab" bug of Make Section & Column Clickable Elementor wordpress plugin, version 1.5
Add Comment
Please, Sign In to add comment
Advertisement