OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d862ebd
)
don't allow deletion of the current theme
author
scribu
<mail@scribu.net>
Fri, 8 Mar 2013 20:44:29 +0000
(22:44 +0200)
committer
scribu
<mail@scribu.net>
Fri, 8 Mar 2013 20:44:32 +0000
(22:44 +0200)
WSODs are bad, mkay.
php/commands/theme.php
patch
|
blob
|
history
diff --git
a/php/commands/theme.php
b/php/commands/theme.php
index
26dbdad
..
4f5a8de
100644
(file)
--- a/
php/commands/theme.php
+++ b/
php/commands/theme.php
@@
-178,6
+178,10
@@
class Theme_Command extends \WP_CLI\CommandWithUpgrade {
function delete( $args ) {
$theme = $this->parse_name( $args );
+ if ( $this->is_active_theme( $theme ) ) {
+ WP_CLI::error( "Can't delete the currently active theme." );
+ }
+
$r = delete_theme( $theme->get_stylesheet() );
if ( is_wp_error( $r ) ) {