add_link

Add a link to using values provided in $_POST.

Description

(int|WP_Error) add_link(); 

Returns (int|WP_Error)

Value 0 or WP_Error on failure. The link ID on success.


Usage

  1. if ( !function_exists( 'add_link' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/bookmark.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = add_link(); 
  7.  

Defined (1)

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

/wp-admin/includes/bookmark.php  
  1. function add_link() { 
  2. return edit_link();