函数原型
get_link( int $bookmark_id, string $output = OBJECT, string $filter = ‘raw’ ): object|array
函数描述
Retrieves bookmark data based on ID.
是否弃用
Warning: This function has been deprecated. Use get_bookmark() instead.
函数参数
-
$bookmark_id
int
Required - ID of link
-
$output
string
Optional - Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A.
Default:
OBJECT -
$filter
string
Optional - How to filter the link for output. Accepts
'raw','edit','attribute','js','db', or'display'. Default'raw'.Default:
'raw'
函数返回值
object|array Bookmark object or array, depending on the type specified by $output.
函数位置
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);
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.1.0 | Use get_bookmark() |
| 2.0.0 | Introduced. |

