Opened 13 years ago
Closed 12 years ago
#16741 closed defect (bug) (fixed)
uninstall_plugins is autoloaded
Reported by: | duck_ | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Attachments (3)
Change History (16)
#2
in reply to:
↑ 1
@
13 years ago
Replying to nacin:
No wonder why class method callbacks slowed sites down as much as they did.
We can just add this to $fat_options and handle the switch in an upgrade path.
16741.upgrade.diff: semi-done (no db_version bump or call to upgrade path).
The difference would be that uninstall_plugins would become a default option instead of added when necessary. If that's undesired then a mixture of the two can be taken. Have an upgrade path for existing installs and set autoload to 'no' on the first registration so it's not a default option.
#3
@
13 years ago
Nice catch.
I don't see a problem with it becoming a default option, since it isn't autoloaded.
#5
@
12 years ago
Upgrade path should probably be get, delete, add, rather than a direct query. No issues with it being a default option.
#6
@
12 years ago
- Keywords 2nd-opinion removed
Refreshed for 3.4. I realized since populate_options() gets called before upgrade_*(), the option will always exist by the time we try to call get_option(), so a direct query to ascertain its autoload property seems like the best route.
#7
@
12 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [20080]:
#8
@
12 years ago
Note that now plugin authors will have to wrap register_uninstall_hook() in an is_admin() check, to avoid an extra query.
#9
@
12 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Hmm. Perhaps we should just noop register_uninstall_hook() when we're not in the admin.
#10
@
12 years ago
As it is, register_uninstall_hook() should only be occurring on an activation hook.
No wonder why class method callbacks slowed sites down as much as they did.
We can just add this to $fat_options and handle the switch in an upgrade path.