. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 198.54.115.242 / Your IP :
216.73.216.33 [
Web Server : LiteSpeed System : Linux server233.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : imereohc ( 2529) PHP Version : 8.2.30 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/imereohc/public_html/wp-content/plugins/happy-elementor-addons/extensions/ |
Upload File : |
<?php
namespace Happy_Addons\Elementor\Extension;
use Elementor\Controls_Manager;
use Elementor\Element_Base;
defined('ABSPATH') || die();
class Wrapper_Link {
public static function init() {
add_action( 'elementor/element/column/section_advanced/after_section_end', [ __CLASS__, 'add_controls_section' ], 1 );
add_action( 'elementor/element/section/section_advanced/after_section_end', [ __CLASS__, 'add_controls_section' ], 1 );
add_action( 'elementor/element/common/_section_style/after_section_end', [ __CLASS__, 'add_controls_section' ], 1 );
add_action( 'elementor/frontend/before_render', [ __CLASS__, 'before_section_render' ], 1 );
}
public static function add_controls_section( Element_Base $element) {
$tabs = Controls_Manager::TAB_CONTENT;
if ( 'section' === $element->get_name() || 'column' === $element->get_name() ) {
$tabs = Controls_Manager::TAB_LAYOUT;
}
$element->start_controls_section(
'_section_ha_wrapper_link',
[
'label' => __( 'Wrapper Link', 'happy-elementor-addons' ) . ha_get_section_icon(),
'tab' => $tabs,
]
);
$element->add_control(
'ha_element_link',
[
'label' => __( 'Link', 'happy-elementor-addons' ),
'type' => Controls_Manager::URL,
'dynamic' => [
'active' => true,
],
'placeholder' => 'https://example.com',
]
);
$element->end_controls_section();
}
public static function before_section_render( Element_Base $element ) {
$link_settings = $element->get_settings_for_display( 'ha_element_link' );
if ( $link_settings && ! empty( $link_settings['url'] ) ) {
$element->add_render_attribute(
'_wrapper',
[
'data-ha-element-link' => json_encode( $link_settings ),
'style' => 'cursor: pointer'
]
);
}
}
}
Wrapper_Link::init();