From f0e266fd62702d8bcae1ec9cb279655aab2869be Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 15 Dec 2023 14:33:25 +0000 Subject: [PATCH] General: Revert code changes from [57191]. The unit tests for `get_bookmark()` expect the function to modify the `$GLOBALS` array directly. Follow-up to [57191]. See #60021. Built from https://develop.svn.wordpress.org/trunk@57192 git-svn-id: http://core.svn.wordpress.org/trunk@56703 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark.php | 10 +++++----- wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index 66c4339638..7513a5622c 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -22,11 +22,11 @@ * @return array|object|null Type returned depends on $output value. */ function get_bookmark( $bookmark, $output = OBJECT, $filter = 'raw' ) { - global $link, $wpdb; + global $wpdb; if ( empty( $bookmark ) ) { - if ( isset( $link ) ) { - $_bookmark = &$link; + if ( isset( $GLOBALS['link'] ) ) { + $_bookmark = & $GLOBALS['link']; } else { $_bookmark = null; } @@ -34,8 +34,8 @@ function get_bookmark( $bookmark, $output = OBJECT, $filter = 'raw' ) { wp_cache_add( $bookmark->link_id, $bookmark, 'bookmark' ); $_bookmark = $bookmark; } else { - if ( isset( $link ) && ( $link->link_id == $bookmark ) ) { - $_bookmark = &$link; + if ( isset( $GLOBALS['link'] ) && ( $GLOBALS['link']->link_id == $bookmark ) ) { + $_bookmark = & $GLOBALS['link']; } else { $_bookmark = wp_cache_get( $bookmark, 'bookmark' ); if ( ! $_bookmark ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index dea4987e30..8d34a3d5bc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57191'; +$wp_version = '6.5-alpha-57192'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.