| Server IP : 103.48.194.25 / Your IP : 216.73.216.74 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/sieuthimayasia.com/public_html/wp-content/plugins/wp-smtp/inc/ |
Upload File : |
<?php
namespace WPSMTP;
use SolidWP\Mail\Admin\SettingsScreen;
class Admin {
/**
* The new solid mail setting.
*
* @var false|mixed|null
*/
private $solidMailOptions;
public function __construct() {
$this->solidMailOptions = get_option( SettingsScreen::SETTINGS_SLUG );
add_action( 'admin_menu', [ $this, 'add_menu' ] );
}
public function add_menu() {
$icon_url = WPSMTP_ASSETS_URL . 'images/Solid-Mail-Icon.svg';
add_menu_page(
__( 'Kadence Mail', 'wp-smtp' ),
__( 'Kadence Mail', 'wp-smtp' ),
'manage_options',
'solidwp-mail',
[
$this,
'render_solidsmtp',
],
apply_filters( 'kadence_mail_dashboard_icon', $icon_url )
);
if ( ! isset( $this->solidMailOptions['disable_logs'] ) || 'yes' !== $this->solidMailOptions['disable_logs'] ) {
add_submenu_page(
'solidwp-mail',
__( 'Mail Logs', 'wp-smtp' ),
__( 'Mail Logs', 'wp-smtp' ),
'manage_options',
'solidwp-mail-logs',
[
$this,
'render_solidsmtp',
]
);
}
// Add the Settings submenu
add_submenu_page(
'solidwp-mail',
__( 'Settings', 'wp-smtp' ),
__( 'Settings', 'wp-smtp' ),
'manage_options',
'solidwp-mail-settings',
[
$this,
'render_solidsmtp',
]
);
}
/**
* Render the hook point for the app.
*
* @return void
*/
public function render_solidsmtp() {
require_once WPSMTP_PATH . 'src/admin-views/admin-root.php';
}
}