Astra_Customizer_Learndash_General_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )
Register General Customizer Configurations.
Description
Parameters
- $configurations
-
(Array) (Required) Astra Customizer Configurations.
- $wp_customize
-
(WP_Customize_Manager) (Required) instance of WP_Customize_Manager.
Return
(Array) Astra Customizer Configurations with updated configurations.
Source
File: addons/learndash/classes/sections/class-astra-customizer-learndash-general-configs.php
public function register_configuration( $configurations, $wp_customize ) {
$_configs = array(
/**
* Option: Distraction Free Learning
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[learndash-distraction-free-learning]',
'default' => astra_get_option( 'learndash-distraction-free-learning' ),
'type' => 'control',
'section' => 'section-learndash',
'title' => __( 'Enable Distraction Free Learning', 'astra-addon' ),
'description' => __( 'Remove extra links in the header and footer in LearnDash learning pages', 'astra-addon' ),
'priority' => 5,
'control' => Astra_Theme_Extension::$switch_control,
'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
),
/**
* Option: Enable Header Profile Link
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[learndash-profile-link-enabled]',
'default' => astra_get_option( 'learndash-profile-link-enabled' ),
'type' => 'control',
'section' => 'section-learndash',
'title' => __( 'Display Student\'s Gravatar in Primary Header', 'astra-addon' ),
'priority' => 10,
'control' => Astra_Theme_Extension::$switch_control,
),
/**
* Option: Profile Link
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[learndash-profile-link]',
'default' => astra_get_option( 'learndash-profile-link' ),
'type' => 'control',
'control' => 'text',
'section' => 'section-learndash',
'title' => __( 'Profile Picture Links to:', 'astra-addon' ),
'priority' => 15,
'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
'context' => array(
astra_addon_builder_helper()->general_tab_config,
array(
'setting' => ASTRA_THEME_SETTINGS . '[learndash-profile-link-enabled]',
'operator' => '==',
'value' => true,
),
),
),
/**
* Option: Table Border Radius
*/
array(
'name' => ASTRA_THEME_SETTINGS . '[learndash-table-border-radius]',
'default' => astra_get_option( 'learndash-table-border-radius' ),
'type' => 'control',
'transport' => 'postMessage',
'control' => 'ast-slider',
'title' => __( 'Table Border Radius', 'astra-addon' ),
'section' => 'section-learndash',
'suffix' => 'px',
'priority' => 35,
'divider' => array(
'ast_class' => 'ast-top-divider',
),
'input_attrs' => array(
'min' => 0,
'step' => 1,
'max' => 50,
),
),
);
return array_merge( $configurations, $_configs );
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.4.3 | Introduced. |