??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/pgtankstorage.sg/wp-content/plugins/suremails/inc/api/get-settings.php
⬅ Kembali
<?php
/**
* Settings class
*
* Handles settings and configurations for the SureMails plugin, including retrieving,
* updating settings, and cleaning up old email logs based on the retention period.
*
* @package SureMails\Inc\API
*/
namespace SureMails\Inc\API;
use SureMails\Inc\Settings;
use SureMails\Inc\Traits\Instance;
use WP_REST_Response;
use WP_REST_Server;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Settings
*
* @since 0.0.1
*/
class GetSettings extends Api_Base {
use Instance;
/**
* Route base.
*
* @var string
*/
protected $rest_base = '/get-settings';
/**
* Register API routes.
*
* @since 0.0.1
* @return void
*/
public function register_routes() {
$namespace = $this->get_api_namespace();
register_rest_route(
$namespace,
$this->rest_base,
[
[
'methods' => WP_REST_Server::CREATABLE, // POST method.
'callback' => [ $this, 'get_settings' ],
'permission_callback' => [ $this, 'validate_permission' ],
],
]
);
}
/**
* Retrieves the current settings for SureMails.
*
* @return WP_REST_Response Returns an array with the current settings.
*/
public function get_settings() {
$options = Settings::instance()->get_settings();
$misc = Settings::instance()->get_misc_settings();
$options['emailSummaryDay'] = $misc['email_summary_day'] ?? 'monday';
$options['emailSummaryActive'] = $misc['email_summary_active'] ?? 'yes';
$options['showInSidebar'] = $misc['show_in_sidebar'] ?? 'no';
$options['analytics'] = get_option( SetSettings::SUREMAILS_ANALYTICS, 'no' );
return new WP_REST_Response(
[
'success' => true,
'data' => $options,
]
);
}
}
/**
* Instantiate the Settings class to register actions and filters.
*/
GetSettings::instance();
Nama
Tipe
Ukuran
Diubah
Aksi
🐘 api-base.php
php
1.8 KB
2026-06-24 02:23
🐘 api-init.php
php
1.7 KB
2026-06-24 02:23
🐘 auth.php
php
2.4 KB
2026-06-24 02:23
🐘 content-guard.php
php
6.6 KB
2026-06-24 02:23
🐘 dashboard-data.php
php
3.8 KB
2026-06-24 02:23
🐘 delete-connection.php
php
8.4 KB
2026-06-24 02:23
🐘 delete-logs.php
php
4.4 KB
2026-06-24 02:23
🐘 email-stats.php
php
4.1 KB
2026-06-24 02:23
🐘 get-settings.php
php
1.8 KB
2026-06-24 02:23
🐘 logs.php
php
5.8 KB
2026-06-24 02:23
🐘 notice.php
php
5.1 KB
2026-06-24 02:23
🐘 onboarding.php
php
1.9 KB
2026-06-24 02:23
🐘 otto-kit.php
php
1.6 KB
2026-06-24 02:23
🐘 provider.php
php
2.6 KB
2026-06-24 02:23
🐘 recommended-plugin.php
php
4 KB
2026-06-24 02:23
🐘 resend-email.php
php
3.8 KB
2026-06-24 02:23
🐘 save-test-connection.php
php
21.2 KB
2026-06-24 02:23
🐘 send-test-email.php
php
5.2 KB
2026-06-24 02:23
🐘 set-settings.php
php
7.7 KB
2026-06-24 02:23
🐘 sure-contact-plans.php
php
3.8 KB
2026-06-24 02:23
🐘 sure-contact-provision.php
php
9.7 KB
2026-06-24 02:23
🐘 sure-contact-resend-verification.php
php
4.8 KB
2026-06-24 02:23
🐘 sure-contact-saas-disconnect.php
php
7.8 KB
2026-06-24 02:23
🐘 sure-contact-sending-domains.php
php
3.8 KB
2026-06-24 02:23
🐘 sure-contact-status.php
php
4.7 KB
2026-06-24 02:23
🐘 sure-contact-verify.php
php
1.7 KB
2026-06-24 02:23