Fires when the Groundhogg admin menu is initialised. This is the correct place to register new admin pages or add items to the Groundhogg menu.
do_action( 'groundhogg/admin/init', $admin_menu );
You will receive the Admin_Menu manager instance.
Example
add_action( 'groundhogg/admin/init', 'my_extension_register_admin_page' );
/**
* Register a custom admin page under the Groundhogg menu.
*
* @param \Groundhogg\Admin\Admin_Menu $admin_menu
*
* @return void
*/
function my_extension_register_admin_page( $admin_menu ) {
$admin_menu->add_page( new My_Extension_Admin_Page() );
}
Was this helpful?
Let us know if this document answered your question. Thatβs the only way we can improve.
