# add\_admin\_menu

Function : add\_admin\_menu\
File : includes/plugins.functions.php\
Since : 2.x

This function used to add links admin area. When you create or develop a plugin you must point links to access or configure plugin pages, in order to make it easier we have created system, an easy system so you can write files dedicated to admin area only. [Please read Add Plugin Pages For Admin Area.](broken://pages/TKmAkLd5m1YNegofWpLF)

**Usage**

function add\_admin\_menu($header=’Tool Box’,$name,$link,$plug\_folder=false,$is\_player\_file=false)

**Uses**

* ClipBucket->AdminMenu

**Overview**

To create menu in admin area, we will simply pass links to an array $Cbucket->AdminMenu and then we create a loop in admin area html files to render the links accordingly, there are too many functions involved and we will try to document them all one by one

| Parameter Name         | **Options**                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $header (String)       | A header of amin menu under which link will be displayed, by default we have ‘Stats and Configurations’, ‘Videos’ etc..please take a look at [this pic](http://docs.clip-bucket.com/images/admin_menu_pic_reference.png) for proper understanding. By default its Tool Box so all your plugin links will be listed under Tool Box if not specified                                                                                                                |
| $name (String)         | Name of your menu link that are displayed under your header, like we have ‘Manage videos’ under Videos header                                                                                                                                                                                                                                                                                                                                                     |
| $link (String)         | Link to your plugin file that you will load or call when admin clicks on it or it can be direct Http link (leave other to params blank for direct http link), e.g for /plugins/global\_announcement/admin/manage.php , simply set it as ‘manage.php’                                                                                                                                                                                                              |
| $plug\_folder (String) | <p>Path to the folder of the files, relative to /plugins directory, e.g if you have a plugin folder ‘global\_announcement’ , then according to given above example , it should be ‘global\_announcement/admin’Note : $plug\_folder and $link makes a complete path to the file relative to plugins directory ie.</p><p>/plugins/$plug\_folder/$link</p><p>its default value is false, it will ultimately load file from /plugins directory</p><p>/plugs/$link</p> |
| $is\_player (Boolean)  | default is false, just to tell CB if plugin file is for player                                                                                                                                                                                                                                                                                                                                                                                                    |

#### Example

this code

```
<?php
add_admin_menu("Audio","Audio Configuration",'audio_configurations.php','cb_audio/back_end/');
add_admin_menu("Audio","Audio Manager",'audio_manager.php','cb_audio/back_end/');
add_admin_menu("Audio","Manage Categories",'audio_categories.php','cb_audio/back_end/');
add_admin_menu("Audio","Flagged Audios",'flagged_audios.php','cb_audio/back_end/');
add_admin_menu("Audio","Inactive Audios",'audio_manager.php&search=search&active=no','cb_audio/back_end/');
?>
```

will generate something like this

[![](http://docs.clip-bucket.com/wp-content/uploads/2011/11/admin_menu_pic_reference_2.png)](http://docs.clip-bucket.com/wp-content/uploads/2011/11/admin_menu_pic_reference_2.png)

Final view of admin menu

![](https://clipbucket.com/docs/wp-content/plugins/wp-postratings/images/loading.gif)Loading...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clipbucket.com/guides/functions/add_admin_menu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
