How To Add Admin Area Menu Via Plugin

43 views October 18, 2016 October 18, 2016 Saqib Razzaq 0

ClipBucket allows you to build plugins for all kinds of activities. In many cases with plugins, there needs to be an admin panel so admins can control how plugin works. In order to make this happen, you will need to add admin area menus which is as simple as snapping your fingers. Here is how it can be done.
$menu_name = 'name_of_main_menu';
$sub_menu = 'name_of_sub_menu';
$file = 'file_to_execute.php';
$path_to_file = 'path_to_file_to_be_executed.php';

// now adding menu
add_admin_menu($menu_name, $sub_menu, $file, $path_to_file);


Bingo!

You have your menu working fine now.

Was this helpful?