From 04a6ab1c8df2450065be6dc8176cf2613aba2a91 Mon Sep 17 00:00:00 2001 From: gziolo Date: Tue, 10 Dec 2024 11:41:16 +0000 Subject: [PATCH] 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 --- wp-includes/html-api/class-wp-html-processor.php | 10 +++------- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php index 8d2a476769..2bc38b305a 100644 --- a/wp-includes/html-api/class-wp-html-processor.php +++ b/wp-includes/html-api/class-wp-html-processor.php @@ -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( '

' ); * $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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index c7e61f20a4..de47056643 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.