function nodewords_delete_tags in Nodewords: D6 Meta Tags 6.3
Same name and namespace in other branches
- 6 nodewords.module \nodewords_delete_tags()
- 6.2 nodewords.module \nodewords_delete_tags()
Delete tags from table.
5 calls to nodewords_delete_tags()
- nodewords_admin_settings_form_reset in nodewords_admin/
nodewords_admin.admin.inc - Submission function for the reset button of the settings page.
- nodewords_admin_tags_edit_form_reset in nodewords_admin/
nodewords_admin.admin.inc - Submission function for the meta tags edit page (reset button).
- nodewords_nodeapi in ./
nodewords.module - Implements hook_nodeapi().
- nodewords_taxonomy in ./
nodewords.module - Implements hook_taxonomy().
- nodewords_user in ./
nodewords.module - Implements hook_user().
File
- ./
nodewords.module, line 331 - Implement an version that other modules can use to add meta tags.
Code
function nodewords_delete_tags(array $options = array()) {
$options += array(
'type' => NODEWORDS_TYPE_DEFAULT,
'id' => '',
'sid' => 0,
'language' => '*',
);
$args = array(
$options['type'],
$options['id'],
);
$query = "DELETE FROM {nodewords} WHERE type = %d AND id = %d";
if ($options['sid'] != '*') {
$args[] = $options['sid'];
$query .= ' AND sid = %d';
}
if ($options['language'] != '*') {
$args[] = $options['language'];
$query .= " AND language = '%s'";
}
db_query($query, $args);
nodewords_load_all_includes('nodewords.hooks.inc');
module_invoke_all('metatags_delete', $options);
}