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 | |
// add this function to Sage’s app/helpers.php | |
// inspired by nicooprat: https://gist.github.com/nicooprat/2c1a642d102425d3131037e5dc156361 | |
/** | |
* Render callback for ACF $blocks | |
* @param array $block The block settings and attributes. | |
* @param string $content The block inner HTML (empty). | |
* @param bool $is_preview True during AJAX preview. | |
* @param (int|string) $post_id The post ID this block is saved to. |