Skip to content

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