| Server IP : 104.21.25.182 / Your IP : 216.73.217.93 Web Server : Apache System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64 User : nobi37te ( 1003) PHP Version : 8.2.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/nobi37te/www/wp-content/plugins/buddyboss-platform/bp-performance/classes/ |
Upload File : |
<?php
/**
* BuddyBoss Performance helper.
*
* @package BuddyBoss\Performance\Helper
*/
namespace BuddyBoss\Performance;
/**
* Cache Helper class.
*/
class Helper {
/**
* Class instance.
*
* @var object
*/
private static $instance;
/**
* Class instance.
*
* @return Helper
*/
public static function instance() {
if ( ! isset( self::$instance ) ) {
$class_name = __CLASS__;
self::$instance = new $class_name();
self::$instance->initialize(); // run the hooks.
}
return self::$instance;
}
/**
* Initialisation of class.
*/
public function initialize() {
}
/**
* Get the settings.
*
* @param null $setting_key Key name of settings.
* @param string $group setting groups.
* @param bool $default_value default value.
*
* @return mixed|null
*/
public function get_app_settings( $setting_key = null, $group = 'default', $default_value = true ) {
// Currently, we are supporting only BuddyBoss App Settings.
$settings = \BuddyBoss\Performance\Settings::get_settings( $group );
if ( ! empty( $setting_key ) ) {
return isset( $settings[ $setting_key ] ) ? $settings[ $setting_key ] : $default_value;
} else {
return $settings;
}
}
}