LLMS_Admin_Meta_Boxes::is_llms_post_type( WP_Post $post )

Check whether the post is a LifterLMS post type.


Parameters Parameters

$post

(WP_Post) (Required) WP_Post instance.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/admin/post-types/class.llms.meta.boxes.php

	public function is_llms_post_type( $post ) {
		$post_types = array(
			'course',
			'section',
			'lesson',
			'llms_order',
			'llms_email',
			'llms_certificate',
			'llms_my_certificate',
			'llms_achievement',
			'llms_my_achievement',
			'llms_engagement',
			'llms_membership',
			'llms_quiz',
			'llms_question',
			'llms_coupon',
			'llms_voucher',
		);

		/**
		 * Filters the post type names that are secific of LifterLMS.
		 *
		 * Used to determine whether or not fire actions of the type "lifterlms_process_{$post->post_type}_meta" on save.
		 *
		 * @since 6.0.0
		 *
		 * @param string[] $post_types Array of post type names.
		 * @param WP_Post  $post       WP_Post instance.
		 */
		$post_types = apply_filters( 'llms_metaboxes_llms_post_types', $post_types, $post );

		if ( in_array( $post->post_type, $post_types, true ) ) {
			return true;
		}
	}


Top ↑

Changelog Changelog

Changelog
Version Description
unknown unknown
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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