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

Function Reference: wlmapi_unmanage_post

Un-protects posts and removes them from the membership level.

Parameters

  • level_id (int) – The ID of the level to remove posts from
  • post_ids (int) – Accepts an array or comma-seprated list of post IDs

Return

Returns a multi-dimensional array containing operation status for each post.

Example Code

<?php
     $posts = wlmapi_unmanage_post(1340726008, '1,60,62');
     print_r($posts);
?>

Example Output

Array
(
    [0] => Array
        (
            [success] => 1
            [supported_verbs] => Array
                (
                    [0] => GET
                    [1] => DELETE
                )

        )

    [1] => Array
        (
            [success] => 1
            [supported_verbs] => Array
                (
                    [0] => GET
                    [1] => DELETE
                )

        )

    [2] => Array
        (
            [success] => 1
            [supported_verbs] => Array
                (
                    [0] => GET
                    [1] => DELETE
                )

        )

)

Notes

This functions returns WLMAPIMethods::unmanage_post($level_id, $post_ids) 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