/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/
// TEMPORARY: Context H:i
add_action('init', function() {
    if (isset($_GET['context_hi']) && $_GET['context_hi'] === '838') {
        $meta = get_post_meta(838, '_bricks_page_content_2', true);
        echo "<h1>Searching for context of 'H:i' in Template 838</h1>";
        $json = json_encode($meta);
        $offset = 0;
        while (($pos = strpos($json, 'H:i', $offset)) !== false) {
            echo "<h3>Found at pos: $pos</h3>";
            echo "<pre>" . htmlspecialchars(substr($json, $pos - 50, 100)) . "</pre>";
            $offset = $pos + 3;
        }
        die();
    }
});
