add_link
Action HookDescription
Fires after a link was added to the database.Hook Information
File Location |
wp-admin/includes/bookmark.php
View on GitHub
|
Hook Type | Action |
Line Number | 263 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$link_id
|
ID of the link that was added. |
Usage Examples
Basic Usage
<?php
// Hook into add_link
add_action('add_link', 'my_custom_function', 10, 1);
function my_custom_function($link_id) {
// Your custom code here
}
Source Code Context
wp-admin/includes/bookmark.php:263
- How this hook is used in WordPress core
<?php
258 *
259 * @since 2.0.0
260 *
261 * @param int $link_id ID of the link that was added.
262 */
263 do_action( 'add_link', $link_id );
264 }
265 clean_bookmark_cache( $link_id );
266
267 return $link_id;
268 }
PHP Documentation
<?php
/**
* Fires after a link was added to the database.
*
* @since 2.0.0
*
* @param int $link_id ID of the link that was added.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-admin/includes/bookmark.php
Related Hooks
Related hooks will be displayed here in future updates.