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.

parameterdescriptionusage
idthe id of the categorysave_category('id=3&title=Test Category 1');
parent_pagethe id of the parent page to add the category to
titleTitle of the category
contentThe html content saved in the database
descriptionDescription used for the content list
positionThe order position
users_can_create_contentflag if users can add content in this category"n" or "y"
The documentation is under development. Help us by editing this page.