Last active
August 10, 2018 00:33
-
-
Save Blair2004/cb35d22e073263fc0a7c7281eeb81d2f to your computer and use it in GitHub Desktop.
My Module Entry
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 | |
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