dreaddymck / wp-plugin-class

starter class for wordpress plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp-plugin-class

starter class for wordpress plugin

example installation instructions.

shortcode: [dmck-starter-plugin]

== Installation ==

  1. Upload plugin folder to /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Add shortcode to pages or posts as needed.

Have fun. Fork. Share.

rename the values for to suite your needs

	public $plugin_title 			= '(DMCK) starter plugin';
	public $plugin_slug				= 'dmck_starter_plugin';
	public $plugin_settings_group 	= 'dmck-starter_plugin-settings-group';
	public $shortcode				= "dmck-starter_plugin";	

add content, includes to.

	function include_file($options) {
		//include (plugin_dir_path(__FILE__).'file.php');
		echo "<h1>Content</h1>";
	}

	function admin_menu_include() {
		if ( !current_user_can( 'read' ) )  {
			wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
		}
		//include ( plugin_dir_path(__FILE__).'admin.php' );			
		echo "<h1>Admin Stuff</h1>";
		
	}

About

starter class for wordpress plugin

License:GNU General Public License v2.0


Languages

Language:PHP 80.5%Language:JavaScript 13.2%Language:CSS 6.3%