get_edit_bookmark_link( int|stdClass $link ): string|void

Displays the edit bookmark link.

Parameters

$linkint|stdClassoptional
Bookmark ID. Default is the ID of the current bookmark.

Return

string|void The edit bookmark link URL.

Source

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

Hooks

apply_filters( ‘get_edit_bookmark_link’, string $location, int $link_id )

Filters the bookmark edit link.

Changelog

VersionDescription
2.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.