Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add basic PHPDoc
  • Loading branch information
ockham committed Aug 18, 2025
commit f52870270ef2398ae7c0c5eda89e5e12576b4ec0
16 changes: 16 additions & 0 deletions src/wp-includes/class-wp-block-bindings-processor.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/**
* WP_Block_Bindings_Processor class.
*
* This class can be used to perform the sort of structural
* changes to an HTML document that are required by
* Block Bindings.
*/
class WP_Block_Bindings_Processor extends WP_HTML_Processor {
private $output = '';
private $end_of_flushed = 0;
Expand All @@ -8,6 +15,15 @@ public function build() {
return $this->output . substr( $this->html, $this->end_of_flushed );
}

/**
* 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() ) {
return false;
Expand Down