On this page
get_edit_bookmark_link( int|stdClass $link ): string|void
Displays the edit bookmark link.
Parameters
$linkint|stdClass Optional-
Bookmark ID. Default is the ID of the current bookmark.
Return
string|void The edit bookmark link URL.
Source
File: wp-includes/link-template.php. View all references
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.
Related
Uses
| Uses | Description |
|---|---|
| get_bookmark() wp-includes/bookmark.php | Retrieves bookmark data. |
| current_user_can() wp-includes/capabilities.php | Returns whether the current user has the specified capability. |
| admin_url() wp-includes/link-template.php | Retrieves the URL to the admin area for the current site. |
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| WP_Links_List_Table::handle_row_actions() wp-admin/includes/class-wp-links-list-table.php | Generates and displays row action links. |
| WP_Links_List_Table::column_name() wp-admin/includes/class-wp-links-list-table.php | Handles the link name column output. |
| edit_bookmark_link() wp-includes/link-template.php | Displays the edit bookmark link anchor content. |
Changelog
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_edit_bookmark_link