WordPress filter hook · part of WordPress core
block_parser_class
A WordPress core filter that 9 plugins also fire themselves, running on 779K+ sites between them.
“Filter to allow plugins to replace the server-side block parser”
How to use block_parser_class
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'block_parser_class', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from Kadence Blocks's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
9 plugins that fire block_parser_class
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Kadence Blocks600,000+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )includes/form-ajax.php:672 -
Gutenberg Essential Blocks100,000+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )includes/Core/FaqSchema.php:146 -
Easy MCP AI40,000+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )includes/tools/posts/class-block-locator.php:17 -
FunnelKit30,000+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )modules/checkouts/builder/gutenberg/class-wfacp-gutenberg-template.php:86 -
SlingBlocks6,000+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )includes/class-slingblocks-frontend-css.php:117 -
Accordion Toggle2,000+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )includes/class-faq-schema.php:198 -
Subscriptions for WooCommerce Recurring Payments with Membership Content Restriction800+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )src/Features/GutenbergIntegration/Services/EditorContentCompatibility.php:181 -
Gutenberg Blocks for AMP with Design Library50+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )dist/class-amp-blocks-frontend.php:3623 -
Quizess10+ installs
apply_filters( 'block_parser_class', 'WP_Block_Parser' )src/blocks/class-blocks-utils.php:51
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.