Make WordPress Core

Changeset 57191

Timestamp:
12/15/2023 12:57:07 PM (8 months ago)
Author:
SergeyBiryukov
Message:

Docs: Document the $link global in get_bookmark().

Follow-up to [8758].

Props upadalavipul, mukesh27.
See #60021.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/bookmark.php

    r56177 r57191  
    1212 * @since 2.1.0
    1313 *
    14  * @global wpdb $wpdb WordPress database abstraction object.
     14 * @global object $link Current link object.
     15 * @global wpdb   $wpdb WordPress database abstraction object.
    1516 *
    1617 * @param int|stdClass $bookmark
     
    2223 */
    2324function get_bookmark( $bookmark, $output = OBJECT, $filter = 'raw' ) {
    24     global $wpdb;
     25    global $wpdb;
    2526
    2627    if ( empty( $bookmark ) ) {
    27         if ( isset( $GLOBALS['link'] ) ) {
    28             $_bookmark = & $GLOBALS['link'];
     28        if ( isset( $ ) ) {
     29            $_bookmark = &;
    2930        } else {
    3031            $_bookmark = null;
     
    3435        $_bookmark = $bookmark;
    3536    } else {
    36         if ( isset( $GLOBALS['link'] ) && ( $GLOBALS['link']->link_id == $bookmark ) ) {
    37             $_bookmark = & $GLOBALS['link'];
     37        if ( isset( $->link_id == $bookmark ) ) {
     38            $_bookmark = &;
    3839        } else {
    3940            $_bookmark = wp_cache_get( $bookmark, 'bookmark' );
Note: See TracChangeset for help on using the changeset viewer.