LLMS_Post_Types::add_membership_restriction_support()

Add post type support for membership restrictions


Description Description

This enables the "Membership Access" metabox to display


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.post-types.php

	public static function add_membership_restriction_support() {

		/**
		 * Add llms-membership-restrictions support for the following post types.
		 *
		 * Adding support for a post type enables the display of the Membership Restriction metabox
		 * for each specified post type.
		 *
		 * These post types can then be "restricted" to enrollment in the selected memberships.
		 *
		 * @since Unknown
		 *
		 * @param string[] $post_types Array of post type names.
		 */
		$post_types = apply_filters( 'llms_membership_restricted_post_types', array( 'post', 'page' ) );
		foreach ( $post_types as $post_type ) {
			add_post_type_support( $post_type, 'llms-membership-restrictions' );
		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.4 Unknown.
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.