[wp-edu] Problems with Theme Options displaying for site admins in WordPress MultiSite

Ken Newquist newquisk at lafayette.edu
Fri Sep 3 13:42:07 UTC 2010


Since the upgrade to WordPress 3.0 things have been running fairly  
smoothly, but I been seeing sporadic problems with some themes no  
longer displaying theme options for  web site administrators.  The  
three themes in question are Mandigo, Tarski and Viala and in all  
cases, the superadmins for the WordPress network are able to access  
these theme options. That's why this problem never showed up in our  
testing; we were logged in as network admins.

After doing some digging, I found the problem: a misunderstanding of  
the "edit_themes" capability.

Based on this discussion thread (http://wordpress.org/support/topic/capability-manage_options-vs-edit_themes 
) it seems that the "edit_themes" capability was intended to be given  
to site administrators who could actually edit the theme itself via  
Wordpress NOT to grant them access to theme options.  I haven't been  
using WordPress long enough to know if this capability has morphed  
over time, or if it was always like this, but in either case it's  
creating headaches now. :)

In a single site WordPress install using the "edit_themes" capability  
to control theme options access works just fine, because they're one  
in the same: the "site administrator" is also the same person who  
could edit the CSS or HTML of the template in question via the  
WordPress interface.

In WordPress 3.0 MultiSite however, that won't work.  You can't let  
individual site administrators edit the theme files because their  
changes would affect everything in the network. As a result, site  
administrators no longer have the "edit_themes" capability; only  
network superadmins can do that.  However themes like Mandigo, Tarski  
and Viala all depend on the "edit_themes" capability to display their  
theme options, and since site admins no longer have it, they can't get  
to their site options anymore.

I'm assuming this capability change happened as part of the code merge  
with WP 3.0 and WP 3.0 MU, since the theme options were still  
accessible under 2.9.

Based on Andrea_R's response to the thread, the fix is to change the  
logic so that it uses the "manage_options" capability (which site  
admins have) instead of "edit_themes".

Ken










More information about the wp-edu mailing list