# learnpress/4.4.1/inc/ExternalPlugin/Elementor/LPDynamicElementor.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.1. 70 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.1/code/inc/ExternalPlugin/Elementor/LPDynamicElementor.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.1/raw/inc/ExternalPlugin/Elementor/LPDynamicElementor.php
- Modified: 2026-06-26T11:19:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.1/code/inc/ExternalPlugin/Elementor/LPDynamicElementor.php#L10-L20`.

```php
<?php
/**
 * Class LPDynamicElementor
 * Declare base properties for dynamic course elementor
 *
 * @since 4.2.3.5
 * @version 1.0.0
 */
namespace LearnPress\ExternalPlugin\Elementor;

use Elementor\Modules\DynamicTags\Module;
use LearnPress\Models\CourseModel;
use LP_Course;

defined( 'ABSPATH' ) || exit;

trait LPDynamicElementor {
	public $lp_dynamic_name       = '';
	public $lp_dynamic_categories = [ Module::TEXT_CATEGORY ];
	public $lp_dynamic_title      = '';
	public $lp_dynamic_group      = LPElementor::GROUP_DYNAMIC;

	public function get_name() {
		return $this->lp_dynamic_name;
	}

	public function get_categories() {
		return $this->lp_dynamic_categories;
	}

	public function get_group() {
		return $this->lp_dynamic_group;
	}

	public function get_title() {
		return $this->lp_dynamic_title;
	}

	/**
	 * Get course
	 *
	 * @return bool|LP_Course|mixed
	 * @deprecated 4.2.7.3
	 */
	public function get_course() {
		$id = get_the_ID();
		if ( ! $id ) {
			return false;
		}

		return learn_press_get_course( $id );
	}

	/**
	 * Get course
	 *
	 * @return false|CourseModel
	 * @since 4.2.7.3
	 * @version 1.0.0
	 */
	public function get_course_model() {
		$id = get_the_ID();
		if ( ! $id ) {
			return false;
		}

		return CourseModel::find( $id, true );
	}
}

```
