get_edit_bookmark_link

Displays the edit bookmark link.

Description

(string|void) get_edit_bookmark_link( (int) $link = 0 ); 

Returns (string|void)

The edit bookmark link URL.

Parameters (1)

0. $link — Optional. (int)
Bookmark ID. Default is the id of the current bookmark.

Usage

  1. if ( !function_exists( 'get_edit_bookmark_link' ) ) { 
  2. require_once ABSPATH . WPINC . '/link-template.php'; 
  3.  
  4. // Optional. Bookmark ID. Default is the id of the current bookmark. 
  5. $link = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_edit_bookmark_link($link); 
  9.  

Defined (1)

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

/wp-includes/link-template.php  
  1. function get_edit_bookmark_link( $link = 0 ) { 
  2. $link = get_bookmark( $link ); 
  3.  
  4. if ( !current_user_can('manage_links') ) 
  5. return; 
  6.  
  7. $location = admin_url('link.php?action=edit&link_id=') . $link->link_id; 
  8.  
  9. /** 
  10. * Filters the bookmark edit link. 
  11. * @since 2.7.0 
  12. * @param string $location The edit link. 
  13. * @param int $link_id Bookmark ID. 
  14. */ 
  15. return apply_filters( 'get_edit_bookmark_link', $location, $link->link_id );