Fires after a link was added to the database.
Parameters
$link_idint- ID of the link that was added.
Source
do_action( 'add_link', $link_id );
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
Fires after a link was added to the database.
$link_idintdo_action( 'add_link', $link_id );
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Overview
The
add_linkaction hook is triggered in WordPress when a new link is added. You can use this hook to execute custom functions whenever a link is added to the WordPress database.Notes
add_action.add_actionandremove_actionshould match.By following the steps above, you can effectively use the
add_linkaction hook to add custom functionality whenever a new link is added in WordPress.You want the password reset link that WordPress automatically sends (when you click Send password reset from the Users panel) to use
enigma.phpinstead of the defaultwp-login.php?You can hook into WordPress filters that build the password reset URL and replace
wp-login.phpwithenigma.php.Add this snippet to your theme’s functions.php file or a custom plugin: