Skip to content

Conversation

@annezazu
Copy link
Contributor

Summary

Removes the unused get_svg_filters() method from WP_Theme_JSON_Gutenberg that was left behind after PR #49103 moved duotone functionality to WP_Duotone_Gutenberg.

What Changed

  • Removed the orphaned get_svg_filters() method (34 lines) from lib/class-wp-theme-json-gutenberg.php

Why

After PR #49103 consolidated duotone generation logic in WP_Duotone_Gutenberg, this method became orphaned:

  • ❌ No callers exist in the codebase
  • ❌ Calls a non-existent function (wp_get_duotone_filter_svg)
  • ✅ Functionality fully replaced by WP_Duotone_Gutenberg::get_svg_definitions()

Testing

  • Verified no callers exist for this method
  • Verified PHP syntax is valid after removal
  • No tests reference this method

Closes #49213

🤖 Generated with Claude Code

Removes the unused get_svg_filters() method from WP_Theme_JSON_Gutenberg that was left behind after PR #49103 moved duotone functionality to WP_Duotone_Gutenberg.

The method has no callers in the codebase and calls a non-existent function (wp_get_duotone_filter_svg). Its functionality has been fully replaced by WP_Duotone_Gutenberg::get_svg_definitions().

Closes #49213

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Required label: Any label starting with [Type].
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: annezazu <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: ajlende <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Flaky tests detected in c146764.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/20291666673
📝 Reported issues:

@Mamaduka
Copy link
Member

This class is synced with the core. Unfortunately, we can't remove public methods because it would break backward compatibility.

It's probably better to deprecate it and noop it. I'm sure there will be examples in the core for similar cases.

@annezazu
Copy link
Contributor Author

Sweet. I'll poke around and see if I can make that happen. Closing this out for now.

@annezazu annezazu closed this Dec 17, 2025
@Mamaduka Mamaduka deleted the remove/orphaned-duotone-get-svg-filters branch December 17, 2025 14:54
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.

Remove unused duotone code in global styles

3 participants