• Resolved shah.neel

    (@shahneel)


    Hi,

    I wanted to know how can i disable access to Duplicate Theme for all user roles except Super administrators? Do I need to change the code it is a functionality to select which user roles can have access to which plugins in a multisite?
    Also if I change the code will it revert back to original when updated?

    https://www.ads-software.com/plugins/duplicate-theme/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter shah.neel

    (@shahneel)

    Is this possbile or not? Does anyone or the developer know how to do this?

    Plugin Author Muller Digital Inc.

    (@muller-digital)

    Hey shah.neel,
    In duplicate-theme.php below line 43, below:
    function register_duplicate_theme_page(){
    add:
    if( is_super_admin() )
    to make:

    function register_duplicate_theme_page(){
    	if( is_super_admin() )

    This will prevent add_theme_page from running if the user is not a super-admin.
    Let me know if you get the White Screen of Death from adding that line, or if any other issues arise.
    Thanks for using Duplicate Theme.
    cheers,
    Muller Digital Inc.

    Thread Starter shah.neel

    (@shahneel)

    Hey Muller,

    I tried your solution and it worked. Thanks!
    I also had a question will this change get reverted back to defaults whenever there is an update to the plugin?

    Plugin Author Muller Digital Inc.

    (@muller-digital)

    Hi shah.neel,
    Unfortunately yes. For the foreseeable future, after an update, you will have to add the line if( is_super_admin() ), as it will not be in duplicate-theme.php.
    If we decide that it is better to only allow super admins to use duplicate theme for network installations, then there will be no need to re-add that line. But you’ll have to view the change log of the updated version to see if we have done so.
    Thanks again for using Duplicate Theme!
    Please let us know if there are any other issues.

    Thread Starter shah.neel

    (@shahneel)

    Okay I get it.
    Just a feedback for next version that may be you can add this option as a check box in the settings or Duplicate Theme page itself for super admins to select. It seems to be a good point if the super admins have this control since like in our case we feel for big organizations like NYU we might not want the admins to have the ability to create new duplicate themes everytime and mess the whole Multisite environment.

    Thanks for the support! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘disable access of duplicate theme for administrators user role’ is closed to new replies.