Skip to content

Instantly share code, notes, and snippets.

@andreiglingeanu
Created August 26, 2021 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreiglingeanu/cd7a5632a719a25dd33826bff96c2ed5 to your computer and use it in GitHub Desktop.
Save andreiglingeanu/cd7a5632a719a25dd33826bff96c2ed5 to your computer and use it in GitHub Desktop.
<?php
add_action('blocksy:pro:content-blocks:pre-output', function ($id) {
if (function_exists('ub_load_assets')) {
add_action( 'enqueue_block_assets', function () {
ub_load_assets();
});
add_action('wp_head', function () use ($id) {
global $post;
$post = get_post($id);
setup_postdata($post);
ub_include_block_attribute_css();
wp_reset_postdata();
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment