creating a new admin panel tab
-
Hi,
I’m begenning an fairly ambition plugin project and i’m struggling to find documentation on how to do a few things.
I would like my plougin to create it’s own tab in the admin area, on the top level, called “list-admin”. i have seen many, many plugins do this, and tried to pick apart their code, but have failed. is there documentation on how this works somewhere? am i missing it?
I believe this is the code snippet from a popular ratings plugin that does what I want. but I don’t understand how it’s doing it.
add_action(‘admin_menu’, ‘ratings_menu’);
function ratings_menu() {
if (function_exists(‘add_menu_page’)) {
add_menu_page(__(‘Ratings’), __(‘Ratings’), ‘manage_ratings’, ‘postratings/postratings-manager.php’);
}
if (function_exists(‘add_submenu_page’)) {
add_submenu_page(‘postratings/postratings-manager.php’, __(‘Manage Ratings’), __(‘Manage Ratings’), ‘manage_ratings’, ‘postratings/postratings-manager.php’);
add_submenu_page(‘postratings/postratings-manager.php’, __(‘Ratings Options’), __(‘Ratings Options’), ‘manage_ratings’, ‘postratings/postratings-options.php’);
}
}thanks for your help.
- The topic ‘creating a new admin panel tab’ is closed to new replies.