Warning: This function has been deprecated. Use get_bookmark() instead.

get_link() WordPress Function

The get_link() function is used to retrieve the URL for a given link. This function can be used to get the URL for a link from the WordPress database, or to get the URL for a link to an external site.

get_link( int $bookmark_id, string $output = OBJECT, string $filter = 'raw' ) #

Retrieves bookmark data based on ID.


Description

Top ↑

See also


Top ↑

Parameters

$bookmark_id

(int)(Required)ID of link

$output

(string)(Optional) Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A.

Default value: OBJECT

$filter

(string)(Optional) How to filter the link for output. Accepts 'raw', 'edit', 'attribute', 'js', 'db', or 'display'.

Default value: 'raw'


Top ↑

Return

(object|array) Bookmark object or array, depending on the type specified by $output.


Top ↑

Source

File: wp-includes/deprecated.php

function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
	return get_bookmark($bookmark_id, $output, $filter);
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Use get_bookmark()
2.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More