Skip to content

Loading…

Deactivated notice when 'force_activation' => true #90

Closed
vauvarin opened this Issue · 3 comments

2 participants

@vauvarin

When you set 'force_activation' to 'true', plugin is activated upon theme activation and cannot be deactivated until theme switch.

This works well but when you are on the plugins page (WP back-end), a 'Deactivate' link is always avalaible and when you click on it a notice appears with this message: "Plugin deactivated."

So this notice is at odds with what is happening in reality and it could be confusing for the users.

A solution could be to either hide the 'Desactivate' link or keep the 'desactivate' link but change the notice message with something like that "You are not allowed to desactivate this plugin, it will be deactivate with the theme switch"

@thomasgriffin

Thanks for pointing this out, and honestly I had just skipped over it until someone made it an issue. :-)

The problem is that WordPress hasn't made that part of the Plugins page very developer friendly. The only way to hide the message and links in my cursory review is hack-ish at best, but since you have brought it up, I will look into a possible solution to try and do this.

It would definitely be a UI/UX improvement. I actually plan on making a patch for this for core as well, so this should give me a good head start on that. :-)

@thomasgriffin

Ultimately I would rather filter out the option to deactivate entirely, including any admin messages, than create another notice saying don't pay attention to the other notices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.