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.
Parameters Parameters
- $post_id
-
(int) (Required) The ID of the post (lesson, quiz, or other focus-mode post type).
Return Return
(string) 'left' or 'right'.
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' );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 10.0.0 | Introduced. |