Skip to content

Instantly share code, notes, and snippets.

@chrisjdavis
Created April 30, 2013 21:00
Show Gist options
  • Save chrisjdavis/5491913 to your computer and use it in GitHub Desktop.
Save chrisjdavis/5491913 to your computer and use it in GitHub Desktop.
private function add_templates() {
$this->add_template( 'dash', dirname(__FILE__) . '/templates/dash.php' );
$this->add_template( 'locations', dirname(__FILE__) . '/templates/location.multiple.php' );
$this->add_template( 'new.location', dirname(__FILE__) . '/templates/location.new.php' );
}
public function action_before_act_admin( $that ) {
if( !isset($that->handler_vars['page']) && $that->handler_vars['entire_match'] == 'admin' ) {
Utils::redirect( Site::get_url('admin') . '/dash/' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment