# UpdateEntryDate.pl
# UpdateEntryDate plugin for Movable Type
# by Kevin Shay
# http://www.staggernation.com/mtplugins/UpdateEntryDate/
use strict;
package MT::Plugin::UpdateEntryDate;
use vars qw( $VERSION );
$VERSION = '1.1';
require MT::Plugin;
require MT;
my $plugin = MT::Plugin->new({
name => "UpdateEntryDate",
description => 'Update the Entry Date timestamp of an entry by clicking a button.',
doc_link => 'http://www.staggernation.com/mtplugins/UpdateEntryDate/',
author_name => 'Kevin Shay',
author_link => 'http://www.staggernation.com/',
version => $VERSION
});
MT->add_plugin($plugin);
MT->add_callback('MT::App::CMS::AppTemplateSource.edit_entry', 9, $plugin, \&_template);
sub _template {
my ($cb, $app, $template) = @_;
my $old = qq{?};
$old = quotemeta($old);
my $new = <<"HTML";
?
">
HTML
$$template =~ s/$old/$new/g;
}
1;