get_edit_bookmark_link()WP 2.7.0

Displays the edit bookmark link.

Hooks from the function

Return

String|null. The edit bookmark link URL.

Usage

get_edit_bookmark_link( $link );
$link(int|stdClass)
Bookmark ID.
Default: ID of the current bookmark

Changelog

Since 2.7.0 Introduced.

get_edit_bookmark_link() code WP 6.5.2

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 );
}