WPDev.one
Core Function
View Source on Trac ↗

wp_insert_link()

wp_insert_link( mixed $linkdata, mixed $wp_error = false )

Inserts a link into the database, or updates an existing link.

Parameters 1 required

Name / Type Description
array

$linkdata { Elements that make up the link to insert.

Required
$wp_error
bool

Optional. Whether to return a WP_Error object on failure. Default false.

Return Value

((int)
| WP_Error) Value 0 or WP_Error on failure. The link ID on success.

Function Information

Since Version
2.0.0
Source File
wp-admin/includes/bookmark.php
Advertisement