#16401 closed enhancement (fixed)
Add hook to delete_theme() on successful delete
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 2.8 |
Component: | Themes | Keywords: | has-patch has-dev-note |
Focuses: | Cc: |
Description (last modified by )
Add an action or filter to the end of /wp-admin/includes/theme.php delete_theme()'s processing when the write is successful.
The use case is for managing a WordPress install on an SVN-controlled server. Whenever the CMS changes a file or folder (particularly in the wp-content folder) I need to be able to trigger an svn commit.
See also Ticket #16396.
Attachments (2)
Change History (18)
#2
in reply to:
↑ description
@
14 years ago
#3
@
14 years ago
- Cc trac@… added
- Keywords has-patch added
ticket.16401.diff adds a new action 'deleted_theme' passing the $template variable as the first parameter.
#4
@
12 years ago
- Keywords close added; subversion removed
Can we close this in favor of #14955?
You could check the proposed action in the patched attached there. Also, playing with the 'delete_site_transient'
action might solve your problem too.
#7
@
9 years ago
- Keywords has-patch close removed
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #14955.
This ticket was mentioned in Slack in #core by ocean90. View the logs.
9 years ago
#9
@
4 years ago
- Description modified (diff)
- Keywords has-patch added
- Milestone set to 5.8
- Resolution duplicate deleted
- Status changed from closed to reopened
I'm reopening this as I feel #14955 is a bit different. That ticket aims to provide a way for the theme being deleted/uninstalled to clean up after itself. But this suggestion is more for a general action hook that would fire when a theme is deleted successfully.
Since an active theme cannot be deleted, it would not be possible for a theme to use these hooks for the purpose of cleanup.
delete_theme
/deleted_theme
theme hooks would also bring parity to the plugin deletion process.
16401.diff is a refresh of a patch from #14955 worked on by @pbiron and @vetyst that adds these hooks.
#10
@
4 years ago
- Keywords commit added
- Version changed from 3.0.4 to 2.8
Marking as 2.8, when delete_theme()
was introduced.
#11
@
4 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from reopened to closed
In 50826:
Replying to scottconnerly:
+1