Skip to content

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

Open
vytisbulkevicius wants to merge 1 commit into
developmentfrom
feat/support-hub
Open

vytisbulkevicius wants to merge 1 commit into
developmentfrom
feat/support-hub

Conversation

@vytisbulkevicius

Copy link
Copy Markdown
Contributor

Opt LightStart into the shared Themeisle SDK Support Hub by registering wp_maintenance_mode_support_hub_metadata, mirroring the existing _ai_connect_metadata filter.

What changed

  • Register the Support Hub filter returning is_pro and the Help-form link.

Note

Free plugin, so is_pro is false. No SDK bump — development ships themeisle-sdk 3.3.72. Link points to the plugin's own WordPress.org support forum.

QA

  1. Activate LightStart on a site with themeisle-sdk 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.
  2. Deactivate the plugin. Expect: the SDK deactivation window appears.

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

Copy link
Copy Markdown
Contributor

Plugin build for a1de2f7 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

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_DE locale and themeisle-sdk 3.3.72. The LightStart screen loaded the Support Hub data cd /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_LOG on, four requests logged no early-translation notice [R27]. A control that translated on plugins_loaded did 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

Comment thread wp-maintenance-mode.php
Comment on lines +114 to +128
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/',
),
),
);
}
);

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 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.

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