Tag Archives | categories

Function Reference: wlmapi_unprotect_category

Un-protects a category. Parameters category_id (int) – The ID of the category to un-protect Return Returns a multi-dimensional array containing operation status. Example Code <?php $categories = wlmapi_unprotect_category(7); print_r($categories); ?> Example Output Array ( [success] => 1 [supported_verbs] => Array ( [0] => DELETE ) ) Notes This functions returns WLMAPIMethods::unprotect_category($page_id) in core/api-helper/class-api-methods.php

Function Reference: wlmapi_protect_category

Protects a category. Parameters args (array) – An array of accepted arguments specified below: Parameter Description Required Default ContentIds (array) An array of category IDs to protect Required Return Returns a multi-dimensional array containing operation status and an array containing all protected categories. Example Code <?php $args = array( ‘ContentIds’ => array(11,12) ); $categories = wlmapi_protect_category($args); print_r($categories); ?> […]

Function Reference: wlmapi_get_protected_categories

Retrieves all categories that have been protected. Parameters There are no parameters for this function Return Returns a multi-dimensional array containing data for each protected category. Example Code <?php $categories = wlmapi_get_protected_categories(); print_r($categories); ?> Example Output Array ( [success] => 1 [categories] => Array ( [category] => Array ( [0] => Array ( [ID] => […]

Function Reference: wlmapi_remove_category_from_level

Removes a membership level’s access to the specified category. Parameters level_id (int) – The ID of the level to remove the category from category_id (int) – The ID of the category to remove access from Return Returns a multi-dimensional array containing operation status. Example Code <?php $categories = wlmapi_remove_category_from_level(1340726008, 7); print_r($categories); ?> Example Output Array ( [success] => 1 […]

Function Reference: wlmapi_add_category_to_level

Gives a membership level access to the specified category. Parameters level_id (int) – The ID of the level to add categories to args (array) – An array of accepted arguments specified below: Parameter Description Required Default ContentIds (array) An array of category IDs to add to the membership level Required Return Returns a multi-dimensional array containing operation status […]

Function Reference: wlmapi_get_level_categories

Retrieves all categories associated with the specified level. Parameters level_id (int) – The ID of the level to retrieve categories from Return Returns a multi-dimensional array containing data for each category. Example Code <?php $categories = wlmapi_get_level_categories(1340726008); print_r($categories); ?> Example Output Array ( [success] => 1 [categories] => Array ( [category] => Array ( [0] => […]