Bryan Valentino on "unable to turn off the file editor for plugins and themes in WordPress admin"

ساخت وبلاگ

7thcircle
Member
Posted 2 hours ago #

I have added the define below to my wp-config.php

define('DISALLOW_FILE_MODS',true);

Even with that there, I still have my theme and plugin editors enabled. I also have the link manager available.

It should be

define('DISALLOW_FILE_EDIT', true);

I tried define('DISALLOW_FILE_EDIT', true); and the editor is still there.

From what I understand, define('DISALLOW_FILE_MODS',true); should remove the editor, updates, installs, etc.

Neither work.

Bryan Valentino
Member
Posted 1 hour ago #

Where did you put the code? Did you put it before or after the wp-settings.php inclusion?

stedata's code is correct.

http://codex.wordpress.org/Hardening_WordPress#Disable_File_Editing

7thcircle
Member
Posted 54 minutes ago #

It is above my db settings, so well before the inclusion.

I have it in the same place on other sites and it is working, in fact both options work as expected.

Bryan Valentino
Member
Posted 13 minutes ago #

Can you try adding a third parameter to the code?

define ('DISALLOW_FILE_EDIT', true, true);

The third parameter makes sure the there are no case-sensitive related errors to the constant DISALLOW_FILE_EDIT.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 278 تاريخ : جمعه 7 خرداد 1395 ساعت: 3:34