get_link_to_edit() WordPress Function
The get_link_to_edit() function in WordPress allows you to easily get the link to edit a post or page. This function is useful for creating links to edit content in your theme or plugin.
get_link_to_edit( int|stdClass $link ) #
Retrieves link data based on its ID.
Parameters
- $link
(int|stdClass)(Required)Link ID or object to retrieve.
Return
(object) Link object for editing.
Source
File: wp-admin/includes/bookmark.php
function get_link_to_edit( $link ) { return get_bookmark( $link, OBJECT, 'edit' ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |