Archive | Functions RSS feed for this section

Function Reference: wlmapi_the_members

Retrieves a list of all members passed through the filter: wlmapi_the_members. If no filter is applied, this function will return the unfiltered array, i.e. the same output as wlmapi_get_members. Parameters This function accepts no parameters. Return Returns a string containing the filtered list. Example Code <?php //On the page displaying the levels $members = wlmapi_the_members(); echo […]

Function Reference: wlmapi_get_members

Retrieves all members. Parameters This function accepts no parameters. Return Returns a multi-dimensional array containing data for each member. Example Code <?php $members = wlmapi_get_members(); print_r($members); ?> Example Output Array ( [success] => 1 [members] => Array ( [member] => Array ( [0] => Array ( [id] => 1 [user_login] => john [user_email] => johnistheman@wlptest.com […]

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_unprotect_page

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

Function Reference: wlmapi_protect_page

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

Function Reference: wlmapi_get_protected_pages

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

Function Reference: wlmapi_unprotect_post

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

Function Reference: wlmapi_protect_post

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