This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Beaver Builder Global JS Reset | |
Description: Resets global JS and self deactivates. | |
Author: <Simon> | |
Version: 1.0 | |
*/ | |
class BB_Global_JS_Reset { | |
function __construct() { | |
include_once ABSPATH . '/wp-admin/includes/plugin.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mb_block_renderer($attributes, $is_preview = false, $post_id = null) | |
{ | |
$context = Timber::context(); | |
$context['content'] = $attributes['data']; | |
$context['is_preview'] = $is_preview; | |
$context['post_id'] = $post_id; | |
Timber::render("blocks/{$attributes['name']}.twig", $context); | |
} |