# Album Plugin:	examples/formatting/sort_pics
# For info:	'album -plugin_info examples/formatting/sort_pics'
# For usage:	'album -plugin_usage examples/formatting/sort_pics'
use strict;

sub start_plugin {
  my ($opt) = @_;

  # Setup my hooks
  album::hook($opt,'sort_pics',\&sort_pics);

  return {
    author => 'David Ljung Madison',
    href => 'http://MarginalHacks.com/',
    version => '1.0',
    description => "Stupid sort_pics hook example",
  };
}

sub sort_pics {
  my ($opt, $data, $hookname, @pics) = @_;
  # Stupid example sort, everything by name, reversed.
  reverse sort @pics;
}

# Plugins always end with:
1;
