forked from jayallen/melody
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#680 state:resolved] Added a callback to DePo Clean to remove Action…
… Streams widget if Action Streams is not installed.
- Loading branch information
1 parent
5a4d6c9
commit bd8f17c
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package DePoCleanTheme::Callbacks; | ||
use strict; | ||
|
||
sub _ts_change { | ||
my ($cb, $param) = @_; | ||
my $blog = $param->{blog}; | ||
my $blog_template_set = $blog->template_set || ''; | ||
return 1 | ||
if 'DePoClean_theme' ne $blog_template_set; | ||
return 1 | ||
if MT->component('ActionStreams'); | ||
my $template = MT->model('template')->load({ | ||
blog_id => $blog->id, | ||
identifier => 'action_streams' | ||
}); | ||
|
||
$template->remove if $template; | ||
} | ||
|
||
1; |