1. Home
  2. Knowledge Base
  3. API
  4. Function Reference
  5. Function Reference: wlmapi_get_level_pages

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] => Array
                        (
                            [ID] => 159
                            [name] => News Feed
                            [_more_] => /levels/1340726008/pages/159
                        )

                    [1] => Array
                        (
                            [ID] => 145
                            [name] => Chat
                            [_more_] => /levels/1340726008/pages/145
                        )

                )

        )

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

)

Notes

This functions returns WLMAPIMethods::get_level_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