You are here

function biblio_delete_keyword in Bibliography Module 7

Same name and namespace in other branches
  1. 6.2 includes/biblio.keywords.inc \biblio_delete_keyword()
  2. 6 biblio.keywords.inc \biblio_delete_keyword()
  3. 7.2 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()
BiblioKeywordWebTestCase::testBiblioDeleteKeyword in tests/BiblioKeywordWebTestCase.test
biblio_admin_keyword_delete_confirm_submit in includes/biblio.admin.inc
_state
biblio_delete_multiple_keywords in includes/biblio.keywords.inc
Delete multiple keywords.

File

includes/biblio.keywords.inc, line 411
Contains all keyword related functions.

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();
}