PageSourceSearch

https://docs.builderius.io/assets/js/cdb713cf.09a68f8a.js

js builderius.io collected 2026-10-02 04:54:44 UTC 29,082 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkbuilderius=globalThis.webpackChunkbuilderius||[]).push([[764],{7227:(e,n,a)=>{a.d(n,{A:()=>o});a(6540);var r=a(8215);const t={tabItem:"tabItem_Ymn6"};var s=a(4848);function o({children:e,hidden:n,className:a}){return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(t.tabItem,a),hidden:n,children:e})}},7515:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>_});const r=JSON.parse('{"id":"dynamic-data/query-examples/website","title":"Website Queries","description":"Access site-wide data, WordPress options, URL parameters, and global functions that work outside specific content contexts.","source":"@site/docs/dynamic-data/query-examples/website.md","sourceDirName":"dynamic-data/query-examples","slug":"/dynamic-data/query-examples/website","permalink":"/docs/dynamic-data/query-examples/website","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"website","title":"Website Queries"},"sidebar":"docs","previous":{"title":"Navigation Queries","permalink":"/docs/dynamic-data/query-examples/navigation"},"next":{"title":"ACF in Custom Queries","permalink":"/docs/dynamic-data/query-examples/acf"}}');var t=a(4848),s=a(8453),o=a(9489),i=a(7227);const l={id:"website",title:"Website Queries"},c=void 0,u={},_=[{value:"What This Guide Covers",id:"what-this-guide-covers",level:2},{value:"URLs & Navigation",id:"urls--navigation",level:2},{value:"Site Settings & WordPress Options",id:"site-settings--wordpress-options",level:2},{value:"Request & Environment Data",id:"request--environment-data",level:2},{value:"ACF Options Pages",id:"acf-options-pages",level:2},{value:"MetaBox Settings Pages",id:"metabox-settings-pages",level:2},{value:"Additional Global Functions",id:"additional-global-functions",level:2},{value:"Common Use Cases",id:"common-use-cases",level:2}];function d(e){const n={admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Access site-wide data, WordPress options, URL parameters, and global functions that work outside specific content contexts."}),"\n",(0,t.jsx)(n.h2,{id:"what-this-guide-covers",children:"What This Guide Covers"}),"\n",(0,t.jsx)(n.p,{children:"Global functions provide access to site-wide data and settings that aren't tied to specific posts, users, or terms. These functions work at the root level of your GraphQL queries and give you access to WordPress options, URL parameters, environment data, and custom global fields."}),"\n",(0,t.jsx)(n.p,{children:"You'll learn how to:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Get WordPress site settings and options"}),"\n",(0,t.jsx)(n.li,{children:"Access URL parameters, cookies, and server variables"}),"\n",(0,t.jsx)(n.li,{children:"Generate URLs for pages, posts, and archives"}),"\n",(0,t.jsx)(n.li,{children:"Query ACF Options Pages and MetaBox Settings"}),"\n",(0,t.jsx)(n.li,{children:"Use advanced functions like PHP function calls"}),"\n",(0,t.jsx)(n.li,{children:"Handle form URLs and security nonces"}),"\n",(0,t.jsx)(n.li,{children:"Access hook arguments and environment data"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"urls--navigation",children:"URLs & Navigation"}),"\n",(0,t.jsxs)(o.A,{groupId:"url-functions",defaultValue:"basic-urls",values:[{label:"Basic URLs",value:"basic-urls"},{label:"Dynamic URLs",value:"dynamic-urls"},{label:"Archive URLs",value:"archive-urls"}],children:[(0,t.jsxs)(i.A,{value:"basic-urls",children:[(0,t.jsx)(n.p,{children:"Get essential site URLs:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:"{\n  # Core site URLs\n  home_url: front_page_url\n  current_page_url: current_url\n  blog_url: posts_index_page_url\n}\n"})})]}),(0,t.jsxs)(i.A,{value:"dynamic-urls",children:[(0,t.jsx)(n.p,{children:"Get URLs for specific content by name/slug:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Page URLs by slug\n  about_page_url: page_url(name: "about")\n  contact_page_url: page_url(name: "contact-us")\n  \n  # Post URLs by slug\n  latest_news_url: post_url(name: "latest-company-news")\n  product_launch_url: post_url(name: "new-product-announcement")\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"archive-urls",children:[(0,t.jsx)(n.p,{children:"Generate archive and taxonomy URLs:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Author archive URLs\n  author_page_url: author_archive_url(username: "john-doe")\n  writer_archive_url: author_archive_url(username: "jane-writer")\n  \n  # Taxonomy archive URLs\n  news_category_url: category_archive_url(slug: "news")\n  tech_category_url: category_archive_url(slug: "technology")\n  \n  # Tag archive URLs\n  wordpress_tag_url: tag_archive_url(slug: "wordpress")\n  tutorial_tag_url: tag_archive_url(slug: "tutorials")\n}\n'})})]})]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["URL helper functions work ONLY at root level, NOT inside loops or nested objects like ",(0,t.jsx)(n.code,{children:"posts_query.posts"})," or ",(0,t.jsx)(n.code,{children:"terms_query.terms"}),". Use ",(0,t.jsx)(n.code,{children:"php_function_output"})," with WordPress functions inside loops."]})}),"\n",(0,t.jsx)(n.h2,{id:"site-settings--wordpress-options",children:"Site Settings & WordPress Options"}),"\n",(0,t.jsxs)(o.A,{groupId:"site-settings",defaultValue:"basic-core-options",values:[{label:"Basic Core Options",value:"basic-core-options"},{label:"More Core Options",value:"more-core-options"},{label:"Custom Made Options",value:"custom-options"}],children:[(0,t.jsxs)(i.A,{value:"basic-core-options",children:[(0,t.jsx)(n.p,{children:"Get core WordPress settings"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Standard WordPress options\n  site_name: option_value(name: "blogname")\n  site_tagline: option_value(name: "blogdescription")\n  site_url: option_value(name: "siteurl")\n  home_url: option_value(name: "home")\n  admin_email: option_value(name: "admin_email")\n  \n  # Site configuration\n  date_format: option_value(name: "date_format")\n  time_format: option_value(name: "time_format")\n  start_of_week: option_value(name: "start_of_week")\n  timezone_string: option_value(name: "timezone_string")\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"custom-options",children:[(0,t.jsx)(n.p,{children:"Access custom WordPress options (created by themes, plugins, or custom code):"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Plugin/theme custom options\n  site_logo_url: option_value(name: "custom_site_logo")\n  maintenance_mode: option_value(name: "site_maintenance_mode")\n  google_analytics_id: option_value(name: "ga_tracking_id")\n  social_media_links: option_value(name: "social_media_config")\n  \n  # Theme Customizer options\n  primary_color: option_value(name: "theme_primary_color")\n  footer_text: option_value(name: "custom_footer_text")\n  header_style: option_value(name: "header_layout_style")\n  \n  # Plugin settings examples\n  contact_form_recipient: option_value(name: "cf7_default_recipient")\n  seo_meta_title: option_value(name: "seo_plugin_default_title")\n  cache_expiration: option_value(name: "cache_plugin_timeout")\n}\n'})}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"}
1)," These are options stored in WordPress's options table by themes/plugins using ",(0,t.jsx)(n.code,{children:"add_option()"})," or ",(0,t.jsx)(n.code,{children:"update_option()"}),". They differ from ACF Options Pages which use ",(0,t.jsx)(n.code,{children:"acf_value()"})," instead."]})]}),(0,t.jsxs)(i.A,{value:"more-core-options",children:[(0,t.jsxs)(n.p,{children:["Get active theme and WordPress configuration settings (any field from ",(0,t.jsx)(n.code,{children:"wp-admin/options.php"}),")"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Active theme information\n  active_theme: option_value(name: "stylesheet")        # Current theme folder name\n  theme_directory: option_value(name: "template")       # Parent theme folder (for child themes)\n  \n  # WordPress system settings\n  db_version: option_value(name: "db_version")          # Database schema version (not WP version)\n  users_can_register: option_value(name: "users_can_register")\n  default_role: option_value(name: "default_role")\n  \n  # Comment system settings  \n  comments_enabled: option_value(name: "default_comment_status")    # "open" or "closed"\n  require_name_email: option_value(name: "require_name_email")      # "1" or ""\n  comment_moderation: option_value(name: "comment_moderation")      # "1" or ""\n  \n  # Additional WordPress settings\n  blog_public: option_value(name: "blog_public")        # Search engine visibility\n  permalink_structure: option_value(name: "permalink_structure")\n  uploads_use_yearmonth_folders: option_value(name: "uploads_use_yearmonth_folders")\n}\n'})}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Note:"}),' These are core WordPress settings from the options table. Most return strings ("1"/"" for booleans). Use ',(0,t.jsx)(n.code,{children:"db_version"})," for database schema version, not WordPress version number."]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"request--environment-data",children:"Request & Environment Data"}),"\n",(0,t.jsxs)(o.A,{groupId:"request-data",defaultValue:"url-params",values:[{label:"URL Parameters",value:"url-params"},{label:"Cookies",value:"cookies"},{label:"Server Variables",value:"server-vars"}],children:[(0,t.jsxs)(i.A,{value:"url-params",children:[(0,t.jsx)(n.p,{children:"Access URL query parameters ($_GET):"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Get URL parameters with fallbacks\n  search_query: url_parameter(name: "s", fallback: "")\n  current_page: url_parameter(name: "page", fallback: 1)\n  category_filter: url_parameter(name: "category", fallback: "all")\n  sort_order: url_parameter(name: "order", fallback: "desc")\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"cookies",children:[(0,t.jsx)(n.p,{children:"Read browser cookies ($_COOKIE):"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # User preferences from cookies\n  preferred_language: cookie_parameter(name: "user_language", fallback: "en")\n  theme_preference: cookie_parameter(name: "dark_mode", fallback: "light")\n  shopping_cart_id: cookie_parameter(name: "cart_session", fallback: "")\n  \n  # Analytics and tracking\n  user_session: cookie_parameter(name: "user_session_id", fallback: "")\n  utm_source: cookie_parameter(name: "utm_source", fallback: "direct")\n  \n  # Personalization\n  viewed_products: cookie_parameter(name: "recently_viewed", fallback: "[]")\n  user_location: cookie_parameter(name: "user_region", fallback: "unknown")\n  \n  # Cookie-based conditional logic\n  returning_visitor: expression_result(\n    expression: "cookie_parameter(\'visited_before\', \'no\') == \'yes\'"\n  )\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"server-vars",children:[(0,t.jsx)(n.p,{children:"Access server environment variables ($_SERVER):"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Request information\n  request_method: server_parameter(name: "REQUEST_METHOD", fallback: "GET")\n  user_agent: server_parameter(name: "HTTP_USER_AGENT", fallback: "")\n  request_uri: server_parameter(name: "REQUEST_URI", fallback: "/")\n  query_string: server_parameter(name: "QUERY_STRING", fallback: "")\n  \n  # Client information\n  client_ip: server_parameter(name: "REMOTE_ADDR", fallback: "unknown")\n  referrer: server_parameter(name: "HTTP_REFERER", fallback: "direct")\n  \n  # Server information\n  server_name: server_parameter(name: "SERVER_NAME", fallback: "localhost")\n  server_port: server_parameter(name: "SERVER_PORT", fallback: "80")\n  https_enabled: server_parameter(name: "HTTPS", fallback: "")\n  \n  # Security headers\n  content_type: server_parameter(name: "CONTENT_TYPE", fallback: "")\n  accept_language: server_parameter(name: "HTTP_ACCEPT_LANGUAGE", fallback: "en")\n}\n'})})]})]}),"\n",(0,t.jsx)(n.h2,{id:"acf-options-pages",children:"ACF Options Pages"}),"\n",(0,t.jsxs)(o.A,{groupId:"acf-global",defaultValue:"basic-acf",values:[{label:"Basic ACF Options",value:"basic-acf"},{label:"ACF Repeaters",value:"acf-repeaters"}],children:[(0,t.jsxs)(i.A,{value:"basic-acf",children:[(0,t.jsx)(n.p,{children:"Access ACF Options Page fields:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Site branding\n  site_logo: acf_value(name: "site_logo")\n  site_favicon: acf_value(name: "site_favicon")\n  default_hero_image: acf_value(name: "default_hero_image")\n  \n  # Contact information\n  company_phone: acf_value(name: "company_phone")\n  company_email: acf_value(name: "company_email")\n  company_address: acf_value(name: "company_address")\n  \n  # Social media\n  facebook_url: acf_value(name: "facebook_url")\n  twitter_handle: acf_value(name: "twitter_handle")\n  linkedin_company: acf_value(name: "linkedin_company")\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"acf-repeaters",children:[(0,t.jsx)(n.p,{children:"Work with ACF repeater fields at global level:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Social media links repeater\n  social_links: acf_repeater_value(name: "social_media_links") {\n    platform: acf_value(name: "social_platform")\n    url: acf_value(name: "social_url")\n    icon: acf_value(name: "platform_icon")\n    show_in_footer
1: acf_value(name: "show_in_footer")\n  }\n  \n  # Company locations repeater\n  office_locations: acf_repeater_value(name: "company_offices") {\n    city: acf_value(name: "office_city")\n    address: acf_value(name: "office_address")\n    phone: acf_value(name: "office_phone")\n    contact_person: acf_value(name: "office_manager")\n  }\n  \n  # Featured content repeater\n  homepage_features: acf_repeater_value(name: "homepage_featured_content") {\n    title: acf_value(name: "feature_title")\n    description: acf_value(name: "feature_description")\n    image: acf_value(name: "feature_image")\n    link_url: acf_value(name: "feature_link")\n    link_text: acf_value(name: "feature_link_text")\n  }\n}\n'})})]})]}),"\n",(0,t.jsx)(n.h2,{id:"metabox-settings-pages",children:"MetaBox Settings Pages"}),"\n",(0,t.jsxs)(o.A,{groupId:"metabox-global",defaultValue:"basic-metabox",values:[{label:"Basic MetaBox",value:"basic-metabox"},{label:"MetaBox Groups",value:"metabox-groups"}],children:[(0,t.jsxs)(i.A,{value:"basic-metabox",children:[(0,t.jsx)(n.p,{children:"Access MetaBox Settings Page fields (requires option_name):"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Basic site settings\n  contact_email: metabox_value(field_id: "contact_email", option_name: "site_settings")\n  company_address: metabox_value(field_id: "company_address", option_name: "site_settings")\n  phone_number: metabox_value(field_id: "main_phone", option_name: "site_settings")\n  \n  # Business information\n  business_hours: metabox_value(field_id: "operating_hours", option_name: "site_settings")\n  company_registration: metabox_value(field_id: "business_registration", option_name: "site_settings")\n  tax_number: metabox_value(field_id: "company_tax_id", option_name: "site_settings")\n  \n  # Marketing settings\n  newsletter_signup_url: metabox_value(field_id: "newsletter_url", option_name: "site_settings")\n  promotional_banner: metabox_value(field_id: "promo_banner_text", option_name: "site_settings")\n  special_offers_enabled: metabox_value(field_id: "show_special_offers", option_name: "site_settings")\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"metabox-groups",children:[(0,t.jsx)(n.p,{children:"Work with MetaBox grouped fields:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Contact information group\n  contact_info: metabox_group_value(field_id: "contact_group", option_name: "site_settings") {\n    main_phone: metabox_value(field_id: "phone")\n    support_email: metabox_value(field_id: "email")\n    office_address: metabox_value(field_id: "address")\n    business_hours: metabox_value(field_id: "hours")\n  }\n  \n  # Social media group\n  social_settings: metabox_group_value(field_id: "social_media", option_name: "site_settings") {\n    facebook_page: metabox_value(field_id: "facebook_url")\n    twitter_account: metabox_value(field_id: "twitter_handle")\n    instagram_profile: metabox_value(field_id: "instagram_url")\n    linkedin_company: metabox_value(field_id: "linkedin_url")\n  }\n  \n  # SEO settings group\n  seo_config: metabox_group_value(field_id: "seo_settings", option_name: "site_settings") {\n    default_title_suffix: metabox_value(field_id: "title_suffix")\n    meta_description: metabox_value(field_id: "default_meta_desc")\n    og_image: metabox_value(field_id: "default_og_image")\n    analytics_code: metabox_value(field_id: "google_analytics")\n  }\n}\n'})})]})]}),"\n",(0,t.jsx)(n.h2,{id:"additional-global-functions",children:"Additional Global Functions"}),"\n",(0,t.jsxs)(o.A,{groupId:"additional-functions",defaultValue:"php-functions",values:[{label:"PHP Functions",value:"php-functions"},{label:"Expression Results",value:"expressions"},{label:"Hook Arguments",value:"hooks"},{label:"Form Functions",value:"forms"}],children:[(0,t.jsxs)(i.A,{value:"php-functions",children:[(0,t.jsx)(n.p,{children:"Call WordPress PHP functions:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Basic WordPress functions\n  wp_version: php_function_output(\n    function: "get_bloginfo"\
1n    arguments: ["version"]\n  )\n  \n  current_user_id: php_function_output(\n    function: "get_current_user_id"\n    arguments: []\n  )\n  \n  # Functions with parameters\n  post_permalink: php_function_output(\n    function: "get_permalink"\n    arguments: [123]\n    fallback: ""\n  )\n  \n  # Theme functions\n  theme_name: php_function_output(\n    function: "wp_get_theme"\n    arguments: []\n    fallback: "Unknown"\n  )\n  \n  # Custom functions\n  custom_data: php_function_output(\n    function: "my_custom_function"\n    arguments: ["param1", "param2"]\n    fallback: "default"\n  )\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"expressions",children:[(0,t.jsx)(n.p,{children:"Process and combine data:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:"{\n  # Combine multiple data sources\n  current_year: expression_result(\n    expression: \"'Current year is: ' ~ date('Y')\"\n  )\n  \n  # String manipulation\n  site_title_caps: expression_result(\n    expression: \"upper('Example Text')\"\n  )\n  \n  # Mathematical calculations\n  total_width: expression_result(\n    expression: \"(2 + (60 * 60 * 24)) ~ 'px' \" \n  )\n  \n  # Check WP Config constants\n  maintenance_mode: php_function_output(\n    function: \"defined\"\n    arguments: [\"WP_MAINTENANCE_MODE\"]\n    fallback: false\n  )\n  \n  # Conditional logic\n  maintenance_message: expression_result(\n    expression: \"(maintenance_mode) ? 'Site under maintenance' : 'Site active'\"\n  )\n}\n"})})]}),(0,t.jsxs)(i.A,{value:"hooks",children:[(0,t.jsx)(n.p,{children:"Access WordPress hook data:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Get arguments passed to current hook\n  first_argument: hook_argument(position: 0)\n  second_argument: hook_argument(position: 1)\n  third_argument: hook_argument(position: 2)\n  \n  # Use hook data in queries\n  post_from_hook: post(identifier: "ID", value: "{{hook_argument(position: 0)}}") {\n    ID\n    post_title\n    post_status\n  }\n  \n  # Conditional processing based on hooks\n  hook_context: expression_result(\n    expression: "hook_argument(0) ? \'has_data\' : \'no_data\'"\n  )\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"forms",children:[(0,t.jsx)(n.p,{children:"Generate form URLs and security:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Form submission URLs\n  contact_form_url: form_submission_url(form: "contact")\n  newsletter_url: form_submission_url(form: "newsletter")\n  registration_url: form_submission_url(form: "registration")\n  \n  # Security nonces\n  contact_nonce: form_nonce(form: "contact")\n  newsletter_nonce: form_nonce(form: "newsletter")\n  admin_nonce: form_nonce(form: "admin_action")\n}\n'})})]})]}),"\n",(0,t.jsx)(n.h2,{id:"common-use-cases",children:"Common Use Cases"}),"\n",(0,t.jsxs)(o.A,{groupId:"global-use-cases",defaultValue:"site-header",values:[{label:"Site Header Data",value:"site-header"},{label:"User Personalization",value:"personalization"},{label:"Form Handling",value:"form-handling"}],children:[(0,t.jsxs)(i.A,{value:"site-header",children:[(0,t.jsx)(n.p,{children:"Complete site header configuration:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n    # Ger the url parameter\n    search_query: url_parameter(name: "s", fallback: "")\n    \n    # Get a curent page url\n    current_page: current_url\n    \n    # Get user language\n    user_language: cookie_parameter(name: "language", fallback: "en")\n    \n    # Get the Browser Agent\n    user_agent: php_function_output(\n      function: "wp_is_mobile"\n    ) @private\n\n    # Respond with a message\n    is_mobile: expression_result(\n      expression: "(user_agent) ? \'mobile-style\' : \'desktop-style\'"\n    )\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"personalization",children:[(0,t.jsx)(n.p,{children:"User personalization and preferences:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # User preferences from cookies\n  theme: cookie_parameter(name: "theme_preference", fallback: "light")\n  language: cookie_parameter(name: "preferred_language", fallback: "en")\n  region: cookie_parameter(name: "user_region", fallback: "US")\n  currency: cookie_parameter(name: "currency", fallback: "USD")\n  \n  # Browser and location data\n  user_agent: server_parameter(name: "HTTP_USER_AGENT", fallback: "")\n  referrer: server_parameter(name: "HTTP_REFERER", fallback: "direct")\n  ip_address: server_parameter(name: "REMOTE_ADDR", fallback: "unknown")\n  accept_language: server_parameter(name: "HTTP_ACCEPT_LANGUAGE", fallback: "en")\n  \n  # Personalized content flags\n  returning_visitor: expression_result(\n    expression: "cookie_parameter(\'visited_before\', \'no\') == \'yes\'"\n  )\n  has_cart: expression_result(\n    expression: "cookie_parameter(\'cart_items\', \'\') != \'\'"\n  )\n  preferred_content: cookie_parameter(name: "content_preferences", fallback: "general")\n}\n'})})]}),(0,t.jsxs)(i.A,{value:"form-handling",children:[(0,t.jsx)(n.p,{children:"Complete form setup with security:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-graphql",children:'{\n  # Contact form configuration\n  action_url: form_submission_url(form: "contact_form")\n  nonce: form_nonce(form: "contact_form")\n  method: "POST"\n  success_url: page_url(name: "thank-you")\n  error_url: page_url(name: "contact")\n  \n  # Newsletter signup\n  action_url: form_submission_url(form: "newsletter")\n  nonce: form_nonce(form: "newsletter")\n  redirect_url: current_url\n  honeypot_field: "
1newsletter_honeypot"\n  \n  # User registration\n  action_url: form_submission_url(form: "user_registration")\n  nonce: form_nonce(form: "user_registration")\n  login_url: page_url(name: "login")\n  terms_url: page_url(name: "terms-of-service")\n  privacy_url: page_url(name: "privacy-policy")\n  \n  # Form validation settings\n  enable_captcha: acf_value(name: "enable_form_captcha")\n  require_email_verification: acf_value(name: "require_email_verification")\n  max_file_size: acf_value(name: "max_upload_size")\n  allowed_file_types: acf_value(name: "allowed_file_extensions")\n}\n'})})]})]})]})}function m(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,a)=>{a.d(n,{R:()=>o,x:()=>i});var r=a(6540);const t={},s=r.createContext(t);function o(e){const n=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(s.Provider,{value:n},e.children)}},9489:(e,n,a)=>{a.d(n,{A:()=>y});var r=a(6540),t=a(8215),s=a(8630),o=a(4245),i=a(6347),l=a(6494),c=a(2814),u=a(5167),_=a(9900);function d(e){return r.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function m(e){const{values:n,children:a}=e;return(0,r.useMemo)(()=>{const e=n??function(e){return d(e).map(({props:{value:e,label:n,attributes:a,default:r}})=>({value:e,label:n,attributes:a,default:r}))}(a);return function(e){const n=(0,u.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e},[n,a])}function p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function f({queryString:e=!1,groupId:n}){const a=(0,i.W6)(),t=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,c.aZ)(t),(0,r.useCallback)(e=>{if(!t)return;const n=new URLSearchParams(a.location.search);n.set(t,e),a.replace({...a.location,search:n.toString()})},[t,a])]}function h(e){const{defaultValue:n,queryString:a=!1,groupId:t}=e,s=m(e),[o,i]=(0,r.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!p({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const a=n.find(e=>e.default)??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:s})),[c,u]=f({queryString:a,groupId:t}),[d,h]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[a,t]=(0,_.Dv)(n);return[a,(0,r.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),g=(()=>{const e=c??d;return p({value:e,tabValues:s})?e:null})();(0,l.A)(()=>{g&&i(g)},[g]);return{selectedValue:o,selectValue:(0,r.useCallback)(e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),h(e)},[u,h,s]),tabValues:s}}var g=a(1062);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=a(4848);function x({className:e,block:n,selectedValue:a,selectValue:r,tabValues:s}){const i=[],{blockElementScrollPositionUntilNextRender:l}=(0,o.a_)(),c=e=>{const n=e.currentTarget,t=i.indexOf(n),o=s[t].value;o!==a&&(l(n),r(o))},u=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const a=i.indexOf(e.currentTarget)+1;n=i[a]??i[0];break}case"ArrowLeft":{const a=i.indexOf(e.currentTarget)-1;n=i[a]??i[i.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:s.map(({value:e,label:n,attributes:r})=>(0,b.jsx)("li",{role:"tab",tabIndex:a===e?0:-1,"aria-selected":a===e,ref:e=>{i.push(e)},onKeyDown:u,onClick:c,...r,className:(0,t.A)("tabs__item",v.tabItem,r?.className,{"tabs__item--active":a===e}),children:n??e},e))})}function j({lazy:e,children:n,selectedValue:a}
1){const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=s.find(e=>e.props.value===a);return e?(0,r.cloneElement)(e,{className:(0,t.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a}))})}function k(e){const n=h(e);return(0,b.jsxs)("div",{className:(0,t.A)(s.G.tabs.container,"tabs-container",v.tabList),children:[(0,b.jsx)(x,{...n,...e}),(0,b.jsx)(j,{...n,...e})]})}function y(e){const n=(0,g.A)();return(0,b.jsx)(k,{...e,children:d(e.children)},String(n))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.