LLMS_Sidebars::get_sidebars()

Get a filtered array of sidebars to register


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.sidebars.php

	public static function get_sidebars() {

		$sidebars = array(
			apply_filters(
				'lifterlms_register_lesson_sidebar',
				array(
					'id'          => 'llms_course_widgets_side',
					'description' => __( 'Widgets in this area will be shown on LifterLMS courses.', 'lifterlms' ),
					'name'        => __( 'Course Sidebar', 'lifterlms' ),
				)
			),
			apply_filters(
				'lifterlms_register_course_sidebar',
				array(
					'description' => __( 'Widgets in this area will be shown on LifterLMS lessons.', 'lifterlms' ),
					'id'          => 'llms_lesson_widgets_side',
					'name'        => __( 'Lesson Sidebar', 'lifterlms' ),
				)
			),
		);

		$settings = apply_filters(
			'llms_sidebar_settings',
			array(
				'before_widget' => '<li id="%1$s" class="widget %2$s">',
				'after_widget'  => '</li>',
				'before_title'  => '<h2 class="widgettitle">',
				'after_title'   => '</h2>',
			)
		);

		foreach ( $sidebars as &$s ) {

			$s = array_merge( $settings, $s );

		}

		return $sidebars;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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