protected function _parser($shortcode) { EE_Registry::instance()->load_helper('Template'); if (!$this->_data instanceof EE_Ticket) { return ''; } //get out cause we can only parse with the ticket object. switch ($shortcode) { case '[TICKET_ID]': return $this->_data->ID(); break; case '[TICKET_NAME]': return $this->_data->get('TKT_name'); break; case '[TICKET_DESCRIPTION]': return $this->_data->get('TKT_description'); break; case '[TICKET_PRICE]': return EEH_Template::format_currency($this->_data->get('TKT_price')); break; case '[TKT_QTY_PURCHASED]': return $this->_extra_data['data']->tickets[$this->_data->ID()]['count']; break; } }
/** * For adding any html output ab ove the payment overview. * Many gateways won't want ot display anything, so this function just returns an empty string. * Other gateways may want to override this, such as offline gateways. * @return string */ public function payment_overview_content(EE_Payment $payment) { EE_Registry::instance()->load_helper('Template'); $extra_meta_for_payment_method = $this->_pm_instance->all_extra_meta_array(); $template_vars = array_merge(array('payment_method' => $this->_pm_instance, 'payment' => $payment, 'page_title' => '', 'payment_instructions' => ''), $extra_meta_for_payment_method); return EEH_Template::locate_template('payment_methods' . DS . 'Bank' . DS . 'templates' . DS . 'bank_payment_details_content.template.php', $template_vars); }
public function column_name(EE_Promotion $item) { $edit_link = EEH_URL::add_query_args_and_nonce(array('action' => 'edit', 'PRO_ID' => $item->ID()), EE_PROMOTIONS_ADMIN_URL); $content = EE_Registry::instance()->CAP->current_user_can('ee_edit_promotion', 'espresso_promotions_edit_promotion', $item->ID()) ? '<a href="' . $edit_link . '" title="' . __('Edit Promotion', 'event_espresso') . '">' . $item->name() . '</a>' : $item->name(); $content .= '<br><span class="ee-status-text-small">' . EEH_Template::pretty_status($item->status(), false, 'sentence') . '</span>'; return $content; }
/** * template_settings_form * * @access public * @static * @return void */ public static function template_settings_form() { $EE = EE_Registry::instance(); $EE->CFG->template_settings->EED_Event_Single = isset($EE->CFG->template_settings->EED_Event_Single) ? $EE->CFG->template_settings->EED_Event_Single : new EE_Event_Single_Config(); $EE->CFG->template_settings->EED_Event_Single = apply_filters('FHEE__EED_Event_Single__template_settings_form__event_list_config', $EE->CFG->template_settings->EED_Event_Single); EEH_Template::display_template(EVENT_SINGLE_CAFF_TEMPLATES_PATH . 'admin-event-single-settings.template.php', $EE->CFG->template_settings->EED_Event_Single); }
/** * This will just setup the _events property in the expected format. * @return void */ protected function _setup_data() { //now let's loop and set up the _events property. At the same time we'll set up attendee properties. //a variable for tracking totals $running_total = 0; //get txn $this->txn = $this->reg_obj->transaction(); $this->taxes = $this->txn->tax_total(); $this->grand_total_price_object = ''; //possible session stuff? $session = $this->txn->session_data(); $session_data = $session instanceof EE_Session ? $session->get_session_data() : array(); //other data from the session (if possible) $this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : ''; $this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : ''; $this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : ''; $this->init_access = $this->last_access = ''; $this->payment = $this->txn->get_first_related('Payment'); $this->payment = empty($this->payment) ? EE_Payment::new_instance(array('STS_ID' => EEM_Payment::status_id_pending, 'PAY_timestamp' => (int) current_time('timestamp'), 'PAY_gateway' => $this->txn->selected_gateway(), 'PAY_gateway_response' => $this->txn->gateway_response_on_transaction())) : $this->payment; //if there is no payments associated with the transaction then we just create a default payment object for potential parsing. $this->billing = $this->payment->details(); EE_Registry::instance()->load_helper('Template'); $this->billing['total_due'] = isset($this->billing['total']) ? EEH_Template::format_currency($this->billing['total']) : ''; //get reg_objs for txn $this->reg_objs = $this->txn->registrations(); //now we can set things up like we do for other handlers $this->_assemble_data(); }
function category_color_widget() { if (isset($this->_req_data['EVT_CAT_ID'])) { $CAT_ID = $this->_req_data['EVT_CAT_ID']; $category = EEM_Term::instance()->get_one_by_ID($CAT_ID); } else { $category = null; } $use_color_picker = false; $default_background_color = '#eeeeee'; $default_text_color = '#444444'; if ($category) { $use_color_picker = $category->get_extra_meta('use_color_picker', true, false); $background_color = $category->get_extra_meta('background_color', true, $default_background_color); $text_color = $category->get_extra_meta('text_color', true, $default_text_color); } else { $background_color = $default_background_color; $text_color = $default_text_color; } $template_args = array(); $template_args['use_color_picker'] = $use_color_picker; $template_args['background_color'] = $background_color; $template_args['text_color'] = $text_color; $template_args['default_background_color'] = $default_background_color; $template_args['default_text_color'] = $default_text_color; EEH_Template::display_template(EE_CALENDAR_ADMIN_TEMPLATE_PATH . 'category_color_for_calendar.template.php', $template_args); }
protected function _setup_data() { //basically ALL we're going to get from this is the transaction object and use it to build the majority of our info. $session = $this->_data->get_session_data(); $this->txn = $session['transaction']; if (empty($this->txn) || !$this->txn instanceof EE_Transaction) { throw new EE_Error(__('Incoming data for the EE_Session data handler must have a valid EE_Transaction object in order to setup the data')); } $this->reg_info = array(); $this->incoming_data = $session; $this->taxes = $this->txn->tax_total(); $this->grand_total_price_object = ''; //other data from the session (if possible) $this->user_id = isset($session['user_id']) ? $session['user_id'] : ''; $this->ip_address = isset($session['ip_address']) ? $session['ip_address'] : ''; $this->user_agent = isset($session['user_agent']) ? $session['user_agent'] : ''; $this->init_access = $this->last_access = ''; $this->payment = $this->txn->get_first_related('Payment'); $this->payment = empty($this->payment) ? EE_Payment::new_instance(array('STS_ID' => EEM_Payment::status_id_pending, 'PAY_timestamp' => (int) current_time('timestamp'), 'PAY_gateway' => $this->txn->selected_gateway(), 'PAY_gateway_response' => $this->txn->gateway_response_on_transaction())) : $this->payment; //if there is no payments associated with the transaction then we just create a default payment object for potential parsing. $this->billing = $this->payment->details(); EE_Registry::instance()->load_helper('Template'); $this->billing['total_due'] = isset($this->billing['total']) ? EEH_Template::format_currency($this->billing['total']) : ''; //let's get all the registrations associated with this txn $this->reg_objs = $this->txn->registrations(); $this->_assemble_data(); }
public function __construct($template_file, $args = array(), $options_array = array()) { EE_Registry::instance()->load_helper('Template'); $html = EEH_Template::locate_template($template_file, $args); // echo " filepath:$template_file html $html"; parent::__construct($html, $options_array); }
/** * debug_logging_options * * @param array $template_args * @return void */ public function debug_logging_options($template_args = array()) { $template_args['use_full_logging'] = EE_Registry::instance()->CFG->admin->use_full_logging; $template_args['use_remote_logging'] = isset(EE_Registry::instance()->CFG->admin->use_remote_logging) ? absint(EE_Registry::instance()->CFG->admin->use_remote_logging) : FALSE; $template_args['remote_logging_url'] = isset(EE_Registry::instance()->CFG->admin->remote_logging_url) && !empty(EE_Registry::instance()->CFG->admin->remote_logging_url) ? stripslashes(EE_Registry::instance()->CFG->admin->remote_logging_url) : ''; $template = GEN_SET_CAF_TEMPLATE_PATH . 'debug_log_settings.template.php'; EEH_Template::display_template($template, $template_args); }
/** * output the relevant ee-status-legend with the designated status highlighted. * @param EEM_Message constant $status What status is set (by class) * @return string The status legend with the related status highlighted */ private function _message_status_legend($status) { $status_array = array('sent_status' => EEM_Message::status_sent, 'idle_status' => EEM_Message::status_idle, 'failed_status' => EEM_Message::status_failed, 'resend_status' => EEM_Message::status_resend, 'incomplete_status' => EEM_Message::status_incomplete, 'retry_status' => EEM_Message::status_retry); if (defined('WP_DEBUG') && WP_DEBUG) { $status_array['debug_only_status'] = EEM_Message::status_debug_only; } return EEH_Template::status_legend($status_array, $status); }
protected function _credits() { // $this->_template_args['admin_page_title'] = sprintf( __('Welcome to Event Espresso %s', 'event_espresso'), EVENT_ESPRESSO_VERSION ); $this->_template_args['admin_page_subtitle'] = __('Thank you for choosing Event Espresso, the most powerful Event Management plugin for WordPress.', 'event_espresso'); $template = EE_ABOUT_TEMPLATE_PATH . 'credits.template.php'; $this->_template_args['about_admin_page_content'] = EEH_Template::display_template($template, $this->_template_args, TRUE); $this->display_about_admin_page(); }
/** * _migration_step * * @access protected * @param int $num_items * @throws EE_Error * @return int number of items ACTUALLY migrated */ protected function _migration_step($num_items = 1) { $templates_relative_path = 'modules/gateways/Invoice/lib/templates/'; $overridden_invoice_body = EEH_Template::locate_template($templates_relative_path . 'invoice_body.template.php', NULL, FALSE, FALSE, TRUE); $overridden_receipt_body = EEH_Template::locate_template($templates_relative_path . 'receipt_body.template.php', NULL, FALSE, FALSE, TRUE); if ($overridden_invoice_body || $overridden_receipt_body) { EE_Error::add_persistent_admin_notice('invoice_overriding_templates', sprintf(__('Note: in this version of Event Espresso, PDF and HTML Invoices and Receipts are now Messages and can be changed just like any other messages; however we noticed you had previously overriden the old default Invoice/Receipt templates. Because of this, your old Invoice/Receipt templates will continue to be used INSTEAD of the new Invoice/Receipt message equivalents (but this will be removed in an upcoming version). We recommend deleting your old Invoice/Receipt templates and using the new messages system. Then modify the new Invoice and Receipt messages\'s content in Messages -> Invoice and Messages -> Receipt.')), TRUE); } //regardless of whether it worked or not, we ought to continue the migration $this->set_completed(); return 1; }
/** * Gets a string representation of the array * @param type $value_on_field_to_be_outputted * @param string $schema, possible values are ',', others can be added * @return string */ function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) { switch ($schema) { case 'print_r': $pretty_value = print_r($value_on_field_to_be_outputted, true); break; case 'as_table': $pretty_value = EEH_Template::layout_array_as_table($value_on_field_to_be_outputted); break; default: $pretty_value = implode(", ", $value_on_field_to_be_outputted); } return $pretty_value; }
/** * Schemas: * 'localized_float': "3,023.00" * 'no_currency_code': "$3,023.00" * null: "$3,023.00<span>USD</span>" * @param type $value_on_field_to_be_outputted * @param type $schema * @return string */ function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) { $pretty_float = parent::prepare_for_pretty_echoing($value_on_field_to_be_outputted); if ($schema == 'localized_float') { return $pretty_float; } if ($schema == 'no_currency_code') { // echo "schema no currency!"; $display_code = false; } else { $display_code = true; } //we don't use the $pretty_float because format_currency will take care of it. return EEH_Template::format_currency($value_on_field_to_be_outputted, false, $display_code); }
protected function _parser($shortcode) { EE_Registry::instance()->load_helper('Template'); $this->_ticket = $this->_data instanceof EE_Ticket ? $this->_data : null; $aee = $this->_data instanceof EE_Messages_Addressee ? $this->_data : null; $aee = !$aee instanceof EE_Messages_Addressee && is_array($this->_extra_data) && isset($this->_extra_data['data']) && $this->_extra_data['data'] instanceof EE_Messages_Addressee ? $this->_extra_data['data'] : $aee; //possible EE_Line_Item may be incoming data $this->_ticket = empty($this->_ticket) && $this->_data instanceof EE_Line_Item && $aee instanceof EE_Messages_Addressee && !empty($aee->line_items_with_children[$this->_data->ID()]['EE_Ticket']) && $aee->line_items_with_children[$this->_data->ID()]['EE_Ticket'] instanceof EE_Ticket ? $aee->line_items_with_children[$this->_data->ID()]['EE_Ticket'] : $this->_ticket; //if still no ticket, then let's see if there is a reg_obj. If there IS, then we'll try and grab the ticket from the reg_obj instead. if (empty($this->_ticket)) { $this->_ticket = $aee instanceof EE_Messages_Addressee && $aee->reg_obj instanceof EE_Registration ? $aee->reg_obj->ticket() : NULL; } //If there is no event object by now then get out. if (!$this->_ticket instanceof EE_Ticket) { return ''; } switch ($shortcode) { case '[TICKET_ID]': return $this->_ticket->ID(); break; case '[TICKET_NAME]': return $this->_ticket->get('TKT_name'); break; case '[TICKET_DESCRIPTION]': return $this->_ticket->get('TKT_description'); break; case '[TICKET_PRICE]': return EEH_Template::format_currency($this->_ticket->get('TKT_price')); break; case '[TICKET_PRICE_WITH_TAXES]': return EEH_Template::format_currency($this->_ticket->get_ticket_total_with_taxes()); break; case '[TKT_QTY_PURCHASED]': return $aee instanceof EE_Messages_Addressee ? $aee->tickets[$this->_ticket->ID()]['count'] : ''; break; } if (strpos($shortcode, '[TKT_USES_*') !== FALSE) { $attrs = $this->_get_shortcode_attrs($shortcode); $schema = empty($attrs['schema']) ? null : $attrs['schema']; return $this->_ticket->get_pretty('TKT_uses', $schema); } return ''; }
/** * * @param array $options_array { * @type string $extra_meta_inputs should be EE_Form_Section_Validatable[] which * will be _subsections and will be saved as extra meta on the payment method object; * @type EE_PMT_Base $payment_method_type the payment method type this form is for * @see EE_Model_Form_Section::__construct() for more * } */ public function __construct($options_array = array()) { $this->_model = EEM_Payment_Method::instance(); $this->_options_array = $options_array; if (isset($options_array['payment_method_type'])) { $this->_payment_method_type = $options_array['payment_method_type']; } $options_array = $this->_options_array; if (isset($options_array['extra_meta_inputs'])) { $this->_extra_meta_inputs = array_merge($this->_extra_meta_inputs, $options_array['extra_meta_inputs']); } if ($this->_extra_meta_inputs) { $this->_subsections = array_merge($this->_subsections, $this->_extra_meta_inputs); } $this->_subsections['PMD_button_url'] = new EE_Admin_File_Uploader_Input(array('html_label_text' => __('Button URL', 'event_espresso'))); $this->_subsections['PMD_scope'] = new EE_Checkbox_Multi_Input(EEM_Payment_Method::instance()->scopes(), array('html_label_text' => $this->_model->field_settings_for('PMD_scope')->get_nicename() . EEH_Template::get_help_tab_link('payment_methods_overview'))); //setup the currency options $this->_subsections['Currency'] = new EE_Select_Multi_Model_Input(EEM_Currency::instance()->get_all_currencies_usable_by($this->_payment_method_type), array('html_label_text' => __('Currencies Supported', 'event_espresso'), 'required' => TRUE)); $this->_subsections['PMD_order'] = new EE_Text_Input(array('html_help_text' => __('Lowest numbers will be shown first', 'event_espresso'), 'normalization_strategy' => new EE_Int_Normalization(), 'validation_strategies' => array(new EE_Int_Validation_Strategy()), 'default' => 0)); $this->_layout_strategy = new EE_Admin_Two_Column_Layout(); parent::__construct($options_array); }
/** * process_shortcode * * [ESPRESSO_PROMOTIONS] * * @access public * @param array $attributes * @return string */ public function process_shortcode($attributes = array()) { /** @type EEM_Promotion $EEM_Promotion */ $EEM_Promotion = EE_Registry::instance()->load_model('Promotion'); EE_Registry::instance()->load_helper('Template'); $active_promotions = $EEM_Promotion->get_all_active_codeless_promotions(); $html = '<div id="ee-upcoming-promotions-dv">'; foreach ($active_promotions as $promotion) { if ($promotion instanceof EE_Promotion) { $config = EED_Promotions::instance()->set_config(); if (!empty($config->banner_template) && $config->banner_template == 'promo-banner-ribbon.template.php' && !empty($config->ribbon_banner_color)) { $promo_bg_color = $config->ribbon_banner_color; } else { $promo_bg_color = ''; } $scope_objects = $promotion->get_objects_promo_applies_to(); $html .= EEH_Template::locate_template(apply_filters('FHEE__EED_Promotions__process_shortcode__upcoming_promotions', EE_PROMOTIONS_PATH . 'templates' . DS . 'upcoming-promotions-grid.template.php'), array('PRO_ID' => $promotion->ID(), 'promo_bg_color' => apply_filters('FHEE__EED_Promotions__process_shortcode__promo_bg_color', $promo_bg_color), 'promo_header' => $promotion->name(), 'promo_desc' => $promotion->description() != '' ? $promotion->description() . '<br />' : '', 'promo_amount' => $promotion->pretty_amount(), 'promo_dates' => $promotion->promotion_date_range(), 'promo_scopes' => $promotion->get_promo_applies_to_link_array($scope_objects))); } } $html .= '</div>'; return $html; }
protected function _setup_data() { $this->reg_info = array(); $this->txn = $this->_data['txn_obj']; $this->payment = $this->_data['pmt_obj']; $this->incoming_data = $this->_data; $this->taxes = $this->txn->tax_total(); $this->grand_total_price_object = ''; //not available and not needed? $session_data = $this->txn->session_data(); //other data from the session (if possible) $this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : ''; $this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : ''; $this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : ''; $this->init_access = $this->last_access = ''; $this->billing = $this->payment->details(); // check that the gateways didn't blow up if (!$this->billing instanceof EE_Error) { EE_Registry::instance()->load_helper('Template'); $this->billing['total_due'] = isset($this->billing['total']) ? EEH_Template::format_currency($this->billing['total']) : ''; } $this->reg_objs = $this->txn->get_many_related('Registration'); $this->_assemble_data(); }
echo EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $registration->ID()) ? ' <a href="' . $reg_url . '" title="' . esc_attr__('View Registration Details', 'event_espresso') . '">' . sprintf(__(' View Registration ', 'event_espresso'), $registration->ID()) . '</a>' : ''; ?> </td> <td class="jst-left"> <?php $txn_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'view_transaction', 'TXN_ID' => $registration->transaction_ID()), TXN_ADMIN_URL); echo EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? ' <a href="' . $txn_url . '" title="' . esc_attr__('View Transaction Details', 'event_espresso') . '"> View Transaction ' . $registration->transaction_ID() . ' </a>' : ''; ?> </td> <td class="jst-left"><?php echo $registration->reg_code(); ?> </td> <td class="jst-rght"><?php echo EEH_Template::format_currency($registration->final_price()); ?> </td> </tr> <?php } ?> </tbody> </table> </div> </div>
/** * Generate the html for selecting events that a promotion applies to. * * @since 1.0.0 * * @param integer $PRO_ID The promotion ID for the applies to selector we are retrieving. * @return string html */ public function get_admin_applies_to_selector($PRO_ID) { $applied_filters = $this->_maybe_overload_request_with_saved_filters($PRO_ID); $total_items = $this->_get_total_items(); $items_to_select = $this->get_scope_items(); $selected_items = $this->_get_applied_to_item_ids($PRO_ID); $template_args = array('scope_slug' => $this->slug, 'scope' => $this, 'header_content' => sprintf(__('%sCheck off the specific events that this promotion will be applied to.%s', 'event_espresso'), '<p>', '</p>'), 'filters' => $this->_get_applies_to_filters(), 'show_filters' => $applied_filters, 'items_to_select' => $this->_get_applies_to_items_to_select($items_to_select, $selected_items, $PRO_ID), 'items_paging' => $this->_get_applies_to_items_paging($total_items), 'selected_items' => $selected_items, 'number_of_selected_items' => count($selected_items), 'display_selected_label' => __('Display only selected Events', 'event_espresso'), 'footer_content' => ''); return EEH_Template::display_template(EE_PROMOTIONS_PATH . '/lib/scopes/templates/promotion_applies_to_wrapper.template.php', $template_args, TRUE); }
/** * display_country_states * * @access public * @param string $CNT_ISO * @return string */ public function display_country_states($CNT_ISO = '') { $CNT_ISO = isset($this->_req_data['country']) ? sanitize_text_field($this->_req_data['country']) : $CNT_ISO; if (!$CNT_ISO) { return ''; } // for ajax remove_all_filters('FHEE__EEH_Form_Fields__label_html'); remove_all_filters('FHEE__EEH_Form_Fields__input_html'); add_filter('FHEE__EEH_Form_Fields__label_html', array($this, 'state_form_field_label_wrap'), 10, 2); add_filter('FHEE__EEH_Form_Fields__input_html', array($this, 'state_form_field_input__wrap'), 10, 2); $states = EEM_State::instance()->get_all_states_for_these_countries(array($CNT_ISO => $CNT_ISO)); // echo '<h4>$CNT_ISO : ' . $CNT_ISO . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>'; // global $wpdb; // echo '<h4>' . $wpdb->last_query . ' <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>'; // EEH_Debug_Tools::printr( $states, '$states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); if ($states) { foreach ($states as $STA_ID => $state) { if ($state instanceof EE_State) { //STA_abbrev STA_name STA_active $state_input_types = array('STA_abbrev' => array('type' => 'TEXT', 'input_name' => 'states[' . $STA_ID . ']', 'class' => 'mid-text'), 'STA_name' => array('type' => 'TEXT', 'input_name' => 'states[' . $STA_ID . ']', 'class' => 'regular-text'), 'STA_active' => array('type' => 'RADIO_BTN', 'input_name' => 'states[' . $STA_ID . ']', 'options' => $this->_yes_no_values, 'use_desc_4_label' => true)); $this->_template_args['states'][$STA_ID]['inputs'] = EE_Question_Form_Input::generate_question_form_inputs_for_object($state, $state_input_types); $query_args = array('action' => 'delete_state', 'STA_ID' => $STA_ID, 'CNT_ISO' => $CNT_ISO, 'STA_abbrev' => $state->abbrev()); $this->_template_args['states'][$STA_ID]['delete_state_url'] = EE_Admin_Page::add_query_args_and_nonce($query_args, GEN_SET_ADMIN_URL); } } } else { $this->_template_args['states'] = FALSE; } // EEH_Debug_Tools::printr( $this->_template_args['states'], 'states <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' ); $this->_template_args['add_new_state_url'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'add_new_state'), GEN_SET_ADMIN_URL); $state_details_settings = EEH_Template::display_template(GEN_SET_TEMPLATE_PATH . 'state_details_settings.template.php', $this->_template_args, TRUE); if (defined('DOING_AJAX')) { $notices = EE_Error::get_notices(FALSE, FALSE, FALSE); echo json_encode(array('return_data' => $state_details_settings, 'success' => $notices['success'], 'errors' => $notices['errors'])); die; } else { return $state_details_settings; } }
/** * template_settings_form * * @access public * @static * @return string */ public static function template_settings_form() { $template_settings = EE_Registry::instance()->CFG->template_settings; $template_settings->EED_Events_Archive = isset($template_settings->EED_Events_Archive) ? $template_settings->EED_Events_Archive : new EE_Events_Archive_Config(); $template_settings->EED_Events_Archive = apply_filters('FHEE__EED_Events_Archive__template_settings_form__event_list_config', $template_settings->EED_Events_Archive); $events_archive_settings = array('display_status_banner' => 0, 'display_description' => 1, 'display_ticket_selector' => 0, 'display_datetimes' => 1, 'display_venue' => 0, 'display_expired_events' => 0); $events_archive_settings = array_merge($events_archive_settings, (array) $template_settings->EED_Events_Archive); EEH_Template::display_template(EVENTS_ARCHIVE_TEMPLATES_PATH . 'admin-event-list-settings.template.php', $events_archive_settings); }
</tbody> <tfoot> <tr class='total_tr'><td colspan="4"></td> <td class="item_r"><?php _e('Total Paid', 'event_espresso'); ?> </td> <td class="item_r"><?php echo EEH_Template::format_currency($amount_pd); ?> </td> </tr> <?php //echo $discount; ?> <tr class="total_tr"> <td colspan="4"></td> <td class="total" id="total_currency"><?php _e('Amount Owed', 'event_espresso'); ?> </td> <td class="total"><?php echo EEH_Template::format_currency($total_cost - $amount_pd); ?> </td> </tr> </tfoot> </table> </div>
protected function _term_object_details_content($taxonomy = 'espresso_people_categories') { $editor_args['category_desc'] = array('type' => 'wp_editor', 'value' => EEH_Formatter::admin_format_content($this->_term_object->category_desc), 'class' => 'my_editor_custom', 'wpeditor_args' => array('media_buttons' => FALSE)); $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); $all_terms = get_terms(array($taxonomy), array('hide_empty' => 0, 'exclude' => array($this->_term_object->id))); //setup category select for term parents. $category_select_values[] = array('text' => __('No Parent', 'event_espresso'), 'id' => 0); foreach ($all_terms as $term) { $category_select_values[] = array('text' => $term->name, 'id' => $term->term_id); } $category_select = EEH_Form_Fields::select_input('category_parent', $category_select_values, $this->_term_object->parent); $template_args = array('category' => $this->_term_object, 'category_select' => $category_select, 'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'), 'category_desc_editor' => $_wp_editor['category_desc']['field'], 'disable' => '', 'disabled_message' => FALSE, 'term_name_label' => $taxonomy == 'espresso_people_categories' ? __('Category Name', 'event_espresso') : __('Type Name', 'event_espresso'), 'term_id_description' => $taxonomy == 'espresso_people_categories' ? __('This is a default category so you can edit the label and the description but not the slug', 'event_espresso') : __('This is a default type so you can edit the label and the description but not the slug', 'event_espresso'), 'term_parent_label' => $taxonomy == 'espresso_people_categories' ? __('Category Parent', 'event_espresso') : __('Type Parent', 'event_espresso'), 'term_parent_description' => $taxonomy == 'espresso_people_categories' ? __('Categories are hierarchical. You can change the parent for this category here.', 'event_espresso') : __('People Types are hierarchical. You can change the parent for this type here.', 'event_espresso'), 'term_description_label' => $taxonomy == 'espresso_people_categories' ? __('Category Description', 'event_espresso') : __('Type Description')); $template = EEA_PEOPLE_ADDON_ADMIN_TEMPLATE_PATH . 'people_term_details.template.php'; return EEH_Template::display_template($template, $template_args, TRUE); }
/** * output the relevant ee-status-legend with the designated status highlighted. * @param EEM_Transaction constant $status What status is set (by class) * @return string The status legend with the related status highlighted */ private function _transaction_status_legend($status) { $status_array = array('overpaid' => EEM_Transaction::overpaid_status_code, 'complete' => EEM_Transaction::complete_status_code, 'incomplete' => EEM_Transaction::incomplete_status_code, 'failed' => EEM_Transaction::failed_status_code); return EEH_Template::status_legend($status_array, $status); }
/** * Overwrite parent _get_main_template for pdf purposes. * * @since 4.5.0 * * @param bool $preview * @return string */ protected function _get_main_template($preview = FALSE) { $wrapper_template = $this->_tmp_pack->get_wrapper('html', 'main'); //add message type to template_args $this->_template_args['message_type'] = $this->_incoming_message_type; //require template helper EE_Registry::instance()->load_helper('Template'); return EEH_Template::display_template($wrapper_template, $this->_template_args, TRUE); }
</th> <td> <?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue'); ?> </td> </tr> <tr> <th> <label for="EED_Events_Archive_display_expired_events"> <?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info'); ?> </label> </th> <td> <?php echo EEH_Form_Fields::select('expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events'); ?> </td> </tr> <tr> <th> <label for="EED_Events_Archive_reset_event_list_settings"> <?php _e('Reset Event List Settings', 'event_espresso');
/** * @return string html for the link to a help tab */ public function get_help_tab_link() { EE_Registry::instance()->load_helper('Template'); return EEH_Template::get_help_tab_link($this->get_help_tab_name()); }
protected function _category_details_content() { $editor_args['category_desc'] = array('type' => 'wp_editor', 'value' => EEH_Formatter::admin_format_content($this->_category->category_desc), 'class' => 'my_editor_custom', 'wpeditor_args' => array('media_buttons' => FALSE)); $_wp_editor = $this->_generate_admin_form_fields($editor_args, 'array'); $all_terms = get_terms(array('espresso_venue_categories'), array('hide_empty' => 0, 'exclude' => array($this->_category->id))); //setup category select for term parents. $category_select_values[] = array('text' => __('No Parent', 'event_espresso'), 'id' => 0); foreach ($all_terms as $term) { $category_select_values[] = array('text' => $term->name, 'id' => $term->term_id); } $category_select = EEH_Form_Fields::select_input('category_parent', $category_select_values, $this->_category->parent); $template_args = array('category' => $this->_category, 'category_select' => $category_select, 'unique_id_info_help_link' => $this->_get_help_tab_link('unique_id_info'), 'category_desc_editor' => $_wp_editor['category_desc']['field'], 'disable' => '', 'disabled_message' => FALSE); $template = EVENTS_TEMPLATE_PATH . 'event_category_details.template.php'; return EEH_Template::display_template($template, $template_args, TRUE); }
function column_amount($item) { if ($this->_price_types[$item->type()]->is_percent()) { return '<div class="pad-amnt-rght">' . number_format($item->amount(), 1) . '%</div>'; } else { return '<div class="pad-amnt-rght">' . EEH_Template::format_currency($item->amount()) . '</div>'; } }