13 reputation
2
bio website
location
age
visits member for 1 year
seen Jan 23 at 4:45

Apr
3
comment Plugin: How should I handle deleting comments?
let us continue this discussion in chat
Apr
3
comment Plugin: How should I handle deleting comments?
I have wondered how secure wp_cron really is. It seems to me, you could just schedule an eval and pass a base64 encoded string of function contents. It could modify itself recursively until the comments are all deleted and then remove itself from cron. However, this would also be a huge security hole that unscrupulous plugin developers would exploit.
Apr
3
comment Plugin: How should I handle deleting comments?
It could be done in chunks with wp_cron right?
Apr
3
comment Plugin: How should I handle deleting comments?
Well this is more of a user expectation issue. If a user clicks uninstall they expect the plugin to be gone. It seems likely that any 'required' step before uninstallation would be ignored by most users, so doing such tasks in the uninstall hook would be better, right?
Apr
3
awarded  Scholar
Apr
3
accepted Plugin: How should I handle deleting comments?
Apr
3
comment Plugin: How should I handle deleting comments?
You mentioned the comments meta and it got me thinking about cleanup of my plugin. If the user uninstalls my plugin should I delete all of the associated custom posts and comments? Sorry if this is way off topic but I was wondering if I should use a custom table instead of polluting the commentsmeta table.
Apr
3
comment Plugin: How should I handle deleting comments?
The placeholder was how I was leaning. I hadn't actually thought to ask the user why they were deleting. A topical placeholder is almost perfect.
Apr
3
awarded  Student
Apr
3
asked Plugin: How should I handle deleting comments?