diff --git src/wp-includes/blocks.php src/wp-includes/blocks.php
index 422b75e945..c2cf8b6232 100644
|
|
|
function get_comment_delimited_block_content( $block_name = null, $block_attribu |
| 220 | 220 | * |
| 221 | 221 | * @since 5.3.1 |
| 222 | 222 | * |
| 223 | | * @param WP_Block_Parser_Block $block A single parsed block object. |
| | 223 | * @param array $block A single parsed block object. |
| 224 | 224 | * @return string String of rendered HTML. |
| 225 | 225 | */ |
| 226 | 226 | function serialize_block( $block ) { |
| … |
… |
function serialize_block( $block ) { |
| 248 | 248 | * |
| 249 | 249 | * @since 5.3.1 |
| 250 | 250 | * |
| 251 | | * @param WP_Block_Parser_Block[] $blocks Parsed block objects. |
| | 251 | * @param array[] $blocks Parsed block objects. |
| 252 | 252 | * @return string String of rendered HTML. |
| 253 | 253 | */ |
| 254 | 254 | function serialize_blocks( $blocks ) { |
| … |
… |
function filter_block_content( $text, $allowed_html = 'post', $allowed_protocols |
| 286 | 286 | * |
| 287 | 287 | * @since 5.3.1 |
| 288 | 288 | * |
| 289 | | * @param WP_Block_Parser_Block $block The parsed block object. |
| 290 | | * @param array[]|string $allowed_html An array of allowed HTML |
| | 289 | * @param array $block The parsed block object. |
| | 290 | * @param array[]|string $allowed_html An array of allowed HTML |
| 291 | 291 | * elements and attributes, or a |
| 292 | 292 | * context name such as 'post'. |
| 293 | | * @param string[] $allowed_protocols Allowed URL protocols. |
| | 293 | * @param string[] $allowed_protocols Allowed URL protocols. |
| 294 | 294 | * @return array The filtered and sanitized block object result. |
| 295 | 295 | */ |
| 296 | 296 | function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) { |
diff --git src/wp-includes/class-wp-block-parser.php src/wp-includes/class-wp-block-parser.php
index eb4c21a973..9dc15c234f 100644
|
|
|
class WP_Block_Parser_Block { |
| 38 | 38 | * List of inner blocks (of this same class) |
| 39 | 39 | * |
| 40 | 40 | * @since 3.8.0 |
| 41 | | * @var WP_Block_Parser_Block[] |
| | 41 | * @var array[] |
| 42 | 42 | */ |
| 43 | 43 | public $innerBlocks; |
| 44 | 44 | |
| … |
… |
class WP_Block_Parser_Frame { |
| 102 | 102 | * Full or partial block |
| 103 | 103 | * |
| 104 | 104 | * @since 3.8.0 |
| 105 | | * @var WP_Block_Parser_Block |
| | 105 | * @var WP_Block_Parser_Block|array |
| 106 | 106 | */ |
| 107 | 107 | public $block; |
| 108 | 108 | |
| … |
… |
class WP_Block_Parser_Frame { |
| 146 | 146 | * |
| 147 | 147 | * @since 3.8.0 |
| 148 | 148 | * |
| 149 | | * @param WP_Block_Parser_Block $block Full or partial block. |
| 150 | | * @param int $token_start Byte offset into document for start of parse token. |
| 151 | | * @param int $token_length Byte length of entire parse token string. |
| 152 | | * @param int $prev_offset Byte offset into document for after parse token ends. |
| 153 | | * @param int $leading_html_start Byte offset into document where leading HTML before token starts. |
| | 149 | * @param WP_Block_Parser_Block|array $block Full or partial block. |
| | 150 | * @param int $token_start Byte offset into document for start of parse token. |
| | 151 | * @param int $token_length Byte length of entire parse token string. |
| | 152 | * @param int $prev_offset Byte offset into document for after parse token ends. |
| | 153 | * @param int $leading_html_start Byte offset into document where leading HTML before token starts. |
| 154 | 154 | */ |
| 155 | 155 | function __construct( $block, $token_start, $token_length, $prev_offset = null, $leading_html_start = null ) { |
| 156 | 156 | $this->block = $block; |
| … |
… |
class WP_Block_Parser { |
| 192 | 192 | * List of parsed blocks |
| 193 | 193 | * |
| 194 | 194 | * @since 3.8.0 |
| 195 | | * @var WP_Block_Parser_Block[] |
| | 195 | * @var array[] |
| 196 | 196 | */ |
| 197 | 197 | public $output; |
| 198 | 198 | |
| … |
… |
class WP_Block_Parser { |
| 222 | 222 | * @since 3.8.0 |
| 223 | 223 | * |
| 224 | 224 | * @param string $document Input document being parsed. |
| 225 | | * @return WP_Block_Parser_Block[] |
| | 225 | * @return array[] |
| 226 | 226 | */ |
| 227 | 227 | function parse( $document ) { |
| 228 | 228 | $this->document = $document; |