I also need for single site admins to be able to edit their themes, but I don′t understand the first part: “1. Place this text in a file in the wp-content/mu-plugins/ folder.” I created a .php file within the plugins folder. Or I have to create a folder and then a .php? I am not a programmer! can some one explain the whole thing “for dummies” please?
This is what I did:
1. created wp-content/plugins/chachacha.php
2. chachacha.php has the code:
<?php
add_action(‘admin_menu’, ‘_add_themes_utility_editor’, 102);
function _add_themes_utility_editor() {
// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
add_submenu_page(‘themes.php’, _x(‘Editor’, ‘theme editor’), _x(‘Editor’, ‘theme editor’), ‘switch_themes’, ‘theme-editor.php’);}
// get the the role object
$editor = get_role(‘administrator’);
// add $cap capability to this role object
$editor->add_cap(‘edit_theme_options’);
$editor->add_cap(‘edit_themes’);
?>
3. “comment out” (that I guess is to put /* and */ at the beggining and end of the thing to be commented out)
/*
if ( is_multisite() && ! is_network_admin() ) {
wp_redirect( network_admin_url( ‘theme-editor.php’ ) );
exit();
}
if ( !current_user_can(‘edit_themes’) )
wp_die(‘<p>’.__(‘You do not have sufficient permissions to edit templates for this site.’).'</p>’);
*/
4. Changed:
$themes = get_themes();
With:
$themes = get_allowed_themes(); (notice I put a space before and after the = sign)
5. Went to one users dashboard and … nothing… The edit link does not show. I am frustrated it′s been 3 days looking for this functionality…
I am using WP 3.1.2 Multisite and BuddyPress.
Thank you! and pls somebody pls help me!!! (as if I was a 3 year old!)