-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Block Bindings: Allow more generic setting of block attributes #9469
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
Changes from 1 commit
7f1f6a0
054756d
b328dee
21e80e2
1c70bc3
8f76759
b7b7ca5
bb7c906
103a5c4
3f2e32b
85b6354
b67890e
6bc4fd5
d943cd8
527c5d8
86e836d
dad7380
88af5ff
a56f978
7c3fc45
66fef38
24a0b0d
2e7df73
e2f0a38
b045050
e739c6c
6a4a3a3
4dbb0e5
a18e435
3410f40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| 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; | ||
|
|
@@ -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; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.