diff options
author | Zach van Rijn <me@zv.io> | 2021-07-21 14:54:07 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2021-07-21 14:54:07 -0500 |
commit | 9d4123cee1867ee7199b06bdc92d40611f547ecc (patch) | |
tree | 6d864e2725242863afed1f8ba12d9c7a9bc63a69 /inc/compatibility/lifterlms/customizer/sections/layout | |
download | blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.gz blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.bz2 blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.xz blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.zip |
Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/.
Diffstat (limited to 'inc/compatibility/lifterlms/customizer/sections/layout')
-rw-r--r-- | inc/compatibility/lifterlms/customizer/sections/layout/class-astra-lifter-general-configs.php | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/inc/compatibility/lifterlms/customizer/sections/layout/class-astra-lifter-general-configs.php b/inc/compatibility/lifterlms/customizer/sections/layout/class-astra-lifter-general-configs.php new file mode 100644 index 0000000..392e28b --- /dev/null +++ b/inc/compatibility/lifterlms/customizer/sections/layout/class-astra-lifter-general-configs.php @@ -0,0 +1,104 @@ +<?php
+/**
+ * LifterLMS General Options for our theme.
+ *
+ * @package Astra
+ * @author Brainstorm Force
+ * @copyright Copyright (c) 2020, Brainstorm Force
+ * @link https://www.brainstormforce.com
+ * @since 1.4.3
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+if ( ! class_exists( 'Astra_Lifter_General_Configs' ) ) {
+
+ /**
+ * Customizer Sanitizes Initial setup
+ */
+ class Astra_Lifter_General_Configs extends Astra_Customizer_Config_Base {
+
+ /**
+ * Register Astra-LifterLMS General Customizer Configurations.
+ *
+ * @param Array $configurations Astra Customizer Configurations.
+ * @param WP_Customize_Manager $wp_customize instance of WP_Customize_Manager.
+ * @since 1.4.3
+ * @return Array Astra Customizer Configurations with updated configurations.
+ */
+ public function register_configuration( $configurations, $wp_customize ) {
+
+ if ( defined( 'ASTRA_EXT_VER' ) && Astra_Ext_Extension::is_active( 'lifterlms' ) ) {
+ $divider_array = array( 'ast_class' => 'ast-bottom-divider' );
+ $section = 'section-lifterlms-general';
+ } else {
+ $divider_array = array();
+ $section = 'section-lifterlms';
+ }
+
+ $_configs = array(
+
+ /**
+ * Option: Course Columns
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[llms-course-grid]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'section' => $section,
+ 'default' => astra_get_option(
+ 'llms-course-grid',
+ array(
+ 'desktop' => 3,
+ 'tablet' => 2,
+ 'mobile' => 1,
+ )
+ ),
+ 'title' => __( 'Course Columns', 'astra' ),
+ 'priority' => 0,
+ 'input_attrs' => array(
+ 'step' => 1,
+ 'min' => 1,
+ 'max' => 6,
+ ),
+ 'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
+ ),
+
+ /**
+ * Option: Membership Columns
+ */
+ array(
+ 'name' => ASTRA_THEME_SETTINGS . '[llms-membership-grid]',
+ 'type' => 'control',
+ 'control' => 'ast-responsive-slider',
+ 'sanitize_callback' => array( 'Astra_Customizer_Sanitizes', 'sanitize_responsive_slider' ),
+ 'section' => $section,
+ 'default' => astra_get_option(
+ 'llms-membership-grid',
+ array(
+ 'desktop' => 3,
+ 'tablet' => 2,
+ 'mobile' => 1,
+ )
+ ),
+ 'title' => __( 'Membership Columns', 'astra' ),
+ 'priority' => 0,
+ 'input_attrs' => array(
+ 'step' => 1,
+ 'min' => 1,
+ 'max' => 6,
+ ),
+ 'divider' => $divider_array,
+ ),
+ );
+
+ return array_merge( $configurations, $_configs );
+
+ }
+ }
+}
+
+new Astra_Lifter_General_Configs();
|