Changeset 3343185
- Timestamp:
- 08/11/2025 11:41:04 PM (8 months ago)
- Location:
- make-column-clickable-elementor
- Files:
-
- 8 added
- 3 edited
-
tags/1.6.0 (added)
-
tags/1.6.0/assets (added)
-
tags/1.6.0/assets/js (added)
-
tags/1.6.0/assets/js/make-column-clickable.js (added)
-
tags/1.6.0/includes (added)
-
tags/1.6.0/includes/class-column-clickable.php (added)
-
tags/1.6.0/make-column-clickable-elementor.php (added)
-
tags/1.6.0/readme.txt (added)
-
trunk/includes/class-column-clickable.php (modified) (1 diff)
-
trunk/make-column-clickable-elementor.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
make-column-clickable-elementor/trunk/includes/class-column-clickable.php
r2712228 r3343185 9 9 10 10 if ( ! defined( 'ABSPATH' ) ) { 11 exit;11 exit; 12 12 } 13 13 14 14 if ( ! class_exists( 'Make_Column_Clickable_Setup' ) ) : 15 15 16 /**17 * The main Make_Column_Clickable_Setup class18 */19 class Make_Column_Clickable_Setup {20 public function __construct() {21 add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ));16 /** 17 * The main Make_Column_Clickable_Setup class 18 */ 19 class Make_Column_Clickable_Setup { 20 public function __construct() { 21 add_action( 'wp_enqueue_scripts', [ $this, 'frontend_scripts' ] ); 22 22 23 add_action( 'elementor/element/column/layout/before_section_end', array( $this, 'widget_extensions' ), 10, 2 ); 24 add_action( 'elementor/frontend/column/before_render', array( $this, 'before_render_options' ), 10 ); 25 } 23 add_action( 'elementor/element/column/section_advanced/after_section_end', [ $this, 'widget_extensions' ], 24 10, 2 ); 25 add_action( 'elementor/frontend/column/before_render', [ $this, 'before_render_options' ], 10 ); 26 27 add_action( 'elementor/element/section/section_advanced/after_section_end', [ $this, 'widget_extensions' ], 28 10, 2 ); 29 add_action( 'elementor/frontend/section/before_render', [ $this, 'before_render_options' ], 10 ); 30 31 add_action( 'elementor/element/container/section_layout/after_section_end', [ $this, 'widget_extensions' ], 32 10, 2 ); 33 add_action( 'elementor/frontend/container/before_render', [ $this, 'before_render_options' ], 10 ); 34 } 26 35 27 36 28 /** 29 * After layout callback 30 * 31 * @param object $element 32 * @param array $args 33 * @return void 34 */ 35 public function widget_extensions( $element, $args ) { 36 $element->add_control( 37 'column_link', 38 [ 39 'label' => __( 'Column Link', 'make-column-clickable-elementor' ), 40 'type' => Elementor\Controls_Manager::URL, 41 'dynamic' => [ 42 'active' => true, 43 ], 44 'placeholder' => __( 'https://your-link.com', 'elementor' ), 45 'selectors' => [ 46 ], 47 ] 48 ); 49 } 37 /** 38 * After layout callback 39 * 40 * @param object $element 41 * @param array $args 42 * 43 * @return void 44 */ 45 public function widget_extensions( $element, $args ) { 46 $element_name = $element->get_name(); 47 $label = $element_name === 'container' ? __( 'Container Link', 'make-column-clickable-elementor' ) : __( 'Column Link', 'make-column-clickable-elementor' ); 48 49 $element->start_controls_section( 50 '_section_column_clickable', 51 [ 52 'label' => $label, 53 'tab' => Elementor\Controls_Manager::TAB_LAYOUT, 54 ] 55 ); 56 57 $element->add_control( 58 'column_link', 59 [ 60 'label' => $label, 61 'type' => Elementor\Controls_Manager::URL, 62 'dynamic' => [ 63 'active' => true, 64 ], 65 'placeholder' => __( 'https://your-link.com', 'elementor' ), 66 ] 67 ); 68 69 $element->end_controls_section(); 70 } 50 71 51 72 52 public function before_render_options( $element ) {53 $settings= $element->get_settings_for_display();73 public function before_render_options( $element ) { 74 $settings = $element->get_settings_for_display(); 54 75 55 if ( isset( $settings['column_link'], $settings['column_link']['url'] ) && ! empty( $settings['column_link']['url'] ) ) {56 wp_enqueue_script( 'make-column-clickable-elementor' );76 if ( isset( $settings['column_link'], $settings['column_link']['url'] ) && ! empty( $settings['column_link']['url'] ) ) { 77 wp_enqueue_script( 'make-column-clickable-elementor' ); 57 78 58 // start of WPML 59 do_action( 'wpml_register_single_string', 'Make Column Clickable Elementor', 'Link - ' . $settings['column_link']['url'], $settings['column_link']['url'] ); 60 $settings['column_link']['url'] = apply_filters('wpml_translate_single_string', $settings['column_link']['url'], 'Make Column Clickable Elementor', 'Link - ' . $settings['column_link']['url'] ); 61 // end of WPML 79 // start of WPML 80 do_action( 'wpml_register_single_string', 'Make Column Clickable Elementor', 81 'Link - ' . $settings['column_link']['url'], $settings['column_link']['url'] ); 82 $settings['column_link']['url'] = apply_filters( 'wpml_translate_single_string', 83 $settings['column_link']['url'], 'Make Column Clickable Elementor', 84 'Link - ' . $settings['column_link']['url'] ); 85 // end of WPML 62 86 63 $element->add_render_attribute( '_wrapper', 'class', 'make-column-clickable-elementor' ); 64 $element->add_render_attribute( '_wrapper', 'style', 'cursor: pointer;' ); 65 $element->add_render_attribute( '_wrapper', 'data-column-clickable', $settings['column_link']['url'] ); 66 $element->add_render_attribute( '_wrapper', 'data-column-clickable-blank', $settings['column_link']['is_external'] ? '_blank' : '_self' ); 67 } 68 } 87 $element->add_render_attribute( '_wrapper', 'class', 'make-column-clickable-elementor' ); 88 $element->add_render_attribute( '_wrapper', 'style', 'cursor: pointer;' ); 89 $element->add_render_attribute( '_wrapper', 'data-column-clickable', $settings['column_link']['url'] ); 90 $element->add_render_attribute( '_wrapper', 'data-column-clickable-blank', 91 $settings['column_link']['is_external'] ? '_blank' : '_self' ); 92 } 93 } 69 94 70 95 71 public function frontend_scripts() { 72 wp_register_script( 'make-column-clickable-elementor', plugins_url( 'assets/js/make-column-clickable.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), Make_Column_Clickable_Elementor::VERSION, true ); 73 } 74 } 96 public function frontend_scripts() { 97 wp_register_script( 'make-column-clickable-elementor', 98 plugins_url( 'assets/js/make-column-clickable.js', plugin_dir_path( __FILE__ ) ), [ 'jquery' ], 99 Make_Column_Clickable_Elementor::VERSION, true ); 100 } 101 } 75 102 76 103 endif; -
make-column-clickable-elementor/trunk/make-column-clickable-elementor.php
r3343178 r3343185 3 3 * Plugin Name: Make Column Clickable Elementor 4 4 * Plugin URI: https://fernandoacosta.net/make-column-clickable-elementor 5 * Description: Simple: allow users to click in the whole column instead of individual elements5 * Description: Simple: allows users to click anywhere on a column, section, or container instead of only on individual elements. 6 6 * Author: Fernando Acosta 7 7 * Author URI: https://fernandoacosta.net/?utm_source=wp-org&utm_medium=site&utm_campaign=make-column-clickable 8 * Version: 1. 5.08 * Version: 1.6.0 9 9 * Elementor tested up to: 3.30 10 10 * Elementor Pro tested up to: 3.30 11 * Requires at least: 5.0 12 * Tested up to: 6.7 13 * Requires PHP: 7.4 11 14 * License: GPLv2 or later 12 15 * … … 38 41 * @var float 39 42 */ 40 const VERSION = '1. 5.0';43 const VERSION = '1.6.0'; 41 44 42 45 /** -
make-column-clickable-elementor/trunk/readme.txt
r3343178 r3343185 2 2 Contributors: Amgnando 3 3 Donate link: https://fernandoacosta.net/donate/ 4 Tags: elementor, column, page builder4 Tags: elementor, column, section, container, page builder 5 5 Requires at least: 5.0 6 6 Tested up to: 6.8.2 … … 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Simple: allow users to click in the whole column instead of individual elements 12 Make entire columns, sections and containers clickable in Elementor — improve navigation and user experience with just one link. 13 13 14 14 == Description == 15 15 16 Simple: allow users to click in the whole column instead ofindividual elements.16 Easily make entire columns, sections and containers clickable in Elementor, not just individual elements. 17 17 18 Users will be able to click in the whole column when you add a link on that.18 Add a link to any column, section or container, and your visitors will be able to click anywhere inside it — perfect for banners, call-to-action areas, and interactive layouts. 19 19 20 20 = How to use it = 21 21 22 After install the plugin, open your Elementor editor, start editing a Column and under the Layout block you canadd your custom link.22 After installing the plugin, open the Elementor editor, select a Column, Section or Container, and under the Layout settings you’ll find a field to add your custom link. 23 23 24 Works with any internal/external link, Lightbox and Elementor PRO popups trigger.24 Works seamlessly with internal and external links, Lightbox, and Elementor PRO popup triggers. 25 25 26 = Looking for custom WooCommerce or Elementor development? Reachus at suporte@fernandoacosta.net =26 = Looking for custom WooCommerce or Elementor development? Contact us at suporte@fernandoacosta.net = 27 27 28 28 == Installation == 29 29 30 31 32 30 == Frequently Asked Questions == 33 31 34 = How this plugin Works? =32 = How does this plugin work? = 35 33 36 Th is plugin will add a custom URL field in each column of your Elementor editor. If you fill it, the column will beclickable.34 The plugin adds a custom URL field to every column, section and container in the Elementor editor. Once you add a link, the entire area becomes clickable. 37 35 38 Please note that the plugin works using JavaScript. So it's not an actual 39 <a> element. I do recommend you to also add the regular links on your inner elements for SEO and compatibility purposes. So you make sure that columns and default elements are workingl. 36 It works using JavaScript, so it doesn’t create a real <a> tag. For best SEO and accessibility, we recommend also adding regular links to inner elements — ensuring both columns and default elements work perfectly. 40 37 41 = What if I f ound a bug? =38 = What if I find a bug? = 42 39 43 If you have any issue, please use the support here. 44 40 If you run into any issues, please open a support request here on the plugin page — we’re happy to help. 45 41 46 42 == Screenshots == 47 43 44 48 45 1. Settings 46 == Changelog == 49 47 50 == Changelog == 48 = 1.6.0 - 2025-01-11 = 49 - Updated for Elementor 3.3+ compatibility 50 - Added support for making containers clickable 51 - Fixed deprecated hooks for better stability 52 53 = 1.5.1 - 2025-09-11 = 54 - Added support for making sections clickable 55 51 56 = 1.5.0 - 2025-09-11 = 52 - Update versions and libraries 57 - Updated versions and libraries 58 53 59 54 60 = 1.4.0 - 2022-04-20 = 55 - WPML compatibility 61 - Added WPML compatibility 62 56 63 57 64 = 1.3.1 - 2019-10-12 = 58 * Fix: Prevent illigal offset warning 59 * New: Working with multiple popups 65 - Fix: Prevent illegal offset warning 66 - New: Support for multiple popups 67 60 68 61 69 = 1.3.0 - 2019-08-27 = 62 * New: Support to Elementor Popups and Lightbox 70 - New: Support for Elementor Popups and Lightbox 71 63 72 64 73 = 1.2.1 - 2019-04-16 = 65 * New: Support to smooth scroll 66 * Fix: Link now works with dynamic content. 74 - New: Support for smooth scrolling 75 - Fix: Links now work with dynamic content 76 67 77 68 78 = 1.2.0 - 2019-03-14 = 69 * NEW: prevent column redirect when click on custom links or buttons 79 - New: Prevent column redirect when clicking on custom links or buttons 80 70 81 71 82 = 1.1.0 - 2019-02-14 = 72 * Fix: new tab links 73 * Fix: minor improvements 83 - Fix: Links opening in new tabs 84 - Fix: Minor improvements 85 74 86 75 87 = 1.0.0 - 2018-11-21 = 76 * First Version 88 - First version 89 77 90 78 91 == Upgrade Notice ==
Note: See TracChangeset
for help on using the changeset viewer.