您的位置:首页 > 其它

theme editor for wordpressmu

2010-09-26 16:17 281 查看
来源 :http://www.niftyeyeblog.com/wordpress-mu-theme-editor/

Hi all, I recently installed WordPress MU 2.8.4a to one of the social networks
I maintain, And wanted to do some changes in theme source code, so I
started looking for theme editor button in admin area, under appearance.
But the button wasn’t there. So I tried to use the direct link to the theme-editor.php

in order to access the theme editor function, instead I received an error “page disabled by administrator
.”
I tried to search online and seems like there are not that many good
suggestions. I looked at the code and if anyone would need to have The built-in Theme Editor
, they you will need to edit one (1) file only and you won’t need to upload or change anything else.

The file is “mu.php
” located under “/wp-admin/includes

” folder.

to edit from WordPress MU 2.8.1
:

Do the following changes


Search and locate

unset( $submenu['themes.php'][10] ); // always remove the themes editor

Then change to

//

unset( $submenu['themes.php'][10] ); // always remove the themes editor


Then locate

if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {

Change to

if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_site_admin()

) {

Refresh you admin page, and now you will find the editor button on Appearance admin menu.

Good luck, If you find this post useful, please share it with others,
if you have a suggestion or opinion, please leave me a comment, I’d
love to hear from you.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: