get_edit_bookmark_link

函数


get_edit_bookmark_link ( $link = 0 )
参数
  • (int|stdClass)
    $link
    Optional. Bookmark ID. Default is the ID of the current bookmark.
    Required:
返回值
  • (string|void) The edit bookmark link URL.
定义位置
  • wp-includes/link-template.php
    , line 1652
引入
2.7.0
弃用

Displays the edit bookmark link.

function get_edit_bookmark_link( $link = 0 ) {
	$link = get_bookmark( $link );

	if ( ! current_user_can( 'manage_links' ) ) {
		return;
	}

	$location = admin_url( 'link.php?action=edit&link_id=' ) . $link->link_id;

	/**
	 * Filters the bookmark edit link.
	 *
	 * @since 2.7.0
	 *
	 * @param string $location The edit link.
	 * @param int    $link_id  Bookmark ID.
	 */
	return apply_filters( 'get_edit_bookmark_link', $location, $link->link_id );
}