llms_get_focus_mode_sidebar_position_options( bool $include_inherit = false )
Get focus mode sidebar position 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_sidebar_position_options( $include_inherit = false ) {
$positions = array(
'left' => __( 'Left', 'lifterlms' ),
'right' => __( 'Right', 'lifterlms' ),
);
$options = array();
if ( $include_inherit ) {
$global_value = get_option( 'lifterlms_focus_mode_sidebar_position', 'left' );
$global_label = isset( $positions[ $global_value ] ) ? $positions[ $global_value ] : $global_value;
$options[] = array(
'key' => 'inherit',
'title' => sprintf(
/* translators: %s: current global setting label */
__( 'Inherit Global Setting (%s)', 'lifterlms' ),
$global_label
),
);
}
foreach ( $positions 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. |