mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 11:53:53 +02:00
adding example documentation
adding example documentation and code for how to user the admin loader via dependency injection
This commit is contained in:
parent
fbf09acbdb
commit
4504d3a4fd
1 changed files with 29 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
* Define a short description for what this class does.
|
||||
|
@ -7,9 +8,8 @@
|
|||
* @package TODO
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @TODO:
|
||||
* @TODO
|
||||
* Define a short description for what this class does.
|
||||
*
|
||||
* Define a longer description for the purpose of this class.
|
||||
|
@ -22,7 +22,33 @@
|
|||
*/
|
||||
class Plugin_Name_Admin_Loader {
|
||||
|
||||
public function run() {
|
||||
/**
|
||||
* @TODO
|
||||
* Short description. (use period)
|
||||
*
|
||||
* Long description.
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @link URL
|
||||
* @param type $plugin_name_admin TODO
|
||||
*/
|
||||
public function run( $plugin_name_admin ) {
|
||||
|
||||
/**
|
||||
* @TODO
|
||||
*
|
||||
* This function is used to define the various hooks that are used in the
|
||||
* dashboard-specific side of the plugin. This is achieved via dependency injection
|
||||
* by passing an instance of Plugin_Name_Admin into this class.
|
||||
*
|
||||
* Each hook then corresponds to a public function defined within the Plugin_Name_Admin
|
||||
* class.
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* add_action( 'save_post' array( $plugin_name_admin, 'save_post' ) );
|
||||
* add_filter( 'the_content', array( $plugin_name_admin, 'update_the_content' ) );
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue