=== AI Summarise Button === Contributors: cropllm Tags: ai, summarise, chatgpt, claude, block Requires at least: 6.5 Tested up to: 7.1 Requires PHP: 7.4 Stable tag: 3.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html A customisable block and shortcode that lets visitors summarise the current page in their preferred AI tool. == Description == AI Summarise Button adds a block (and a matching shortcode) that lets a reader send the current page to an AI tool for a summary. Clicking the button opens the chosen tool in a new tab with a prompt already filled in. **Two modes** * **Basic** — the button goes straight to one AI tool of your choosing. * **Advanced** — the visitor picks from the tools you have enabled. **Supported tools** * ChatGPT * Claude * Perplexity * Gemini * Copilot **Customisable** * Button text and optional AI logo * Background and text colour * Alignment, width, height and corner radius * Logo size The plugin stores nothing and sends nothing to any server of its own. It builds a prompt from the page title and URL in the visitor's browser and opens the selected tool in a new tab. == Installation == 1. Upload the plugin folder to `/wp-content/plugins/`, or install it through **Plugins → Add New**. 2. Activate it through the **Plugins** menu. 3. Add the **AI Summarise Button** block to any post or page, or use the shortcode `[aisubu_summarise_button]`. == Frequently Asked Questions == = Does the plugin store or send my visitors' data? = No. It opens the selected AI tool in a new tab with a pre-filled prompt containing the page title and URL. Nothing is stored, and no request is made to any third party until the visitor clicks. = Can visitors choose which AI tool to use? = Yes — set the block to Advanced mode and tick the tools you want to offer. Clicking the button then shows a small chooser. = Can I use it outside the block editor? = Yes. The shortcode accepts the same options: `[aisubu_summarise_button mode="advanced" providers="chatgpt,claude" label="Summarise this page" alignment="center" background_color="#111111" text_color="#ffffff" border_radius="6" width="220" height="36" logo_size="15" show_logo="true"]` = Can I change the prompt? = Yes, with the `aisubu_prompt_template` filter. `%1$s` is the page title and `%2$s` the page URL. The provider list can be changed with the `aisubu_providers` filter. == Screenshots == 1. The button in a post, in Basic mode. 2. Block settings — mode, colours and size. 3. The provider chooser shown in Advanced mode. == Changelog == = 3.0.0 = * Fixed: the provider picker inherited its text colour from the theme, so on dark themes the title and hint appeared grey on white. Text is now explicitly black. * Rebuilt for WordPress 7.1. Block now uses Block API version 3 and `block.json` metadata. * Editor code no longer touches the top-level document, so it works with the always-iframed editor introduced in WordPress 7.0. * Removed deprecated component props (`__next40pxDefaultSize`, `size`) that became no-ops in WordPress 7.1. * Minimum requirements raised to WordPress 6.5 and PHP 7.4, matching core. * Block and shortcode now share one server-side renderer, so both stay in step. * All attributes validated and escaped on output; colours run through `sanitize_hex_color()`. * Provider chooser rebuilt as an accessible dialog — keyboard navigable, Escape to close, focus returned to the button. * Logo is now an inline SVG using `currentColor`, so it matches the button text colour at any size. * Front-end script is deferred and only loaded on pages that use the button. * Added `aisubu_prompt_template` and `aisubu_providers` filters. = 2.9.8 = * Directory assets: FAQ, screenshots and branding. = 2.9.7 = * Provider selection popup and additional editor controls. == Upgrade Notice == = 3.0.0 = Rebuilt for WordPress 7.1 (requires WordPress 6.5 and PHP 7.4). Check any existing buttons after updating.