Commit d22f1f46b4 for wordpress.org
commit d22f1f46b402fabb0e6b1401e99b0d9771a3f1dc
Author: lancewillett <lancewillett@git.wordpress.org>
Date: Fri Oct 30 17:43:07 2026 +0000
Code Modernization: Simplify block parser default length assignment.
Use `??=` in `WP_Block_Parser::add_freeform()` to preserve the existing default-length behavior with a shorter assignment.
Developed in: https://github.com/WordPress/wordpress-develop/pull/15149
Props shailu25, westonruter.
See #65823.
Built from https://develop.svn.wordpress.org/trunk@65066
git-svn-id: http://core.svn.wordpress.org/trunk@64216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/class-wp-block-parser.php b/wp-includes/class-wp-block-parser.php
index 07ddf52fc5..5adc9d95e6 100644
--- a/wp-includes/class-wp-block-parser.php
+++ b/wp-includes/class-wp-block-parser.php
@@ -319,7 +319,7 @@ class WP_Block_Parser {
* @param null|int $length How many bytes of document text to output.
*/
public function add_freeform( $length = null ) {
- $length = $length ?? strlen( $this->document ) - $this->offset;
+ $length ??= strlen( $this->document ) - $this->offset;
if ( 0 === $length ) {
return;
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 8cd0dd8dcf..2892201fee 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-beta3-65065';
+$wp_version = '7.2-beta3-65066';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.