mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57192 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bd88eafee1
commit
8e56669a49
@ -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 ) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user