← All changes
|
packages/block-serialization-default-parser/class-wp-block-parser-frame.php
+3
-4
23.7.0
→
17.0.2
View file →
| @@ -64,16 +64,15 @@ | ||
| 64 | 64 | * |
| 65 | 65 | * @param WP_Block_Parser_Block $block Full or partial block. |
| 66 | 66 | * @param int $token_start Byte offset into document for start of parse token. |
| 67 | 67 | * @param int $token_length Byte length of entire parse token string. |
| 68 | - * @param int|null $prev_offset Optional. Byte offset into document for after parse token ends. Default null. | |
| 69 | - * @param int|null $leading_html_start Optional. Byte offset into document where leading HTML before token starts. | |
| 70 | - * Default null. | |
| 68 | + * @param int $prev_offset Byte offset into document for after parse token ends. | |
| 69 | + * @param int $leading_html_start Byte offset into document where leading HTML before token starts. | |
| 71 | 70 | */ |
| 72 | 71 | public function __construct( $block, $token_start, $token_length, $prev_offset = null, $leading_html_start = null ) { |
| 73 | 72 | $this->block = $block; |
| 74 | 73 | $this->token_start = $token_start; |
| 75 | 74 | $this->token_length = $token_length; |
| 76 | - $this->prev_offset = $prev_offset ?? $token_start + $token_length; | |
| 75 | + $this->prev_offset = isset( $prev_offset ) ? $prev_offset : $token_start + $token_length; | |
| 77 | 76 | $this->leading_html_start = $leading_html_start; |
| 78 | 77 | } |
| 79 | 78 | } |