delete_link
Fires before a link is deleted.
Description
Parameters (1)
- 0. $link_id (int)
- ID of the link to delete.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'delete_link', $link_id );
- The following example is for adding a hook callback.
- // define the delete_link callback
- function action_delete_link( $link_id ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'delete_link', 'action_delete_link', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'delete_link', 'action_delete_link', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-admin/includes/bookmark.php
- do_action( 'delete_link', $link_id );