I would like to know the location of allValue.php file.
That’s not how it works. The value of page
doesn’t tell WP which file to load, it’s just a name, an identifier ( the menu_slug
to be specific ).
For example, we can use this code to add a top level menu page to WP Admin:
/**
* Register a custom menu page.
*/
function registerAbusAdminMenu() {
add_menu_page(
'Abus Menu',
'Abus menu',
'manage_options',
'abu',
'helloAbu'
);
}
add_action( 'admin_menu', 'registerAbusAdminMenu' );
function helloAbu() {
echo "<p>Hello Abu!</p>";
}
Notice that the menu slug parameter I chose was abu
. Some people don’t like picking a menu slug though, they use the name of the file the code is in, but that’s just coincidence. WP doesn’t use that value to load a file ( that would be a security vulnerability ), it’s the 5th argument to the function that controls what gets displayed/loaded, not a filename.
See the docs here for other functions to add submenus, options pages, etc, each function will have explanations and examples