1. Home
  2. API
  3. Function Reference
  4. 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

Updated on May 22, 2020

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Submit Ticket

Leave a Comment