예제 #1
0
 function __construct($plugin_basename, $static_url = '/', $static_dir = '', $remote_get_option = array())
 {
     self::$instance = $this;
     $this->plugin_basename = $plugin_basename;
     $this->url_table = self::url_table();
     $this->init_params($static_url, $static_dir, $remote_get_option);
     add_action('wp_ajax_static_press_init', array($this, 'ajax_init'));
     add_action('wp_ajax_static_press_fetch', array($this, 'ajax_fetch'));
     add_action('wp_ajax_static_press_finalyze', array($this, 'ajax_finalyze'));
 }
 function __construct($plugin_basename, $static_url = '/', $static_dir = '', $remote_get_option = array(), $exclude_folders = 'node_modules')
 {
     self::$instance = $this;
     $this->plugin_basename = $plugin_basename;
     $this->url_table = self::url_table();
     $this->init_params($static_url, $static_dir, $remote_get_option, $exclude_folders);
     add_action('wp_ajax_static_press_init', array($this, 'ajax_init'));
     add_action('wp_ajax_static_press_fetch', array($this, 'ajax_fetch'));
     add_action('wp_ajax_static_press_finalyze', array($this, 'ajax_finalyze'));
     add_action('save_post', array($this, 'staticpress_save_single'));
     add_action('transition_post_status', array($this, 'staticpress_page_delete_unpublish'), 10, 3);
 }
예제 #3
0
<?php

if (!defined('ABSPATH') && !defined('WP_UNINSTALL_PLUGIN')) {
    exit;
}
if (!class_exists('static_press_admin')) {
    require dirname(__FILE__) . '/includes/class-static_press_admin.php';
}
if (!class_exists('static_press')) {
    require dirname(__FILE__) . '/includes/class-static_press.php';
}
delete_option(static_press_admin::OPTION_STATIC_URL);
delete_option(static_press_admin::OPTION_STATIC_DIR);
delete_option(static_press_admin::OPTION_STATIC_BASIC);
global $wpdb;
$url_table = static_press::url_table();
if ($wpdb->get_var("show tables like '{$url_table}'") != $url_table) {
    $wpdb->query("DROP TABLE `{$url_table}`");
}