Ticket #25494: 25494.diff
File 25494.diff, 1.6 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/bookmark.php
79 79 */ 80 80 function wp_delete_link( $link_id ) { 81 81 global $wpdb; 82 82 /** 83 * Fires action before link is deleted. 84 * 85 * @since 2.0.0 86 * 87 * @param int $link_id ID of the link to delete. 88 */ 83 89 do_action( 'delete_link', $link_id ); 84 90 85 91 wp_delete_object_term_relationships( $link_id, 'link_category' ); 86 92 87 93 $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); 88 94 /** 95 * Fires action after link is deleted. 96 * 97 * @since 2.0.0 98 * 99 * @param int $link_id ID of the link to delete. 100 */ 89 101 do_action( 'deleted_link', $link_id ); 90 102 91 103 clean_bookmark_cache( $link_id ); … … 207 219 wp_set_link_cats( $link_id, $link_category ); 208 220 209 221 if ( $update ) 222 /** 223 * Fires action to be run when a link is updated in the database. 224 * 225 * @since 2.0.0 226 * 227 * @param int $link_id ID of the link to be updated. 228 */ 210 229 do_action( 'edit_link', $link_id ); 211 230 else 231 /** 232 * Adds a link to the database. 233 * 234 * @since 2.0.0 235 * 236 * @param int $link_id ID of the link to be added. 237 */ 212 238 do_action( 'add_link', $link_id ); 213 239 214 240 clean_bookmark_cache( $link_id );