0

in the plugins page, under each plugins' name usually there are buttons/links like "Deactivate | Edit | Settings". Recently on one of my sites the "Edit" (and "Settings") button has disappeared. I have just "Deactivate" or "Activate | Delete".

My question is - what could cause this?

I am logged in as an administrator, so I should see the buttons. I suspect that something might have vent wrong with the installation of the last plugin but I am not sure.

Is there some scenario when these buttons get disabled (hidden) or do I have a bug / error?

1 Answer 1

0

Edit buttons display only when the necessary file permissions are acquired by PHP.

http://core.trac.wordpress.org/browser/tags/3.3.1/wp-admin/includes/class-wp-plugins-list-table.php#L380

is_writable(WP_PLUGIN_DIR . '/' . $plugin_file)

current_user_can('edit_plugins') will always return false if the DISALLOW_FILE_EDIT flag is set to true (recommended) in the configuration, no matter if you're the administrator or not.

http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/capabilities.php#L1118

5
  • Hey, thanks for your answer. It seems that is_writable really sees the files as non-writable. I am now checking with the admins...
    – Priednis
    Mar 14, 2012 at 18:58
  • @Priednis Check this for further information codex.wordpress.org/Changing_File_Permissions Also, I highly discourage the use of the editor altogether: codeseekah.com/2012/02/19/…
    – soulseekah
    Mar 14, 2012 at 23:55
  • Many thanks for your responses. I managed to get the plugin directories writtable and it enabled the Edit links but my plugin is still not working. I'll check the Changing_File_Permissions link and ask another question if needed. Regarding the editor - I don't need the editor and I don't use it, it (the missing buttons) was just a sign that something was wrong...
    – Priednis
    Mar 15, 2012 at 19:09
  • Does you plugin work though? Can you pastebin it all so we can see if there's something wrong?
    – soulseekah
    Mar 16, 2012 at 6:22
  • Am a bit [censored] about spending so much time on this, but turns out my server is running PHP4 and the plugin was using __construct() style constructors which are not yet recognized on this version of PHP, so I had to do somehing like function ClassName() { $this->__construct(); } to get it working and now it seems ok...
    – Priednis
    Mar 16, 2012 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.