Skip to content

Commit

Permalink
Added main plugin PHP file
Browse files Browse the repository at this point in the history
  • Loading branch information
W1W1-M committed Jul 5, 2023
1 parent a408185 commit df4282c
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions wp-plugintemplate/wp-plugintemplate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php /** @noinspection PhpRedundantClosingTagInspection */

/**
* WP-plugintemplate
*
* @package WP-plugintemplate
* @version 1.0.0
* @author William Mead - Manche Numérique
* @copyright 2023 Manche Numérique
* @license GPL-3.0-or-later
*
* @wordpress-plugin
* Plugin Name: WP-plugintemplate
* Plugin URI: https://git.manche.io/wordpress/wpplugintemplate
* Description: Plugin description
* Version: 1.0.0
* Requires at least: 6.0.5
* Requires PHP: 7.4.33
* Author: William Mead - Manche Numérique
* Author URI: https://www.manchenumerique.fr
* License: GNU GPLv3
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
* Text Domain: wp-plugintemplate
* Domain Path: /lang
*/

const WP_PLUGINTEMPLATE_PLUGIN_FILE_PATH = __FILE__;

wp_plugintemplate_setup();

/**
* @since 1.0.0
*
* @return void
*/
function wp_plugintemplate_setup(): void {
try {
wp_plugintemplate_require_once();
$wp_plugintemplate_setup = new WP_tarteaucitron_Setup();
$wp_plugintemplate_setup->init();
} catch ( Exception $exception ) {
exit( $exception->getMessage() );
}
}

/**
* @since 1.0.0
*
* @return void
*/
function wp_plugintemplate_require_once(): void {
$plugin_dir_path = plugin_dir_path( WP_PLUGINTEMPLATE_PLUGIN_FILE_PATH );
require_once $plugin_dir_path . 'inc/WP_plugintemplate_Setup.php';
require_once $plugin_dir_path . 'admin/WP_plugintemplate_Options.php';
}

?>

0 comments on commit df4282c

Please sign in to comment.