function simplenews_category_save in Simplenews 7
Store newsletter category in the database.
Parameters
$category: Newsletter category object
Related topics
3 calls to simplenews_category_save()
- simplenews_admin_categories_submit in includes/
simplenews.admin.inc - Form submit callback for the simplenews categories.
- simplenews_admin_category_form_submit in includes/
simplenews.admin.inc - Form submit callback for a newsletter category form.
- _simplenews_init_simplenews_category in ./
simplenews.install - Create initial simplenews categories.
File
- ./
simplenews.module, line 1876 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_category_save($category) {
db_merge('simplenews_category')
->key(array(
'tid' => $category->tid,
))
->fields(array(
'tid' => $category->tid,
'format' => $category->format,
'priority' => $category->priority,
'receipt' => $category->receipt,
'from_name' => $category->from_name,
'from_address' => $category->from_address,
'email_subject' => $category->email_subject,
'hyperlinks' => $category->hyperlinks,
'new_account' => $category->new_account,
'opt_inout' => $category->opt_inout,
'block' => $category->block,
))
->execute();
module_invoke_all('simplenews_category_update', $category);
}