MP_Register::register_menu()
Register menu.
Return Return
(array)
- 'The'
(string) Mortgage Platform page's hook_suffix. - 'The'
(string|false) Mortgage Platform settings page's hook_suffix, or false if the user does not have the capability required.
Source Source
File: mortgage-platform/Inc/Base/MP_Register.php
public function register_menu() {
$menu_page = add_menu_page(
MortgagePlatform::$plugin_name,
MortgagePlatform::$plugin_name,
'manage_options',
MortgagePlatform::$domain,
array( $this, 'admin_index' ),
'dashicons-calculator',
'69'
);
$settings = add_submenu_page(
MortgagePlatform::$domain,
MortgagePlatform::$plugin_name,
__( 'Settings', 'mortgage_platform' ),
'manage_options',
MortgagePlatform::$domain,
array( $this, 'admin_index' )
);
add_action( 'admin_print_scripts-' . $settings, array( new MP_Enqueue(), 'google_charts_scripts' ) );
return array($menu_page,$settings);
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |