I can’t display the submenu of my menu when creating a plugin (Beginner).
Could you please help me to find my error?
My plugin is well activated and the menu_page appears well
add_action('admin_menu','tictac_admin_menu_option');
function tictac_admin_menu_option()
{
add_menu_page(
'Gestion des Horaires',
'Time Control',
'manage_options',
'tictac_admin_menu',
'tictac_scripts_page',
//plugins_url( 'time-control/admin/logo/tictac-logo.png' ),
'dashicons-calendar-alt'
//16
);
add_submenu_page('tictac_admin_menu',
'Sous menu Opening',
'Options Opening',
'tictac_admin_submenu',
'tictac_scripts_menu',
'tictac_opening_submenu'
);
}
function tictac_opening_submenu()
{
?>
<div id="wrap">
<h1>Add Opening</h1>
</div>
<?php
}