1. Home
  2. Knowledge Base
  3. API
  4. Function Reference
  5. Function Reference: wlmapi_get_protected_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] => 145
                            [name] => Chat
                        )

                    [1] => stdClass Object
                        (
                            [ID] => 159
                            [name] => News Feed
                        )

                )

        )

    [supported_verbs] => Array
        (
            [0] => GET
            [1] => POST
        )

)

Notes

This functions returns WLMAPIMethods::get_protected_pages($level_id) in core/api-helper/class-api-methods.php

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support