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

Add get_render_attribute to element-base.php #5878

Closed
tristanleboss opened this issue Oct 8, 2018 · 1 comment
Closed

Add get_render_attribute to element-base.php #5878

tristanleboss opened this issue Oct 8, 2018 · 1 comment

Comments

@tristanleboss
Copy link

tristanleboss commented Oct 8, 2018

Because property _render_attributes is private, it's not easy to work with render attributes.
It can happens if you try to extend an existing widget you have no control on (from a third party plugin, for example) and whant to add some render attributes depending on the one the original widget function already added (by calling the parent in the extended widget).

Indeed, I want to create (not replace or alter the original one) a new widget using the logic from another one.

This function would take two arguments: $element and $key and would return $this->_render_attributes[ $element ][ $key ].

The get_render_attributes_string is not really useull because it gives an "HTML" string with all the render attributes and so, needs parsing to grab the actual data.

kobizz added a commit to kobizz/elementor that referenced this issue Oct 9, 2018
@bainternet bainternet added the status/has-pr Indicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged. label Oct 10, 2018
@bainternet
Copy link
Contributor

bainternet commented Oct 10, 2018

@arielk arielk removed the status/has-pr Indicates that an Issue, or Discussion has a companion Pull Request awaiting to be merged. label Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants