Utilities

These are the most useful functions from the CFGP_U class for developing advanced solutions: working with REST keys, reading geo data, secure redirects, cache invalidation, bot detection, input sanitization, helper HTTP requests, and more. All examples are ready for copy/paste.

Tip: All methods are static (CFGP_U::method()), so you can call them directly from themes, plugins, or custom snippets.

Security Notes

  • Do not output KEY() and internal IDs in front-end HTML.
  • Use CFGP_U::redirect() for redirects instead of manual header() calls.
  • Trigger cache invalidation only when needed (e.g., after changing geo rules), not on every request.
  • Do not apply geo rules to bots (CFGP_U::is_bot()) to avoid breaking SEO previews and crawls.
Was this page helpful?