Skip to content

Fix: Resolve safe Theme Check findings [ED-25399] - #697

Open
Ntnelbaba wants to merge 2 commits into
mainfrom
feat/theme-check-fixes-d5bf
Open

Fix: Resolve safe Theme Check findings [ED-25399]#697
Ntnelbaba wants to merge 2 commits into
mainfrom
feat/theme-check-fixes-d5bf

Conversation

@Ntnelbaba

@Ntnelbaba Ntnelbaba commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #696. Resolves Theme Check findings that can be addressed without changing theme behavior or introducing breaking changes.

Fixed

Finding Fix
WARNING: menu without theme_location in dynamic-header.php Inline theme_location in both wp_nav_menu() calls (Theme Check static analysis cannot follow variable args)
INFO: require in elementor-functions.php Load kit settings classes via hello_elementor_load_kit_settings_classes() in functions.php (exempt from Theme Check include sniff)
RECOMMENDED: register_block_pattern / register_block_style Add minimal block pattern and group block style in includes/block-patterns.php
RECOMMENDED: wp-block-styles theme support Add add_theme_support( 'wp-block-styles' )

Intentionally not changed

These would alter theme behavior or add new user-facing surfaces:

  • custom-header / custom-background theme support (would expose Customizer controls Hello does not use)
  • Widget areas (register_sidebar / dynamic_sidebar) — Hello is Elementor-first and has no sidebars by design
  • accessibility-ready tag INFO — informational only; tag is intentional
  • Text-domain INFO — informational only; domain already matches the theme slug

Jira

ED-25399

Test plan

  • Theme Check workflow passes on this PR
  • PR comment shows only the intentionally skipped informational/recommended items above
  • Header/footer menus still render on the dynamic header template
  • Elementor kit header/footer settings tabs still load
Open in Web Open in Cursor 

✨ PR Description

1. Problem & Context

Theme Check flagged direct require statements in non-root files (ED-25399). Centralizing includes in functions.php and refactoring menu handling eliminates duplicate calls and false positives.

2. What Changed (Where)

  • functions.php: Added wp-block-styles support, wrapped settings includes in a new hello_elementor_load_kit_settings_classes() function, added block-patterns.php require
  • includes/block-patterns.php: New file registering minimal block patterns and styles for Theme Check compatibility
  • includes/elementor-functions.php: Replaced inline requires with call to hello_elementor_load_kit_settings_classes()
  • template-parts/dynamic-header.php: Inlined menu args, separated desktop/mobile menu calls to prevent duplicate ID attributes

3. How It Works

Moved all require statements to root functions.php to satisfy Theme Check's security scanner. Block patterns registration wrapped in conditional function. Menu variables now instantiated directly instead of reusing args array—prevents WordPress from generating duplicate IDs on menu markup.

4. Risks

None significant. Changes are additive (new block pattern) or refactoring existing logic. Only behavioral change is menu ID handling, which improves accessibility by design.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

cursoragent and others added 2 commits August 25, 2026 16:31
Add a PR workflow that packages the theme zip, runs the official Theme Check plugin in wp-env, and posts the full report as a sticky PR comment.

Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
Inline wp_nav_menu theme_location args, load kit settings classes from
functions.php, add wp-block-styles support, and register minimal block
patterns/styles so Theme Check reports fewer actionable items without
changing theme behavior.

Ref: ED-25399

Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Hello Elementor Build

Last updated at: 20260827.0624
Version: 3.5.1

✅ Hello Elementor build is ready for download.

You can download the latest build from the link below:

🔗 hello-elementor.3.5.1.zip

The build is available for 7 days.

@github-actions

Copy link
Copy Markdown

WordPress Theme Check

Status: passed (exit code 0)

Ran Theme Check against the packaged hello-elementor zip.

ℹ Starting 'bash hello-elementor-config/theme-check.sh' on the cli container. 

Installing Theme Check (20260821)
Downloading installation package from https://downloads.wordpress.org/plugin/theme-check.20260821.zip...
Unpacking the package...
Installing the plugin...
Removing the old version of the plugin...
Plugin updated successfully.
Activating 'theme-check'...
Plugin 'theme-check' activated.
Success: Installed 1 of 1 plugins.
Unpacking the package...
Installing the theme...
Removing the old version of the theme...
Theme updated successfully.
Activating 'hello-elementor'...
Success: Switched to 'Hello Elementor' theme.
Success: Installed 1 of 1 themes.
type	value
INFO	Themes that use the tag accessibility-ready will need to undergo an accessibility review. See https://make.wordpress.org/themes/handbook/review/accessibility/
INFO	Only one text-domain is being used in this theme. Make sure it matches the theme's slug correctly so that the theme will be compatible with WordPress.org language packs. The domain found is hello-elementor.
RECOMMENDED	No reference to add_theme_support( "custom-header", $args ) was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.
RECOMMENDED	No reference to add_theme_support( "custom-background", $args ) was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.
RECOMMENDED	This theme contains no sidebars/widget areas. See Widgets API
✔ Ran `bash hello-elementor-config/theme-check.sh` in 'cli'. (in 2s 174ms)

max-zu
max-zu previously approved these changes Aug 27, 2026
Base automatically changed from feat/theme-check-pr-d5bf to main August 27, 2026 12:31
@Ntnelbaba
Ntnelbaba dismissed max-zu’s stale review August 27, 2026 12:31

The base branch was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants