Title: admin_enqueue_scripts $hook_suffix can&#8217;t work normally.
Last modified: March 12, 2018

---

# admin_enqueue_scripts $hook_suffix can’t work normally.

 *  [bearshang](https://wordpress.org/support/users/bearshang/)
 * (@bearshang)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/)
 *     ```
       add_action( 'admin_enqueue_scripts', 'adminAssets' );
       function($hook_suffix){
          echo $hook_suffix;
       }
       ```
   
 * However, the result of $hook_suffix is: ‘%e7%94%a8%e6%88%b7_page_users-user-role-
   editor’.
 * I don’t know what is ‘%e7%94%a8%e6%88%b7’, how to troubleshoot this string?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [subrat4php](https://wordpress.org/support/users/subrat4php/)
 * (@subrat4php)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064043)
 * Hi! [@bearshang](https://wordpress.org/support/users/bearshang/),
 * It seems your code is not complete. Please check once.
 *     ```
       add_action( 'admin_enqueue_scripts', 'adminAssets' );
       function adminAssets($hook_suffix){
          echo $hook_suffix;
       }
       ```
   
 *  Thread Starter [bearshang](https://wordpress.org/support/users/bearshang/)
 * (@bearshang)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064049)
 * yes, as you perfect code.
 * I wrote less of an adminAssets.
 *  [subrat4php](https://wordpress.org/support/users/subrat4php/)
 * (@subrat4php)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064080)
 * [@bearshang](https://wordpress.org/support/users/bearshang/),
 * Is it working now??? If not, can you please explain bit more of the problem you
   are facing so that I can suggest you something from my end.
 * 🙂
 *  Thread Starter [bearshang](https://wordpress.org/support/users/bearshang/)
 * (@bearshang)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064103)
 * It not normal working,
    If nothing goes wrong then he should output: ‘users_page_users-
   user-role-editor’, That is, I guess the reason may be due to coding.
 * What’s bad is, This problem is in the plug-in I wrote, And he affected all the
   other plugins.
 * But I really don’t know what the problem is with the plug-in I wrote.
 *  [subrat4php](https://wordpress.org/support/users/subrat4php/)
 * (@subrat4php)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064120)
 * [@bearshang](https://wordpress.org/support/users/bearshang/),
 * what is the purpose of the block of code you were writing and what this ‘users_page_users-
   user-role-editor’ will output???
 *  Thread Starter [bearshang](https://wordpress.org/support/users/bearshang/)
 * (@bearshang)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064164)
 * You may not understand what I mean. In fact, I used a wordpress plugin user-role-
   editor.
 * In /wp-content/plugins/user-role-editor/includes/classes/user-role-editor.php
   924 row:
 *     ```
       /**
            * Load plugin javascript stuff
            * 
            * @param string $hook_suffix
            */
           public function admin_load_js($hook_suffix) {
   
               URE_Known_JS_CSS_Compatibility_Issues::fix($hook_suffix, $this->ure_hook_suffixes);                
   
               if ($hook_suffix==$this->main_page_hook_suffix) {
                   $this->load_main_page_js();
               } elseif($hook_suffix==$this->settings_hook_suffix) {
                   $this->load_settings_js();
               }                
   
           }
           // end of admin_load_js()
       ```
   
 * Among them, he needs to get the value of $hook_suffix and make a judgment. Under
   normal circumstances, the value of his $hook_suffix should be ‘users_page_users-
   user-role-editor’, but now it is ‘%e7%94%a8%e6%88%b7_page_users-user-role-editor’,
   so it doesn’t work.
 * After my one-by-one pause on each plugin, I found the problem in the plugin I
   wrote.
 * This is my current predicament. Do you not understand that you can understand?
 *  [subrat4php](https://wordpress.org/support/users/subrat4php/)
 * (@subrat4php)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064350)
 * [@bearshang](https://wordpress.org/support/users/bearshang/),
 * First thing is I am in no where why you have to edit the plugin wp role editor?
   
   Second thing is, if you need some customization work then you must do it by hooks
   and filters available with wordpress. Third thing is, i am really not sure what
   is your actual requirement and what you were trying to do?
 * I am sorry but its what i felt.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘admin_enqueue_scripts $hook_suffix can’t work normally.’ is closed to
new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 7 replies
 * 2 participants
 * Last reply from: [subrat4php](https://wordpress.org/support/users/subrat4php/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/admin_enqueue_scripts-hook_suffix-cant-work-normally/#post-10064350)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
