Skip to content

Instantly share code, notes, and snippets.

@Blair2004
Last active August 10, 2018 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blair2004/cb35d22e073263fc0a7c7281eeb81d2f to your computer and use it in GitHub Desktop.
Save Blair2004/cb35d22e073263fc0a7c7281eeb81d2f to your computer and use it in GitHub Desktop.
My Module Entry
<?php
class MyEntryModule extends Tendoo_Module
{
/**
* Constructor is used to build the module
* And to register actions and filters
**/
public function __construct()
{
parent::__construct();
$this->events->add_action( 'load_dashboard', function(){
// trigger an action while opening the dashboard.
});
$this->events->add_filter( 'admin_menus', function( $menus ){
// register your menu here
}, 15, 1 );
}
}
new MyEntryModule;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment