| 开发者 | alexandreminem |
|---|---|
| 更新时间 | 2026年5月22日 03:13 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
.cwebpf-*, with CSS variables for colors and fonts.cwebpf_ai_fallback_recommendation filter lets you plug an AI service for ambiguous cases. No built-in API call./wp-content/plugins/cweb-product-finder-for-gravity-forms/, or install through the Plugins menu in WordPress.No. All scoring happens locally in PHP. Your visitors' answers never leave your server.
Yes. Gravity Forms is the questionnaire engine. The plugin is a companion that hooks into form submissions.
Yes. In the setup wizard, choose "WooCommerce products" as the source. Reference your existing products by ID in the scoring rules. The rule editor auto-completes from your catalog.
All HTML uses classes prefixed .cwebpf-*. Colors and fonts are exposed as CSS custom properties (--cwebpf-primary, --cwebpf-accent, --cwebpf-font-heading, etc.). Override them in your theme stylesheet.
Yes. The recommendation result and explanation pass through filters (cwebpf_recommendation_explanation, cwebpf_form_id, cwebpf_field_id, cwebpf_fallback_contact_url, cwebpf_card_disclaimer). Advanced users can also call CWebPF_Recommendation_Engine::recommend() directly.
Recommendation rules: wp_options (cwebpf_scoring_rules, cwebpf_form_config, cwebpf_product_source). Products: the standard wp_posts / wp_postmeta tables (CPT cwebpf_product or WooCommerce products). No custom database tables are created.
cweb- prefix per WordPress.org naming guidelines.gr_* / GR_* / .gr-* to cwebpf_* / CWEBPF_* / CWebPF_* / .cwebpf-* to satisfy the 4+ character prefix rule.<style> and <script> blocks moved to standalone files in assets/css/admin.css, assets/js/admin-rules.js, and assets/js/admin-onboarding.js, registered via wp_enqueue_style, wp_enqueue_script, and localized with wp_localize_script. Each asset is conditionally loaded only on its own admin screen.[gravity_recommender] → [cwebpf_recommender].(int) wp_unslash(...) with absint(wp_unslash(...)) on $_POST['gr_form_id'] and $_GET['step']. Static analyzers don't accept type casts as sanitization.gr_gravityforms_affiliate_url → gr_gravityforms_url.:root. Default colors and fonts now render even when the theme doesn't override them.load_plugin_textdomain() (auto-loaded since WP 4.6), added languages/ folder, fixed translators: comment placement, switched to explicit per-field wp_unslash() + sanitize_*() chains across all admin pages.gr_ai_fallback_recommendation filter for plugging an optional AI fallback.