Skip to content

Instantly share code, notes, and snippets.

@vimes1984
Created March 27, 2016 02:12
Show Gist options
  • Save vimes1984/0a4cf9403e302b537f9b to your computer and use it in GitHub Desktop.
Save vimes1984/0a4cf9403e302b537f9b to your computer and use it in GitHub Desktop.
<?php
/**
* Yeticraft Extended
*
* @package yeticraft
* @author vimes1984 <churchill.c.j@gmail.com>
* @license GPL-2.0+
* @link http://buildawebdoctor.com
* @copyright 11-20-2015 BAWD
*/
/**
* Example class.
*
* @package yeticraft-extended
* @author vimes1984 <churchill.c.j@gmail.com>
*/
class exampleClass{
/**
* Plugin version, used for cache-busting of style and script file references.
*
* @since 1.0.0
*
* @var string
*/
protected $version = "1.0.0";
/**
* Unique identifier for your plugin.
*
* Use this value (not the variable name) as the text domain when internationalizing strings of text. It should
* match the Text Domain file header in the main plugin file.
*
* @since 1.0.0
*
* @var string
*/
protected $plugin_slug = "workoutanywhere";
/**
* Instance of this class.
*
* @since 1.0.0
*
* @var object
*/
protected static $instance = null;
/**
* Slug of the plugin screen.
*
* @since 1.0.0
*
* @var string
*/
protected $plugin_screen_hook_suffix = null;
/**
* Initialize the plugin by setting localization, filters, and administration functions.
*
* @since 1.0.0
*/
private function __construct() {
// Add the options page and menu item.
add_action("init", array($this, "EXAMPLE_FUNCTION"));
}
/**
* Return an instance of this class.
*
* @since 1.0.0
*
* @return object A single instance of this class.
*/
public static function get_instance() {
// If the single instance hasn"t been set, set it now.
if (null == self::$instance) {
self::$instance = new self;
}
return self::$instance;
}
/**
* Do shit at Init of wordpress
*
* @since 1.0.0
*
* @return null Return early if no settings page is registered.
*/
public function EXAMPLE_FUNCTION(){
/*
DO SHIT AT INIT OF WORDPRESS
*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment