get_link

Retrieves bookmark data based on ID.

Description

(object|array) get_link( (int) $bookmark_id, (constant) $output = OBJECT, (string) $filter = 'raw' ); 

Returns (object|array)

Bookmark object or array, depending on the type specified by `$output`.

Parameters (3)

0. $bookmark_id (int)
The bookmark id.
1. $output — Optional. (constant) => OBJECT
Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A. Default OBJECT.
2. $filter — Optional. (string) => 'raw'
How to filter the link for output. Accepts raw,, edit., attribute, js, db, or display. Default raw,.

Usage

  1. if ( !function_exists( 'get_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The bookmark id. 
  5. $bookmark_id = -1; 
  6.  
  7. // Optional. Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A. 
  8. // Default OBJECT. 
  9. $output = OBJECT; 
  10.  
  11. // Optional. How to filter the link for output. Accepts 'raw', 'edit', 
  12. // 'attribute', 'js', 'db', or 'display'. Default 'raw'. 
  13. $filter = 'raw'; 
  14.  
  15. // NOTICE! Understand what this does before running. 
  16. $result = get_link($bookmark_id, $output, $filter); 
  17.  

Defined (1)

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

/wp-includes/deprecated.php  
  1. function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) { 
  2. _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' ); 
  3. return get_bookmark($bookmark_id, $output, $filter);