MPI - Base
[php]
<?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();
}
?>
[/php]