get_link()

最后更新于:2021-11-26 09:15:28

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

Retrieves bookmark data based on ID.

参数

$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’

响应

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

源文件

文件: gc-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);
}