Title: Easy feature request / hookable function check_user_role()
Last modified: August 30, 2016

---

# Easy feature request / hookable function check_user_role()

 *  [Pierre from DesignBots](https://wordpress.org/support/users/mecanographik/)
 * (@mecanographik)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/easy-feature-request-hookable-function-check_user_role/)
 * Hi,
    It would be great if you could make, in a next release, **a hookable function**
   of : `function check_user_role()` (in includes/classes/wp-maintenance-mode.php)
 * for example, i would like to use a custom function in my themes/functions.php
   to add a “allowed” case, for example :
 *     ```
       if (WP_ENV == 'development'){
           $is_allowed = true;
        }
       ```
   
 * or :
 *     ```
       if (is_front_page()) {
           $is_allowed = true;
       }
       ```
   
 * It would be really handy!
    regards
 * [https://wordpress.org/plugins/wp-maintenance-mode/](https://wordpress.org/plugins/wp-maintenance-mode/)

The topic ‘Easy feature request / hookable function check_user_role()’ is closed
to new replies.

 * ![](https://ps.w.org/wp-maintenance-mode/assets/icon-256x256.gif?rev=3027645)
 * [LightStart - Maintenance Mode, Coming Soon and Landing Page Builder](https://wordpress.org/plugins/wp-maintenance-mode/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-maintenance-mode/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-maintenance-mode/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-maintenance-mode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-maintenance-mode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-maintenance-mode/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [Pierre from DesignBots](https://wordpress.org/support/users/mecanographik/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/easy-feature-request-hookable-function-check_user_role/)
 * Status: not resolved