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

Enhancement - Add Filter for Post Title Heading Level Support #221

Merged
merged 6 commits into from
Aug 28, 2024

Conversation

ellm
Copy link
Member

@ellm ellm commented Aug 22, 2024

Summary

Provides ability within projects to disable the Heading Level dropdown from the Post Title block settings.

Example

wp.hooks.addFilter( 'blocks.registerBlockType', 'wp-curate/example', ( settings, name ) => {
    const maybeFilteredSettings = { ...settings };

    if( 'wp-curate/post-title' === name ) {
        maybeFilteredSettings.attributes.supportsLevel.default = false;
    }

    return maybeFilteredSettings
});

@ellm ellm marked this pull request as ready for review August 22, 2024 15:45
Copy link
Member

@goodguyry goodguyry left a comment

Choose a reason for hiding this comment

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

🎸

CHANGELOG.md Outdated
@@ -2,13 +2,17 @@

All notable changes to `WP Curate` will be documented in this file.

## 2.2.3 - 2024-08-22
Copy link
Member

Choose a reason for hiding this comment

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

I'd argue this is more than a patch and could/should be 2.3.0

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I suppose that is accurate. I've made that update. Thanks for flagging

@ellm ellm force-pushed the feature/filter-post-title-level-support branch from 30ecaa3 to 15a139d Compare August 28, 2024 11:45
@ellm ellm merged commit 36f0105 into develop Aug 28, 2024
5 checks passed
@ellm ellm deleted the feature/filter-post-title-level-support branch August 28, 2024 11:58
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