llms_get_focus_mode_sidebar_position( int $post_id )

Retrieve the effective focus mode sidebar position for a post.


Description Description

Checks the parent course setting first (for lesson/quiz), then falls back to global.


Top ↑

Parameters Parameters

$post_id

(int) (Required) The ID of the post (lesson, quiz, or other focus-mode post type).


Top ↑

Return Return

(string) 'left' or 'right'.


Top ↑

Source Source

File: includes/functions/llms.functions.template.php

function llms_get_focus_mode_sidebar_position( $post_id ) {
	$course = llms_get_post_parent_course( $post_id );
	if ( $course ) {
		$value = $course->get( 'focus_mode_sidebar_position' );
		if ( $value && 'inherit' !== $value ) {
			return $value;
		}
	}
	return get_option( 'lifterlms_focus_mode_sidebar_position', 'left' );
}


Top ↑

Changelog Changelog

Changelog
Version Description
10.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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