44
wp-plugin-base.php
Normal file
44
wp-plugin-base.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Plugin Name: wp-plugin-base
|
||||
* Plugin URI: https://git.prettysunflower.moe/prettysunflower/wp-plugin-base
|
||||
* Description: Template for new WordPress plugins.
|
||||
* Version: 1
|
||||
* Requires PHP: 8.1
|
||||
* Author: prettysunflower
|
||||
* Author URI: https://prettysunflower.moe/
|
||||
* License: Public Domain
|
||||
*/
|
||||
|
||||
namespace wp_plugin_base;
|
||||
|
||||
if (! defined('ABSPATH')) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
function on_activation(): void
|
||||
{
|
||||
}
|
||||
|
||||
register_activation_hook(__FILE__, __NAMESPACE__ . '\on_activation');
|
||||
|
||||
function on_deactivation(): void
|
||||
{
|
||||
}
|
||||
|
||||
register_deactivation_hook(__FILE__, __NAMESPACE__ . '\on_deactivation');
|
||||
|
||||
function on_uninstall(): void
|
||||
{
|
||||
}
|
||||
|
||||
register_uninstall_hook(__FILE__, __NAMESPACE__ . '\on_uninstall');
|
||||
|
||||
function on_init(): void
|
||||
{
|
||||
}
|
||||
|
||||
add_action('init', __NAMESPACE__ . '\on_init');
|
Reference in New Issue
Block a user