Last active
March 15, 2018 14:04
-
-
Save ideag/30c4c3a501bc30be1e529be88f14fac8 to your computer and use it in GitHub Desktop.
TinyTemplate
This file contains 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: TinyTemplate | |
* Version: 0.1.0 | |
*/ | |
// If this file is called directly, abort. | |
if ( ! defined( 'WPINC' ) ) { | |
die; | |
} | |
add_action( 'plugins_loaded', 'TinyTemplate' ); | |
register_activation_hook( __FILE__, array( TinyTemplate(), 'activate' ) ); | |
register_deactivation_hook( __FILE__, array( TinyTemplate(), 'deactivate' ) ); | |
register_uninstall_hook( __FILE__, array( 'TinyTemplateClass', 'uninstall' ) ); | |
function TinyTemplate() { | |
if ( false === TinyTemplateClass::$instance ) { | |
TinyTemplateClass::$instance = new TinyTemplateClass(); | |
} | |
return TinyTemplateClass::$instance; | |
} | |
class TinyTemplateClass { | |
public static $instance = false; | |
public function __construct() {} | |
public function activate() {} | |
public function deactivate() {} | |
public static function uninstall() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment