save_category
save_category — saves a category
Summary
save_category($params);
Return Values
Integer with the saved category id or false if the category is not saved
Usage
$params = array(
'title' => 'Test Category 1',
'parent_page' => $parent_page
);
//saving
$category_id = save_category($params);
print $category_id;
Parameters
You can pass parameters as string or as array.
| parameter | description | usage |
|---|---|---|
| id | the id of the category | save_category('id=3&title=Test Category 1'); |
| parent_page | the id of the parent page to add the category to | |
| title | Title of the category | |
| content | The html content saved in the database | |
| description | Description used for the content list | |
| position | The order position | |
| users_can_create_content | flag if users can add content in this category | "n" or "y" |