WordPress.org

Make WordPress Core

Ticket #25494: 25494.3.diff

File 25494.3.diff, 1.5 KB (added by DrewAPicture, 7 years ago)

Final

  • src/wp-admin/includes/bookmark.php

     
    7070}
    7171
    7272/**
    73  * Delete link specified from database
     73 * Delete link specified from database.
    7474 *
    7575 * @since 2.0.0
    7676 *
     
    7979 */
    8080function wp_delete_link( $link_id ) {
    8181        global $wpdb;
    82 
     82        /**
     83         * Fires before a link is deleted.
     84         *
     85         * @since 2.0.0
     86         *
     87         * @param int $link_id ID of the link to delete.
     88         */
    8389        do_action( 'delete_link', $link_id );
    8490
    8591        wp_delete_object_term_relationships( $link_id, 'link_category' );
    8692
    8793        $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) );
    88 
     94        /**
     95         * Fires after a link has been deleted.
     96         *
     97         * @since 2.2.0
     98         *
     99         * @param int $link_id ID of the deleted link.
     100         */
    89101        do_action( 'deleted_link', $link_id );
    90102
    91103        clean_bookmark_cache( $link_id );
     
    206218
    207219        wp_set_link_cats( $link_id, $link_category );
    208220
    209         if ( $update )
     221        if ( $update ) {
     222                /**
     223                 * Fires after a link was updated in the database.
     224                 *
     225                 * @since 2.0.0
     226                 *
     227                 * @param int $link_id ID of the link that was updated.
     228                 */
    210229                do_action( 'edit_link', $link_id );
    211         else
     230        } else {
     231                /**
     232                 * Fires after a link was added to the database.
     233                 *
     234                 * @since 2.0.0
     235                 *
     236                 * @param int $link_id ID of the link that was added.
     237                 */
    212238                do_action( 'add_link', $link_id );
    213 
     239        }
    214240        clean_bookmark_cache( $link_id );
    215241
    216242        return $link_id;