BP_Learndash_Integration

Setup the bp learndash class.

Description

Source

File: bp-integrations/learndash/bp-learndash-integration.php

class BP_Learndash_Integration extends BP_Integration {

	public function __construct() {
		$this->start(
			'learndash',
			__('LearnDash', 'buddyboss'),
			'learndash',
			[
				'required_plugin' => 'sfwd-lms/sfwd_lms.php',
			]
		);
	}

	/**
	 * Register admin setting tab
	 *
	 * @since BuddyBoss 1.0.0
	 */
	public function setup_admin_integration_tab() {
		require_once trailingslashit($this->path) . 'bp-admin-learndash-tab.php';

		new BP_Learndash_Admin_Integration_Tab(
			"bp-{$this->id}",
			$this->name,
			[
				'root_path' => $this->path,
				'root_url' => $this->url,
				'required_plugin' => $this->required_plugin,
			]
		);
	}

	/**
	 * Load function files
	 *
	 * @since BuddyBoss 1.0.0
	 */
	public function includes($includes = array()) {
		parent::includes([
			'functions',
			'groups-sync/loader.php',
			'core/Core.php',
		]);
	}
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Methods

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.