Skip to content

Instantly share code, notes, and snippets.

@ideag
Last active March 15, 2018 14:04
Show Gist options
  • Save ideag/30c4c3a501bc30be1e529be88f14fac8 to your computer and use it in GitHub Desktop.
Save ideag/30c4c3a501bc30be1e529be88f14fac8 to your computer and use it in GitHub Desktop.
TinyTemplate
<?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