Repository navigation
feat: opt into the Themeisle SDK Support Hub - #204
vytisbulkevicius wants to merge 1 commit into
Conversation
Register the <slug>_support_hub_metadata filter so the shared Themeisle SDK Support Hub (Help button and deactivation window) is enabled for this theme, mirroring the existing _ai_connect_metadata filter. It is a free theme with no Pro tier, so is_pro is false. Development ships SDK 3.3.72.
There was a problem hiding this comment.
🔵 Needs a closer look
QA check: The SDK contract and hook timing check out, but nobody saw the Help button render; please run the QA steps and add the requested test.
Validation details
- Files reviewed: 1/1 changed files.
- The locked themeisle-sdk 3.3.72 applies
raft_support_hub_metadataduringinitand accepts this data shape. This was a source read. - Raft fires
themeisle_internal_pageonly on the Dashboard and Themes screens for users withmanage_options. - The history pass found no repeated bug. The early translation loading issue does not recur.
QA steps
- As an administrator with Raft active, open Dashboard. Expect a Help button at the bottom right.
- Click Help. Expect the Support Hub form with Documentation and Community Forum links.
- Click each link. Expect the Raft docs page and the Raft support forum to open.
- Open Appearance → Themes. Expect the same Help button.
- Open another admin page, such as Posts. Expect no Help button.
Untested areas
- PHPUnit did not run because Composer dependencies were absent.
- No site was set up, so the admin screens were not opened.
🤖 Automated review · run code-review-agent_6b04b90472af38.45700732.
🤖 Review agent — review posted ✅ on 74bcb6c1 · commented · 1 finding · 11 min
Run code-review-agent_6b04b90472af38.45700732 · trail
| public function get_support_hub_metadata() { | ||
| return array( | ||
| 'is_pro' => false, | ||
| 'links' => array( | ||
| array( | ||
| 'icon' => 'book-alt', | ||
| 'text' => __( 'Documentation', 'raft' ), | ||
| 'url' => 'https://docs.themeisle.com/fse-themes/raft-fse-theme', | ||
| ), | ||
| array( | ||
| 'icon' => 'groups', | ||
| 'text' => __( 'Community Forum', 'raft' ), | ||
| 'url' => 'https://wordpress.org/support/theme/raft/', | ||
| ), | ||
| ), | ||
| ); | ||
| } | ||
| } |
There was a problem hiding this comment.
tests Add a test for the new Support Hub opt-in. The PHPUnit suite (phpunit.xml, tests/test-*.php) exists, but no test exercises raft_support_hub_metadata or get_support_hub_metadata(). A broken registration or a renamed key would silently hide the Help button. Add tests/test-admin.php with a case that asserts apply_filters( 'raft_support_hub_metadata', array() ) returns is_pro === false and two links, each with non-empty icon, text and url. Without the change, the filter returns array() and the case fails.
Opt Raft into the shared Themeisle SDK Support Hub — the Help button and deactivation window we added to Feedzy, Neve, Otter and Jaxon — by registering
raft_support_hub_metadata, mirroring the existing_ai_connect_metadatafilter.What changed
inc/Admin.php— register the Support Hub filter and addget_support_hub_metadata()returningis_proand the Help-form links.Note
Raft is a free theme with no Pro tier, so
is_proisfalse. No SDK bump needed —developmentalready ships themeisle-sdk3.3.72. Nothing in the theme's support copy contradicts the Help panel.QA
Activate Raft on a site with themeisle-sdk
3.3.72+.Open the Dashboard or Appearance → Themes (the theme's own screens).
Expect: a Help button bottom-right on the theme's screens (scoped by design, not every admin page). It opens the Support Hub form with the links.
Go to
Appearance → Themes → Add Newwith Raft active. Expect: the SDK theme/deactivation window appears.