public static function get_options()
 {
     if (!self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 private function __construct()
 {
     $plugin_main_file = plugin_dir_path(__FILE__) . 'wp-offline-content.php';
     $this->options = WP_Offline_Content_Options::get_options();
     $this->set_urls();
     $this->setup_sw();
     register_activation_hook($plugin_main_file, array($this, 'activate'));
     register_deactivation_hook($plugin_main_file, array($this, 'deactivate'));
 }
 private function __construct()
 {
     $this->options = WP_Offline_Content_Options::get_options();
     add_action('admin_menu', array($this, 'admin_menu'));
     add_action('admin_init', array($this, 'admin_init'));
 }
Exemplo n.º 4
0
<?php

if (!defined('WP_UNINSTALL_PLUGIN')) {
    exit;
}
include_once plugin_dir_path(__FILE__) . 'class-wp-offline-content-options.php';
WP_Offline_Content_Options::get_options()->remove_all();