| 开发者 | wpformation |
|---|---|
| 更新时间 | 2026年10月11日 16:57 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[preferable] shortcode or preferable_render() in a template.[preferable] shows the buttons with your settings. Options override them:
show="ai" or show="google": one family of buttons only.providers="chatgpt,claude": these assistants, in this order (chatgpt, claude, perplexity, mistral, google-ai-mode, gemini, copilot, grok).template="soft|classic|outline|theme" (classic: Editorial, outline: Graphic), layout="card|row", order="ai|google", align="start|center|stretch", icons="logos|color|neutral", heading="Your heading".post="123": the buttons of another post.<?php do_action( 'preferable_render', array( 'show' => 'google' ) ); ?> does nothing when Preferable is deactivated.
For developers
preferable_providers, preferable_should_display, preferable_html, preferable_icon_svg, preferable_heading_level, preferable_ogeeat_buttons, preferable_palette, preferable_palette_variable, preferable_guard_words.preferable_html and preferable_icon_svg goes through wp_kses(): tags outside the plugin's list, such as scripts, are removed. Icons may use the basic SVG shapes.--preferable-accent, --preferable-text, --preferable-bg, --preferable-ai, --preferable-google, --preferable-radius, --preferable-gap.assets/licenses/ and assets/fonts/: assistant and Google icons from Simple Icons (CC0 1.0) and LobeHub Icons (MIT), the uqr QR code library (MIT), the Inter and JetBrains Mono fonts (SIL Open Font License 1.1).
Preferable is not affiliated with OpenAI, Anthropic, Perplexity, Mistral AI, Google, Microsoft or SpaceXAI (formerly xAI). Their names and logos belong to them and only identify each service.
Not while the page loads. A service is contacted only when a reader clicks its button, by the reader's browser.
They cannot receive a question in a link. Preferable copies it to the clipboard as the assistant opens, and tells the reader to paste it.
Domains and subdomains are, sites in a subdirectory are not: the settings tell you. For AI Mode and AI Overviews, your site must stay included in Search generative AI features, in Search Console.
Your server probably sends a Cross-Origin-Opener-Policy: same-origin header. Use same-origin-allow-popups instead, or remove the header.
OGEEAT, a free plugin by the same author, can show its own AI and Google buttons. While they are on, Preferable shows nothing to your visitors, to avoid two sets of buttons. Turn them off in OGEEAT > Settings > AI, GEO & Firewall.
Tested with Elementor, Yoast SEO, Rank Math, All in One SEO, SEOPress and The SEO Framework: their descriptions and social tags never contain the buttons' text.
In the plugin: build/ is compiled from src/ with @wordpress/scripts. Run npm install, then npm run build, in the plugin folder to rebuild it.
Yes, with the "Preferred source button for Google" block in Appearance > Widgets or in a template part, or with the classic Preferable widget. Outside single posts, it shows the Google button for your whole site.
order option).