当前位置: 首页>>代码示例>>PHP>>正文


PHP EE_Admin_Page类代码示例

本文整理汇总了PHP中EE_Admin_Page的典型用法代码示例。如果您正苦于以下问题:PHP EE_Admin_Page类的具体用法?PHP EE_Admin_Page怎么用?PHP EE_Admin_Page使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了EE_Admin_Page类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: column_CHK_timestamp

 function column_CHK_timestamp(EE_Checkin $item)
 {
     $actions = array();
     $delete_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'delete_checkin_row', 'DTT_ID' => $this->_req_data['DTT_ID'], '_REGID' => $this->_req_data['_REGID'], 'CHK_ID' => $item->ID()));
     $actions['delete_checkin'] = EE_Registry::instance()->CAP->current_user_can('ee_delete_checkins', 'espresso_registrations_delete_checkin_row') ? '<a href="' . $delete_url . '" title="' . esc_attr__('Click here to delete this check-in record', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>' : '';
     return sprintf('%1$s %2$s', $item->get_datetime('CHK_timestamp'), $this->row_actions($actions));
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:7,代码来源:EE_Registration_CheckIn_List_Table.class.php

示例2: _request_filesystem_credentials

 /**
  * _request_filesystem_credentials
  * if attempting to enable full logging, WordPress may require filesystem credentials for FTP or SSH depending on the server
  *
  * @access   protected
  * @param bool $show_errors
  * @return bool
  */
 protected function _request_filesystem_credentials($show_errors = TRUE)
 {
     require_once ABSPATH . 'wp-admin/includes/file.php';
     $url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'request_filesystem_credentials'), $this->_admin_base_url);
     $credentials = request_filesystem_credentials($url);
     if ($credentials == FALSE) {
         if ($show_errors) {
             EE_Error::get_notices(FALSE);
             EE_Error::reset_notices();
             EE_Error::add_error(__('Connection settings are missing or incorrect. Please verify that the connection settings below are correct.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
             add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false');
         }
         return FALSE;
     }
     // now we have some credentials, try to get the wp_filesystem running
     $WP_Filesystem = WP_Filesystem($credentials);
     if (!$WP_Filesystem) {
         if ($show_errors) {
             EE_Error::get_notices(FALSE);
             EE_Error::reset_notices();
             EE_Error::add_error(__('There was an error connecting to the server. Please verify that the connection settings below are correct.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
             add_filter('FHEE__General_Settings_Admin_Page___update_admin_option_settings__success', '__return_false');
         }
         // our credentials were no good, ask the user for them again
         request_filesystem_credentials($url);
         return FALSE;
     }
     EE_Registry::instance()->CFG->admin->use_full_logging = TRUE;
     return TRUE;
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:38,代码来源:Extend_General_Settings_Admin_Page.core.php

示例3: column_count

 public function column_count($item)
 {
     $e_args = array('action' => 'default', 'category' => $item->get_first_related('Term')->ID());
     $e_link = EE_Admin_Page::add_query_args_and_nonce($e_args, EE_VENUES_ADMIN_URL);
     $content = '<a href="' . $e_link . '">' . $item->get('term_count') . '</a>';
     return $content;
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:7,代码来源:Venue_Categories_Admin_List_Table.class.php

示例4: column_display_text

 public function column_display_text(EE_Question $item)
 {
     $system_question = $item->is_system_question();
     $actions = array();
     if (!defined('REG_ADMIN_URL')) {
         define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
     }
     $edit_query_args = array('action' => 'edit_question', 'QST_ID' => $item->ID());
     $trash_query_args = array('action' => 'trash_question', 'QST_ID' => $item->ID());
     $restore_query_args = array('action' => 'restore_question', 'QST_ID' => $item->ID());
     $delete_query_args = array('action' => 'delete_questions', 'QST_ID' => $item->ID());
     $edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
     $trash_link = EE_Admin_Page::add_query_args_and_nonce($trash_query_args, EE_FORMS_ADMIN_URL);
     $restore_link = EE_Admin_Page::add_query_args_and_nonce($restore_query_args, EE_FORMS_ADMIN_URL);
     $delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EE_FORMS_ADMIN_URL);
     if (EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID())) {
         $actions = array('edit' => '<a href="' . $edit_link . '" title="' . __('Edit Question', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>');
     }
     if (!$system_question && $this->_view != 'trash' && EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_trash_question', $item->ID())) {
         $actions['delete'] = '<a href="' . $trash_link . '" title="' . __('Trash Question', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
     }
     if ($this->_view == 'trash') {
         if (EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_restore_question', $item->ID())) {
             $actions['restore'] = '<a href="' . $restore_link . '" title="' . __('Restore Question', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
         }
         if ($item->count_related('Answer') === 0 && EE_Registry::instance()->CAP->current_user_can('ee_delete_question', 'espresso_registration_form_delete_questions', $item->ID())) {
             $actions['delete_permanently'] = '<a href="' . $delete_link . '" title="' . __('Delete Question Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
         }
     }
     $content = EE_Registry::instance()->CAP->current_user_can('ee_edit_question', 'espresso_registration_form_edit_question', $item->ID()) ? '<strong><a class="row-title" href="' . $edit_link . '">' . $item->display_text() . '</a></strong>' : $item->display_text();
     $content .= $this->row_actions($actions);
     return $content;
 }
开发者ID:robert-osborne,项目名称:event-espresso-core-1,代码行数:33,代码来源:Extend_Registration_Form_Questions_Admin_List_Table.class.php

示例5: column_ATT_fname

 function column_ATT_fname($item)
 {
     //Build row actions
     $actions = array();
     // edit attendee link
     if (EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee')) {
         $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit_attendee', 'post' => $item->ID()), REG_ADMIN_URL);
         $actions['edit'] = '<a href="' . $edit_lnk_url . '" title="' . esc_attr__('Edit Contact', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>';
     }
     if ($this->_view == 'in_use') {
         // trash attendee link
         if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) {
             $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'trash_attendees', 'ATT_ID' => $item->ID()), REG_ADMIN_URL);
             $actions['trash'] = '<a href="' . $trash_lnk_url . '" title="' . esc_attr__('Move Contact to Trash', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
         }
     } else {
         if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_restore_attendees')) {
             // restore attendee link
             $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'restore_attendees', 'ATT_ID' => $item->ID()), REG_ADMIN_URL);
             $actions['restore'] = '<a href="' . $restore_lnk_url . '" title="' . esc_attr__('Restore Contact', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
         }
     }
     $edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'edit_attendee', 'post' => $item->ID()), REG_ADMIN_URL);
     $name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="' . $edit_lnk_url . '" title="' . esc_attr__('Edit Contact', 'event_espresso') . '">' . $item->fname() . '</a>' : $item->fname();
     //Return the name contents
     return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions));
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:27,代码来源:EE_Attendee_Contact_List_Table.class.php

示例6: _column_name_action_setup

 protected function _column_name_action_setup(EE_Event $item)
 {
     $export_query_args = array('action' => 'export_events', 'EVT_ID' => $item->ID());
     $export_event_link = EE_Admin_Page::add_query_args_and_nonce($export_query_args, EVENTS_ADMIN_URL);
     $actions = parent::_column_name_action_setup($item);
     //		$actions['export'] = '<a href="' . $export_event_link . '" title="' . __('Export Event', 'event_espresso') . '">' . __('Export', 'event_espresso') . '</a>';
     return $actions;
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:8,代码来源:Extend_Events_Admin_List_Table.class.php

示例7: extra_news_box_content

 public function extra_news_box_content($content)
 {
     echo '<h4 style="margin:0">' . __('From the Forums', 'event_espresso') . '</h4>';
     echo '<div id="ee_forum_posts_content">';
     $url = 'http://eventespresso.com/forum/event-espresso-support/feed/';
     EE_Admin_Page::cached_rss_display('ee_forum_posts_content', $url);
     echo '</div>';
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:8,代码来源:Global_EE_Caf_Hooks.class.php

示例8: check_payment_gateway_setup

    /**
     * Checks that there is at least one active gateway. If not, add a notice
     */
    public function check_payment_gateway_setup()
    {
        $actives = EE_Config::instance()->gateway->active_gateways;
        if (!$actives || count($actives) < 1) {
            $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL);
            echo '<div class="error">
				 <p>' . sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"), "<a href='{$url}'>", "</a>") . '</p>
			 </div>';
        }
    }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:13,代码来源:Payments_Admin_Page_Init.core.php

示例9: ee_deprecated_update_attendee_registration_form_old

/**
 * @deprecated since 4.8.32.rc.000 because it has issues on https://events.codebasehq.com/projects/event-espresso/tickets/9165
 * it is preferred to instead use _update_attendee_registration_form_new() which
 * also better handles form validation. Exits
 * @param EE_Admin_Page $admin_page
 * @return void
 */
function ee_deprecated_update_attendee_registration_form_old($admin_page)
{
    //check if the old hooks are in use. If not, do the default
    if (!ee_deprecated_using_old_registration_admin_custom_questions_form_hooks() || !$admin_page instanceof EE_Admin_Page) {
        return;
    }
    $req_data = $admin_page->get_request_data();
    $qstns = isset($req_data['qstn']) ? $req_data['qstn'] : FALSE;
    $REG_ID = isset($req_data['_REG_ID']) ? absint($req_data['_REG_ID']) : FALSE;
    $qstns = apply_filters('FHEE__Registrations_Admin_Page___update_attendee_registration_form__qstns', $qstns);
    if (!$REG_ID || !$qstns) {
        EE_Error::add_error(__('An error occurred. No registration ID and/or registration questions were received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
    }
    $success = TRUE;
    // allow others to get in on this awesome fun   :D
    do_action('AHEE__Registrations_Admin_Page___save_attendee_registration_form__after_reg_and_attendee_save', $REG_ID, $qstns);
    // loop thru questions... FINALLY!!!
    foreach ($qstns as $QST_ID => $qstn) {
        //if $qstn isn't an array then it doesn't already have an answer, so let's create the answer
        if (!is_array($qstn)) {
            $success = $this->_save_new_answer($REG_ID, $QST_ID, $qstn);
            continue;
        }
        foreach ($qstn as $ANS_ID => $ANS_value) {
            //get answer
            $query_params = array(0 => array('ANS_ID' => $ANS_ID, 'REG_ID' => $REG_ID, 'QST_ID' => $QST_ID));
            $answer = EEM_Answer::instance()->get_one($query_params);
            //this MAY be an array but NOT have an answer because its multi select.  If so then we need to create the answer
            if (!$answer instanceof EE_Answer) {
                $set_values = array('QST_ID' => $QST_ID, 'REG_ID' => $REG_ID, 'ANS_value' => $qstn);
                $success = EEM_Answer::instance()->insert($set_values);
                continue 2;
            }
            $answer->set('ANS_value', $ANS_value);
            $success = $answer->save();
        }
    }
    $what = __('Registration Form', 'event_espresso');
    $route = $REG_ID ? array('action' => 'view_registration', '_REG_ID' => $REG_ID) : array('action' => 'default');
    $admin_page->redirect_after_action($success, $what, __('updated', 'event_espresso'), $route);
    exit;
}
开发者ID:adrianjonmiller,项目名称:hearts-being-healed,代码行数:49,代码来源:EE_Deprecated.core.php

示例10: upload_form

    /**
     *	@ generates HTML for a file upload input and form
     *	@ access 	public
     * 	@param 	string 		$title - heading for the form
     * 	@param 	string 		$intro - additional text explaing what to do
     * 	@param 	string 		$page - EE Admin page to direct form to - in the form "espresso_{pageslug}"
     * 	@param 	string 		$action - EE Admin page route array "action" that form will direct to
     * 	@param 	string 		$type - type of file to import
     *	@ return 	string
     */
    public function upload_form($title, $intro, $form_url, $action, $type)
    {
        $form_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => $action), $form_url);
        ob_start();
        ?>
	<div class="ee-upload-form-dv">
		<h3><?php 
        echo $title;
        ?>
</h3>
		<p><?php 
        echo $intro;
        ?>
</p>

		<form action="<?php 
        echo $form_url;
        ?>
" method="post" enctype="multipart/form-data">
			<input type="hidden" name="csv_submitted" value="TRUE" id="<?php 
        echo time();
        ?>
">
			<input name="import" type="hidden" value="<?php 
        echo $type;
        ?>
" />
			<input type="file" name="file[]" size="90" >
			<input class="button-primary" type="submit" value="<?php 
        _e('Upload File', 'event_espresso');
        ?>
">
		</form>

		<p class="ee-attention">
			<b><?php 
        _e('Attention', 'event_espresso');
        ?>
</b><br/>
			<?php 
        echo sprintf(__('Accepts .%s file types only.', 'event_espresso'), $type);
        ?>
			<?php 
        echo __('Please only import CSV files exported from Event Espresso, or compatible 3rd-party software.', 'event_espresso');
        ?>
		</p>

	</div>

<?php 
        $uploader = ob_get_clean();
        return $uploader;
    }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:63,代码来源:EE_Import.class.php

示例11: column_display_text

 public function column_display_text(EE_Question $item)
 {
     $system_question = $item->is_system_question();
     if (!defined('REG_ADMIN_URL')) {
         define('REG_ADMIN_URL', EVENTS_ADMIN_URL);
     }
     $edit_query_args = array('action' => 'edit_question', 'QST_ID' => $item->ID());
     $edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EE_FORMS_ADMIN_URL);
     $actions = array('edit' => '<a href="' . $edit_link . '" title="' . __('Edit Event', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>');
     $content = '<strong><a class="row-title" href="' . $edit_link . '">' . $item->display_text() . '</a></strong>';
     $content .= $this->row_actions($actions);
     return $content;
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:13,代码来源:Registration_Form_Questions_Admin_List_Table.class.php

示例12: column_DTT_EVT_start

 /**
  * 		column_default
  */
 function column_DTT_EVT_start(EE_Registration $item)
 {
     $datetime_strings = array();
     $remove_defaults = array('default_where_conditions' => 'none');
     $ticket = $item->ticket();
     $datetimes = $ticket instanceof EE_Ticket ? $ticket->datetimes($remove_defaults) : array();
     $query_args = array('action' => 'event_registrations', 'event_id' => $item->event_ID());
     foreach ($datetimes as $datetime) {
         $query_args['DTT_ID'] = $datetime->ID();
         $checkin_url = EE_Admin_Page::add_query_args_and_nonce($query_args, REG_ADMIN_URL);
         $datetime_strings[] = EE_Registry::instance()->CAP->current_user_can('ee_read_checkin', 'espresso_registrations_registration_checkins', $item->ID()) ? '<a href="' . $checkin_url . '" title="' . esc_attr__('View Checkins for this Event', 'event_espresso') . '">' . $datetime->get_i18n_datetime('DTT_EVT_start') . '</a>' : $datetime->get_i18n_datetime('DTT_EVT_start');
     }
     return implode("<br />", $datetime_strings);
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:17,代码来源:Extend_EE_Registrations_List_Table.class.php

示例13: check_maintenance_mode

    /**
     * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of maintenance mode
     */
    public function check_maintenance_mode()
    {
        if (EE_Maintenance_Mode::instance()->level()) {
            $maintenance_page_url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_MAINTENANCE_ADMIN_URL);
            switch (EE_Maintenance_Mode::instance()->level()) {
                case EE_Maintenance_Mode::level_1_frontend_only_maintenance:
                    echo '<div class="updated">
						<p>' . sprintf(__("Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", "event_espresso"), "<a href='{$maintenance_page_url}'>", "</a>") . '</div>';
                    break;
                case EE_Maintenance_Mode::level_2_complete_maintenance:
                    echo '<div class="error">
						<p>' . sprintf(__("As part of the process for updating Event Espresso, your database also\nneeds to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script. %s Visit the Maintenance Page to get started,%s it only takes a moment.", "event_espresso"), "<a href='{$maintenance_page_url}'>", "</a>") . '</div>';
                    break;
            }
        }
    }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:19,代码来源:Maintenance_Admin_Page_Init.core.php

示例14: check_payment_gateway_setup

    /**
     * Checks that there is at least one active gateway. If not, add a notice
     */
    public function check_payment_gateway_setup()
    {
        //ONLY do this check if models can query
        //and avoid a bug where when we nuke EE4's data that this causes a fatal error
        //because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539
        if (!EE_Maintenance_Mode::instance()->models_can_query() || !EEH_Activation::table_exists(EEM_Payment_Method::instance()->table())) {
            return;
        }
        // ensure Payment_Method model is loaded
        EE_Registry::instance()->load_model('Payment_Method');
        $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart);
        if ($actives < 1) {
            $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL);
            echo '<div class="error">
				 <p>' . sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"), "<a href='{$url}'>", "</a>") . '</p>
			 </div>';
        }
    }
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:21,代码来源:Payments_Admin_Page_Init.core.php

示例15: column_TKT_name

 function column_TKT_name($item)
 {
     //build row actions
     $actions = array();
     //trash links
     if ($item->ID() !== 1) {
         if ($this->_view == 'all') {
             $trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'trash_ticket', 'TKT_ID' => $item->ID()), TICKETS_ADMIN_URL);
             $actions['trash'] = '<a href="' . $trash_lnk_url . '" title="' . esc_attr__('Move Ticket to trash', 'event_espresso') . '">' . __('Trash', 'event_espresso') . '</a>';
         } else {
             // restore price link
             $restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'restore_ticket', 'TKT_ID' => $item->ID()), TICKETS_ADMIN_URL);
             $actions['restore'] = '<a href="' . $restore_lnk_url . '" title="' . esc_attr__('Restore Ticket', 'event_espresso') . '">' . __('Restore', 'event_espresso') . '</a>';
             // delete price link
             $delete_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'delete_ticket', 'TKT_ID' => $item->ID()), TICKETS_ADMIN_URL);
             $actions['delete'] = '<a href="' . $delete_lnk_url . '" title="' . esc_attr__('Delete Ticket Permanently', 'event_espresso') . '">' . __('Delete Permanently', 'event_espresso') . '</a>';
         }
     }
     return $item->get('TKT_name') . $this->row_actions($actions);
 }
开发者ID:DavidSteinbauer,项目名称:event-espresso-core,代码行数:20,代码来源:Tickets_List_Table.class.php


注:本文中的EE_Admin_Page类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。