/**
  * Load the email template if we're looking at the email page. 
  *
  * @param 	string 		$template
  * @return 	string
  * @access  public
  * @since 	1.0.0
  */
 public function email_template($template)
 {
     if (charitable_is_page('email_preview')) {
         do_action('charitable_email_preview');
         $template = charitable_get_template_path('emails/preview.php');
     }
     return $template;
 }
 /**
  * Loads the user dashboard template. 
  *
  * @param   string $template
  * @return  string
  * @access  public
  * @since   1.0.0
  */
 public function load_user_dashboard_template($template)
 {
     /**
      * The user dashboard template is not loaded by default; this has to be enabled. 
      */
     if (false === apply_filters('charitable_force_user_dashboard_template', false)) {
         return $template;
     }
     /**
      * The current object isn't in the nav, so return the template.
      */
     if (!$this->in_nav()) {
         return $template;
     }
     do_action('charitable_is_user_dashboard');
     $new_template = apply_filters('charitable_user_dashboard_template', 'user-dashboard.php');
     $template = charitable_get_template_path($new_template, $template);
     return $template;
 }
 /**
  * Load the reset password template.
  *
  * @param   string $template
  * @return  string
  * @access  protected
  * @since   1.4.0
  */
 protected function get_reset_password_template($template)
 {
     if ('wp' == charitable_get_option('login_page', 'wp')) {
         return $template;
     }
     new Charitable_Ghost_Page('reset-password-page', array('title' => __('Reset Password', 'charitable'), 'content' => '<!-- Silence is golden -->'));
     $new_template = apply_filters('charitable_reset_password_page_template', array('reset-password-page.php', 'page.php', 'index.php'));
     return charitable_get_template_path($new_template, $template);
 }
 /**
  * @covers charitable_get_template_path
  */
 public function test_get_template_path()
 {
     $expected = charitable()->get_path('templates', true) . 'campaign-loop.php';
     $this->assertEquals($expected, charitable_get_template_path('campaign-loop.php'));
 }