Skip to content

Add local readme.txt fallback for Tested up to#82

Draft
apermo wants to merge 1 commit intoZodiac1978:developfrom
apermo:fix/tested-up-to-from-readme
Draft

Add local readme.txt fallback for Tested up to#82
apermo wants to merge 1 commit intoZodiac1978:developfrom
apermo:fix/tested-up-to-from-readme

Conversation

@apermo
Copy link
Copy Markdown
Contributor

@apermo apermo commented Apr 13, 2026

Summary

  • Adds get_local_tested_up_to() method that parses the Tested up to header from a plugin's local readme.txt (or readme.md)
  • Uses this local value as fallback when the wordpress.org API does not provide a tested value (e.g. non-wordpress.org plugins with custom Update URI)
  • Escapes the displayed value with esc_html() (minor hardening)

Fixes #64

Context

The Tested up to column currently relies exclusively on plugins_api(). This fails for:

  1. Non-wordpress.org plugins (custom Update URI) — no API call is made, column shows "No data available"
  2. Third-party updaters (e.g. Git Updater) — may inject incorrect values via plugins_api filters

The local readme.txt is the authoritative source for the installed version's compatibility declaration and serves as a reliable fallback.

Test in WordPress Playground

Before (develop — no fallback): Open in WordPress Playground

After (this branch — readme.txt fallback): Open in WordPress Playground

Pre-installed test plugins: Apermo Admin Bar (outdated), giWeather (closed/removed)

Test plan

  • Open the Before link — non-wordpress.org plugins show "No data available" in the Tested up to column
  • Open the After link — those same plugins show the value parsed from their local readme.txt
  • Verify wordpress.org plugins still show the API value (primary source unchanged)
  • Clear cache and reload to confirm the fallback works on fresh data

@apermo
Copy link
Copy Markdown
Contributor Author

apermo commented Apr 13, 2026

@Zodiac1978 would you take over from here? If you need further assistance let me know, you should be able to push to the pr.

for "Tested up to"

Parse the "Tested up to" header from the plugin's
local readme.txt when the wordpress.org API does
not provide a value. This covers non-wordpress.org
plugins (custom Update URI) and cases where the
API returns no tested value.

Closes Zodiac1978#64
@apermo apermo force-pushed the fix/tested-up-to-from-readme branch from 78f5353 to 1782887 Compare April 14, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange "Tested up to" value

1 participant