Changeset 56945 for trunk/src/wp-includes/class-wp-block-parser.php
- Timestamp:
- 10/16/2023 07:14:55 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-parser.php
r56710 r56945 50 50 51 51 /** 52 * Empty associative array, here due to PHP quirks53 *54 * @since 4.4.055 * @var array empty associative array56 */57 public $empty_attrs;58 59 /**60 52 * Parses a document and returns a list of block structures 61 53 * … … 70 62 */ 71 63 public function parse( $document ) { 72 $this->document = $document; 73 $this->offset = 0; 74 $this->output = array(); 75 $this->stack = array(); 76 $this->empty_attrs = array(); 64 $this->document = $document; 65 $this->offset = 0; 66 $this->output = array(); 67 $this->stack = array(); 77 68 78 69 while ( $this->proceed() ) { … … 288 279 $attrs = $has_attrs 289 280 ? json_decode( $matches['attrs'][0], /* as-associative */ true ) 290 : $this->empty_attrs;281 : array(); 291 282 292 283 /* … … 319 310 */ 320 311 public function freeform( $inner_html ) { 321 return new WP_Block_Parser_Block( null, $this->empty_attrs, array(), $inner_html, array( $inner_html ) );312 return new WP_Block_Parser_Block( null, array(), array(), $inner_html, array( $inner_html ) ); 322 313 } 323 314
Note: See TracChangeset
for help on using the changeset viewer.