soflyy/breakdance-bugs

breakdance_element_classnames_for_html_class_attribute nclasses not added inside page builder

Opened this issue · 2 comments

If the filter "breakdance_element_classnames_for_html_class_attribute" is used, the classes are rendered in the frontend, but not in the builder.

add_filter("breakdance_element_classnames_for_html_class_attribute", function ($classNames) {
$classNames[] = 'another-class';
return $classNames;
});

The class 'another-class' is not added to the element in the builder. In the frontend it seems to be ok.
Also if you use different priorities (1-10, PHP_INT_MAX) it doesn't work. Also by setting the attribute for the parameter count it doesn't work.

I have also checked the filter 'breakdance_render_element_class_list'. Same problem here.

Or do I something wrong?

And... can you clarify, whats the difference between these two hooks?

The _render function seems to be ok (checked via log file). The class is added to the $acc variable. So the bug seems to be after the _render function.

Are the classes stripped via js?

Any news here?