LLMS_Meta_Box_Access::get_screens()
Determine which screens to display the metabox on This is determined by finding all public post types and checking if they support the ‘llms-membership-restrictions’ feature Developers can add post types by adding the desired post type to the array of default post types by filtering “llms_membership_restricted_post_types”
Description Description
Return Return
(array)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.access.php
public function get_screens() { $screens = array(); // get all public post types // non public can't be restricted for hopefully obvious reasons foreach ( get_post_types( array( 'public' => true, ), 'names', 'and' ) as $post_type ) { // check if the post type supports membership restrictions if ( post_type_supports( $post_type, 'llms-membership-restrictions' ) ) { $screens[] = $post_type; } } return $screens; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |