I installed WPMU because I'm running a couple of blogs that only I am admin to so it's not a security risk. But is there a plugin or some way to edit themes through the browser in WPMU the same as in WP?
Thanks.
I installed WPMU because I'm running a couple of blogs that only I am admin to so it's not a security risk. But is there a plugin or some way to edit themes through the browser in WPMU the same as in WP?
Thanks.
If you're the only one:
look in wp-admin/theme-editor.php. Near the top there's a line that says wp_die. remove it or comment it out (stick // at the first of this line).
Then the theme editor is there, but not in the menus. I just type it in.
Yes! Worked great, thank you :-)
I tried that and I got Cannot load /wp-admin/theme-editor.php.
Is this what I'm supposed to do
//if ( ! isset($themes[$theme]) )
// wp_die(__('The requested theme does not exist.'));
Now I am getting a message that says disabled
I also tried just putting the // next to the wp_die ... but got the same message
"Near the top" MelRidger,
Turn this
wp_die( 'Disabled' );
into this
// wp_die( 'Disabled' );
Nothing else, nada.
Gonna be irrelevant in the next release. :)
"Gonna be irrelevant in the next release. :)"
I found the new function/hook "disable_some_pages" in mu.php v2.8.1
Looks prime for a "toggle forbidden pages" plugin, now.
Did you find where the wp_die was replaced by is_site_admin? :)
I changed it and I'm still getting disabled. Also everything in the admin page looks different today. The navigation gos all the way across.
K :-) I just upgraded as well. So which line in which file should I be commenting out now?
The best way to enable theme editor is to comment out the following in the mu.php
$pages = array( 'theme-editor.php', 'plugin-editor.php' );
foreach( $pages as $page ) {
if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {
wp_die( __('Page disabled by the administrator') );
}
}
but be careful it opens the editor for all the users with admin powers
-----
Anybody professionally programmer of wp can suggest how to add the icon of theme editor, plugin editor to the admin menu.
Presently i am typing the full link eg:
http://www.myfundmachine.ws/wp-admin/plugin-editor.php or
http://www.myfundmachine.ws/wp-admin/theme-editor.php
Cheers
Deep
If you dont wanna activate the plugin-editor please make a different page loop and add the plugin-editor in the disable section.
Cheers
Deep
WOW i find out how to add the link on the menu bar too.
Just open mu.php and find function wpmu_menu()
then add this following two lines. it will add the links to ur site admin option from there u can edit themes as well as plugins (be carefull while u edit plugins)
$submenu[ 'wpmu-admin.php' ][35] = array( __('Themes Editor'), '10', 'theme-editor.php' );
$submenu[ 'wpmu-admin.php' ][40] = array( __('Plugin Editor'), '10', 'plugin-editor.php' );
Cheers
Deep
Awesome, found it in /wp-admin/includes/mu.php :-)
Thanks Deep, tagging this resolved.
Thank you for this info!
No, no simple comment!
It's a big risk!
Go to mu.ph, and find:
$pages = array( 'theme-editor.php', 'plugin-editor.php' );
foreach( $pages as $page ) {
if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {
wp_die( __('Page disabled by the administrator') ); } }
Replace for this:
$pages = array( 'theme-editor.php', 'plugin-editor.php' );
foreach( $pages as $page ) {
//if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {
if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_site_admin() ) {
wp_die( __('Page disabled by the administrator') ); } }
with the code above, theme editor is active ONLY for MU admin.
I have tested with a "simple" blog admin account. Theme and Plugin Editor is not available for this account.
Cheers!
The code just above (ericaakira) worked PERFECT for the theme editor. Still have problem with plugin editor. When clicked says page does not exist (wp-admin/theme-editor.php). It certainly does exist so obviously there's a foul up somewhere. Any ideas?
Okay, I added a new plugin and activated it and now the plugin editor page seems to be functioning fine. I hate being a newbie!
The only thing I get that is a little weird is now when I edit pages and posts it tries to show the background of the page in the edkiting window.