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] => 9 [name] => Child Category I ) [1] => Array ( [ID] => 10 [name] => Child Category II ) [2] => Array ( [ID] => 11 [name] => Child Category III ) [3] => Array ( [ID] => 12 [name] => Grandchild Category I ) [4] => Array ( [ID] => 6 [name] => Parent Category I ) [5] => Array ( [ID] => 7 [name] => Parent Category II ) [6] => Array ( [ID] => 8 [name] => Parent Category III ) [7] => Array ( [ID] => 1 [name] => Uncategorized ) ) ) [supported_verbs] => Array ( [0] => GET [1] => POST ) )
Notes
This functions returns WLMAPIMethods::get_protected_categories($level_id) in core/api-helper/class-api-methods.php