llms_get_focus_mode_content_width( int $post_id )

Retrieve the effective focus mode content width 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) Width value: 'full', '1600', '1180', '960', or '768'.


Top ↑

Source Source

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

function llms_get_focus_mode_content_width( $post_id ) {
	$course = llms_get_post_parent_course( $post_id );
	if ( $course ) {
		$value = $course->get( 'focus_mode_content_width' );
		if ( $value && 'inherit' !== $value ) {
			return $value;
		}
	}
	return get_option( 'lifterlms_focus_mode_content_width', '960' );
}


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.