HEX
Server: Apache
System: Linux v2532718.hostpapavps.net 5.14.0-570.37.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 26 10:33:12 EDT 2025 x86_64
User: emiin2 (1016)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/emiin2/public_html/wp-content/plugins/woolentor-addons/classes/class.installer.php
<?php
namespace WooLentor;
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}
/**
 * Installer class
 */
class Installer {

    private static $instance = null;
    public static function instance() {
        if ( is_null( self::$instance ) ) {
            self::$instance = new self();
        }
        return self::$instance;
    }
    /**
     * Class Constructor
     */
    private function __construct(){
        $this->run();
    }

    /**
     * Run the installer
     *
     * @return void
     */
    public function run() {
        $this->add_version();
        $this->add_redirection_flag();
    }

    /**
     * Add time and version on DB
     */
    public function add_version() {
        $installed = get_option( 'woolentor_installed' );

        if ( ! $installed ) {
            update_option( 'woolentor_installed', time() );
        }

        update_option( 'woolentor_version', WOOLENTOR_VERSION );
    }

    /**
     * [add_redirection_flag] redirection flug
     */
    public function add_redirection_flag(){
        add_option( 'woolentor_do_activation_redirect', TRUE );
        flush_rewrite_rules();
    }


}