Ejemplo n.º 1
0
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     // create download buttons
     add_filter('FHEE__espresso_list_of_event_dates__datetime_html', array('EED_Ical', 'generate_add_to_iCal_button'), 10, 2);
     // process ics download request
     EE_Config::register_route('download_ics_file', 'EED_Ical', 'download_ics_file');
 }
 /**
  *    set_hooks - for hooking into EE Core, other modules, etc
  *
  * @access    public
  * @return    void
  */
 public static function set_hooks()
 {
     EED_Multi_Event_Registration::set_definitions();
     add_action('wp_enqueue_scripts', array('EED_Multi_Event_Registration', 'enqueue_styles_and_scripts'), 10);
     EE_Config::register_route('view', 'Multi_Event_Registration', 'view_event_cart', 'event_cart');
     EE_Config::register_route('update', 'Multi_Event_Registration', 'update_event_cart', 'event_cart');
     EE_Config::register_route('add_ticket', 'Multi_Event_Registration', 'add_ticket', 'event_cart');
     EE_Config::register_route('remove_ticket', 'Multi_Event_Registration', 'remove_ticket', 'event_cart');
     EE_Config::register_route('delete_ticket', 'Multi_Event_Registration', 'delete_ticket', 'event_cart');
     EE_Config::register_route('empty', 'Multi_Event_Registration', 'empty_event_cart', 'event_cart');
     // don't empty cart
     add_filter('FHEE__EE_Ticket_Selector__process_ticket_selections__clear_session', '__return_false');
     // process registration links
     add_filter('FHEE__EE_Ticket_Selector__ticket_selector_form_open__html', array('EED_Multi_Event_Registration', 'filter_ticket_selector_form_html'), 10, 2);
     add_filter('FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text', array('EED_Multi_Event_Registration', 'filter_ticket_selector_submit_button'), 10, 2);
     add_filter('FHEE__EED_Ticket_Selector__ticket_selector_iframe__css', array('EED_Multi_Event_Registration', 'style_sheet_URLs'), 10, 1);
     add_filter('FHEE__EED_Ticket_Selector__ticket_selector_iframe__js', array('EED_Multi_Event_Registration', 'javascript_URLs'), 10, 1);
     add_filter('FHEE__EE_Ticket_Selector__process_ticket_selections__success_redirect_url', array('EED_Multi_Event_Registration', 'filter_ticket_selector_redirect_url'), 10, 2);
     // verify that SPCO registrations correspond to tickets in cart
     add_filter('FHEE__EED_Single_Page_Checkout___initialize__checkout', array('EED_Multi_Event_Registration', 'verify_tickets_in_cart'), 10, 1);
     // redirect to event_cart
     add_action('EED_Ticket_Selector__process_ticket_selections__before', array('EED_Multi_Event_Registration', 'redirect_to_event_cart'), 10);
     add_filter('FHEE__EE_SPCO_Reg_Step__reg_step_submit_button__sbmt_btn_html', array('EED_Multi_Event_Registration', 'return_to_event_cart_button'), 10, 2);
     // toggling reg status
     add_filter('FHEE__EE_Registration_Processor__toggle_registration_status_if_no_monies_owing', array('EED_Multi_Event_Registration', 'toggle_registration_status_if_no_monies_owing'), 10, 2);
     // display errors
     add_action('wp_footer', array('EED_Multi_Event_Registration', 'cart_results_modal_div'), 1);
     // update cart in session
     add_action('shutdown', array('EED_Multi_Event_Registration', 'save_cart'), 10);
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     if (apply_filters('FHEE__EED_Bot_Trap__set_hooks__use_bot_trap', true) && EE_Registry::instance()->CFG->registration->use_bot_trap) {
         define('EE_BOT_TRAP_BASE_URL', plugin_dir_url(__FILE__) . DS);
         add_action('AHEE__ticket_selector_chart__template__after_ticket_selector', array('EED_Bot_Trap', 'generate_bot_trap'), 10, 2);
         add_action('EED_Ticket_Selector__process_ticket_selections__before', array('EED_Bot_Trap', 'process_bot_trap'), 1, 2);
         // redirect bots to bogus success page
         EE_Config::register_route('ticket_selection_received', 'EED_Bot_Trap', 'display_bot_trap_success');
     }
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route('promotions', 'EED_Promotions', 'run');
     add_action('wp_enqueue_scripts', array('EED_Promotions', 'translate_js_strings'), 1);
     add_action('wp_enqueue_scripts', array('EED_Promotions', 'enqueue_scripts'));
     add_action('AHEE__ticket_selector_chart__template__before_ticket_selector', array('EED_Promotions', 'display_event_promotions_banner'), 10, 1);
     add_action('FHEE__EE_Ticket_Selector__process_ticket_selections__before_redirecting_to_checkout', array('EED_Promotions', 'auto_process_promotions_in_cart'), 10, 1);
     add_action('FHEE__EE_SPCO_Reg_Step_Payment_Options___display_payment_options__before_payment_options', array('EED_Promotions', 'add_promotions_form_inputs'));
     // adjust SPCO
     add_filter('FHEE__EE_SPCO_Line_Item_Display_Strategy__item_row__name', array('EED_Promotions', 'adjust_SPCO_line_item_display'), 10, 2);
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     // routing
     EE_Config::register_route('process_ticket_selections', 'EED_Ticket_Selector', 'process_ticket_selections');
     add_action('wp_loaded', array('EED_Ticket_Selector', 'set_definitions'), 2);
     add_action('AHEE_event_details_before_post', array('EED_Ticket_Selector', 'ticket_selector_form_open'), 10, 1);
     add_action('AHEE_event_details_header_bottom', array('EED_Ticket_Selector', 'display_ticket_selector'), 10, 1);
     add_action('AHEE__ticket_selector_chart__template__after_ticket_selector', array('EED_Ticket_Selector', 'display_ticket_selector_submit'), 10, 1);
     add_action('AHEE_event_details_after_post', array('EED_Ticket_Selector', 'ticket_selector_form_close'), 10);
     add_action('wp_enqueue_scripts', array('EED_Ticket_Selector', 'load_tckt_slctr_assets'), 10);
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EED_Single_Page_Checkout::set_definitions();
     add_filter('FHEE_load_EE_messages', '__return_true');
     // configure the reg steps array
     EED_Single_Page_Checkout::setup_reg_steps_array();
     // set routing
     EE_Config::register_route('_register', 'EED_Single_Page_Checkout', 'run');
     foreach (self::$_reg_steps as $reg_step => $reg_step_details) {
         EE_Config::register_route($reg_step, 'EED_Single_Page_Checkout', $reg_step_details['process_func']);
     }
     //EE_Config::register_route( 'finalize_registration', 'EED_Single_Page_Checkout', 'finalize_registration' );
     // add powered by EE msg
     add_action('AHEE__SPCO__reg_form_footer', array('EED_Single_Page_Checkout', 'display_registration_footer'));
 }
 /**
  * All the message triggers done by route go in here.
  *
  * @since 4.5.0
  *
  * @return void
  */
 protected static function _register_routes()
 {
     EE_Config::register_route('msg_url_trigger', 'Messages', 'run');
     do_action('AHEE__EED_Messages___register_routes');
 }
 /**
  * load_reg_steps
  * loads and instantiates each reg step based on the EE_Registry::instance()->CFG->registration->reg_steps array
  *
  * @access    private
  * @throws EE_Error
  * @return    array
  */
 public static function load_reg_steps()
 {
     static $reg_steps_loaded = FALSE;
     if ($reg_steps_loaded) {
         return;
     }
     // load EE_SPCO_Reg_Step base class
     //		EE_Registry::instance()->load_file( SPCO_INC_PATH, 'EE_SPCO_Reg_Step', 'class'  );
     // filter list of reg_steps
     $reg_steps_to_load = apply_filters('AHEE__SPCO__load_reg_steps__reg_steps_to_load', EED_Single_Page_Checkout::get_reg_steps());
     // sort by key (order)
     ksort($reg_steps_to_load);
     // loop through folders
     foreach ($reg_steps_to_load as $order => $reg_step) {
         // we need a
         if (isset($reg_step['file_path'], $reg_step['class_name'], $reg_step['slug'])) {
             // copy over to the reg_steps_array
             EED_Single_Page_Checkout::$_reg_steps_array[$order] = $reg_step;
             // register custom key route for each reg step ( ie: step=>"slug" - this is the entire reason we load the reg steps array now )
             EE_Config::register_route($reg_step['slug'], 'EED_Single_Page_Checkout', 'run', 'step');
             // add AJAX or other hooks
             if (isset($reg_step['has_hooks']) && $reg_step['has_hooks']) {
                 // setup autoloaders if necessary
                 if (!class_exists($reg_step['class_name'])) {
                     EEH_Autoloader::register_autoloaders_for_each_file_in_folder($reg_step['file_path'], TRUE);
                 }
                 if (is_callable($reg_step['class_name'], 'set_hooks')) {
                     call_user_func(array($reg_step['class_name'], 'set_hooks'));
                 }
             }
         }
     }
     $reg_steps_loaded = TRUE;
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     add_filter('FHEE_run_EE_wp', '__return_true');
     add_action('wp_loaded', array('EED_Event_Single', 'set_definitions'), 2);
     EE_Config::register_route(__('event', 'event_espresso'), 'Event_Single', 'run');
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route('new_addon', 'EED_New_Addon', 'run');
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route('venues', 'Venues_Archive', 'run');
     //		EE_Config::register_view( 'venues', 0, EE_TEMPLATES . EE_Config::get_current_theme() . DS . 'archive-espresso_venues.php' );
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route('calendar', 'EED_Espresso_Calendar', 'run');
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route(__('events', 'event_espresso'), 'Events_Archive', 'run');
     EE_Config::register_route('event_list', 'Events_Archive', 'event_list');
     add_action('wp_loaded', array('EED_Events_Archive', 'set_definitions'), 2);
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route('person', 'People_Single', 'run');
     EED_People_Single::$templates_path = EEA_PEOPLE_ADDON_PATH . 'public' . DS . 'templates' . DS;
 }
 /**
  * All the message triggers done by route go in here.
  *
  * @since 4.5.0
  *
  * @return void
  */
 protected static function _register_routes()
 {
     EE_Config::register_route('msg_url_trigger', 'Messages', 'run');
     EE_Config::register_route('msg_cron_trigger', 'Messages', 'execute_batch_request');
     EE_Config::register_route('msg_browser_trigger', 'Messages', 'browser_trigger');
     EE_Config::register_route('msg_browser_error_trigger', 'Messages', 'browser_error_trigger');
     do_action('AHEE__EED_Messages___register_routes');
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route(EE_Registry::instance()->CFG->core->event_cpt_slug, 'Events_Archive', 'run');
     EE_Config::register_route('event_list', 'Events_Archive', 'event_list');
     add_action('wp_loaded', array('EED_Events_Archive', 'set_definitions'), 2);
 }
 /**
  * 	set_hooks - for hooking into EE Core, other modules, etc
  *
  *  @access 	public
  *  @return 	void
  */
 public static function set_hooks()
 {
     EE_Config::register_route('download_invoice', 'EED_Invoice', 'download_invoice');
     EE_Config::register_route('launch_invoice', 'EED_Invoice', 'launch_invoice');
 }