Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Fix custom settings not appearing in block editor store #68545

Conversation

Sukhendu2002
Copy link
Contributor

@Sukhendu2002 Sukhendu2002 commented Jan 8, 2025

Fixes: #68541

What?

Fixes an inconsistency where custom settings added through block_editor_settings_all filter are available in core/editor store but not in core/block-editor store.

Why?

  • In useBlockEditorSettings, settings are being filtered through a whitelist defined in BLOCK_EDITOR_SETTINGS array
  • Custom attributes added via block_editor_settings_all are getting dropped during this filtering

How?

Modified useBlockEditorSettings to first spread all settings, then override with filtered core settings

@Mamaduka
Copy link
Member

Mamaduka commented Jan 8, 2025

Thanks for contributing, @Sukhendu2002!

The current behavior is intentional. See #68541 (comment).

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.

core/block-editor getSettings() does not return custom settings added from filter
2 participants