Looking at source code "bricks-scripts-js-extra"

When looking at the source code from pages, there is a script tag with the id bricks-scripts-js-extra. It contains a lot of stuff. Why does that exist, and can I remove it?

var bricksData = {"debug":"","locale":"de_DE","ajaxUrl":"https:\/\ …

Hi Max,
Sorry for the late reply.

bricksData contains a lot of necessary data that Bricks needs for its JS. Like the instances of the initiated scripts, map settings, locale, AJAX URL etc…

Accordingly, you should definitely not remove it :slight_smile:

Best regards,
timmse

@timmse Hi Stefan. I want to remove/unset the ajaxURL from this array as I don’t use Bricks form. I noticed the code is coming from frontend.php file but there is no filter to make the change.

I was able to override the file by defining a modified copy of the file in my child theme. I am not sure if this approach is robut but it works for now and loads the php file from child theme instead of parent theme. I know this approach will require me to update the file after every Bricks update. I see no other option till there is a filter for the same.

include get_theme_file_path( '/includes/frontend.php' );