REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.87 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/mp-timetable/classes/models/class-settings.php
Text
Base64
<?php namespace mp_timetable\classes\models; use mp_timetable\plugin_core\classes\Model as Model; /** * Model Events */ class Settings extends Model { protected static $instance; /** * Settings constructor. */ public function __construct() { parent::__construct(); } /** * Get instance * * @return Settings */ public static function get_instance() { if (null === self::$instance) { self::$instance = new self(); } return self::$instance; } /** * Render settings */ public function render_settings() { $data = $this->get_settings(); $this->get_view()->render_html("settings/general", array('settings' => $data), true); } /** * Get Settings * * @return mixed */ public function get_settings() { $mp_timetable_general = array( 'theme_mode' => 'theme', ); $settings = get_option('mp_timetable_general', $mp_timetable_general); if ($this->is_theme_supports()) { $settings['theme_mode'] = 'plugin'; } return $settings; } /** * Theme supports plugin mode. * * @return string */ public function is_theme_supports() { return current_theme_supports('mp-timetable'); } /** * Save meta data Column post type * */ public function save_settings() { if ( current_user_can('manage_options') && !empty( $_POST['theme_mode'] ) ) { $options = array(); $options['theme_mode'] = sanitize_key( $_POST['theme_mode'] ); update_option('mp_timetable_general', $options); } } /** * Check whether to use single room template from plugin * * @return bool */ public function is_plugin_template_mode() { return ($this->get_template_mode() === 'plugin'); } /** * Retrieve template mode. Possible values: plugin, theme. * * @return string */ public function get_template_mode() { $options = $this->get_settings(); return isset($options['theme_mode']) ? $options['theme_mode'] : 'theme'; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
class-column.php
4.75 KB
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-events.php
26.21 KB
lrw-r--r--
2025-11-11 01:28:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-export.php
17.63 KB
lrw-r--r--
2025-06-24 17:54:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-import.php
34.25 KB
lrw-r--r--
2024-08-05 16:22:22
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-settings.php
1.87 KB
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).