| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Class LP_Settings_Profile |
| 5 |
* |
| 6 |
* @author ThimPress |
| 7 |
* @package LearnPress/Admin/Classes/Settings |
| 8 |
* @version 1.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
use LearnPress\Helpers\Config; |
| 12 |
|
| 13 |
defined( 'ABSPATH' ) || exit; |
| 14 |
|
| 15 |
if ( class_exists( 'LP_Settings_Profile', false ) ) { |
| 16 |
return new LP_Settings_Profile(); |
| 17 |
} |
| 18 |
|
| 19 |
class LP_Settings_Profile extends LP_Abstract_Settings_Page { |
| 20 |
|
| 21 |
/** |
| 22 |
* Constructor |
| 23 |
*/ |
| 24 |
public function __construct() { |
| 25 |
$this->id = 'profile'; |
| 26 |
$this->text = esc_html__( 'Profile', 'learnpress' ); |
| 27 |
|
| 28 |
parent::__construct(); |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* @param string $section |
| 33 |
* @param string $tab |
| 34 |
* |
| 35 |
* @return array |
| 36 |
*/ |
| 37 |
public function get_settings( $section = null, $tab = null ) { |
| 38 |
return Config::instance()->get( 'profile', 'settings' ); |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
return new LP_Settings_Profile(); |
| 43 |
|