| 1 |
<?php |
| 2 |
|
| 3 |
namespace ISC\Settings; |
| 4 |
|
| 5 |
use ISC\Plugin; |
| 6 |
|
| 7 |
/** |
| 8 |
* Main settings class |
| 9 |
*/ |
| 10 |
class Section { |
| 11 |
|
| 12 |
/** |
| 13 |
* Constructor |
| 14 |
*/ |
| 15 |
public function __construct() { |
| 16 |
$this->add_settings_section(); |
| 17 |
|
| 18 |
// validate settings on save |
| 19 |
add_filter( 'isc_settings_on_save_after_validation', [ $this, 'validate_settings' ], 10, 2 ); |
| 20 |
} |
| 21 |
|
| 22 |
/** |
| 23 |
* Add settings section |
| 24 |
*/ |
| 25 |
public function add_settings_section() { |
| 26 |
} |
| 27 |
|
| 28 |
/** |
| 29 |
* Validate settings |
| 30 |
* |
| 31 |
* @param array $output output data. |
| 32 |
* @param array $input input data. |
| 33 |
* |
| 34 |
* @return array $output |
| 35 |
*/ |
| 36 |
public function validate_settings( array $output, array $input ): array { |
| 37 |
return $output; |
| 38 |
} |
| 39 |
|
| 40 |
/** |
| 41 |
* Get the ISC options |
| 42 |
*/ |
| 43 |
protected function get_options() { |
| 44 |
return Plugin::get_options(); |
| 45 |
} |
| 46 |
} |
| 47 |
|