HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: /home/honghock/public_html/wp-content/plugins/be-gdpr/includes/class-be-gdpr-options.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class Be_Gdpr_Options {

    private static $instance;
    private $options;

	public static function getInstance() {
        if ( null == self::$instance ) {
            self::$instance = new self;
        }
 
        return self::$instance;		
	}

	private function __construct() {
        $this->options = array();
    }

    public function register_option( $id, $option) {
        if( !empty( $id ) && !empty( $option ) && is_array( $option ) )  {
            $this->options[$id] = $option; 
        }
    }

    public function deregister_option( $id ) {
        if( !empty( $id ) ) {
            if( array_key_exists( $id, $this->options ) ) {
                unset( $this->options[$id] );
            }
        }
    }


	public function setup_hooks() {
		do_action( 'be_gdpr_register_options' );
		do_action( 'be_gdpr_deregister_options' );
    }
    
    public function get_options() {
        return $this->options;
    }

}