Code check for feedback tool

Hey team,

I’m starting to use Feedbucket to gather feedback on site builds. It works absolutely brilliantly but one thing we’ve noticed is that it also shows in Cornerstone when you’re in the builder.

Feedbucket have said they can exclude it from being shown on pages but need a constant element in the code to trigger that:

For elementor it’s if we have a GET parameter of elementor-preview and for Bricks there was a method that we could call. I do not have this specific builder that you are using but do you know if there is a way for us to detect (in code) if we are in the builder

What would you advise to tell them to use? I did initially think to say the editor url /cornerstone/edit/… but that’s customisable so probably not the best.

Follow up as I mentioned about the editor URL being customisable and they said if there’s a hook for that?

For Bricks we do it like this in the plugin:

function in_bricks_builder() {

if (!function_exists( 'bricks_is_builder' )) {

    return false;

} else {

    return (bool) bricks_is_builder();

}

}

So if they have a hook/method like that it would be awesome.

Thanks!

You are probably looking for the action cornerstone_before_boot_app

add_action('cornerstone_before_boot_app', function() {
  // Disable code check
});

If it’s happening in the preview you are probably looking for is_cornerstone_preview().

We use the following to check if Cornerstone is even installed.

function_exists('cornerstone')

Have a great day.