diff --git a/README.txt b/README.txt index 807db68..36b9ea8 100644 --- a/README.txt +++ b/README.txt @@ -3,7 +3,7 @@ Contributors: leonstafford Tags: wp2static,netlify,static Requires at least: 3.2 Tested up to: 5.4 -Stable tag: 1.0-alpha-004 +Stable tag: 1.0-alpha-005 License: Unlicense License URI: http://unlicense.org diff --git a/src/Controller.php b/src/Controller.php index abf20bf..3581931 100755 --- a/src/Controller.php +++ b/src/Controller.php @@ -4,14 +4,6 @@ namespace WP2StaticNetlify; class Controller { public function run() : void { - // check for seed data - // if deployment_url option doesn't exist, create: - $options = $this->getOptions(); - - if ( ! isset( $options['siteID'] ) ) { - $this->seedOptions(); - } - add_filter( 'wp2static_add_menu_items', [ 'WP2StaticNetlify\Controller', 'addSubmenuPage' ] @@ -30,12 +22,6 @@ class Controller { 15, 1 ); - - // if ( defined( 'WP_CLI' ) ) { - // \WP_CLI::add_command( - // 'wp2static netlify', - // [ 'WP2StaticNetlify\CLI', 'netlify' ]); - // } } /** @@ -150,6 +136,13 @@ class Controller { require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $sql ); + // check for seed data + // if deployment_url option doesn't exist, create: + $options = self::getOptions(); + + if ( ! isset( $options['siteID'] ) ) { + self::seedOptions(); + } } public static function deactivate_for_single_site() : void { diff --git a/uninstall.php b/uninstall.php index fa9b9b4..61f9d9b 100644 --- a/uninstall.php +++ b/uninstall.php @@ -1,31 +1,12 @@ prefix . 'wp2static_addon_netlify_options'; + +$wpdb->query( "DROP TABLE IF EXISTS $table_name" ); diff --git a/wp2static-addon-netlify.php b/wp2static-addon-netlify.php index eb85d5d..a5128ae 100644 --- a/wp2static-addon-netlify.php +++ b/wp2static-addon-netlify.php @@ -4,7 +4,7 @@ * Plugin Name: WP2Static Add-on: Netlify Deployment * Plugin URI: https://wp2static.com * Description: Netlify deployment add-on for WP2Static. - * Version: 1.0-alpha-004 + * Version: 1.0-alpha-005 * Author: Leon Stafford * Author URI: https://ljs.dev * License: Unlicense @@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) { } define( 'WP2STATIC_NETLIFY_PATH', plugin_dir_path( __FILE__ ) ); -define( 'WP2STATIC_NETLIFY_VERSION', '1.0-alpha-004' ); +define( 'WP2STATIC_NETLIFY_VERSION', '1.0-alpha-005' ); require WP2STATIC_NETLIFY_PATH . 'vendor/autoload.php';