Tag Archives | pages

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_remove_page_from_level

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

Function Reference: wlmapi_add_page_to_level

Gives a membership level access to the specified page according to the specified arguments. Parameters level_id (int) – The ID of the level to add pages to args (array) – An array of accepted arguments specified below: Parameter Description Required Default ContentIds (array) An array of page IDs to add to the membership level Required Return Returns a […]

Function Reference: wlmapi_get_level_pages

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