0
0
Wordpressframework~5 mins

Admin menu pages in Wordpress - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of admin menu pages in WordPress?
Admin menu pages let you add new sections or pages in the WordPress dashboard for managing settings or content related to your plugin or theme.
Click to reveal answer
beginner
Which WordPress function is used to add a new top-level admin menu page?
The function add_menu_page() is used to create a new top-level menu item in the WordPress admin sidebar.
Click to reveal answer
intermediate
What parameters does add_menu_page() require?
It requires: page title, menu title, capability (who can see it), menu slug (unique ID), callback function to display content, icon URL or dashicon, and position in the menu.
Click to reveal answer
intermediate
How do you add a submenu page under an existing admin menu in WordPress?
Use the add_submenu_page() function, specifying the parent slug, page title, menu title, capability, menu slug, and callback function.
Click to reveal answer
beginner
Why is it important to check user capabilities when adding admin menu pages?
Checking capabilities ensures only authorized users can see or access the menu pages, keeping the admin area secure and organized.
Click to reveal answer
Which function adds a new top-level admin menu page in WordPress?
Aadd_menu_page()
Badd_admin_page()
Ccreate_menu_page()
Dregister_menu_page()
What does the 'capability' parameter control in admin menu functions?
AThe icon shown in the menu
BWho can see and access the menu page
CThe position of the menu item
DThe URL of the menu page
Which parameter in add_menu_page() defines the function that outputs the page content?
Amenu_slug
Bicon_url
Cpage_title
Dcallback
To add a submenu page under 'Settings', which parent slug should you use?
Aedit.php
Btools.php
Coptions-general.php
Dadmin.php
What happens if you do not check user capabilities when adding admin menu pages?
AAll users, including unauthorized ones, can see the menu page
BThe menu page will not show at all
CThe menu icon will be missing
DThe menu page will load faster
Explain how to add a new top-level admin menu page in WordPress and what each parameter means.
Think about what you want the menu to show and who should see it.
You got /6 concepts.
    Describe the difference between add_menu_page() and add_submenu_page() in WordPress admin menus.
    One creates main menu items, the other adds items inside them.
    You got /4 concepts.