llms_get_focus_mode_content_width_options( bool $include_inherit = false )
Get focus mode content width select options for course-level settings.
Parameters Parameters
- $include_inherit
-
(bool) (Optional) Whether to include the "Inherit" option with the current global value.
Default value: false
Return Return
(array) Array of key/title option arrays.
Source Source
File: includes/functions/llms.functions.template.php
function llms_get_focus_mode_content_width_options( $include_inherit = false ) {
$widths = array(
'full' => __( 'Full Width', 'lifterlms' ),
'1600' => __( 'Extra Wide (1600px)', 'lifterlms' ),
'1180' => __( 'Wide (1180px)', 'lifterlms' ),
'960' => __( 'Default (960px)', 'lifterlms' ),
'768' => __( 'Narrow (768px)', 'lifterlms' ),
);
$options = array();
if ( $include_inherit ) {
$global_value = get_option( 'lifterlms_focus_mode_content_width', '960' );
$global_label = isset( $widths[ $global_value ] ) ? $widths[ $global_value ] : $global_value;
$options[] = array(
'key' => 'inherit',
'title' => sprintf(
/* translators: %s: current global setting label */
__( 'Inherit Global Setting (%s)', 'lifterlms' ),
$global_label
),
);
}
foreach ( $widths as $key => $title ) {
$options[] = array(
'key' => $key,
'title' => $title,
);
}
return $options;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 10.0.0 | Introduced. |