10
votes
Bricks builder integration
It would be great if the Bricks builder could be considered for integration so that you can conditionally hide elements on a page as well as using the query option to show/hide posts, or pages someone has access to.
This is complete, however we are waiting on two filters that need to be added to Bricks in order for the integration to work. Once Bricks releases an update with that change we will release the new integration.
Hi Jack… what are the filters that are needed? I’ve looked in the Bricks Builder ideas board but I couldn’t find any posts. Any idea if Bricks is going to pick up on adding the filters?
Below is the email I’d sent to Thomas back in February. Haven’t heard back yet despite following up, so I’m not sure if they’re working on it or not.
—–
We have the integration mostly done (https://i.wpfusion.com/J35VsZ ). Here’s the integration class https://gist.github.com/verygoodplugins/3ad6870966e5be34893e36a0f53656a1.
We did run into two places where we’d need to have a filter added. Those are at
/bricks/includes/elements/base.php, line 88
$this->control_groups = apply_filters( 'bricks/elements/control_groups', $this->control_groups );
https://i.wpfusion.com/lUhPgH
And
/bricks/includes/elements/base.php, line 1564
if ( apply_filters( 'bricks/elements/render', true, $this ) ) {
$this->render();
}
https://i.wpfusion.com/UuCEkd
We couldn’t figure out a way to get the control group added and conditionally display the elements without those filters, but if we’ve overlooked something please let me know.
The only other thing was the bricks/elements/{element}/controls filter. It’d be ideal if there were a filter that applied to every element. As a temporary workaround we’re using a list_files() to get all the element slugs (https://gist.github.com/verygoodplugins/3ad6870966e5be34893e36a0f53656a1#file-class-bricks-php-L281) but it’s not ideal.
It’d be great if we could get a
$this->controls = apply_filters( 'bricks/elements/controls', $this->controls );
filter also around line 88 of the Element base class so we could add controls to all elements simultaneously.
Thanks Jack. I don’t know if it will help but I’ve added that as a Bricks idea board item.
This is complete and was released yesterday in v3.40.11: https://wpfusion.com/documentation/page-builders/bricks/
Awesome! Thank you 🙂
hi jack have you add a full integration? with form, media and more?
At the moment Bricks doesn’t have APIs for custom form integrations, and it also doesn’t have a field mapping UI element.
Bricks also doesn’t have an API for the media player, so an integration isn’t possible.
If they add APIs and documentation for these things we can revisit it.
Hi Jack, following up on Bricks Form element now allowing Custom Actions:
My request:
https://wpfusion.com/feature-requests/bricks-builder-form-element/
Bricks Documentation:
https://academy.bricksbuilder.io/article/form-element/#custom-action
Hey Jack, I’m curious if it’d be possible to include a color indicator (maybe WP Fusion’s brand color) to any section in the Bricks structure panel where WP Fusion’s visibility settings are being used. That way, at a glance, it’s easy to identify sections that contain elements with visibility restrictions. Maybe the parent element can have a color if that’s the only thing with a visibility restriction , but child elements with visibility restrictions get a lighter shade of the color. That way it’s easy to track down any nested items with visibility restrictions being controlled by WP Fusion. Or if not a color indicator maybe icons of some sort, similar to Brick’s condition/interaction icons that appear to the right of structure panel elements could be used.
It’s a great idea! We did this with Elementor, but it was really difficult to implement. I’ll put it on the list to see if it’s possible with Bricks 👍