function biblio_delete_keyword in Bibliography Module 7.2
Same name and namespace in other branches
- 6.2 includes/biblio.keywords.inc \biblio_delete_keyword()
- 6 biblio.keywords.inc \biblio_delete_keyword()
- 7 includes/biblio.keywords.inc \biblio_delete_keyword()
Delete a keyword from both the biblio_keyword and biblio_keyword_data tables This will remove the keyword referenced by the supplied ID from ALL nodes which reference them.
Parameters
$keyword_id: The keyword id to delete
Return value
The number of keywords deleted (should always be one)
3 calls to biblio_delete_keyword()
- BiblioKeywordUnitTest::testBiblioDeleteKeyword in tests/
keyword.test - biblio_admin_keyword_delete_confirm_submit in includes/
biblio.admin.inc - biblio_delete_multiple_keywords in includes/
biblio.keywords.inc - Delete multiple keywords from both the biblio_keyword and biblio_keyword_data tables This will remove the keywords referenced by the supplied ID's from ALL nodes which reference them.
File
- includes/
biblio.keywords.inc, line 321
Code
function biblio_delete_keyword($keyword_id) {
db_delete('biblio_keyword')
->condition('kid', $keyword_id)
->execute();
return db_delete('biblio_keyword_data')
->condition('kid', $keyword_id)
->execute();
}