Retrieves all information about the specified membership level.
Parameters
- level_id (int) – The ID of the level to retrieve
Return
Returns a multi-dimensional array containing data for the specified membership level.
Example Code
<?php $level = wlmapi_get_level(1340726008); print_r($level); ?>
Example Output
Array ( [success] => 1 [level] => Array ( [id] => 1340726008 [name] => Test Level 1 [registration_url] => bjkpz8 [after_login_redirect] => global [after_registration_redirect] => global [access_all_pages] => 0 [access_all_categories] => 0 [access_all_posts] => 0 [access_all_comments] => 0 [no_expiry] => 1 [expiry] => [expiry_period] => [sequential_upgrade_to] => [sequential_upgrade_after] => [sequential_upgrade_method] => [member_count] => 3 [require_captcha] => 0 [require_email_confirmation] => 0 [require_admin_approval] => 0 [grant_continued_access] => 0 [disable_existing_users_link] => 0 [registration_date_reset] => 0 [uncancel_on_registration] => 0 [wordpress_role] => subscriber [level_order] => [remove_from_levels] => [_more_] => Array ( [0] => /levels/1340726008/members [1] => /levels/1340726008/posts [2] => /levels/1340726008/pages [3] => /levels/1340726008/comments [4] => /levels/1340726008/categories ) ) [supported_verbs] => Array ( [0] => GET [1] => PUT [2] => DELETE ) )
Notes
This functions returns WLMAPIMethods::get_level($level_id) in core/api-helper/class-api-methods.php