Skip to content

feat: opt into the Themeisle SDK Support Hub - #124

Open
vytisbulkevicius wants to merge 2 commits into
developmentfrom
feat/support-hub
Open

vytisbulkevicius wants to merge 2 commits into
developmentfrom
feat/support-hub

Conversation

@vytisbulkevicius

@vytisbulkevicius vytisbulkevicius commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Opt Fork into the shared Themeisle SDK Support Hub — the deactivation and theme-switch support we added to the other Themeisle products — by registering fork_support_hub_metadata, mirroring the existing _ai_connect_metadata filter.

What changed

  • inc/Admin.php — register the Support Hub filter and add get_support_hub_metadata() returning is_pro and the support links.

Note

Fork is a free theme with no Pro tier, so is_pro is false. No SDK bump needed — development already ships themeisle-sdk 3.3.72. Nothing in the theme's support copy contradicts the Help panel.

  • Help button off core screens: the theme fires themeisle_internal_page on the core Dashboard and Themes screens for its survey and AI Connect notice, which also made the SDK show the Help button there. The theme now drops the SDK script that draws the button (themeisle-sdk-support-hub) on those two screens. Like Neve, the button only shows on a product's own screens; Fork has none, so it shows no Help button. The survey, the AI Connect notice and the theme-switch "Contact support" keep working.

QA

  1. Install the Fork build from this PR and activate it. Log in as an administrator.

  2. Open WP Admin → Dashboard, then WP Admin → Appearance → Themes.

    Expect: no Help button in the bottom-right corner on either screen.

  3. On Appearance → Themes, activate another theme.

    Expect: the theme feedback appears. A reason support can help with offers Contact support, which sends the message through the Support Hub.

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.
@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for 6c21a6b is ready 🛎️!

@pirate-bot pirate-bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

Approved: the Support Hub filter works in the sandbox, and the inline comment asks for a PHPUnit case for it.

Validation details
  • Files reviewed: 1/1 changed files.
  • The locked themeisle-sdk 3.3.72 reads fork_support_hub_metadata and accepts the returned shape and icon names.
  • In the WordPress sandbox, the filter returned the new metadata `cd /var/www/html && cat > /workspace/checks/R1/support-hub-probe.php <<'EOF'
'a…` (run R22, exit 0). - The SDK registered the `fork` product with both links `cd /var/www/html && cat > /workspace/checks/R1/support-hub-probe2.php <<'EOF' > $M <<'EOF' // R2 te…` (run R37, exit 0). The base logs the same notices from block patterns `cd /workspace/checks/R2; cp Admin.base.php /workspace/fork-site/inc/Admin.php; sleep 3; ./run_admin.sh base1; L=/var/www…` (run R36, exit 0). - In Chromium, the Help button appeared bottom-right on the Dashboard and Themes screens. Its form showed both links with their icons. - The existing PHPUnit suite passed `cd /workspace/fork-site && (timeout 240 phpunit --do-not-cache-result 2>&1 | tee /workspace/checks/R1/phpunit-suite.log …` printed `OK (3 tests, 6 assertions)` (run R26).
Untested areas - The deactivation window on Appearance → Themes → Add New was not checked in the browser. - The sandbox built the theme CSS with `sass` and skipped the JavaScript build, because node-sass fails on Node 24.
🤖 Automated review · run code-review-agent_6b04b8ff4b0460.49691313. --- **🤖 Review agent** — review posted ✅ on `6c21a6bb` · [approved · 1 finding](https://github.com//pull/124#pullrequestreview-6030503428) · 19 min Run `code-review-agent_6b04b8ff4b0460.49691313` · [trail](https://agents.vertistudio.com/admin/trails/github-pr/Codeinwp-fork-124)

Comment thread inc/Admin.php
add_action( 'wp_ajax_fork_dismiss_design_pack_notice', array( $this, 'remove_design_pack_notice' ) );
add_filter( 'themeisle_sdk_blackfriday_data', array( $this, 'add_black_friday_data' ) );
add_filter( 'fork_ai_connect_metadata', array( $this, 'get_ai_connect_metadata' ) );
add_filter( 'fork_support_hub_metadata', array( $this, 'get_support_hub_metadata' ) );

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests The new fork_support_hub_metadata filter changes what the SDK shows: the Help panel now appears on the theme's screens with two links. The PHPUnit suite reaches this code but has no case for the filter or its payload. Add tests/test-admin.php. Assert that has_filter( 'fork_support_hub_metadata' ) is true after the theme loads. Assert that apply_filters( 'fork_support_hub_metadata', array() ) returns is_pro false and two links with icon, text and url. The case fails on pr-base, where the filter is not registered.

…reens

The theme fires themeisle_internal_page on the core Dashboard and Themes
screens for its survey and AI Connect notice, which also made the SDK
show its Help button there. Like Neve, the button should only show on a
product's own screens, so the SDK script that draws it is dropped on
those two screens. The theme-switch feedback still offers to contact
support.
@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for a17ef0c is ready 🛎️!

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.

2 participants