| Server IP : 5.129.245.98 / Your IP : 216.73.216.246 Web Server : Apache/2.4.66 (Debian) System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/content-egg/application/components/ |
Upload File : |
<?php
namespace ContentEgg\application\components;
defined('\ABSPATH') || exit;
use ContentEgg\application\Plugin;
use ContentEgg\application\admin\PluginAdmin;
/**
* ModuleConfig abstract class file
*
* @author keywordrush.com <support@keywordrush.com>
* @link https://www.keywordrush.com
* @copyright Copyright © 2025 keywordrush.com
*/
abstract class ModuleConfig extends Config
{
protected $module_id;
protected function __construct($module_id = null)
{
if ($module_id)
{
$this->module_id = $module_id;
}
else
{
$parts = explode('\\', get_class($this));
$this->module_id = $parts[count($parts) - 2];
}
parent::__construct();
}
public function getModuleId()
{
return $this->module_id;
}
public function getModuleName()
{
return $this->getModuleInstance()->getName();
}
public function getModuleInstance()
{
return ModuleManager::factory($this->getModuleId());
}
public function page_slug()
{
return 'content-egg-modules--' . $this->getModuleId();
}
public function option_name()
{
return Plugin::slug() . '_' . $this->getModuleId();
}
public function add_admin_menu()
{
\add_submenu_page('options.php', $this->getModuleName() . ' ' . __('settings', 'content-egg') . ' ‹ Content Egg', '', 'manage_options', $this->page_slug(), array(
$this,
'settings_page'
));
}
public function settings_page()
{
\wp_enqueue_style('cegg-bootstrap5-full');
PluginAdmin::render('module_settings', array('module' => $this->getModuleInstance(), 'config' => $this));
}
public function options()
{
return array();
}
}