Title: WP_Block::get_block_bindings_processor
Published: February 24, 2026

---

# WP_Block::get_block_bindings_processor( $block_content )

[ Back to top](https://developer.wordpress.org/reference/classes/wp_block/get_block_bindings_processor/?output_format=md#wp--skip-link--target)

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

## Source

    ```php
    private static function get_block_bindings_processor( string $block_content ) {
    	$internal_processor_class = new class('', WP_HTML_Processor::CONSTRUCTOR_UNLOCK_CODE) extends WP_HTML_Processor {
    		/**
    		 * Replace the rich text content between a tag opener and matching closer.
    		 *
    		 * When stopped on a tag opener, replace the content enclosed by it and its
    		 * matching closer with the provided rich text.
    		 *
    		 * @param string $rich_text The rich text to replace the original content with.
    		 * @return bool True on success.
    		 */
    		public function replace_rich_text( $rich_text ) {
    			if ( $this->is_tag_closer() || ! $this->expects_closer() ) {
    				return false;
    			}

    			$depth    = $this->get_current_depth();
    			$tag_name = $this->get_tag();

    			$this->set_bookmark( '_wp_block_bindings' );
    			// The bookmark names are prefixed with `_` so the key below has an extra `_`.
    			$tag_opener = $this->bookmarks['__wp_block_bindings'];
    			$start      = $tag_opener->start + $tag_opener->length;

    			// Find matching tag closer.
    			while ( $this->next_token() && $this->get_current_depth() >= $depth ) {
    			}

    			if ( ! $this->is_tag_closer() || $tag_name !== $this->get_tag() ) {
    				return false;
    			}

    			$this->set_bookmark( '_wp_block_bindings' );
    			$tag_closer = $this->bookmarks['__wp_block_bindings'];
    			$end        = $tag_closer->start;

    			$this->lexical_updates[] = new WP_HTML_Text_Replacement(
    				$start,
    				$end - $start,
    				$rich_text
    			);

    			return true;
    		}
    	};

    	return $internal_processor_class::create_fragment( $block_content );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-block.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-block.php#L431)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-block.php#L431-L478)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_block%2Fget_block_bindings_processor%2F)
before being able to contribute a note or feedback.