1:"$Sreact.fragment" 2:I[14627,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","7525","static/chunks/7525-7a1a5e1511dea190.js","7177","static/chunks/app/layout-11e1d5e45067277c.js"],"ThemeProvider"] 3:I[82025,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","7525","static/chunks/7525-7a1a5e1511dea190.js","7177","static/chunks/app/layout-11e1d5e45067277c.js"],"default"] 4:I[46525,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","7525","static/chunks/7525-7a1a5e1511dea190.js","7177","static/chunks/app/layout-11e1d5e45067277c.js"],"default"] 5:I[15244,[],""] 6:I[43866,[],""] 7:I[30191,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","406","static/chunks/406-889913e11df0a888.js","7780","static/chunks/app/utilities/blocks/page-4a04462cd238a9c1.js"],"default",1] a:I[48173,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","406","static/chunks/406-889913e11df0a888.js","7780","static/chunks/app/utilities/blocks/page-4a04462cd238a9c1.js"],""] b:I[86213,[],"OutletBoundary"] d:I[86213,[],"MetadataBoundary"] f:I[86213,[],"ViewportBoundary"] 11:I[34835,[],""] :HL["/_next/static/media/a34f9d1faa5f3315-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/_next/static/css/7372fd73fc9f904e.css","style"] 8:T434,// Use in an ACF block render callback function my_acf_block_render_callback($block) { // Display preview image in the editor cbo_block_preview($block); // Block content $title = get_field('title'); $content = get_field('content'); echo '
'; echo '

' . $title . '

'; echo '
' . $content . '
'; echo '
'; // Close the hidden div if in preview mode if (isset($block['data']['preview_image'])) { echo ''; } } // Register ACF block function register_acf_blocks() { acf_register_block_type([ 'name' => 'my-block', 'title' => 'My Block', 'description' => 'A custom block with preview.', 'render_callback' => 'my_acf_block_render_callback', 'category' => 'formatting', 'icon' => 'admin-comments', 'keywords' => ['custom', 'block'], 'supports' => [ 'align' => true, 'mode' => true, 'jsx' => true ], ]); } add_action('acf/init', 'register_acf_blocks');9:T5eb,// Create a simple page builder function function render_page_sections($post_id = null) { if (!$post_id) { $post_id = get_the_ID(); } // Get sections from ACF flexible content field $sections = get_field('page_sections', $post_id); if (!$sections) { return; } // Render each section foreach ($sections as $section) { $section_type = $section['acf_fc_layout']; switch ($section_type) { case 'hero': cbo_template_block('hero', [ 'title' => $section['title'], 'subtitle' => $section['subtitle'], 'background_image' => $section['background_image'], 'button_text' => $section['button_text'], 'button_url' => $section['button_url'] ]); break; case 'features': cbo_template_block('features', [ 'title' => $section['title'], 'features' => $section['features'] ]); break; case 'testimonials': cbo_template_block('testimonials', [ 'title' => $section['title'], 'testimonials' => $section['testimonials'] ]); break; case 'cta': cbo_template_part('cta', [ 'title' => $section['title'], 'content' => $section['content'], 'button_text' => $section['button_text'], 'button_url' => $section['button_url'] ]); break; } } } // Usage in a template file get_header(); render_page_sections(); get_footer();0:{"P":null,"b":"ds2nZAjgJ_uSRgCt4uMw0","p":"","c":["","utilities","blocks"],"i":false,"f":[[["",{"children":["utilities",{"children":["blocks",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/7372fd73fc9f904e.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__className_d65c78","children":["$","$L2",null,{"attribute":"class","defaultTheme":"light","enableSystem":true,"disableTransitionOnChange":true,"children":["$","div",null,{"className":"flex flex-col min-h-screen","children":[["$","$L3",null,{}],["$","div",null,{"className":"flex flex-1 flex-col md:flex-row mt-16 md:mt-16","children":[["$","$L4",null,{}],["$","main",null,{"className":"flex-1 p-4 md:p-8 pb-16","children":["$","div",null,{"className":"container mx-auto max-w-4xl","children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],["$","footer",null,{"className":"border-t border-border py-6 bg-muted/40","children":["$","div",null,{"className":"container mx-auto px-4 md:px-6","children":["$","div",null,{"className":"flex flex-col md:flex-row justify-between items-center","children":[["$","div",null,{"className":"mb-4 md:mb-0","children":["$","p",null,{"className":"text-sm text-muted-foreground","children":["© ",2025," Combo WordPress Plugin. All rights reserved."]}]}],["$","div",null,{"className":"flex space-x-6","children":[["$","a",null,{"href":"#","className":"text-sm text-muted-foreground hover:text-foreground transition-colors","children":"Privacy Policy"}],["$","a",null,{"href":"#","className":"text-sm text-muted-foreground hover:text-foreground transition-colors","children":"Terms of Service"}],["$","a",null,{"href":"#","className":"text-sm text-muted-foreground hover:text-foreground transition-colors","children":"Contact"}]]}]]}]}]}]]}]}]}]}]]}],{"children":["utilities",["$","$1","c",{"children":[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","utilities","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["blocks",["$","$1","c",{"children":[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","utilities","children","blocks","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","div",null,{"className":"space-y-8","children":[["$","div",null,{"children":[["$","h1",null,{"className":"text-3xl font-bold tracking-tight mb-4","children":"Blocks"}],["$","p",null,{"className":"text-muted-foreground","children":"The blocks utility functions provide tools for working with Gutenberg and ACF blocks in WordPress."}]]}],["$","div",null,{"className":"space-y-4","children":[["$","h2",null,{"className":"text-xl font-semibold","children":"Available Functions"}],["$","div",null,{"className":"space-y-6","children":[["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_get_first_block_name()"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Retrieves the name of the first ACF block on the current page."}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Return Value:"}],["$","p",null,{"className":"text-muted-foreground","children":"Returns the name of the first block or false if no block is found."}],["$","$L7",null,{"code":"// Get the first block name\n$first_block = cbo_get_first_block_name();\n\nif ($first_block) {\n echo 'The first block is: ' . $first_block;\n} else {\n echo 'No blocks found on this page.';\n}\n\n// Use the first block name to add a specific class to the body\nfunction add_first_block_class($classes) {\n $first_block = cbo_get_first_block_name();\n \n if ($first_block) {\n $classes[] = 'has-block-' . sanitize_title($first_block);\n }\n \n return $classes;\n}\nadd_filter('body_class', 'add_first_block_class');","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_block_preview($block)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Generates a preview image for a block in the Gutenberg editor."}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Parameters:"}],["$","ul",null,{"className":"list-disc pl-6 space-y-2 text-muted-foreground","children":["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$block"}],": The Gutenberg block."]}]}],["$","$L7",null,{"code":"$8","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_block_anchor($block)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Generates an HTML anchor for a given block."}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Parameters:"}],["$","ul",null,{"className":"list-disc pl-6 space-y-2 text-muted-foreground","children":["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$block"}],": The Gutenberg block."]}]}],["$","$L7",null,{"code":"// Use in an ACF block render callback\nfunction hero_block_render_callback($block) {\n // Generate anchor if set in the block\n cbo_block_anchor($block);\n \n // Block content\n $title = get_field('title');\n $subtitle = get_field('subtitle');\n $image = get_field('background_image');\n \n echo '
';\n if ($image) {\n echo '\"'';\n }\n echo '
';\n echo '

' . $title . '

';\n echo '

' . $subtitle . '

';\n echo '
';\n echo '
';\n}\n\n// This will output something like:\n//
\n// if an anchor is set in the block settings","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_template_block($slug, $args)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Generates an ACF block from its slug."}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Parameters:"}],["$","ul",null,{"className":"list-disc pl-6 space-y-2 text-muted-foreground","children":[["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$slug"}],": The slug of the ACF block (without the 'block-' prefix)."]}],["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$args"}],": Arguments to pass to the block (default: [])."]}]]}],["$","$L7",null,{"code":"// Render a hero block\ncbo_template_block('hero', [\n 'title' => 'Welcome to Our Website',\n 'subtitle' => 'Learn more about our services',\n 'button_text' => 'Get Started',\n 'button_url' => '/services'\n]);\n\n// Render a features block\ncbo_template_block('features', [\n 'title' => 'Our Features',\n 'features' => [\n [\n 'title' => 'Feature 1',\n 'description' => 'Description of feature 1'\n ],\n [\n 'title' => 'Feature 2',\n 'description' => 'Description of feature 2'\n ]\n ]\n]);","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_template_part($slug, $args, $tpl)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Generates a template part from its slug."}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Parameters:"}],["$","ul",null,{"className":"list-disc pl-6 space-y-2 text-muted-foreground","children":[["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$slug"}],": The slug of the template part."]}],["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$args"}],": Arguments to pass to the template part (default: [])."]}],["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$tpl"}],": The name of the template file without the .php extension (default: 'template')."]}]]}],["$","$L7",null,{"code":"// Include a header template part\ncbo_template_part('header', [\n 'title' => 'Page Title',\n 'subtitle' => 'Page Subtitle'\n]);\n\n// Include a custom card template part\ncbo_template_part('card', [\n 'title' => 'Card Title',\n 'content' => 'Card content goes here',\n 'image' => get_field('card_image'),\n 'link' => get_field('card_link')\n]);\n\n// Include a specific template variation\ncbo_template_part('button', [\n 'text' => 'Click Me',\n 'url' => '/contact',\n 'style' => 'primary'\n], 'rounded'); // Will load templates/parts/button/rounded.php","language":"php"}]]}]]}]]}],["$","div",null,{"className":"space-y-4","children":[["$","h2",null,{"className":"text-xl font-semibold","children":"Usage Examples"}],["$","div",null,{"className":"space-y-6","children":["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"Creating a Page Builder"}],["$","$L7",null,{"code":"$9","language":"php"}]]}]}]]}],["$","div",null,{"className":"space-y-4","children":[["$","h2",null,{"className":"text-xl font-semibold","children":"Best Practices"}],["$","ul",null,{"className":"list-disc pl-6 space-y-2 text-muted-foreground","children":[["$","li",null,{"children":[["$","strong",null,{"children":"Use cbo_block_preview"}]," to provide visual previews of blocks in the editor."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Use cbo_block_anchor"}]," to create linkable sections on the page."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Use cbo_template_block"}]," for reusable ACF blocks."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Use cbo_template_part"}]," for smaller, reusable template components."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Organize template parts"}]," in a logical folder structure for better maintainability."]}]]}]]}],["$","div",null,{"className":"mt-8 border-t border-border pt-6","children":["$","div",null,{"className":"flex justify-between","children":[["$","$La",null,{"href":"/utilities/images","className":"text-primary hover:underline","children":"← Images"}],["$","$La",null,{"href":"/utilities/dummy-content","className":"text-primary hover:underline","children":"Dummy Content →"}]]}]}]]}],null,["$","$Lb",null,{"children":"$Lc"}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","MpOWFtki-eHt9Dhhg-qGw",{"children":[["$","$Ld",null,{"children":"$Le"}],["$","$Lf",null,{"children":"$L10"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$11","$undefined"],"s":false,"S":true} 10:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] e:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Combo WordPress Plugin Documentation"}],["$","meta","2",{"name":"description","content":"Documentation for the Combo WordPress plugin - A powerful configuration system and optimization toolkit"}],["$","meta","3",{"name":"generator","content":"v0.dev"}]] c:null