wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_delete_link › WordPress Function
Seit2.0.0
Veraltetn/v
› wp_delete_link ( $link_id )
Parameter: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Deletes a specified link from the database.
Ähnliche Funktionen: wp_ajax_delete_link, wp_delete_site, wp_delete_file, wp_update_link, wp_get_links
Quellcode
function wp_delete_link( $link_id ) { global $wpdb; /** * Fires before a link is deleted. * * @since 2.0.0 * * @param int $link_id ID of the link to delete. */ do_action( 'delete_link', $link_id ); wp_delete_object_term_relationships( $link_id, 'link_category' ); $wpdb->delete( $wpdb->links, array( 'link_id' => $link_id ) ); /** * Fires after a link has been deleted. * * @since 2.2.0 * * @param int $link_id ID of the deleted link. */ do_action( 'deleted_link', $link_id ); clean_bookmark_cache( $link_id ); return true; }