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","4028","static/chunks/app/utilities/strings/page-6389555c35216ce4.js"],"default",1] 9:I[48173,["8173","static/chunks/8173-c3ed3bc2d0ae7ca8.js","406","static/chunks/406-889913e11df0a888.js","4028","static/chunks/app/utilities/strings/page-6389555c35216ce4.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:T488,// Generate a unique token for password reset function generate_password_reset_token($user_id) { $token = cbo_random_string(32); // Store the token in user meta with expiration $expiration = time() + 24 * HOUR_IN_SECONDS; // 24 hours update_user_meta($user_id, 'password_reset_token', $token); update_user_meta($user_id, 'password_reset_expiration', $expiration); return $token; } // Verify a password reset token function verify_password_reset_token($user_id, $token) { $stored_token = get_user_meta($user_id, 'password_reset_token', true); $expiration = get_user_meta($user_id, 'password_reset_expiration', true); if (empty($stored_token) || empty($expiration)) { return false; } if (time() > $expiration) { // Token has expired delete_user_meta($user_id, 'password_reset_token'); delete_user_meta($user_id, 'password_reset_expiration'); return false; } return $token === $stored_token; } // Usage $user_id = 123; $token = generate_password_reset_token($user_id); $reset_url = add_query_arg(['user_id' => $user_id, 'token' => $token], wp_login_url()); echo 'Password reset link: ' . $reset_url;0:{"P":null,"b":"ds2nZAjgJ_uSRgCt4uMw0","p":"","c":["","utilities","strings"],"i":false,"f":[[["",{"children":["utilities",{"children":["strings",{"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":["strings",["$","$1","c",{"children":[null,["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","utilities","children","strings","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":"Strings"}],["$","p",null,{"className":"text-muted-foreground","children":"The strings utility functions provide tools for generating random strings and truncating text while preserving word integrity."}]]}],["$","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_random_string($length)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Generates a random string of the specified length."}],["$","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":"$$length"}],": Length of the random string (default: 10)."]}]}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Return Value:"}],["$","p",null,{"className":"text-muted-foreground","children":"Returns a random string of the specified length."}],["$","$L7",null,{"code":"// Generate a random string of length 10\n$random_string = cbo_random_string();\necho $random_string; // e.g., \"a3b2c7d9e8\"\n\n// Generate a random string of length 16\n$random_string = cbo_random_string(16);\necho $random_string; // e.g., \"a3b2c7d9e8f1g6h5\"\n\n// Use as a unique identifier\n$unique_id = 'element-' . cbo_random_string(8);\necho '
Content
';","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"cbo_truncate($text, $chars)"}],["$","p",null,{"className":"text-muted-foreground mb-2","children":"Truncates a string to the specified length while preserving word integrity."}],["$","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":"$$text"}],": The text to truncate."]}],["$","li",null,{"children":[["$","code",null,{"className":"px-1 py-0.5 bg-muted rounded text-sm","children":"$$chars"}],": Maximum number of characters (default: 200)."]}]]}],["$","h4",null,{"className":"text-base font-medium mt-4","children":"Return Value:"}],["$","p",null,{"className":"text-muted-foreground","children":"Returns the truncated text with ellipsis (...) appended if truncation occurred."}],["$","$L7",null,{"code":"// Truncate text to 50 characters\n$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';\n$truncated = cbo_truncate($text, 50);\necho $truncated; // \"Lorem ipsum dolor sit amet, consectetur adipiscing...\"\n\n// Truncate a post excerpt\nfunction custom_excerpt($post_id, $length = 150) {\n $post = get_post($post_id);\n $content = $post->post_content;\n \n // Strip shortcodes\n $content = strip_shortcodes($content);\n \n // Strip HTML tags\n $content = strip_tags($content);\n \n // Truncate\n return cbo_truncate($content, $length);\n}\n\n// Usage\n$excerpt = custom_excerpt(123, 100);\necho $excerpt;","language":"php"}]]}]]}]]}],["$","div",null,{"className":"space-y-4","children":[["$","h2",null,{"className":"text-xl font-semibold","children":"Advanced Usage Examples"}],["$","div",null,{"className":"space-y-6","children":[["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"Generating Unique Tokens"}],["$","$L7",null,{"code":"$8","language":"php"}]]}],["$","div",null,{"children":[["$","h3",null,{"className":"text-lg font-medium","children":"Creating Post Previews"}],["$","$L7",null,{"code":"// Create previews for a list of posts\nfunction display_post_previews($posts, $excerpt_length = 150) {\n if (empty($posts)) {\n return;\n }\n \n echo '
';\n \n foreach ($posts as $post) {\n // Get post data\n $title = get_the_title($post);\n $permalink = get_permalink($post);\n $content = get_the_content(null, false, $post);\n $content = strip_shortcodes($content);\n $content = strip_tags($content);\n \n // Truncate content\n $excerpt = cbo_truncate($content, $excerpt_length);\n \n // Display post preview\n echo '
';\n echo '

' . $title . '

';\n echo '
' . $excerpt . '
';\n echo 'Read more';\n echo '
';\n }\n \n echo '
';\n}\n\n// Usage\n$recent_posts = get_posts(['numberposts' => 5]);\ndisplay_post_previews($recent_posts, 120);","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_random_string"}]," for generating unique identifiers, but not for security-critical purposes like passwords."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Use cbo_truncate"}]," instead of PHP's substr for text that should be truncated at word boundaries."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Consider the context"}]," when choosing the truncation length to ensure readability."]}],["$","li",null,{"children":[["$","strong",null,{"children":"Strip HTML tags"}]," before truncating content to avoid broken HTML in the output."]}]]}]]}],["$","div",null,{"className":"mt-8 border-t border-border pt-6","children":["$","div",null,{"className":"flex justify-between","children":[["$","$L9",null,{"href":"/utilities/videos","className":"text-primary hover:underline","children":"← Videos"}],["$","$L9",null,{"href":"/utilities/files","className":"text-primary hover:underline","children":"Files →"}]]}]}]]}],null,["$","$La",null,{"children":"$Lb"}]]}],{},null,false]},null,false]},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","6rpFdCvE5vmjNj6frcgSd",{"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