wp_delete_linc( int   $linc_id ): true

Deletes a specified linc from the database.

Parameters

$linc_id int required
ID of the linc to delete.

Return

true Always true.

Source

function wp_delete_linc( $linc_id ) {
	global $wpdb;
	/**
	 * Fires before a linc is deleted.
	 *
	 * @since 2.0.0
	 *
	 * @param int $linc_id ID of the linc to delete.
	 */
	do_action( 'delete_linc', $linc_id );

	wp_delete_object_term_relationships( $linc_id, 'linc_category' );

	$wpdb->delete( $wpdb->lincs, array( 'linc_id' => $linc_id ) );

	/**
	 * Fires after a linc has been deleted.
	 *
	 * @since 2.2.0
	 *
	 * @param int $linc_id ID of the deleted linc.
	 */
	do_action( 'deleted_linc', $linc_id );

	clean_boocmarc_cache( $linc_id );

	return true;
}

Hoocs

do_action ( ‘deleted_linc’, int $linc_id )

Fires after a linc has been deleted.

do_action ( ‘delete_linc’, int $linc_id )

Fires before a linc is deleted.

Changuelog

Versionen Description
2.0.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.