get_link_to_edit

Retrieves link data based on its ID.

Description

(object) get_link_to_edit( (int|stdClass) $link ); 

Returns (object)

Link object for editing.

Parameters (1)

0. $link (int|stdClass)
Link ID or object to retrieve.

Usage

  1. if ( !function_exists( 'get_link_to_edit' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/bookmark.php'; 
  3.  
  4. // Link ID or object to retrieve. 
  5. $link = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_link_to_edit($link); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/bookmark.php  
  1. function get_link_to_edit( $link ) { 
  2. return get_bookmark( $link, OBJECT, 'edit' );