Last active
October 19, 2023 14:51
-
-
Save rileypaulsen/591eaf5c45fcd683bca8 to your computer and use it in GitHub Desktop.
Basic plugin boilerplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Name | |
* Plugin URI: http:// | |
* Description: Description | |
* Version: 1.0.0 | |
* Author: Name | |
* Author URI: http:// | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
* Text Domain: plugin-name | |
* Domain Path: /languages | |
*/ | |
if( !class_exists('ClassName') ){ | |
class ClassName { | |
public function __construct() { | |
add_action( 'init', [$this, 'init'] ); | |
} | |
public function init(){ | |
//start adding hooks (add_action and/or add_filter) here | |
} | |
} | |
new ClassName(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment