{"id":337505,"date":"2026-07-21T05:28:18","date_gmt":"2026-07-21T05:28:18","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ai-short-summary\/"},"modified":"2026-07-21T05:27:44","modified_gmt":"2026-07-21T05:27:44","slug":"jigar-patel-post-content-summary-with-ai","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/jigar-patel-post-content-summary-with-ai\/","author":23529423,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0.2","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Jigar Patel Post Content Summary With AI","header_author":"indiajigar, Jigar Patel","header_description":"Generate an AI-written short summary (max 200 characters) for posts, editable by the editor, saved to post_meta, and automatically prepended to the post content in a styled box.","assets_banners_color":"","last_updated":"2026-07-21 05:27:44","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":39,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"indiajigar","date":"2026-07-21 05:27:44"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2353,236834,1395,194533,520],"plugin_category":[],"plugin_contributors":[272567],"plugin_business_model":[],"class_list":["post-337505","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-anthropic","plugin_tags-excerpt","plugin_tags-openai","plugin_tags-summary","plugin_contributors-indiajigar","plugin_committers-indiajigar"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/jigar-patel-post-content-summary-with-ai.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>JP Post Content Summary With AI adds a \"Generate Summary with AI\" button to the post editor. One click sends the article content to your chosen AI provider (Anthropic Claude or OpenAI), which returns a short summary (200 characters max). The summary lands in an editable text field so editors can tweak it before publishing. Once the post is saved, the summary is stored in post_meta and automatically prepended to the post content on the front end, inside a rounded, bordered box.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li>One-click AI summary generation from the post editor<\/li>\n<li>Editable summary field with a live 200-character counter<\/li>\n<li>Works with Anthropic (Claude) or OpenAI \u2014 your choice, your API key<\/li>\n<li>Summary is stored in <code>post_meta<\/code> (key: <code>_ai_short_summary<\/code>)<\/li>\n<li>Automatically displayed above the post content in a styled box \u2014 no theme edits needed<\/li>\n<li>Server-side enforcement of the 200-character limit, even if the field is edited manually<\/li>\n<li>Nonce-protected AJAX request and standard WordPress capability checks<\/li>\n<\/ul>\n\n<h3>How It Works (Step by Step)<\/h3>\n\n<ol>\n<li><p><strong>Configure your API key<\/strong>\nGo to <em>Settings \u2192 JP PostSummary With AI<\/em> in wp-admin. Choose a provider (Anthropic or OpenAI), paste your API key, and optionally specify a model (defaults: <code>claude-sonnet-4-6<\/code> for Anthropic, <code>gpt-4o-mini<\/code> for OpenAI). Save changes.<\/p><\/li>\n<li><p><strong>Open a post<\/strong>\nEdit any post (new or existing). Below the main content editor you'll see a \"Short Summary (AI)\" box.<\/p><\/li>\n<li><p><strong>Generate the summary<\/strong>\nClick \"Generate Summary With AI.\" The plugin sends the post's title and content (up to ~6000 characters) to the configured AI provider via a secure server-side AJAX request (<code>admin-ajax.php<\/code>, nonce-verified). The AI returns a short summary, which is inserted into the text field below the button.<\/p><\/li>\n<li><p><strong>Review and edit<\/strong>\nThe summary is fully editable. A live character counter (e.g. \"142 \/ 200\") shows how much room is left, and turns red if you exceed the limit. You can also skip AI generation entirely and type your own summary.<\/p><\/li>\n<li><p><strong>Save\/Publish the post<\/strong>\nWhen you click Update or Publish, WordPress's standard <code>save_post<\/code> hook fires. The plugin verifies the nonce and your editing capability, sanitizes the text, truncates it to 200 characters at a clean word boundary if needed, and saves it to <code>post_meta<\/code> under the key <code>_ai_short_summary<\/code>.<\/p><\/li>\n<li><p><strong>Automatic front-end display<\/strong>\nOn the single post view, a <code>the_content<\/code> filter checks for a saved summary. If one exists, it's wrapped in a <code>&lt;div class=\"jppsai-summary-box\"&gt;<\/code> \u2014 rounded corners, subtle border and shadow \u2014 and prepended before the rest of the article content. No template edits are required; this happens automatically via the filter.<\/p><\/li>\n<\/ol>\n\n<h3>External services<\/h3>\n\n<p>This plugin uses the <strong>WordPress AI Client<\/strong>, the AI infrastructure built into WordPress core (7.0+), to generate short article summaries. It does not connect to any external service directly or on its own \u2014 it works only through whichever AI provider(s) the site administrator has configured under <em>Settings \u2192 AI Credentials<\/em>. Depending on that configuration, the plugin's \"Generate Summary by AI\" button will cause the post title and content to be sent to one of the following third-party services:<\/p>\n\n<p><strong>Anthropic (Claude models)<\/strong>\n* What it is \/ what it's used for: a generative AI service used to produce the short article summary text.\n* What data is sent, and when: the post title and up to approximately 6,000 characters of the post content, sent only when an editor clicks the \"Generate Summary by AI\" button (never automatically or in the background).\n* Terms of Service: https:\/\/www.anthropic.com\/legal\/consumer-terms\n* Privacy Policy: https:\/\/www.anthropic.com\/legal\/privacy<\/p>\n\n<p><strong>OpenAI (GPT models)<\/strong>\n* What it is \/ what it's used for: a generative AI service used to produce the short article summary text.\n* What data is sent, and when: the post title and up to approximately 6,000 characters of the post content, sent only when an editor clicks the \"Generate Summary by AI\" button (never automatically or in the background).\n* Terms of Service: https:\/\/openai.com\/policies\/row-terms-of-use\/\n* Privacy Policy: https:\/\/openai.com\/policies\/row-privacy-policy\/<\/p>\n\n<h3>Data &amp; Privacy Notes<\/h3>\n\n<ul>\n<li>Post title and content (up to ~6000 characters) are sent to the configured third-party AI provider (Anthropic or OpenAI) when the \"Generate Summary With AI\" button is clicked.<\/li>\n<li>No data is sent automatically \u2014 generation only happens on explicit button click.<\/li>\n<li>Refer to your chosen provider's privacy policy and terms of service for how they handle submitted data.<\/li>\n<\/ul>\n\n<h3>Known Limitations<\/h3>\n\n<ul>\n<li>Any user with <code>edit_posts<\/code> capability can trigger a billed API call by clicking the button. If you have many editors, consider adding rate-limiting.<\/li>\n<li>Summary generation is synchronous \u2014 the request happens while the editor waits, so response time depends on the AI provider's latency (typically a few seconds).<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin zip via <em>Plugins \u2192 Add New \u2192 Upload Plugin<\/em>, or extract it into <code>\/wp-content\/plugins\/jigar-patel-post-content-summary-with-ai\/<\/code>.<\/li>\n<li>Activate the plugin through the <em>Plugins<\/em> menu.<\/li>\n<li>Go to <em>Settings \u2192 JP PostSummary With AI<\/em> and enter your API key and provider.<\/li>\n<li>Edit any post and use the \"Generate Summary With AI\" button in the post editor.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"which%20ai%20providers%20are%20supported%3F\"><h3>Which AI providers are supported?<\/h3><\/dt>\n<dd><p>Anthropic (Claude) and OpenAI out of the box. The API-calling logic is isolated in two functions (<code>jppsai_call_anthropic()<\/code> and <code>jppsai_call_openai()<\/code>), so adding another provider just means adding a similar function and a case in <code>jppsai_call_ai_api()<\/code>.<\/p><\/dd>\n<dt id=\"where%20is%20the%20summary%20stored%3F\"><h3>Where is the summary stored?<\/h3><\/dt>\n<dd><p>In the <code>wp_postmeta<\/code> table, under the meta key <code>_ai_short_summary<\/code>, tied to the post ID.<\/p><\/dd>\n<dt id=\"does%20this%20modify%20my%20theme%20files%3F\"><h3>Does this modify my theme files?<\/h3><\/dt>\n<dd><p>No. The summary box is injected via the <code>the_content<\/code> filter and its styles via <code>wp_head<\/code>, so it works with any theme without editing template files.<\/p><\/dd>\n<dt id=\"what%20happens%20if%20the%20ai-generated%20summary%20is%20longer%20than%20200%20characters%3F\"><h3>What happens if the AI-generated summary is longer than 200 characters?<\/h3><\/dt>\n<dd><p>It's automatically truncated at the nearest word boundary and an ellipsis is appended, both when displayed in the editor and again server-side when saved, so the stored value never exceeds the limit.<\/p><\/dd>\n<dt id=\"can%20editors%20write%20their%20own%20summary%20instead%20of%20using%20ai%3F\"><h3>Can editors write their own summary instead of using AI?<\/h3><\/dt>\n<dd><p>Yes. The text field is always editable \u2014 the AI button is a convenience, not a requirement.<\/p><\/dd>\n<dt id=\"does%20this%20work%20for%20custom%20post%20types%3F\"><h3>Does this work for custom post types?<\/h3><\/dt>\n<dd><p>By default it's enabled for the <code>post<\/code> post type. Other post types can be added via the <code>jppsai_post_types<\/code> filter, e.g.:<\/p>\n\n<pre><code>add_filter( 'jppsai_post_types', function( $types ) {\n    $types[] = 'news';\n    return $types;\n} );\n<\/code><\/pre><\/dd>\n<dt id=\"is%20my%20api%20key%20secure%3F\"><h3>Is my API key secure?<\/h3><\/dt>\n<dd><p>It's stored in the <code>wp_options<\/code> table (via the Settings API) and is never sent to the browser. Make sure your site runs over HTTPS and that only trusted admins have access to <em>Settings \u2192 JP PostSummary With AI<\/em>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release: AI summary generation button, editable field with character counter, post_meta storage, automatic front-end display box, settings page for API key\/provider.<\/li>\n<\/ul>","raw_excerpt":"Generate a short, AI-written summary for any post, let editors review\/edit it, and automatically display it in a styled box above the article.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/337505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=337505"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/indiajigar"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=337505"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=337505"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=337505"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=337505"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=337505"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=337505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}