Skip to content

Post Digest transforms passive readers into engaged users by letting them customize AI summary prompts directly on your content. See exactly what questions and topics your audience cares about through privacy-safe analytics that track prompt modifications - giving you invaluable insights into their real pain points and interests.

Notifications You must be signed in to change notification settings

atraining/post-digest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Post Digest - WordPress Plugin

Post Digest Banner

Transform passive readers into engaged users with customizable AI summary buttons.

WordPress Plugin PHP Version License GDPR Compliant


Visit wordpress.org to install the Plugin

🎯 What Does Post Digest Do?

Post Digest adds interactive "Summarize with ChatGPT" buttons to your WordPress posts. But here's what makes it special: readers can customize the AI prompt right on your page before clicking. This gives you invaluable insights into what your audience actually cares about!

Why This Matters

Traditional analytics tell you what people read. Post Digest tells you what questions they're asking about your content. See which topics spark curiosity, what pain points need addressing, and how readers want information presented.


πŸ“Έ See It In Action

Step 1: Add the Block in Gutenberg Editor

Adding the Post Digest block in Gutenberg

Simply search for "Post Digest" in the block inserter. The block integrates seamlessly with WordPress's native editor experience.


Step 2: Customize the Prompt Template (Author View)

Customizing prompt instructions in the block editor

As the author, you set the default instructions for ChatGPT. Want bullet points? A technical summary? Explain it for beginners? You control the template. The preview shows exactly how the button will appear on your published post.

What you see:

  • βœ… Real-time preview of the prompt
  • βœ… Live URL generation as you type
  • βœ… Clean, intuitive interface

Step 3: Interactive Reader Experience (Frontend)

Frontend view showing editable prompt interface

This is what your readers see - an elegant, editable prompt interface. They can:

  • ✏️ Customize the instructions to their specific needs
  • 🎯 Ask specific questions about your content
  • πŸš€ Click once to get AI-powered insights

Example: A reader might change "give me a summary" to "explain this for a 12-year-old" or "focus on the technical implementation details."

This customization data is GOLD - it reveals exactly what information gaps exist in your content!


Step 4: Seamless ChatGPT Integration

ChatGPT interface with pre-filled prompt

One click and boom! ChatGPT opens with the fully customized prompt pre-filled. Your reader gets instant, AI-powered insights about your post.

The prompt includes:

  • πŸ“„ Your post title
  • πŸ”— Full URL to the article
  • ✨ Customized instructions (either yours or reader-modified)

Step 5: Analytics Dashboard (WordPress Comments)

Track engagement in the WordPress Comments section:

  • πŸ“Š See all button clicks grouped by post
  • πŸ’‘ Discover which prompt variations readers prefer
  • 🎯 Identify content gaps and reader questions
  • πŸ”’ All data anonymized for GDPR compliance

Example insights:

  • "15 readers asked to explain this 'for beginners'" β†’ Time to simplify!
  • "8 readers wanted 'technical details only'" β†’ Maybe add an advanced section?
  • "Readers keep asking about X" β†’ Create a dedicated post about X!

How to view: In WordPress admin, go to Comments β†’ Filter by comment type.


πŸš€ Key Features

πŸ›‘οΈ Enterprise-Grade Security

  • SQL Injection Protection - All database queries use prepared statements
  • CSRF Prevention - Comprehensive nonce verification
  • Input Validation - Multi-layer validation on client and server
  • XSS Protection - All output properly escaped
  • Rate Limiting - Prevents abuse (10 requests/minute per IP)

🌍 GDPR Compliant Privacy

  • IP Anonymization - Automatic IPv4/IPv6 anonymization
  • No External Tracking - All data stored locally in WordPress
  • Data Minimization - Only essential data collected
  • Transparent - Users know exactly what's tracked
  • Secure Storage - All data sanitized before database storage

🎨 Developer-Friendly

  • WordPress Coding Standards - 100% compliant
  • Unique Prefixing - wrpdig_ namespace prevents conflicts
  • Clean Uninstall - Complete data removal option
  • Theme Compatible - Prefixed CSS prevents style conflicts
  • Translation Ready - Complete i18n support

🌐 Multi-Language Support

Built-in translations for:

  • πŸ‡©πŸ‡ͺ German (Deutsch)
  • πŸ‡¬πŸ‡§ English
  • πŸ‡ͺπŸ‡Έ Spanish (EspaΓ±ol)
  • πŸ‡«πŸ‡· French (FranΓ§ais)

πŸ“¦ Installation

Option 1: WordPress.org (After Approval)

  1. Log into WordPress admin
  2. Go to Plugins β†’ Add New
  3. Search "Post Digest"
  4. Click Install β†’ Activate

Option 2: Manual Upload

  1. Download the latest release from dist/ folder
  2. Go to Plugins β†’ Add New β†’ Upload Plugin
  3. Choose the .zip file
  4. Click Install Now β†’ Activate

Option 3: Developer Installation

cd wp-content/plugins/
git clone git@github.com:atraining/post-digest.git
# Activate via WordPress admin

🎯 Quick Start Guide

For Content Creators

1. Create or edit a post

  • Open any post in the Gutenberg editor

2. Add the block

  • Click the (+) button
  • Search "Post Digest"
  • Add the block

3. Customize (optional)

  • Edit the default prompt instructions
  • Preview how it will look
  • Publish!

4. Monitor engagement

  • Check WordPress Comments
  • Filter by comment type to see analytics
  • Identify content opportunities

For Developers

Block Registration:

// The block is registered with namespace: wrpdig/summary-button
register_block_type('wrpdig/summary-button', array(
    'render_callback' => array('WrpDig_Block', 'render_callback')
));

AJAX Endpoint:

// Track button clicks
action: 'wrpdig_track_click'
nonce: wrpdigData.nonce
post_id: [current_post_id]

πŸ”§ Technical Specifications

System Requirements

  • WordPress: 5.0+ (Gutenberg required)
  • PHP: 7.4+ (tested up to 8.2)
  • JavaScript: ES6+ browser support
  • Database: Standard WordPress tables (no custom tables)

Performance

  • Database Queries: Optimized with prepared statements
  • Caching: Transient-based rate limiting
  • Assets: Minimal JS/CSS loaded only when block is present
  • Server-Side Rendering: Better SEO and performance

Browser Compatibility

  • βœ… Chrome 90+
  • βœ… Firefox 88+
  • βœ… Safari 14+
  • βœ… Edge 90+
  • ⚠️ Graceful degradation for older browsers

πŸ“Š Analytics & Insights

What Gets Tracked?

  • βœ… Button clicks
  • βœ… Prompt modifications (what readers changed)
  • βœ… Timestamp of interaction
  • βœ… Anonymized IP (GDPR compliant)
  • βœ… Post ID and title

What's NOT Tracked?

  • ❌ Full IP addresses
  • ❌ Personal information
  • ❌ ChatGPT responses
  • ❌ External analytics services

How to Access Analytics

// Get analytics for a specific post (if developing)
$analytics = WrpDig_Analytics::get_analytics_for_post($post_id);

// Or view in WordPress admin:
// Comments β†’ Filter by comment type

πŸ”’ Security & Privacy

Security Measures Implemented

1. Input Validation

// All inputs validated
$post_id = intval($_POST['post_id']);
$prompt = sanitize_textarea_field($_POST['prompt']);
if (strlen($prompt) > 5000) wp_send_json_error();

2. CSRF Protection

wp_verify_nonce($nonce, 'wrpdig_track_click');

3. Rate Limiting

// 10 requests per minute per IP
set_transient('wrpdig_rate_limit_' . $ip_hash, $count, MINUTE_IN_SECONDS);

4. IP Anonymization (GDPR)

// IPv4: 192.168.1.123 β†’ 192.168.1.0
// IPv6: Last 80 bits set to 0

WordPress.org Compliance

  • βœ… Unique prefix: wrpdig_ (6 characters)
  • βœ… No generic function names
  • βœ… Proper file naming: post-digest.php
  • βœ… Assets excluded from plugin package
  • βœ… All code follows WordPress standards

πŸ“ Changelog

Version 1.0.2 (Current)

🎯 WordPress.org Compliance Release

  • βœ… Breaking Change: Prefix changed from post_digest to wrpdig
  • βœ… Renamed main file to post-digest.php
  • βœ… Updated 74+ namespace instances
  • βœ… Assets properly excluded from distribution
  • βœ… All PHP files validated for syntax
  • ⚠️ Migration Note: Clean install recommended for existing users

Version 1.0.1

πŸ›‘οΈ Security & Privacy Update

  • Added SQL injection protection
  • Implemented GDPR-compliant IP anonymization
  • Enhanced input validation
  • Improved error handling
  • Performance optimizations

Version 1.0.0

  • Initial release
  • Basic Gutenberg block
  • ChatGPT integration
  • Simple analytics

🀝 Contributing

We welcome contributions!

Report Bugs

  • Use GitHub Issues
  • Include WordPress/PHP versions
  • Provide steps to reproduce

Submit Pull Requests

  1. Fork the repository
  2. Create a feature branch
  3. Follow WordPress coding standards
  4. Submit PR with clear description

Translation

Help translate Post Digest:

  • Translation files in /languages/
  • Use Poedit or similar tool
  • Submit translations via PR

πŸ“š File Structure

post-digest/
β”œβ”€β”€ post-digest.php              # Main plugin file
β”œβ”€β”€ readme.txt                   # WordPress.org readme
β”œβ”€β”€ uninstall.php               # Cleanup on uninstall
β”œβ”€β”€ includes/
β”‚   β”œβ”€β”€ class-wrpdig-analytics.php
β”‚   └── class-wrpdig-block.php
β”œβ”€β”€ blocks/
β”‚   └── summary-button/
β”‚       β”œβ”€β”€ edit.js             # Block editor
β”‚       β”œβ”€β”€ frontend.js         # Frontend interaction
β”‚       └── style.css           # Styling
β”œβ”€β”€ languages/                  # Translation files
β”œβ”€β”€ assets/                     # WordPress.org assets (not in plugin zip)
β”‚   β”œβ”€β”€ banner-1544x500.png
β”‚   β”œβ”€β”€ screenshot-1.png
β”‚   β”œβ”€β”€ screenshot-2.png
β”‚   β”œβ”€β”€ screenshot-3.png
β”‚   └── screenshot-4.png
└── dist/                       # Distribution packages

πŸ’‘ Support


βš–οΈ License

GPL v2 or later

Post Digest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.


πŸ‘₯ Credits

Developed by: Wise Relations - WordPress experts specializing in AI-powered content engagement and analytics solutions.

Contributors:

  • Security review and enhancements
  • GDPR compliance implementation
  • WordPress.org submission preparation

Need custom WordPress development? Visit wise-relations.com for expert consulting services.


🌟 Show Your Support

If you find Post Digest useful:

  • ⭐ Star this repository
  • πŸ› Report bugs to help improve
  • πŸ”„ Share with others who might benefit

Made with ❀️ for the WordPress community

About

Post Digest transforms passive readers into engaged users by letting them customize AI summary prompts directly on your content. See exactly what questions and topics your audience cares about through privacy-safe analytics that track prompt modifications - giving you invaluable insights into their real pain points and interests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published