Skip to content

Adding GB 2.0 compatibility and new filter for devs to update blocks. #64

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

Merged
merged 3 commits into from
Feb 15, 2025

Conversation

blronaldhuereca
Copy link
Contributor

This PR does the following:

  1. Adds GenerateBlocks 2.0 compatibility (using generateblocks/text)
  2. Adds a new filter to update the list of third-party headline blocks programmatically (this is so you don't have to keep updating the plugin to support other block suites).

Filter in the code:

/**
 * Filter to add supported third party blocks.
 *
 * @param array $supported_third_party_blocks The array of supported third party blocks.
 * @return array The modified array of supported third party blocks.
 */
$supported_third_party_blocks = apply_filters(
	'simpletoc_supported_third_party_blocks',
	$supported_third_party_blocks
);

Copy link
Owner

@mtoensing mtoensing left a comment

Choose a reason for hiding this comment

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

Elegant change. Thank you

@mtoensing mtoensing merged commit 5870d9b into mtoensing:master Feb 15, 2025
2 checks passed
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