mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Docs: Revert the WP_Block_Parser documentation changes now.
This commit reverts [54193] and [54194].
It appears that these changes should first be made [533e0b7dad/packages/block-serialization-default-parser/parser.php upstream in the Gutenberg respository] and then backported to core, as the [https://github.com/WordPress/wordpress-develop/actions/runs/3074068296/jobs/4966609235#step:8:1 tests fail otherwise].
See #56581.
git-svn-id: https://develop.svn.wordpress.org/trunk@54195 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -62,7 +62,7 @@ class WP_Block_Parser_Block {
|
||||
* 'innerContent' => array( 'Before', null, 'Inner', null, 'After' ),
|
||||
* )
|
||||
*
|
||||
* @since 5.0.0
|
||||
* @since 4.2.0
|
||||
* @var array
|
||||
*/
|
||||
public $innerContent;
|
||||
@@ -164,9 +164,10 @@ class WP_Block_Parser_Frame {
|
||||
/**
|
||||
* Class WP_Block_Parser
|
||||
*
|
||||
* Parses a document and constructs a list of parsed blocks.
|
||||
* Parses a document and constructs a list of parsed block objects
|
||||
*
|
||||
* @since 5.0.0
|
||||
* @since 4.0.0 returns arrays not objects, all attributes are arrays
|
||||
*/
|
||||
class WP_Block_Parser {
|
||||
/**
|
||||
@@ -191,7 +192,7 @@ class WP_Block_Parser {
|
||||
* List of parsed blocks
|
||||
*
|
||||
* @since 5.0.0
|
||||
* @var array[]
|
||||
* @var WP_Block_Parser_Block[]
|
||||
*/
|
||||
public $output;
|
||||
|
||||
@@ -206,7 +207,7 @@ class WP_Block_Parser {
|
||||
/**
|
||||
* Empty associative array, here due to PHP quirks
|
||||
*
|
||||
* @since 5.0.0
|
||||
* @since 4.4.0
|
||||
* @var array empty associative array
|
||||
*/
|
||||
public $empty_attrs;
|
||||
@@ -221,7 +222,7 @@ class WP_Block_Parser {
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param string $document Input document being parsed.
|
||||
* @return array[]
|
||||
* @return WP_Block_Parser_Block[]
|
||||
*/
|
||||
function parse( $document ) {
|
||||
$this->document = $document;
|
||||
@@ -394,6 +395,7 @@ class WP_Block_Parser {
|
||||
*
|
||||
* @internal
|
||||
* @since 5.0.0
|
||||
* @since 4.6.1 fixed a bug in attribute parsing which caused catastrophic backtracking on invalid block comments
|
||||
* @return array
|
||||
*/
|
||||
function next_token() {
|
||||
@@ -466,7 +468,7 @@ class WP_Block_Parser {
|
||||
* Returns a new block object for freeform HTML
|
||||
*
|
||||
* @internal
|
||||
* @since 5.0.0
|
||||
* @since 3.9.0
|
||||
*
|
||||
* @param string $innerHTML HTML content of block.
|
||||
* @return WP_Block_Parser_Block freeform block object.
|
||||
|
||||
Reference in New Issue
Block a user