Skip to content

Commit

Permalink
few update
Browse files Browse the repository at this point in the history
  • Loading branch information
prappo committed Aug 22, 2024
1 parent 3ae530f commit abaab02
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions docs/plugin/wordpress-plugin-boilerplate/uninstall.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<?php
// If uninstall not called from WordPress, then exit
/**
* If uninstall not called from WordPress, then exit.
*
* @since 1.0.0
* @package WordPress Plugin Boilerplate
*/

use MyPlugin\Database\Migrations\Accounts;

if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
exit;
}

require_once __DIR__ . '/vendor/autoload.php';
require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';

// delete tables from database which is created by this plugin
// delete tables from database which is created by this plugin.
Accounts::down();
6 changes: 3 additions & 3 deletions my-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

defined( 'ABSPATH' ) || exit;

require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/plugin.php';
require_once plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
require_once plugin_dir_path( __FILE__ ) . '/plugin.php';

/**
* Initializes the Myplugin plugin when plugins are loaded.
Expand All @@ -33,4 +33,4 @@ function myplugin_init() {
add_action( 'plugins_loaded', 'myplugin_init' );

// Hook for plugin activation.
register_activation_hook( __FILE__, array( Install::get_instance(), 'init' ) );
// register_activation_hook( __FILE__, array( Install::get_instance(), 'init' ) );

0 comments on commit abaab02

Please sign in to comment.