Add sunset notice with downloadable certificate - #777
Draft
tacoverdo wants to merge 1 commit into
Draft
Conversation
Show a notice that support for the plugin is ending, on the Progress Planner dashboard and on the plugins overview page. The notice thanks users and links to more information, and lets them download a printable single-page A4 certificate showing their site, how long they have used Progress Planner, and all completed badges. The notice is hidden when the pp-hosts companion plugin is installed or active, or when a branding ID is defined, since support continues for hosted users. A progress_planner_show_sunset_notice filter is available as an escape hatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Test on Playground |
Contributor
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
232 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
377 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
381 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
388 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
📁 classes/suggested-tasks/data-collector/class-unpublished-content.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
103 |
WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in | Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://docs.wpvip.com/databases/optimize-queries/using-post__not_in/ for more information. |
📁 classes/suggested-tasks/data-collector/class-yoast-orphaned-content.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
111 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_row()\n$query assigned unsafely at line 98. |
📁 classes/suggested-tasks/data-collector/class-terms-without-description.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
108 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 106. |
📁 classes/suggested-tasks/data-collector/class-terms-without-posts.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
120 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $query used in $wpdb->get_results()\n$query assigned unsafely at line 118. |
📁 classes/activities/class-query.php (2 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
71 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $table_name used in $wpdb->query()\n$table_name assigned unsafely at line 58. |
163 |
PluginCheck.Security.DirectDB.UnescapedDBParameter | Unescaped parameter $where_args used in $wpdb->get_results()\n$where_args assigned unsafely at line 153. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
Contributor
✅ Code Coverage Report
🎉 Great job maintaining/improving code coverage! 📊 File-level Coverage Changes (2 files)🆕 New Files
📈 Coverage Improved
ℹ️ About this report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Shows a notice that support for the free plugin is ending, in two places:
progress_planner_admin_page_header_beforeslot), thanking users, linking to more information, and offering a certificate download.plugin-update-tr/notice notice-warning inline notice-alt) so it inherits core styling.Certificate
The "Get your certificate" button opens a standalone print-optimized page (served via
admin-post.php, outside the admin chrome) showing the site name/URL, the date the user started using Progress Planner (get_activation_date()), and all completed badges across the content, maintenance, and monthly groups. A "Save as PDF" button triggers the browser print dialog. The layout is hard-sized to a single A4 landscape page; badge artwork scales with the badge count (24mm → 10mm tiers) so even 60+ badges fit on one sheet.Suppression for hosted users
The notice and certificate endpoint are not registered when:
PP_HOSTS_FILEorPROGRESS_PLANNER_BRANDING_IDis defined, or thePP_Hosts\Updaterclass exists (pp-hosts active / host-defined branding), orpp-hostsplugin is installed but inactive (Plugin_Installer::is_plugin_installed()).A
progress_planner_show_sunset_noticefilter is available as an escape hatch (and as the test seam).Open items
https://prpl.fyi/sunset, kept as a class constant.badge-svgendpoint at render time (with placeholder fallback); if that endpoint sunsets too, we may want to cache SVGs locally.Testing
PROGRESS_PLANNER_BRANDING_IDdefined.🤖 Generated with Claude Code