-
-
Save padawan/488472 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
name: Plugin Name | |
init: sub { my $p = shift; require PluginName::Plugin; bless $p, 'PluginName::Plugin', $p; } | |
This file contains hidden or 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
package PluginName::Plugin; | |
use strict; | |
use warnings; | |
use base qw( MT::Plugin ); | |
sub load_config { | |
my $plugin = shift; | |
$plugin->SUPER::load_config(@_); | |
my ( $param, $scope ) = @_; | |
if ( $scope =~ /^blog:(\d+)$/ ) { | |
my $blog_id = $1; | |
# tweak $param as needed for values | |
# to pass to the config template | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment