# learnpress/4.3.8/inc/ExternalPlugin/Elementor/Widgets/Course/SingleCourseBaseElementor.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.3.8. 102 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.3.8/code/inc/ExternalPlugin/Elementor/Widgets/Course/SingleCourseBaseElementor.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.3.8/raw/inc/ExternalPlugin/Elementor/Widgets/Course/SingleCourseBaseElementor.php
- Modified: 2026-06-01T03:47:14+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.3.8/code/inc/ExternalPlugin/Elementor/Widgets/Course/SingleCourseBaseElementor.php#L10-L20`.

```php
<?php
/**
 * Class SingleInstructorBaseElementor
 *
 * Has general methods for sections single instructor widgets use
 *
 * @sicne 4.2.3
 * @version 1.0.0
 */

namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course;

use LearnPress\ExternalPlugin\Elementor\LPElementor;
use LearnPress\Models\CourseModel;
use LP_Course;

trait SingleCourseBaseElementor {
	/**
	 * @var string $title
	 */
	public $title = '';
	/**
	 * @var string $prefix_name;
	 */
	private $prefix_name = 'learnpress_';
	/**
	 * @var string $name;
	 */
	public $name = '';
	/**
	 * @var string $icon
	 */
	public $icon;
	/**
	 * @var string[] key search widget
	 */
	public $keywords = array();
	/**
	 * @var array Controls
	 */
	public $controls = array();
	/**
	 * @var array Controls
	 */
	public $categories = array( LPElementor::CATE_COURSE );

	public function get_title() {
		return $this->title;
	}

	public function get_name() {
		return $this->prefix_name . $this->name;
	}

	public function get_icon() {
		return $this->icon ?? 'eicon-site-logo';
	}

	public function get_keywords() {
		return array_push( $this->keywords, 'learnpress' );
	}

	public function get_categories() {
		return $this->categories;
	}

	public function get_help_url() {
		return '';
	}

	/**
	 * 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 );
	}
}

```
