Created
January 28, 2013 14:40
-
-
Save ericjuden/4656024 to your computer and use it in GitHub Desktop.
Object-Oriented Plugin for WordPress boilerplate
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: My Object-Oriented Plugin | |
* Plugin URI: Plugin Website Here | |
* Description: Your Description Here | |
* Author: Your Name Here | |
* Author URI: Your Website Here | |
* Version: 1.0 | |
*/ | |
class My_Object_Oriented_Plugin { | |
function __construct(){ | |
// Constructor...actions and filters go here | |
add_action('admin_init', array($this, 'admin_init')); | |
} | |
function admin_init(){ | |
echo "This is a test"; | |
} | |
} | |
// Create an instance of the class so it will run | |
$my_object_oriented_plugin = new My_Object_Oriented_Plugin(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment