Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique ID associated with button anchor tags #4535

Closed
2 tasks done
clickharder opened this issue May 24, 2018 · 0 comments
Closed
2 tasks done

Unique ID associated with button anchor tags #4535

clickharder opened this issue May 24, 2018 · 0 comments
Labels
request/enhancement Indicates an Enhancement Request for an existing feature. status/merged Indicates when a Pull Request has been merged to a Release.
Milestone

Comments

@clickharder
Copy link

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

Description

Anchor tags used for buttons do not have a unique ID associated with them. Assigning a unique ID or css class to the button widget associates the ID or class to the parent div instead of the anchor tag.

Ideally, there should be a unique identifier associated with each button anchor tag for identification and use for Google Analytics events.

A unique class or id could be included by adding the widget id to the anchor tag. A solution similar to this:

File: /elementor/includes/widgets/button.php

On line 423 within the render() function

$id_int = $this->get_id_int();
$this->add_render_attribute ( 'button', 'class', 'btn-'.$id_int );

Thanks

@bainternet bainternet added the request/enhancement Indicates an Enhancement Request for an existing feature. label May 24, 2018
KingYes added a commit that referenced this issue May 27, 2018
button widget: added css id closes #4535
@arielk arielk added this to the 2.1.0 milestone May 27, 2018
@bainternet bainternet added the status/merged Indicates when a Pull Request has been merged to a Release. label May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request/enhancement Indicates an Enhancement Request for an existing feature. status/merged Indicates when a Pull Request has been merged to a Release.
Projects
None yet
Development

No branches or pull requests

3 participants