Title: Fix for multisite
Last modified: February 4, 2021

---

# Fix for multisite

 *  Resolved [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/fix-for-multisite/)
 * Hi, I have tested the plugin for multisite, and out of the box everything is 
   working fine. There’s one easy-to-fix issue I found.
 * On a multisite network it seems like my theme’s functions.php file is executed
   AFTER the plugin script.
 * So adding a filter like this won’t work:
 *     ```
       add_filter('use_admin_password_supported_roles', function($array){
           $array[80][] = 'custom-admin-role';
           return $array;
       });
       ```
   
 * A workaround that seems to work fine, is to change the last line of your plugin
   script to:
 *     ```
       add_action('init', function(){
       	$simba_use_admin_password = new Simba_Use_Admin_Password;
       });
       ```
   
 * so your script runs a little bit later (after my theme functions have loaded)
 * Please let me know if you plan to add this in the next update (otherwise I’ll
   fork the plugin and manage my own version)
    -  This topic was modified 5 years, 3 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).
    -  This topic was modified 5 years, 3 months ago by [Jules Colle](https://wordpress.org/support/users/jules-colle/).

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

 *  Plugin Author [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * (@davidanderson)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/fix-for-multisite/#post-14004167)
 * Hi Jules,
 * I would recommend against putting anything in your theme’s functions.php file
   that is not related directly to the theme. For one thing, you’ll then lose plugin
   functionality if you change theme; for another, as you remark, that file isn’t
   executed early enough.
 * The proper place to put plugin customisations is in an mu-plugin. i.e. Create
   the folder wp-content/mu-plugins, and create a .php file in there.
 * David
 *  Thread Starter [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/fix-for-multisite/#post-14004443)
 * Hi David, fair point. Will do that. Although I like to have all my code in a 
   single root folder. I find it a bit easier to maintain for versioning and the
   likes, but there are work-arounds for that too.
 * Anyway, thanks for the fast reply!

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

The topic ‘Fix for multisite’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/use-administrator-password.svg)
 * [Use Administrator Password](https://wordpress.org/plugins/use-administrator-password/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/use-administrator-password/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/use-administrator-password/)
 * [Active Topics](https://wordpress.org/support/plugin/use-administrator-password/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/use-administrator-password/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/use-administrator-password/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/fix-for-multisite/#post-14004443)
 * Status: resolved