Title: Javascript for admin panel customization plugin
Last modified: August 19, 2016

---

# Javascript for admin panel customization plugin

 *  [mido-upipok](https://wordpress.org/support/users/mido-upipok/)
 * (@mido-upipok)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/javascript-for-admin-panel-customization-plugin/)
 * I am in the process of creating a custom admin panel which has a specific page
   for adding/editing each of the different categories of posts.
 * For a couple of the categories, the ‘Add New Post’ page differs very little from
   the original therefore I was hoping to avoid re-programming all of the available
   features.
 * In my plugin file, I add the _admin\_menu_ action to create a panel and define
   the linking action in the function _content\_special\_category\_update\_edit()_
 * >  add_menu_page(‘Special Category Updates’, ‘Special Category Updates’, 8, __FILE__,‘
   > content_special_category_update_edit’)
 * Within the function _content\_special\_category\_update\_edit()_, I start by 
   copying the contents of **post-new.php** exactly.
 * >  function content_special_category_update_edit(){
   > /** Load WordPress Administration Bootstrap */
   >  require_once(‘admin.php’); 
   > $title = __(‘Add New NTI Update’); $parent_file = ‘edit.php’; $editing = true;
   > wp_enqueue_script(‘autosave’); wp_enqueue_script(‘post’); if ( user_can_richedit())
   > wp_enqueue_script(‘editor’); add_thickbox(); wp_enqueue_script(‘media-upload’);
   > wp_enqueue_script(‘word-count’);
   > if ( ! current_user_can(‘edit_posts’) ) {
   >  require_once (‘./admin-header.php’);?
   > > <div class=”wrap”> <p><?php printf(__(‘Speak with an admin to add the `edit_posts`
   > capability to your user account, in order to be authorized to post.‘)); ?> 
   > </p> </div> <?php include(‘admin-footer.php’); exit(); }
   > // Show post form.
   >  $post = get_default_post_to_edit(); include(‘edit-form-
   > advanced’);
   > }
 * The resulting page looks as it should and allows the publication of posts, but
   none of the javascript functionality works.
 * I tried copying the folder wp-admin/js into my_plugin/js but that didn’t help
   anything.
 * Any thoughts????
 * thanks,
    mido

Viewing 1 replies (of 1 total)

 *  [kharisma](https://wordpress.org/support/users/kharisma/)
 * (@kharisma)
 * [16 years ago](https://wordpress.org/support/topic/javascript-for-admin-panel-customization-plugin/#post-1191672)
 * I’m guessing there’s a bunch of hooks you’ll need to track down to make it load
   properly

Viewing 1 replies (of 1 total)

The topic ‘Javascript for admin panel customization plugin’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 1 reply
 * 2 participants
 * Last reply from: [kharisma](https://wordpress.org/support/users/kharisma/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/javascript-for-admin-panel-customization-plugin/#post-1191672)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
