HTML API: Remove nullable from get_breadcrumbs return type
Follow-up [58713] Props jonsurrell, westonruter, gziolo. Fixes #62674. Built from https://develop.svn.wordpress.org/trunk@59503 git-svn-id: http://core.svn.wordpress.org/trunk@58889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
70af002cdb
commit
04a6ab1c8d
|
@ -1143,11 +1143,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||
* Breadcrumbs start at the outermost parent and descend toward the matched element.
|
||||
* They always include the entire path from the root HTML node to the matched element.
|
||||
*
|
||||
* @todo It could be more efficient to expose a generator-based version of this function
|
||||
* to avoid creating the array copy on tag iteration. If this is done, it would likely
|
||||
* be more useful to walk up the stack when yielding instead of starting at the top.
|
||||
*
|
||||
* Example
|
||||
* Example:
|
||||
*
|
||||
* $processor = WP_HTML_Processor::create_fragment( '<p><strong><em><img></em></strong></p>' );
|
||||
* $processor->next_tag( 'IMG' );
|
||||
|
@ -1155,9 +1151,9 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
* @return string[]|null Array of tag names representing path to matched node, if matched, otherwise NULL.
|
||||
* @return string[] Array of tag names representing path to matched node.
|
||||
*/
|
||||
public function get_breadcrumbs(): ?array {
|
||||
public function get_breadcrumbs(): array {
|
||||
return $this->breadcrumbs;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59502';
|
||||
$wp_version = '6.8-alpha-59503';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue