Created
October 3, 2013 06:48
-
-
Save hchouhan/6806022 to your computer and use it in GitHub Desktop.
MPI - 01
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: My Plugin Info | |
| Plugin URI: http://myplugininfo.com | |
| Description: Communicate with WordPress.org Plugins API to retrive your Plugin Information | |
| Version: 0.1 | |
| Author: Harish | |
| Author Email: mye@email.com | |
| License: GPL3 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| if ( ! class_exists( 'DOT_MyPluginInfo' ) ) | |
| { | |
| class DOT_MyPluginInfo { | |
| /** | |
| * Constructor | |
| */ | |
| function __construct() { | |
| //Hook up to the init action | |
| add_action( 'init', array( &$this, 'init_my_plugin_info' ) ); | |
| } | |
| /** | |
| * Runs when the plugin is initialized | |
| */ | |
| function init_my_plugin_info() { | |
| // Register the shortcode [mpi slug='my-plugin-info' field='version'] | |
| add_shortcode( 'mpi', array( &$this, 'render_mpi' ) ); | |
| } | |
| function render_mpi($atts) { | |
| } | |
| } // end class | |
| new DOT_MyPluginInfo(); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment