本文整理汇总了PHP中EEH_Template::display_template方法的典型用法代码示例。如果您正苦于以下问题:PHP EEH_Template::display_template方法的具体用法?PHP EEH_Template::display_template怎么用?PHP EEH_Template::display_template使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EEH_Template
的用法示例。
在下文中一共展示了EEH_Template::display_template方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: payment_overview_content
/**
* 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::display_template($this->_file_folder . 'templates' . DS . 'bank_payment_details_content.template.php', $template_vars, true);
}
示例2: template_settings_form
/**
* 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);
}
示例3: category_color_widget
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);
}
示例4: _credits
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();
}
示例5: debug_logging_options
/**
* 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);
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:14,代码来源:Extend_General_Settings_Admin_Page.core.php
示例6: display_country_states
/**
* 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;
}
}
示例7: _term_object_details_content
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);
}
示例8: payment_overview_content
/**
* 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.
* @param EE_Payment $payment
* @return string
*/
public function payment_overview_content(EE_Payment $payment)
{
EE_Registry::instance()->load_helper('Template');
return EEH_Template::display_template(EE_LIBRARIES . 'payment_methods' . DS . 'templates' . DS . 'payment_details_content.template.php', array('payment_method' => $this->_pm_instance, 'payment' => $payment), true);
}
示例9: after_title_form_fields
/**
* add in the form fields for the attendee edit
* @param WP_Post $post wp post object
* @return string html for new form.
*/
public function after_title_form_fields($post)
{
if ($post->post_type == 'espresso_attendees') {
$template = REG_TEMPLATE_PATH . 'attendee_details_after_title_form_fields.template.php';
$template_args['attendee'] = $this->_cpt_model_obj;
EEH_Template::display_template($template, $template_args);
}
}
示例10: _get_ticket_js_structure
protected function _get_ticket_js_structure($all_dtts, $all_tickets)
{
$template_args = array('default_datetime_edit_row' => $this->_get_dtt_edit_row('DTTNUM', NULL, TRUE, $all_dtts), 'default_ticket_row' => $this->_get_ticket_row('TICKETNUM', NULL, array(), array(), TRUE), 'default_price_row' => $this->_get_ticket_price_row('TICKETNUM', 'PRICENUM', NULL, TRUE, NULL), 'default_price_rows' => '', 'default_base_price_amount' => 0, 'default_base_price_name' => '', 'default_base_price_description' => '', 'default_price_modifier_selector_row' => $this->_get_price_modifier_template('TICKETNUM', 'PRICENUM', NULL, TRUE), 'default_available_tickets_for_datetime' => $this->_get_dtt_attached_tickets_row('DTTNUM', NULL, array(), array(), TRUE), 'existing_available_datetime_tickets_list' => '', 'existing_available_ticket_datetimes_list' => '', 'new_available_datetime_ticket_list_item' => $this->_get_datetime_tickets_list_item('DTTNUM', 'TICKETNUM', NULL, NULL, array(), TRUE), 'new_available_ticket_datetime_list_item' => $this->_get_ticket_datetime_list_item('DTTNUM', 'TICKETNUM', NULL, NULL, array(), TRUE));
$tktrow = 1;
foreach ($all_tickets as $ticket) {
$template_args['existing_available_datetime_tickets_list'] .= $this->_get_datetime_tickets_list_item('DTTNUM', $tktrow, NULL, $ticket, array(), TRUE);
$tktrow++;
}
$dttrow = 1;
foreach ($all_dtts as $dtt) {
$template_args['existing_available_ticket_datetimes_list'] .= $this->_get_ticket_datetime_list_item($dttrow, 'TICKETNUM', $dtt, NULL, array(), TRUE);
$dttrow++;
}
$default_prices = EE_Registry::instance()->load_model('Price')->get_all_default_prices();
$prcrow = 1;
foreach ($default_prices as $price) {
if ($price->is_base_price()) {
$template_args['default_base_price_amount'] = $price->get_pretty('PRC_amount', 'localized_float');
$template_args['default_base_price_name'] = $price->get('PRC_name');
$template_args['default_base_price_description'] = $price->get('PRC_desc');
$prcrow++;
continue;
}
$show_trash = count($default_prices) > 1 && $prcrow === 1 || count($default_prices) === 1 ? FALSE : TRUE;
$show_create = count($default_prices) > 1 && count($default_prices) !== $prcrow ? FALSE : TRUE;
$template_args['default_price_rows'] .= $this->_get_ticket_price_row('TICKETNUM', $prcrow, $price, TRUE, NULL, $show_trash, $show_create);
$prcrow++;
}
$template_args = apply_filters('FHEE__espresso_events_Pricing_Hooks___get_ticket_js_structure__template_args', $template_args, $all_dtts, $all_tickets, $this->_is_creating_event);
$template = PRICING_TEMPLATE_PATH . 'event_tickets_datetime_ticket_js_structure.template.php';
return EEH_Template::display_template($template, $template_args, TRUE);
}
示例11: edit_admin_footer
/**
* This is the dynamic method for this class that will end up hooking into the 'admin_footer' hook on the 'edit_event' route in the events page.
* @return string (admin_footer contents)
*/
public function edit_admin_footer()
{
$template_path = EE_CORE_CAF_ADMIN_EXTEND . 'messages/templates/create_custom_template_form.template.php';
EEH_Template::display_template($template_path, array());
}
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:9,代码来源:espresso_events_Messages_Hooks_Extend.class.php
示例12: admin_page_wrapper
/**
* generates HTML wrapper with Tabbed nav for an admin page
* @access public
* @param boolean $about whether to use the special about page wrapper or default.
* @return void
*/
public function admin_page_wrapper($about = FALSE)
{
do_action('AHEE_log', __FILE__, __FUNCTION__, '');
$this->_nav_tabs = $this->_get_main_nav_tabs();
$this->_template_args['nav_tabs'] = $this->_nav_tabs;
$this->_template_args['admin_page_title'] = $this->_admin_page_title;
$this->_template_args['before_admin_page_content'] = apply_filters('FHEE_before_admin_page_content' . $this->_current_page . $this->_current_view, isset($this->_template_args['before_admin_page_content']) ? $this->_template_args['before_admin_page_content'] : '');
$this->_template_args['after_admin_page_content'] = apply_filters('FHEE_after_admin_page_content' . $this->_current_page . $this->_current_view, isset($this->_template_args['after_admin_page_content']) ? $this->_template_args['after_admin_page_content'] : '');
$this->_template_args['after_admin_page_content'] .= $this->_set_help_popup_content();
// load settings page wrapper template
$template_path = !defined('DOING_AJAX') ? EE_ADMIN_TEMPLATE . 'admin_wrapper.template.php' : EE_ADMIN_TEMPLATE . 'admin_wrapper_ajax.template.php';
//about page?
$template_path = $about ? EE_ADMIN_TEMPLATE . 'about_admin_wrapper.template.php' : $template_path;
if (defined('DOING_AJAX')) {
$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, $this->_template_args, TRUE);
$this->_return_json();
} else {
EEH_Template::display_template($template_path, $this->_template_args);
}
}
示例13: venue_metabox
public function venue_metabox()
{
$values = array(array('id' => true, 'text' => __('Yes', 'event_espresso')), array('id' => false, 'text' => __('No', 'event_espresso')));
$evt_obj = $this->_adminpage_obj->get_event_object();
$evt_id = $evt_obj->ID();
//first let's see if we have a venue already
$evt_venues = !empty($evt_id) ? $evt_obj->venues() : array();
$evt_venue = $evt_venues && is_array($evt_venues) ? reset($evt_venues) : null;
$evt_venue_id = $evt_venue instanceof EE_Venue ? $evt_venue->ID() : null;
//possibly private venues.
if (EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')) {
$vnu_where['status'] = array('IN', array('publish', 'private'));
} else {
$vnu_where['status'] = 'publish';
}
//cap checks
if (!EE_Registry::instance()->CAP->current_user_can('ee_read_others_venues', 'get_venues')) {
$vnu_where['VNU_wp_user'] = get_current_user_id();
}
$vnumdl = EE_Registry::instance()->load_model('Venue');
$venues = $vnumdl->get_all(array($vnu_where, 'order_by' => array('VNU_name' => 'ASC')));
$ven_select = array();
$ven_select[0] = __('Select a Venue', 'event_espresso');
//setup venues for selector
foreach ($venues as $venue) {
$ven_select[$venue->ID()] = $venue->name();
}
//if $ven_select does not have the existing venue attached to event then let's add that because we'll always
//show existing attached venues even if it's trashed (or some other restricted status).
if ($evt_venue_id && !isset($ven_select[$evt_venue_id])) {
$ven_select[$evt_venue_id] = $evt_venue->name();
$venues = array_merge($venues, array($evt_venue));
}
$template_args['venues'] = $venues;
$template_args['evt_venue_id'] = $evt_venue_id;
$template_args['venue_selector'] = EEH_Form_Fields::select_input('venue_id', $ven_select, $evt_venue_id, 'id="venue_id"');
$template_args['enable_for_gmap'] = EEH_Form_Fields::select_input('enable_for_gmap', $values, is_object($evt_venue) ? $evt_venue->enable_for_gmap() : NULL, 'id="enable_for_gmap"');
$template_path = empty($venues) ? EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content.template.php' : EE_VENUES_TEMPLATE_PATH . 'event_venues_metabox_content_from_manager.template.php';
EEH_Template::display_template($template_path, $template_args);
}
示例14: _reg_form_settings
protected function _reg_form_settings()
{
$this->_template_args['values'] = $this->_yes_no_values;
$this->_template_args['use_captcha'] = isset(EE_Registry::instance()->CFG->registration->use_captcha) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE;
$this->_template_args['show_captcha_settings'] = $this->_template_args['use_captcha'] ? 'style="display:table-row;"' : '';
$this->_template_args['recaptcha_publickey'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_publickey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_publickey) : '';
$this->_template_args['recaptcha_privatekey'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) : '';
$this->_template_args['recaptcha_width'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_width) ? absint(EE_Registry::instance()->CFG->registration->recaptcha_width) : 500;
$this->_template_args['recaptcha_theme_options'] = array(array('id' => 'red', 'text' => __('Red', 'event_espresso')), array('id' => 'white', 'text' => __('White', 'event_espresso')), array('id' => 'blackglass', 'text' => __('Blackglass', 'event_espresso')), array('id' => 'clean', 'text' => __('Clean', 'event_espresso')));
$this->_template_args['recaptcha_theme'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_theme) ? EE_Registry::instance()->CFG->registration->get_pretty('recaptcha_theme') : 'clean';
$this->_template_args['recaptcha_language_options'] = array(array('id' => 'en', 'text' => __('English', 'event_espresso')), array('id' => 'es', 'text' => __('Spanish', 'event_espresso')), array('id' => 'nl', 'text' => __('Dutch', 'event_espresso')), array('id' => 'fr', 'text' => __('French', 'event_espresso')), array('id' => 'de', 'text' => __('German', 'event_espresso')), array('id' => 'pt', 'text' => __('Portuguese', 'event_espresso')), array('id' => 'ru', 'text' => __('Russian', 'event_espresso')), array('id' => 'tr', 'text' => __('Turkish', 'event_espresso')));
$this->_template_args['recaptcha_language'] = isset(EE_Registry::instance()->CFG->registration->recaptcha_language) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en';
$this->_set_add_edit_form_tags('update_reg_form_settings');
$this->_set_publish_post_box_vars(NULL, FALSE, FALSE, NULL, FALSE);
$this->_template_args['admin_page_content'] = EEH_Template::display_template(REGISTRATION_FORM_TEMPLATE_PATH . 'reg_form_settings.template.php', $this->_template_args, TRUE);
$this->display_admin_page_with_sidebar();
}
示例15: _faq
protected function _faq()
{
$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE);
$this->display_admin_page_with_sidebar();
}