Pixelpost

Authentic Photoblog Flavour

ExtendingPixelpost /

Use of the Admin Interface Function

add_admin_functions($addon_function_name, $addon_workspace, $addon_menu, $addon_submenu);

SyntaxDescription
add_admin_functions($addon_function_name,$addon_workspace,'','')
Example:
add_admin_functions('do_pings','image_uploaded','','')
The Addon function do_pings() is performed in the workspace "image_uploaded".
Here the interface is used to call an Addon function in the defined workspace. No menus or submenus are involved since every workspace has its unique location.
add_admin_functions($addon_function_name,$addon_workspace,$addon_menu,$addon_submenu)
Example:
add_admin_functions('cropimage12_admin_addon','image_edit','images','12cropimage')
Creates a new submenu named "12cropimage" under Images Menu, calling the function crop12_admin_addon() in the workspace "image_edit".
To create code within a new submenu of an existing menu you have to use the interface function with all variables set. $addon_menu should now be an existing menu item. If the submenu in $addon_admin_submenu does not exist the submenu entry is created automatically.
Special interface functions:
add_admin_functions($addon_function_name,'admin_html_head','','')Inserts code between the <HTML> and </HTML> tags in all Admin pages. Can be used for CSS, Javascript or for including files.
add_admin_functions('','admin_main_menu',$addon_menu,'')This is used to create a new menu entry in the Admin panel. The $addon_menu variable will indicate the menu name as well as the link to that new page in admin area. For instance if $addon_menu is "newitem", the link to the new page will be index.php?view=newitem and the menu title will show NEWITEM.
add_admin_functions($addon_function_name,'admin_main_menu_contents',$addon_menu,'')
With this function the content of a new page is performed whenever the new page is called. Of course $addon_menu must be the name of the new page here.
To add submenus to your new page you can code them directly in the new page code.

TOP << AvailableSubMenus | ExtendingPixelpost | AdminWorkspaces >>


Page last modified on November 06, 2007, at 05:56 AM