Pridėti prie skydelio papildomą menu punktą
function add_toplevel_menu() {
add_menu_page(
'Custom menu page title',
'Custom page menu title',
'manage_options',
'custome_menu_slug',
'custom_menu_display_settings_page',
'dashicons-admin-generic',
null
);
}
add_action( 'admin_menu', 'add_toplevel_menu' );
// display the plugin settings page
function custom_menu_display_settings_page() {
// check if user is allowed access
if ( ! current_user_can( 'manage_options' ) ) return;
?>
<div class="wrap">
<h1><?php echo "Custome menu page here"; ?>
</div>
<?php
}
?>