/**
  * Set up the class. 
  *
  * @access 	private
  * @since 	1.0.0
  */
 private function __construct()
 {
     add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'));
     add_filter('post_class', array($this, 'campaign_post_class'));
     /**
      * We are registering this object only for backwards compatibility. It
      * will be removed in or after Charitable 1.3.
      *
      * @deprecated
      */
     charitable()->register_object(Charitable_Session::get_instance());
     charitable()->register_object(Charitable_Templates::get_instance());
     do_action('charitable_public_start', $this);
 }
 /**
  * Set up the class.
  *
  * @access 	private
  * @since 	1.0.0
  */
 private function __construct()
 {
     add_action('after_setup_theme', array($this, 'load_template_files'));
     add_action('wp_enqueue_scripts', array($this, 'setup_scripts'));
     add_action('wp_enqueue_scripts', array($this, 'maybe_enqueue_donation_form_scripts'), 11);
     add_action('charitable_campaign_loop_before', array($this, 'maybe_enqueue_donation_form_scripts'));
     add_filter('post_class', array($this, 'campaign_post_class'));
     add_filter('comments_open', array($this, 'disable_comments_on_application_pages'), 10, 2);
     /**
      * We are registering this object only for backwards compatibility. It
      * will be removed in or after Charitable 1.3.
      *
      * @deprecated
      */
     charitable()->register_object(Charitable_Session::get_instance());
     charitable()->register_object(Charitable_Templates::get_instance());
     do_action('charitable_public_start', $this);
 }
/**
 * Returns the current user's session object.
 *
 * @return 	Charitable_Session
 * @since 	1.0.0
 */
function charitable_get_session()
{
    return Charitable_Session::get_instance();
}
Пример #4
0
 /**
  * Checks whether we're executing an AJAX hook and if so, loads some AJAX functionality.
  *
  * @return  void
  * @access  private
  * @since   1.0.0
  */
 private function maybe_start_ajax()
 {
     if (false === (defined('DOING_AJAX') && DOING_AJAX)) {
         return;
     }
     require_once $this->get_path('includes') . 'ajax/charitable-ajax-functions.php';
     require_once $this->get_path('includes') . 'ajax/charitable-ajax-hooks.php';
     /**
      * We are registering this object only for backwards compatibility. It
      * will be removed in or after Charitable 1.3.
      *
      * @deprecated
      */
     $this->register_object(Charitable_Session::get_instance());
 }
Пример #5
0
 /**
  * Checks whether we're executing an AJAX hook and if so, loads some AJAX functionality. 
  *
  * @return  void
  * @access  private
  * @since   1.0.0
  */
 private function maybe_start_ajax()
 {
     if (false === (defined('DOING_AJAX') && DOING_AJAX)) {
         return;
     }
     /**
      * We are registering this object only for backwards compatibility. It
      * will be removed in or after Charitable 1.3.
      *
      * @deprecated
      */
     $this->register_object(Charitable_Session::get_instance());
 }