Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,15 @@ private function removeOuterDiv(DOMDocument $doc): string

return $newContent;
}

/**
* Overwrite the project should_load_separate_core_block_assets since WP 6.9
*
* @see https://github.com/roots/sage/pull/3279
*/
#[Action('should_load_separate_core_block_assets')]
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

should_load_separate_core_block_assets is a WordPress filter hook; using the Action attribute here makes the intent unclear. Consider switching this attribute to Filter (and keep the return type bool) to better reflect the hook’s behavior and avoid confusion for future maintainers.

Suggested change
#[Action('should_load_separate_core_block_assets')]
#[Filter('should_load_separate_core_block_assets')]

Copilot uses AI. Check for mistakes.
public function forceLoadSeparateCoreBlockAssets(): bool
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The method name forceLoadSeparateCoreBlockAssets() suggests enabling separate core block assets, but the implementation returns false (disabling separate assets). Renaming to match the behavior (e.g., disabling separate assets / forcing combined assets) would prevent misunderstandings.

Suggested change
public function forceLoadSeparateCoreBlockAssets(): bool
public function disableSeparateCoreBlockAssets(): bool

Copilot uses AI. Check for mistakes.
{
return false;
}
}
Loading