| 1 |
<?php |
| 2 |
/** |
| 3 |
* Class LP_Settings_Profile |
| 4 |
* |
| 5 |
* @author ThimPress |
| 6 |
* @package LearnPress/Admin/Classes/Settings |
| 7 |
* @version 4.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
defined( 'ABSPATH' ) || exit; |
| 11 |
|
| 12 |
class LP_Settings_Advanced extends LP_Abstract_Settings_Page { |
| 13 |
|
| 14 |
public function __construct() { |
| 15 |
$this->id = 'advanced'; |
| 16 |
$this->text = esc_html__( 'Advanced', 'learnpress' ); |
| 17 |
|
| 18 |
parent::__construct(); |
| 19 |
} |
| 20 |
|
| 21 |
public function get_settings( $section = '', $tab = '' ) { |
| 22 |
return apply_filters( |
| 23 |
'learn_press_advanced_settings', |
| 24 |
array( |
| 25 |
array( |
| 26 |
'type' => 'title', |
| 27 |
'title' => esc_html__( 'Style', 'learnpress' ), |
| 28 |
'id' => 'lp_metabox_setting_advanced', |
| 29 |
), |
| 30 |
array( |
| 31 |
'title' => esc_html__( 'Primary color', 'learnpress' ), |
| 32 |
'desc' => sprintf( __( 'Default: %s', 'learnpress' ), '<code>#ffb606</code>' ), |
| 33 |
'id' => 'primary_color', |
| 34 |
'type' => 'color', |
| 35 |
'css' => 'width:6em;', |
| 36 |
'default' => '#ffb606', |
| 37 |
'autoload' => false, |
| 38 |
'desc_tip' => true, |
| 39 |
), |
| 40 |
array( |
| 41 |
'title' => esc_html__( 'Secondary color', 'learnpress' ), |
| 42 |
'desc' => sprintf( __( 'Default: %s', 'learnpress' ), '<code>#442e66</code>' ), |
| 43 |
'id' => 'secondary_color', |
| 44 |
'type' => 'color', |
| 45 |
'css' => 'width:6em;', |
| 46 |
'default' => '#442e66', |
| 47 |
'autoload' => false, |
| 48 |
'desc_tip' => true, |
| 49 |
), |
| 50 |
array( |
| 51 |
'type' => 'sectionend', |
| 52 |
'id' => 'lp_metabox_setting_advanced', |
| 53 |
), |
| 54 |
array( |
| 55 |
'type' => 'title', |
| 56 |
'title' => esc_html__( 'Other', 'learnpress' ), |
| 57 |
'id' => 'lp_metabox_advanced_other', |
| 58 |
), |
| 59 |
array( |
| 60 |
'title' => esc_html__( 'Enable gutenberg', 'learnpress' ), |
| 61 |
'id' => 'enable_gutenberg_course', |
| 62 |
'default' => 'no', |
| 63 |
'type' => 'checkbox', |
| 64 |
'checkboxgroup' => 'start', |
| 65 |
'desc' => esc_html__( 'Course', 'learnpress' ), |
| 66 |
), |
| 67 |
array( |
| 68 |
'id' => 'enable_gutenberg_lesson', |
| 69 |
'default' => 'no', |
| 70 |
'type' => 'checkbox', |
| 71 |
'checkboxgroup' => '', |
| 72 |
'desc' => esc_html__( 'Lesson', 'learnpress' ), |
| 73 |
), |
| 74 |
array( |
| 75 |
'id' => 'enable_gutenberg_quiz', |
| 76 |
'default' => 'no', |
| 77 |
'type' => 'checkbox', |
| 78 |
'checkboxgroup' => '', |
| 79 |
'desc' => esc_html__( 'Quiz', 'learnpress' ), |
| 80 |
), |
| 81 |
array( |
| 82 |
'id' => 'enable_gutenberg_question', |
| 83 |
'default' => 'no', |
| 84 |
'type' => 'checkbox', |
| 85 |
'checkboxgroup' => 'end', |
| 86 |
'desc' => esc_html__( 'Question', 'learnpress' ), |
| 87 |
), |
| 88 |
array( |
| 89 |
'title' => esc_html__( 'Debug Mode', 'learnpress' ), |
| 90 |
'id' => 'debug', |
| 91 |
'default' => 'no', |
| 92 |
'type' => 'checkbox', |
| 93 |
'desc' => esc_html__( 'Enable debug mode for developer.', 'learnpress' ), |
| 94 |
), |
| 95 |
// array( |
| 96 |
// 'title' => esc_html__( 'Enable Jwt Rest API', 'learnpress' ), |
| 97 |
// 'id' => 'enable_jwt_rest_api', |
| 98 |
// 'default' => 'no', |
| 99 |
// 'type' => 'checkbox', |
| 100 |
// 'desc' => esc_html__( 'Enable Rest API build for app, mobile...etc.', 'learnpress' ), |
| 101 |
// ), |
| 102 |
/*array( |
| 103 |
'title' => esc_html__( 'Hard Cache', 'learnpress' ), |
| 104 |
'id' => 'enable_hard_cache', |
| 105 |
'default' => 'no', |
| 106 |
'type' => 'checkbox', |
| 107 |
'desc' => sprintf( __( 'Enable cache for static content such as content and settings of course, lesson, quiz. <a href="%1$s">%2$s</a>', 'learnpress' ), admin_url( 'admin.php?page=learn-press-tools&tab=cache' ), esc_html__( 'Advanced', 'learnpress' ) ), |
| 108 |
),*/ |
| 109 |
array( |
| 110 |
'title' => esc_html__( 'Enable', 'learnpress' ), |
| 111 |
'id' => 'navigation_position', |
| 112 |
'default' => 'yes', |
| 113 |
'type' => 'checkbox', |
| 114 |
'desc' => esc_html__( 'Question navigation position is sticky, if not right below the quiz content', 'learnpress' ), |
| 115 |
), |
| 116 |
array( |
| 117 |
'type' => 'sectionend', |
| 118 |
'id' => 'lp_metabox_advanced_other', |
| 119 |
), |
| 120 |
) |
| 121 |
); |
| 122 |
} |
| 123 |
} |
| 124 |
|
| 125 |
return new LP_Settings_Advanced(); |
| 126 |
|