| Server IP : 3.147.158.171 / Your IP : 216.73.216.216 Web Server : Apache/2.4.67 (Amazon Linux) OpenSSL/3.5.5 System : Linux ip-172-31-2-178.us-east-2.compute.internal 6.1.172-216.329.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Wed May 20 06:31:34 UTC 2026 x86_64 User : ec2-user ( 1000) PHP Version : 8.4.21 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /tsai/repo/sites/scike-astronomy/wp-content/plugins/tsai-plugin/includes/ |
Upload File : |
<?php
if (!defined('ABSPATH')) {
exit;
}
/**
* Coordinator for the single "TSAI" settings page. Owns the menu entry and the
* one form/Save button. The individual domain settings classes (API, Ratings,
* Status) register their sections and fields into this page's shared slug and
* option group, so they all save together here.
*/
class TSAI_Settings {
const PAGE_SLUG = 'tsai';
const OPTION_GROUP = 'tsai';
public function __construct() {
add_action('admin_menu', array($this, 'register_menu'));
}
public function register_menu() {
add_options_page(
__('TSAI', 'tsai'),
__('TSAI', 'tsai'),
'manage_options',
self::PAGE_SLUG,
array($this, 'render_page')
);
}
public function render_page() {
if (!current_user_can('manage_options')) {
return;
}
?>
<div class="wrap">
<h1><?php echo esc_html__('TSAI', 'tsai'); ?></h1>
<form method="post" action="options.php">
<?php
settings_fields(self::OPTION_GROUP);
do_settings_sections(self::PAGE_SLUG);
submit_button();
?>
</form>
</div>
<?php
}
}
new TSAI_Settings();