Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

Remove setting from site option when deleting plugin #32

Merged
merged 1 commit into from
Mar 5, 2020

Conversation

bookdude13
Copy link
Contributor

Fixes #29.

One thing I noticed in this is that we are tracking plugin settings based on the plugin file path, not the slug. Could that cause issues for plugins which change their file location? Not sure how common that would be, but I feel like the slug makes more sense as an id?

@audrasjb
Copy link
Owner

audrasjb commented Mar 3, 2020

Hi,
Looks great, thanks. Milestoning this to 0.2, scheduled this week :)

@audrasjb audrasjb self-assigned this Mar 3, 2020
@audrasjb audrasjb added the enhancement New feature or request label Mar 3, 2020
@audrasjb audrasjb added this to the 0.2.0 milestone Mar 3, 2020
@pbiron
Copy link
Collaborator

pbiron commented Mar 5, 2020

One thing I noticed in this is that we are tracking plugin settings based on the plugin file path, not the slug. Could that cause issues for plugins which change their file location? Not sure how common that would be, but I feel like the slug makes more sense as an id?

Because that's how WP stores things in the active_plugins option and/or active_sitewide_plugins sitemeta.

It's possible to have more than 1 plugin in a single directory. any file with a plugin header directly within a directory will be treated as a separate plugin. For instance, create a directory, my-plugin that contains 2 files plugin1.php and plugin2.php, each of which has a plugin header and you'll see that they are both listed in the plugins list table.

Although, you shouldn't do that and I think it's against the guidelines for plugins in the .org repo.

The updater provides enough hooks that, theoretically, a premium plugin could be written that would allow each of those multiple plugins within the same directory to be updated separately.

I only know of one such "multiple plugins in the same directory" in the wide...and it's used on .org!!
See https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook.

@pbiron
Copy link
Collaborator

pbiron commented Mar 5, 2020

BTW, this PR works great! Thanx for that @bookdude13!

@audrasjb
Copy link
Owner

audrasjb commented Mar 5, 2020

Works great, thanks!

@audrasjb audrasjb merged commit a83efc3 into audrasjb:master Mar 5, 2020
@bookdude13
Copy link
Contributor Author

I only know of one such "multiple plugins in the same directory" in the wide...and it's used on .org!!
Haha, that's fantastic :)

Thanks for the info, and glad to help!

@bookdude13 bookdude13 deleted the iss29_delete_preference branch March 6, 2020 08:09
pedro-mendonca pushed a commit to pedro-mendonca/wp-autoupdates that referenced this pull request Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting plugin doesn't remove auto-update preference
3 participants