WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
394 | $linkdata = array_merge($link, $linkdata); |
395 | $linkdata['link_category'] = $link_cats; |
396 |
|
397 | return wp_insert_link($linkdata); |
398 | } |
399 |
|
400 | function wp_delete_link($link_id) { |
401 | global $wpdb; |
402 |
|
403 | do_action('delete_link', $link_id); |
404 |
|
405 | $categories = wp_get_link_cats($link_id); |
406 | if( is_array( $categories ) ) { |
407 | foreach ( $categories as $category ) { |
408 | $wpdb->query("UPDATE $wpdb->categories SET link_count = link_count - 1 WHERE cat_ID = '$category'"); |
409 | wp_cache_delete($category, 'category'); |
410 | do_action('edit_category', $cat_id); |
411 | } |
412 | } |