WordPress does not come with specially designed pages for plugin options. We can either use the admin menu page or the options page to make the HTML forms required for configuring options. I am going to use the admin menu page to implement the options. First we have to use the following code to add the page to the left menu.

add_action(‘admin_menu’,’pro_admin_menu’);

function pro_admin_menu() {

add_menu_page(

“Donation”,

“Donation”,

8,

__FILE__,

“pro_admin_menu_list”,

PRO_URL.”/images/shopping_cart.png”

);

add_submenu_page(__FILE__,’Doners’,’Doners’,’8′,’doner-list’,’doner_listings_site’);

}

We have to use the action called admin_menu to add a new menu item and pro_admin_menu is the name of the function to add the page. Inside the function we can use the built-in add_menu_page to create the menu item.


0 thoughts on “WP Admin Menu”

Leave a Reply