Repository navigation
WordPress 7.2 compatibility fixes and minimum bump to 7.0 - #1292
Conversation
WordPress 7.2 renders the excerpt as a field of the post summary and no longer renders the PluginPostExcerpt slot, so the button was not shown. Provide the edit control of the excerpt field through the Entity Fields API instead, and register the generate excerpt command from the hook rather than from a DOM lookup. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Vk5tcg3sz5RAa99h6WB8K
- Only enqueue the recommended content settings script on the settings page. - Don't fatal on the embeddings status route when the scheduler isn't set up. - Guard against missing models in the Google AI and Together AI providers. - Don't pass a null Elasticsearch version to version_compare(). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Vk5tcg3sz5RAa99h6WB8K
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Vk5tcg3sz5RAa99h6WB8K
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Vk5tcg3sz5RAa99h6WB8K
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
Updated WordPress tested version in badges.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Vk5tcg3sz5RAa99h6WB8K
|
The red checks on the latest head are not caused by this PR. Every E2E job and every PHPUnit job on PHP 8.2+ fails in the "Start the Docker testing environment" step, before any test runs: WP-CLI hits its 128M limit while The same failure, on the same set of jobs, shows on unrelated branches since Dec 2, for example this run on Proposed fix, as its own PR so every branch gets it: raise the memory limit for the test environments in "config": {
"WP_MEMORY_LIMIT": "256M"
}I have not been able to run this against the failing setup, since it only fails in CI, so it needs a CI run to confirm. Generated by Claude Code |
Requested by JP · project thread
Description of the Change
Compatibility fixes found while testing ClassifAI on WordPress 7.2 (RC3), plus the "Tested up to" bump to 7.2 and a WordPress minimum bump from 6.9 to 7.0.
Note that this bumps the WordPress minimum from 6.9 to 7.0. It is updated in the plugin header, both readmes, the docs, and the PHPCS and PHPStan configs. The "WP minimum" E2E job already runs on 7.0.
Excerpt Generation button missing on 7.2
WordPress 7.2 renders the excerpt as a field of the post summary and no longer renders the excerpt panel that holds the
PluginPostExcerptslot. The "Generate excerpt" button was added through that slot, so it did not show on 7.2.ExcerptGenerationuses the new Entity Fields API (wp_update_entity_fields()onwp_entity_fields_api_init) to provide the edit control of theexcerptfield. The control is the same textarea with the generate button below it. It is provided by a small script module,assets/js/excerpt-field.js, which picks up the component from the excerpt generation script. On screens where that script is not loaded, the core control is used.PluginPostExcerptfill stays, so 7.0 and 7.1 behave as before.useCommandfrom the excerpt generation script. The old one looked for a button class that no longer exists, so it never showed.Other fixes found during testing (these also happen on 7.1)
Cannot destructure property 'services' of 'window.classifAISettings'. It now loads on the ClassifAI settings page only.embeddings_in_progressREST route caused a fatal error when the embeddings scheduler was not set up. It now returnsfalse.GoogleAI::get_models()andTogetherAI\Images::sanitize_settings()(PHP warnings).TermCleanupEPIntegrationno longer passes a null Elasticsearch version toversion_compare()(PHP 8.1+ deprecation).E2E helpers updated for the 7.2 editor markup
role="button"element in the post summary.FormTokenFieldtokens.Each selector keeps the previous markup too, so the suite runs on 7.0 to 7.2.
Closes #1283
How to test the Change
Changelog Entry
Credits
Props @jeffpaul
Checklist:
<ahref="https://playground.wordpress.net?blueprint-url=data:application/json,%7B%22preferredVersions%22%3A%7B%22wp%22%3A%22latest%22%7D%2C%22steps%22%3A%5B%7B%22step%22%3A%22installPlugin%22%2C%22pluginData%22%3A%7B%22resource%22%3A%22url%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2F10up%2Fclassifai%2Freleases%2Fdownload%2Fci-artifacts%2Fpr-1292-103a0090a222ab2e75730f527a358cc97e8f8eb3.zip%22%7D%7D%5D%7D"target="_blank" rel="noopener noreferrer">Generated by Claude Code