Repository navigation
feat: opt into the Themeisle SDK Support Hub - #608
vytisbulkevicius wants to merge 1 commit into
Conversation
Register the <slug>_support_hub_metadata filter so the shared Themeisle SDK Support Hub is enabled for this plugin, mirroring _ai_connect_metadata. Free plugin, so is_pro is false. Development ships SDK 3.3.72.
There was a problem hiding this comment.
🟢 Approved
This approves the Support Hub opt-in, and the inline comment asks for one PHPUnit case that covers the new filter.
Validation details
- Files reviewed: 1/1 changed files.
- The site ran WordPress 7.1.5 on PHP 8.3.36 with the
de_DElocale and themeisle-sdk 3.3.72. The LightStart screen loaded the Support Hub datacd /workspace/checks/R1; curl -s -m 60 -c cj.txt -b cj.txt -o admin-head-de-final.html 'http://localhost:8080/wp-admin/a…printed"links":[{"icon":"groups","text":"Community Forum","url":"https://wordpress.org/support/plugin/wp-maintenance-mode/"}](run R27). - A browser check showed the Help button. The opened panel had the Community Forum link with the forum URL.
- With
WP_DEBUG_LOGon, four requests logged no early-translation notice [R27]. A control that translated onplugins_loadeddid log the notice [R26].
Untested areas
- The SDK deactivation window (PR QA step 2) was not checked. The diff adds no deactivation code.
🤖 Automated review · run code-review-agent_6b04c0357103c1.44542044.
🤖 Review agent — review posted ✅ on a1de2f7b · approved · 1 finding · 14 min
Run code-review-agent_6b04c0357103c1.44542044 · trail
| add_filter( | ||
| 'wp_maintenance_mode_support_hub_metadata', | ||
| function () { | ||
| return array( | ||
| 'is_pro' => false, | ||
| 'links' => array( | ||
| array( | ||
| 'icon' => 'groups', | ||
| 'text' => __( 'Community Forum', 'wp-maintenance-mode' ), | ||
| 'url' => 'https://wordpress.org/support/plugin/wp-maintenance-mode/', | ||
| ), | ||
| ), | ||
| ); | ||
| } | ||
| ); |
There was a problem hiding this comment.
tests This filter is new behavior, and no PHPUnit test covers it. tests/bootstrap.php loads this file, so the suite can reach it. Add a case to a test file in tests/, for example tests/generic-test.php. Call apply_filters( 'wp_maintenance_mode_support_hub_metadata', array() ). Assert that is_pro is false. Assert that links[0]['url'] is https://wordpress.org/support/plugin/wp-maintenance-mode/. Without this change the filter returns the empty default, so the test fails.
Opt LightStart into the shared Themeisle SDK Support Hub by registering
wp_maintenance_mode_support_hub_metadata, mirroring the existing_ai_connect_metadatafilter.What changed
is_proand the Help-form link.Note
Free plugin, so
is_proisfalse. No SDK bump —developmentships themeisle-sdk3.3.72. Link points to the plugin's own WordPress.org support forum.QA
3.3.72+. Open its admin screen. Expect: a Help button bottom-right (on the plugin's own screens) opening the Support Hub form with the Community Forum link.