theme editor for wordpressmu

来源 :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.

mySignature WordPress MU theme editor

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值