REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.82 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/metform/core/integrations/onboard/classes/utils.php
Text
Base64
<?php namespace MetForm\Core\Integrations\Onboard\Classes; defined( 'ABSPATH' ) || exit; class Utils{ public static $instance = null; private static $key = 'metform_onboard_options'; public static function get_dir(){ return \MetForm\Plugin::instance()->core_dir() . 'integrations/onboard/'; } public static function get_url(){ return \MetForm\Plugin::instance()->core_dir() . 'integrations/onboard/'; } public function get_option($key, $default = ''){ $data_all = get_option(self::$key); return (isset($data_all[$key]) && $data_all[$key] != '') ? $data_all[$key] : $default; } public function save_option($key, $value = ''){ $data_all = get_option(self::$key); if (!is_array($data_all)) { $data_all = []; } $data_all[$key] = $value; update_option(self::$key, $data_all); } public function get_settings($key, $default = ''){ $data_all = $this->get_option('settings', []); return (isset($data_all[$key]) && $data_all[$key] != '') ? $data_all[$key] : $default; } public function save_settings($new_data = []){ $data_old = $this->get_option('settings', []); if (!is_array($data_old)) { $data_old = []; } if (!is_array($new_data)) { $new_data = []; } $data = array_merge($data_old, $new_data); $this->save_option('settings', $data); } /* -> this method used to check weather the widget active/deactive -> this method takes two paramitter 1. widget name 2. Active/deactive hook */ public function is_widget_active_class( $widget_name, $pro_active ){ if($pro_active){ return 'label-'.esc_attr($widget_name).' attr-panel-heading'; }else{ return 'label-'.esc_attr($widget_name).' attr-panel-heading pro-disabled'; } } public function input($input_options){ $defaults = [ 'type' => null, 'name' => '', 'value' => '', 'class' => '', 'label' => '', 'info' => '', 'disabled' => '', 'options' => [], ]; $input_options = array_merge($defaults, $input_options); if(file_exists(self::get_dir() . 'controls/settings/' . $input_options['type'] . '.php')){ extract($input_options); include self::get_dir() . 'controls/settings/' . $input_options['type'] . '.php'; } } public static function strify($str){ return strtolower(preg_replace("/[^A-Za-z0-9]/", "__", $str)); } public static function instance() { if ( is_null( self::$instance ) ) { // Fire the class instance self::$instance = new self(); } return self::$instance; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ajax.php
4.03 KB
lrw-r--r--
2025-07-28 10:52:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-data-sender.php
3.26 KB
lrw-r--r--
2025-07-14 13:00:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-installer.php
3.19 KB
lrw-r--r--
2025-07-28 10:52:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-skin.php
471 B
lrw-r--r--
2025-07-28 10:52:50
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugin-status.php
2.92 KB
lrw-r--r--
2021-11-28 17:17:08
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.php
2.82 KB
lrw-r--r--
2026-05-03 15:35:04
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).