LLMS_Admin_Assets::is_llms_page()

Determine if the current screen should load LifterLMS assets


Return Return

(bool)


Top ↑

Source Source

File: includes/admin/class.llms.admin.assets.php

	public function is_llms_page() {

		$screen = get_current_screen();

		$id = str_replace( 'edit-', '', $screen->id );

		if ( false !== strpos( $id, 'lifterlms' ) ) {
			return true;
		} elseif ( false !== strpos( $id, 'llms' ) ) {
			return true;
		} elseif ( in_array( $id, array( 'course', 'lesson' ), true ) ) {
			return true;
		} elseif ( ! empty( $screen->post_type ) && post_type_supports( $screen->post_type, 'llms-membership-restrictions' ) ) {
			return true;
		} elseif ( in_array( $screen->id, array( 'users' ), true ) ) {
			return true;
		}

		return false;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.7.0
3.19.4 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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