fbpx

Feature Requests

Got an idea for a new feature or integration? We’d love to hear it! You can find our roadmap here.

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.

Completed Category: Core Feature Enhancements Robert shared this idea Updated: June 29, 2022

11 thoughts on “Bricks builder integration”

  1. 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.

  2. 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?

    1. 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.

    1. 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.

  3. 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.

Leave a Comment

Your email address will not be published. Required fields are marked *