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","5253","static/chunks/app/utilities/files/page-f8360897a1e989d0.js"],"default",1] 9:I[48173,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","406","static/chunks/406-889913e11df0a888.js","5253","static/chunks/app/utilities/files/page-f8360897a1e989d0.js"],""] a:I[86213,[],"OutletBoundary"] c:I[86213,[],"MetadataBoundary"] e:I[86213,[],"ViewportBoundary"] 10:I[34835,[],""] :HL["/_next/static/media/a34f9d1faa5f3315-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] :HL["/_next/static/css/7372fd73fc9f904e.css","style"] 8:T4d9,// Create a simple media browser function simple_media_browser() { $uploads_dir = wp_upload_dir()['basedir']; $uploads_url = wp_upload_dir()['baseurl']; // Get year/month folders $year_folders = cbo_list_folders($uploads_dir); echo '
'; if ($year_folders) { foreach ($year_folders as $year_folder) { $year = basename(rtrim($year_folder, '/')); echo '
'; echo '

' . $year . '

'; // Get month folders within each year $month_folders = cbo_list_folders($year_folder); if ($month_folders) { echo '
'; foreach ($month_folders as $month_folder) { $month = basename(rtrim($month_folder, '/')); $relative_path = $year . '/' . $month; echo '
'; echo '

' . $month . '

'; echo 'View Files'; echo '
'; } echo '
'; } echo '
'; } } else { echo '

No media folders found.

'; } echo '
'; } // Usage simple_media_browser();0:{"P":null,"b":"ds2nZAjgJ_uSRgCt4uMw0","p":"","c":["","utilities","files"],"i":false,"f":[[["",{"children":["utilities",{"children":["files",{"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":["files",["$","$1","c",{"children":[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","utilities","children","files","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":"Files and Directories"}],["$","p",null,{"className":"text-muted-foreground","children":"The files utility function provides a tool for listing subdirectories within a specified directory."}]]}],["$","div",null,{"className":"space-y-4","children":[["$","h2",null,{"className":"text-xl font-semibold","children":"Available Function"}],["$","div",null,{"className":"space-y-6","children":["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_list_folders($folder, $levels)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Lists subdirectories within a specified directory with configurable depth."}],["$","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":"$$folder"}],": The directory path to scan (default: '')."]}],["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$levels"}],": Number of levels of subdirectories to explore (default: 1)."]}]]}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Return Value:"}],["$","p",null,{"className":"text-muted-foreground","children":"Returns an array of subdirectories found or false in case of error."}],["$","$L7",null,{"code":"// List subdirectories in the uploads folder\n$uploads_dir = wp_upload_dir()['basedir'];\n$subdirs = cbo_list_folders($uploads_dir);\n\n// Display the subdirectories\nif ($subdirs) {\n echo '';\n} else {\n echo 'No subdirectories found or error occurred.';\n}\n\n// List subdirectories with depth of 2\n$theme_dir = get_template_directory();\n$theme_subdirs = cbo_list_folders($theme_dir, 2);\n\n// Display the theme subdirectories\nif ($theme_subdirs) {\n echo '

Theme Subdirectories:

';\n echo '';\n}","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":"Finding Template Parts"}],["$","$L7",null,{"code":"// Find all template parts in the theme\nfunction get_template_parts() {\n $template_parts_dir = get_template_directory() . '/template-parts';\n $template_parts = [];\n \n // Get all subdirectories in the template-parts directory\n $subdirs = cbo_list_folders($template_parts_dir);\n \n if ($subdirs) {\n foreach ($subdirs as $dir) {\n // Get the template part name from the directory path\n $part_name = basename(rtrim($dir, '/'));\n $template_parts[] = $part_name;\n }\n }\n \n return $template_parts;\n}\n\n// Usage\n$template_parts = get_template_parts();\n\necho '

Available Template Parts:

';\nif (!empty($template_parts)) {\n echo '';\n} else {\n echo '

No template parts found.

';\n}","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"Creating a Media Browser"}],["$","$L7",null,{"code":"$8","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":"Always check the return value"}]," before using the results, as the function may return false."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Be cautious with the depth level"}]," as higher values can lead to performance issues on directories with many nested subdirectories."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Use absolute paths"}]," when working with directories to avoid path resolution issues."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Consider caching the results"}]," for frequently accessed directories to improve performance."]}]]}]]}],["$","div",null,{"className":"mt-8 border-t border-border pt-6","children":["$","div",null,{"className":"flex justify-between","children":[["$","$L9",null,{"href":"/utilities/strings","className":"text-primary hover:underline","children":"← Strings"}],["$","$L9",null,{"href":"/utilities/admin","className":"text-primary hover:underline","children":"Admin →"}]]}]}]]}],null,["$","$La",null,{"children":"$Lb"}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","imLvYWstrfoHhpZyKCGPv",{"children":[["$","$Lc",null,{"children":"$Ld"}],["$","$Le",null,{"children":"$Lf"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$10","$undefined"],"s":false,"S":true} f:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] d:[["$","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"}]] b:null